@itcase/config 1.6.73 → 1.6.75
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/commitlint/commitizenAdapter.js +14 -4
- package/commitlint/commitlintCommon.js +1 -1
- package/package.json +17 -15
- package/smart-commit/cli.js +11 -3
- package/svgr/index.js +1 -0
|
@@ -28,7 +28,9 @@ function buildTypeChoices(types, typeEnum) {
|
|
|
28
28
|
const name = meta
|
|
29
29
|
? [meta.emoji, value, meta.description].filter(Boolean).join(': ')
|
|
30
30
|
: value
|
|
31
|
-
|
|
31
|
+
// `short` is what inquirer reprints after select. Without it the
|
|
32
|
+
// full emoji + description wraps and the next input line jumps.
|
|
33
|
+
return { name: name, short: value, value: value }
|
|
32
34
|
})
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -82,7 +84,11 @@ async function prompter(inquirer, commit) {
|
|
|
82
84
|
type: 'list',
|
|
83
85
|
name: 'scope',
|
|
84
86
|
message: messages.scope,
|
|
85
|
-
choices: scopeList.map((value) => ({
|
|
87
|
+
choices: scopeList.map((value) => ({
|
|
88
|
+
name: value,
|
|
89
|
+
short: value,
|
|
90
|
+
value: value,
|
|
91
|
+
})),
|
|
86
92
|
},
|
|
87
93
|
{
|
|
88
94
|
type: 'list',
|
|
@@ -91,9 +97,13 @@ async function prompter(inquirer, commit) {
|
|
|
91
97
|
choices: function (answers) {
|
|
92
98
|
const subs = isScopesArray ? [] : SCOPES[answers.scope] || []
|
|
93
99
|
return [
|
|
94
|
-
...subs.map((value) => ({
|
|
100
|
+
...subs.map((value) => ({
|
|
101
|
+
name: value,
|
|
102
|
+
short: value,
|
|
103
|
+
value: value,
|
|
104
|
+
})),
|
|
95
105
|
new inquirer.Separator(),
|
|
96
|
-
{ name: 'none', value: '' },
|
|
106
|
+
{ name: 'none', short: 'none', value: '' },
|
|
97
107
|
]
|
|
98
108
|
},
|
|
99
109
|
when: function (answers) {
|
|
@@ -16,7 +16,7 @@ export const commonRules = {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const promptSubjectDescription =
|
|
19
|
-
'Short
|
|
19
|
+
'Short description (lower-case, no camelCase)'
|
|
20
20
|
|
|
21
21
|
export const promptSubjectRules = [
|
|
22
22
|
'lower-case only (commitlint subject-case)',
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/config",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.75",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "ITCase Config",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": "
|
|
7
|
+
"node": "^22.22.3 || ^24.15.0 || >=26.0"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
10
|
"itcase-config-husky-hooks": "./husky-hooks/run.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@commitlint/config-conventional": "^21.2.2",
|
|
45
45
|
"@commitlint/cz-commitlint": "^21.2.2",
|
|
46
46
|
"@lehoczky/postcss-fluid": "^1.0.3",
|
|
47
|
-
"@lerna-lite/cli": "^5.6.
|
|
48
|
-
"@lerna-lite/exec": "^5.6.
|
|
49
|
-
"@lerna-lite/list": "^5.6.
|
|
50
|
-
"@lerna-lite/run": "^5.6.
|
|
51
|
-
"@lerna-lite/watch": "^5.6.
|
|
47
|
+
"@lerna-lite/cli": "^5.6.1",
|
|
48
|
+
"@lerna-lite/exec": "^5.6.1",
|
|
49
|
+
"@lerna-lite/list": "^5.6.1",
|
|
50
|
+
"@lerna-lite/run": "^5.6.1",
|
|
51
|
+
"@lerna-lite/watch": "^5.6.1",
|
|
52
52
|
"@rollup/plugin-alias": "^6.0.0",
|
|
53
53
|
"@rollup/plugin-babel": "^7.1.0",
|
|
54
54
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
@@ -60,14 +60,16 @@
|
|
|
60
60
|
"@semantic-release/changelog": "^7.0.0",
|
|
61
61
|
"@semantic-release/git": "^11.0.1",
|
|
62
62
|
"@semantic-release/release-notes-generator": "14.1.1",
|
|
63
|
+
"@svgr/plugin-jsx": "^8.1.0",
|
|
64
|
+
"@svgr/plugin-svgo": "^8.1.0",
|
|
63
65
|
"@svgr/webpack": "^8.1.0",
|
|
64
66
|
"autoprefixer": "^10.5.4",
|
|
65
67
|
"chokidar-cli": "^3.0.0",
|
|
66
68
|
"commitizen": "^4.3.2",
|
|
67
69
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
68
|
-
"cssnano": "^
|
|
69
|
-
"cssnano-preset-default": "^
|
|
70
|
-
"inquirer": "^14.
|
|
70
|
+
"cssnano": "^9.0.1",
|
|
71
|
+
"cssnano-preset-default": "^9.0.1",
|
|
72
|
+
"inquirer": "^14.2.0",
|
|
71
73
|
"log-update": "^8.0.0",
|
|
72
74
|
"postcss": "^8.5.26",
|
|
73
75
|
"postcss-aspect-ratio-polyfill": "^2.0.0",
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|
|
78
80
|
"postcss-convert-unit": "^0.1.3",
|
|
79
81
|
"postcss-dark-theme-class": "^2.0.0",
|
|
80
|
-
"postcss-discard-duplicates": "^
|
|
82
|
+
"postcss-discard-duplicates": "^9.0.0",
|
|
81
83
|
"postcss-each": "^1.1.0",
|
|
82
84
|
"postcss-easings": "^4.0.0",
|
|
83
85
|
"postcss-extend-rule": "^4.0.0",
|
|
@@ -93,7 +95,7 @@
|
|
|
93
95
|
"postcss-nested-ancestors": "^3.0.0",
|
|
94
96
|
"postcss-normalize": "^13.0.1",
|
|
95
97
|
"postcss-prepend-imports": "^1.0.1",
|
|
96
|
-
"postcss-preset-env": "^11.
|
|
98
|
+
"postcss-preset-env": "^11.5.1",
|
|
97
99
|
"postcss-pxtorem": "^6.1.0",
|
|
98
100
|
"postcss-sort-media-queries": "^6.7.1",
|
|
99
101
|
"postcss-unit": "^0.0.3",
|
|
@@ -107,14 +109,14 @@
|
|
|
107
109
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
108
110
|
"rollup-preserve-directives": "^1.1.3",
|
|
109
111
|
"semantic-release": "^25.0.9",
|
|
110
|
-
"semantic-release-lerna": "^3.6.
|
|
112
|
+
"semantic-release-lerna": "^3.6.3"
|
|
111
113
|
},
|
|
112
114
|
"devDependencies": {
|
|
113
115
|
"@itcase/lint": "^1.1.122",
|
|
114
116
|
"eslint": "9.39.2",
|
|
115
117
|
"husky": "^9.1.7",
|
|
116
|
-
"inquirer": "^14.
|
|
117
|
-
"lint-staged": "^17.
|
|
118
|
+
"inquirer": "^14.2.0",
|
|
119
|
+
"lint-staged": "^17.4.1",
|
|
118
120
|
"prettier": "^3.9.6",
|
|
119
121
|
"storybook": "^10.5.10",
|
|
120
122
|
"stylelint": "^17.14.1",
|
package/smart-commit/cli.js
CHANGED
|
@@ -117,13 +117,21 @@ async function main(argv) {
|
|
|
117
117
|
|
|
118
118
|
let created = 0
|
|
119
119
|
for (const plan of activePlans) {
|
|
120
|
-
|
|
120
|
+
const files = plan.files.filter((file) => fileHasChanges(cwd, file))
|
|
121
|
+
if (!files.length) {
|
|
122
|
+
process.stdout.write(`Skipping empty commit: ${plan.message}\n`)
|
|
123
|
+
continue
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Drop leftover index entries so only this plan's files are committed.
|
|
127
|
+
git(cwd, ['reset', '-q', 'HEAD'])
|
|
128
|
+
git(cwd, ['add', '--', ...files])
|
|
121
129
|
const staged = lines(cwd, ['diff', '--cached', '--name-only'])
|
|
122
|
-
const stagedForPlan =
|
|
130
|
+
const stagedForPlan = files.filter((file) => staged.includes(file))
|
|
123
131
|
if (!stagedForPlan.length) {
|
|
124
132
|
throw new Error(
|
|
125
133
|
`Nothing staged for commit: ${plan.message}\n` +
|
|
126
|
-
`Files: ${
|
|
134
|
+
`Files: ${files.join(', ')}`,
|
|
127
135
|
)
|
|
128
136
|
}
|
|
129
137
|
|