picgo 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/enum.d.ts +2 -2
- package/package.json +2 -2
- package/.github/CODEOWNERS +0 -1
- package/.github/funding.yml +0 -1
- package/.github/workflows/release.yml +0 -60
- package/CHANGELOG.md +0 -690
- package/eslint.config.js +0 -134
- package/logo.png +0 -0
- package/rollup.config.js +0 -80
package/eslint.config.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
const globals = require('globals')
|
|
2
|
-
const js = require('@eslint/js')
|
|
3
|
-
const tsPlugin = require('@typescript-eslint/eslint-plugin')
|
|
4
|
-
const tsParser = require('@typescript-eslint/parser')
|
|
5
|
-
const importPlugin = require('eslint-plugin-import')
|
|
6
|
-
const promisePlugin = require('eslint-plugin-promise')
|
|
7
|
-
const eslintConfigPrettier = require('eslint-config-prettier')
|
|
8
|
-
|
|
9
|
-
const tsEslintRecommendedAdjustments =
|
|
10
|
-
tsPlugin.configs['eslint-recommended'].overrides?.[0]?.rules ?? {}
|
|
11
|
-
|
|
12
|
-
module.exports = [
|
|
13
|
-
{
|
|
14
|
-
ignores: [
|
|
15
|
-
'**/dist/**',
|
|
16
|
-
'**/node_modules/**',
|
|
17
|
-
'**/*.d.ts',
|
|
18
|
-
'.eslintrc.js',
|
|
19
|
-
'bin',
|
|
20
|
-
'scripts/**/*.js'
|
|
21
|
-
],
|
|
22
|
-
linterOptions: {
|
|
23
|
-
reportUnusedDisableDirectives: 'off'
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
...js.configs.recommended,
|
|
28
|
-
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
|
|
29
|
-
ignores: ['**/dist/**', '**/node_modules/**'],
|
|
30
|
-
languageOptions: {
|
|
31
|
-
sourceType: 'commonjs',
|
|
32
|
-
globals: {
|
|
33
|
-
...globals.node,
|
|
34
|
-
...globals.es2022
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
rules: {
|
|
38
|
-
'no-undef': 'off',
|
|
39
|
-
semi: ['error', 'never']
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
files: ['**/*.d.ts'],
|
|
44
|
-
ignores: ['**/dist/**', '**/node_modules/**'],
|
|
45
|
-
languageOptions: {
|
|
46
|
-
parser: tsParser,
|
|
47
|
-
parserOptions: {
|
|
48
|
-
project: './tsconfig.json',
|
|
49
|
-
tsconfigRootDir: __dirname,
|
|
50
|
-
sourceType: 'module'
|
|
51
|
-
},
|
|
52
|
-
globals: {
|
|
53
|
-
...globals.node,
|
|
54
|
-
...globals.es2022
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
plugins: {
|
|
58
|
-
'@typescript-eslint': tsPlugin
|
|
59
|
-
},
|
|
60
|
-
rules: {
|
|
61
|
-
'no-var': 'off',
|
|
62
|
-
'@typescript-eslint/naming-convention': 'off'
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
files: ['src/**/*.ts', 'scripts/**/*.ts', 'types/**/*.ts'],
|
|
67
|
-
ignores: ['**/*.d.ts'],
|
|
68
|
-
languageOptions: {
|
|
69
|
-
parser: tsParser,
|
|
70
|
-
parserOptions: {
|
|
71
|
-
project: './tsconfig.json',
|
|
72
|
-
tsconfigRootDir: __dirname,
|
|
73
|
-
sourceType: 'module'
|
|
74
|
-
},
|
|
75
|
-
globals: {
|
|
76
|
-
...globals.node,
|
|
77
|
-
...globals.es2022
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
plugins: {
|
|
81
|
-
'@typescript-eslint': tsPlugin,
|
|
82
|
-
import: importPlugin,
|
|
83
|
-
promise: promisePlugin
|
|
84
|
-
},
|
|
85
|
-
rules: {
|
|
86
|
-
...tsEslintRecommendedAdjustments,
|
|
87
|
-
...tsPlugin.configs.recommended.rules,
|
|
88
|
-
...tsPlugin.configs['recommended-requiring-type-checking'].rules,
|
|
89
|
-
...promisePlugin.configs.recommended.rules,
|
|
90
|
-
...eslintConfigPrettier.rules,
|
|
91
|
-
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
92
|
-
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
93
|
-
'@typescript-eslint/return-await': 'off',
|
|
94
|
-
'@typescript-eslint/no-floating-promises': 'off',
|
|
95
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
96
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
97
|
-
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
98
|
-
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
99
|
-
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
100
|
-
'@typescript-eslint/no-unsafe-call': 'off',
|
|
101
|
-
'@typescript-eslint/no-unsafe-return': 'off',
|
|
102
|
-
'@typescript-eslint/no-unsafe-function-type': 'off',
|
|
103
|
-
'@typescript-eslint/no-redundant-type-constituents': 'off',
|
|
104
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
105
|
-
'@typescript-eslint/require-await': 'off',
|
|
106
|
-
'@typescript-eslint/no-require-imports': 'off',
|
|
107
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
108
|
-
'@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
109
|
-
'@typescript-eslint/naming-convention': [
|
|
110
|
-
'error',
|
|
111
|
-
{
|
|
112
|
-
selector: 'interface',
|
|
113
|
-
format: ['PascalCase'],
|
|
114
|
-
custom: { regex: '^I[A-Z]', match: true }
|
|
115
|
-
}
|
|
116
|
-
],
|
|
117
|
-
'import/no-unresolved': 'off',
|
|
118
|
-
'import/namespace': 'off',
|
|
119
|
-
'import/no-duplicates': 'off',
|
|
120
|
-
'import/default': 'off',
|
|
121
|
-
'import/no-named-as-default': 'off',
|
|
122
|
-
'import/no-named-as-default-member': 'off',
|
|
123
|
-
'promise/always-return': 'off',
|
|
124
|
-
'promise/no-promise-in-callback': 'off',
|
|
125
|
-
semi: ['error', 'never']
|
|
126
|
-
},
|
|
127
|
-
settings: {
|
|
128
|
-
'import/resolver': {
|
|
129
|
-
typescript: true,
|
|
130
|
-
node: true
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
]
|
package/logo.png
DELETED
|
Binary file
|
package/rollup.config.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { readFileSync, existsSync } from 'node:fs'
|
|
2
|
-
import { builtinModules } from 'node:module'
|
|
3
|
-
import terser from '@rollup/plugin-terser'
|
|
4
|
-
|
|
5
|
-
import commonjs from '@rollup/plugin-commonjs'
|
|
6
|
-
import json from '@rollup/plugin-json'
|
|
7
|
-
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
|
8
|
-
import replace from '@rollup/plugin-replace'
|
|
9
|
-
import typescript from '@rollup/plugin-typescript'
|
|
10
|
-
import copy from 'rollup-plugin-copy'
|
|
11
|
-
import { string } from 'rollup-plugin-string'
|
|
12
|
-
|
|
13
|
-
const pkg = JSON.parse(readFileSync('./package.json', 'utf8'))
|
|
14
|
-
|
|
15
|
-
const version = process.env.VERSION || pkg.version
|
|
16
|
-
const sourcemap = true
|
|
17
|
-
const banner = `/*
|
|
18
|
-
* picgo@${version}, https://github.com/PicGo/PicGo-Core
|
|
19
|
-
* (c) 2018-${new Date().getFullYear()} PicGo Group
|
|
20
|
-
* Released under the MIT License.
|
|
21
|
-
*/`
|
|
22
|
-
const input = './src/index.ts'
|
|
23
|
-
|
|
24
|
-
const external = [
|
|
25
|
-
...(Object.keys(pkg.dependencies || {}).map(packageName => new RegExp(`^${packageName}(/.*)?`))),
|
|
26
|
-
...builtinModules.map(moduleName => new RegExp(`^(node:)?${moduleName}(/.*)?`))
|
|
27
|
-
]
|
|
28
|
-
|
|
29
|
-
const plugins = [
|
|
30
|
-
typescript({ tsconfig: './tsconfig.json' }),
|
|
31
|
-
commonjs(),
|
|
32
|
-
nodeResolve({ preferBuiltins: true }),
|
|
33
|
-
string({
|
|
34
|
-
include: ['**/*.applescript', '**/*.ps1', '**/*.sh']
|
|
35
|
-
}),
|
|
36
|
-
json(),
|
|
37
|
-
replace({
|
|
38
|
-
'process.env.PICGO_VERSION': JSON.stringify(pkg.version),
|
|
39
|
-
preventAssignment: true
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
|
|
43
|
-
if (existsSync('assets')) {
|
|
44
|
-
plugins.splice(1, 0, copy({ targets: [{ src: 'assets', dest: 'dist' }] }))
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const isDev = process.env.NODE_ENV === 'development'
|
|
48
|
-
const commonOptions = {
|
|
49
|
-
external,
|
|
50
|
-
plugins,
|
|
51
|
-
input
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (!isDev) {
|
|
55
|
-
commonOptions.plugins.push(terser())
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** @type import('rollup').RollupOptions[] */
|
|
59
|
-
const bundles = [
|
|
60
|
-
{
|
|
61
|
-
output: [{
|
|
62
|
-
file: 'dist/index.cjs.js',
|
|
63
|
-
format: 'cjs',
|
|
64
|
-
banner,
|
|
65
|
-
sourcemap
|
|
66
|
-
}],
|
|
67
|
-
...commonOptions
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
output: [{
|
|
71
|
-
file: 'dist/index.esm.js',
|
|
72
|
-
format: 'esm',
|
|
73
|
-
banner,
|
|
74
|
-
sourcemap
|
|
75
|
-
}],
|
|
76
|
-
...commonOptions
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
|
|
80
|
-
export default bundles
|