create-packer 1.45.3 → 1.45.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-packer",
|
|
3
|
-
"version": "1.45.
|
|
3
|
+
"version": "1.45.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": "https://github.com/kevily/create-packer",
|
|
6
6
|
"author": "1k <bug_zero@163.com>",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@commitlint/cz-commitlint": "17.4.2",
|
|
31
31
|
"@types/fs-extra": "9.0.12",
|
|
32
32
|
"@types/inquirer": "7.3.3",
|
|
33
|
-
"@types/node": "
|
|
33
|
+
"@types/node": "18",
|
|
34
34
|
"commitizen": "4.3.0",
|
|
35
35
|
"eslint": "9.17.0",
|
|
36
36
|
"globals": "15.12.0",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import eslint from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import tseslint from 'typescript-eslint'
|
|
4
|
+
|
|
5
|
+
export default tseslint.config({
|
|
6
|
+
extends: [eslint.configs.recommended, tseslint.configs.recommended],
|
|
7
|
+
files: ['**/*.{tsx,ts}'],
|
|
8
|
+
ignores: ['**/node_modules/', 'dist/', '.history/', '.vscode'],
|
|
9
|
+
languageOptions: {
|
|
10
|
+
ecmaVersion: 2018,
|
|
11
|
+
sourceType: 'module',
|
|
12
|
+
globals: {
|
|
13
|
+
...globals.browser,
|
|
14
|
+
...globals.node
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
rules: {
|
|
18
|
+
'@typescript-eslint/no-var-requires': 0,
|
|
19
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
20
|
+
'@typescript-eslint/no-explicit-any': 1,
|
|
21
|
+
'@typescript-eslint/no-inferrable-types': [
|
|
22
|
+
'warn',
|
|
23
|
+
{
|
|
24
|
+
ignoreParameters: true
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
28
|
+
'@typescript-eslint/member-delimiter-style': 0,
|
|
29
|
+
'@typescript-eslint/class-name-casing': 0,
|
|
30
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
31
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
32
|
+
semi: ['error', 'never'],
|
|
33
|
+
quotes: 'off'
|
|
34
|
+
}
|
|
35
|
+
})
|
|
@@ -27,22 +27,23 @@
|
|
|
27
27
|
"@inquirer/prompts": "7.0.0",
|
|
28
28
|
"chalk": "5.3.0",
|
|
29
29
|
"commander": "8.1.0",
|
|
30
|
-
"fs-extra": "
|
|
30
|
+
"fs-extra": "11.3.0",
|
|
31
|
+
"lodash": "4.17.21",
|
|
31
32
|
"ora": "8.1.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@commitlint/config-conventional": "^17.
|
|
35
|
+
"@commitlint/config-conventional": "^17.7.0",
|
|
35
36
|
"@commitlint/cz-commitlint": "17.4.2",
|
|
36
37
|
"@types/fs-extra": "9.0.12",
|
|
37
38
|
"@types/inquirer": "7.3.3",
|
|
38
|
-
"@types/node": "
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "4.29.2",
|
|
40
|
-
"@typescript-eslint/parser": "4.29.2",
|
|
39
|
+
"@types/node": "18",
|
|
41
40
|
"commitizen": "4.3.0",
|
|
42
|
-
"eslint": "
|
|
43
|
-
"
|
|
41
|
+
"eslint": "9.17.0",
|
|
42
|
+
"globals": "15.12.0",
|
|
43
|
+
"prettier": "3.2.5",
|
|
44
44
|
"rimraf": "3.0.2",
|
|
45
|
-
"typescript": "
|
|
45
|
+
"typescript": "5.8.2",
|
|
46
|
+
"typescript-eslint": "8.15.0"
|
|
46
47
|
},
|
|
47
48
|
"config": {
|
|
48
49
|
"commitizen": {
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import * as inquirer from '@inquirer/prompts'
|
|
2
|
-
import pkg from '../package.json'
|
|
3
|
-
import { execSync } from 'child_process'
|
|
4
|
-
import chalk from 'chalk'
|
|
5
|
-
|
|
6
|
-
function genPrompt(nextVersion) {
|
|
7
|
-
const version = {
|
|
8
|
-
major: 0,
|
|
9
|
-
minor: 1,
|
|
10
|
-
patch: 2
|
|
11
|
-
}
|
|
12
|
-
const nextVersionIndex = version[nextVersion]
|
|
13
|
-
const newVersion = pkg.version.split('.').map(Number)
|
|
14
|
-
newVersion[nextVersionIndex] += 1
|
|
15
|
-
// 把后续的版本号归零
|
|
16
|
-
// ------------------------------------------------------------------------
|
|
17
|
-
for (let i = nextVersionIndex + 1; i < 3; i++) {
|
|
18
|
-
newVersion[i] = 0
|
|
19
|
-
}
|
|
20
|
-
return `${nextVersion}(${newVersion.join('.')})`
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const versions = {
|
|
24
|
-
[genPrompt('patch')]: 'patch',
|
|
25
|
-
[genPrompt('minor')]: 'minor',
|
|
26
|
-
[genPrompt('major')]: 'major'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
inquirer
|
|
30
|
-
.select({
|
|
31
|
-
message: 'version:',
|
|
32
|
-
choices: Object.keys(versions)
|
|
33
|
-
})
|
|
34
|
-
.then(version => {
|
|
35
|
-
execSync(
|
|
36
|
-
`npm version ${versions[version]} && pnpm publish --registry https://registry.npmjs.org && git push`
|
|
37
|
-
)
|
|
38
|
-
console.log(chalk.blue('Published(*^3^)'))
|
|
39
|
-
})
|
|
1
|
+
import * as inquirer from '@inquirer/prompts'
|
|
2
|
+
import pkg from '../package.json' with { type: 'json' }
|
|
3
|
+
import { execSync } from 'child_process'
|
|
4
|
+
import chalk from 'chalk'
|
|
5
|
+
|
|
6
|
+
function genPrompt(nextVersion) {
|
|
7
|
+
const version = {
|
|
8
|
+
major: 0,
|
|
9
|
+
minor: 1,
|
|
10
|
+
patch: 2
|
|
11
|
+
}
|
|
12
|
+
const nextVersionIndex = version[nextVersion]
|
|
13
|
+
const newVersion = pkg.version.split('.').map(Number)
|
|
14
|
+
newVersion[nextVersionIndex] += 1
|
|
15
|
+
// 把后续的版本号归零
|
|
16
|
+
// ------------------------------------------------------------------------
|
|
17
|
+
for (let i = nextVersionIndex + 1; i < 3; i++) {
|
|
18
|
+
newVersion[i] = 0
|
|
19
|
+
}
|
|
20
|
+
return `${nextVersion}(${newVersion.join('.')})`
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const versions = {
|
|
24
|
+
[genPrompt('patch')]: 'patch',
|
|
25
|
+
[genPrompt('minor')]: 'minor',
|
|
26
|
+
[genPrompt('major')]: 'major'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
inquirer
|
|
30
|
+
.select({
|
|
31
|
+
message: 'version:',
|
|
32
|
+
choices: Object.keys(versions)
|
|
33
|
+
})
|
|
34
|
+
.then(version => {
|
|
35
|
+
execSync(
|
|
36
|
+
`npm version ${versions[version]} && pnpm publish --registry https://registry.npmjs.org && git push`
|
|
37
|
+
)
|
|
38
|
+
console.log(chalk.blue('Published(*^3^)'))
|
|
39
|
+
})
|
package/template/cli/.eslintrc
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@typescript-eslint/parser",
|
|
3
|
-
"plugins": ["@typescript-eslint"],
|
|
4
|
-
"extends": ["eslint:recommended"],
|
|
5
|
-
"env": {
|
|
6
|
-
"browser": true,
|
|
7
|
-
"node": true
|
|
8
|
-
},
|
|
9
|
-
"parserOptions": {
|
|
10
|
-
"ecmaVersion": 2018,
|
|
11
|
-
"sourceType": "module",
|
|
12
|
-
"ecmaFeatures": {
|
|
13
|
-
"jsx": true
|
|
14
|
-
},
|
|
15
|
-
"useJSXTextNode": true
|
|
16
|
-
},
|
|
17
|
-
"rules": {
|
|
18
|
-
"@typescript-eslint/no-var-requires": 0,
|
|
19
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
20
|
-
"@typescript-eslint/no-explicit-any": 1,
|
|
21
|
-
"@typescript-eslint/no-inferrable-types": [
|
|
22
|
-
"warn",
|
|
23
|
-
{
|
|
24
|
-
"ignoreParameters": true
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
28
|
-
"@typescript-eslint/member-delimiter-style": 0,
|
|
29
|
-
"@typescript-eslint/class-name-casing": 0,
|
|
30
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
31
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
32
|
-
"semi": ["error", "never"],
|
|
33
|
-
"quotes": "off"
|
|
34
|
-
}
|
|
35
|
-
}
|