fds-vue-core 6.0.13 → 6.1.2
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 +39 -0
- package/dist/fds-vue-core.cjs.js +1 -1
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +1 -1
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +16 -4
- package/scripts/cz/.cz-config.cjs +22 -0
- package/scripts/cz/cz-adapter.cjs +112 -0
- package/src/components/FdsWizard/FdsWizard.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fds-vue-core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"description": "FDS Vue Core Component Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
"./eslint.config.base.js": "./configs/eslint.config.base.js",
|
|
29
29
|
"./prettier.config.js": "./configs/prettier.config.js",
|
|
30
30
|
"./vscode-settings.json": "./configs/vscode-settings.json",
|
|
31
|
-
"./vuln-commit": "./scripts/vuln-commit.mjs"
|
|
31
|
+
"./vuln-commit": "./scripts/vuln-commit.mjs",
|
|
32
|
+
"./cz-adapter": "./scripts/cz/cz-adapter.cjs",
|
|
33
|
+
"./cz-config": "./scripts/cz/.cz-config.cjs"
|
|
32
34
|
},
|
|
33
35
|
"files": [
|
|
34
36
|
"dist",
|
|
@@ -67,7 +69,15 @@
|
|
|
67
69
|
"yalc:push": "npm run build && yalc push",
|
|
68
70
|
"serve:playground": "pnpm --dir playground-consumer dev",
|
|
69
71
|
"create:release": "bash ./scripts/release.sh",
|
|
70
|
-
"
|
|
72
|
+
"commit": "git-cz",
|
|
73
|
+
"commit:vuln": "node scripts/vuln-commit.mjs",
|
|
74
|
+
"vuln-commit": "node scripts/vuln-commit.mjs",
|
|
75
|
+
"cz:config": "node -e \"console.log(require('./scripts/cz/.cz-config.cjs'))\""
|
|
76
|
+
},
|
|
77
|
+
"config": {
|
|
78
|
+
"commitizen": {
|
|
79
|
+
"path": "./scripts/cz/cz-adapter.cjs"
|
|
80
|
+
}
|
|
71
81
|
},
|
|
72
82
|
"peerDependencies": {
|
|
73
83
|
"vue": "^3.5.25"
|
|
@@ -93,6 +103,7 @@
|
|
|
93
103
|
"@vitest/eslint-plugin": "^1.5.2",
|
|
94
104
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
95
105
|
"@vue/tsconfig": "^0.8.1",
|
|
106
|
+
"commitizen": "^4.3.1",
|
|
96
107
|
"eslint": "^9.39.2",
|
|
97
108
|
"eslint-plugin-storybook": "^10.1.10",
|
|
98
109
|
"eslint-plugin-vue": "~10.6.2",
|
|
@@ -123,7 +134,8 @@
|
|
|
123
134
|
"overrides": {
|
|
124
135
|
"minimatch": "^10.2.3",
|
|
125
136
|
"flatted": "^3.4.2",
|
|
126
|
-
"lodash": ">=4.18.0"
|
|
137
|
+
"lodash": ">=4.18.0",
|
|
138
|
+
"tmp": "^0.2.4"
|
|
127
139
|
},
|
|
128
140
|
"onlyBuiltDependencies": [
|
|
129
141
|
"@parcel/watcher",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
types: [
|
|
3
|
+
{ value: 'feat', name: 'feat(scope): Added' },
|
|
4
|
+
{ value: 'fix', name: 'fix(scope): Fixed' },
|
|
5
|
+
{ value: 'perf', name: 'perf(scope): Performance' },
|
|
6
|
+
{ value: 'refactor', name: 'refactor(scope): Changed' },
|
|
7
|
+
{ value: 'chore', name: 'chore(scope): Changed' },
|
|
8
|
+
{ value: 'dep', name: 'dep(scope): Dependencies (single package or batch)' },
|
|
9
|
+
{ value: 'vuln', name: 'vuln(scope): Security dependency update (single package or batch)' },
|
|
10
|
+
{ value: 'fix(security)', name: 'fix(security): Security' }
|
|
11
|
+
],
|
|
12
|
+
allowCustomScopes: true,
|
|
13
|
+
allowBreakingChanges: [],
|
|
14
|
+
skipQuestions: ['footer', 'breaking'],
|
|
15
|
+
subjectLimit: 120,
|
|
16
|
+
messages: {
|
|
17
|
+
type: 'Select the type of change you are committing:',
|
|
18
|
+
customScope: 'Packages (for dep/vuln) or scope:',
|
|
19
|
+
subject: 'Commit subject (imperative, no trailing period):',
|
|
20
|
+
body: "Optional body (use '|' for newline):"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
prompter(cz, commit) {
|
|
3
|
+
const types = [
|
|
4
|
+
{ value: "feat", name: "feat(scope): Added" },
|
|
5
|
+
{ value: "fix", name: "fix(scope): Fixed" },
|
|
6
|
+
{ value: "perf", name: "perf(scope): Performance" },
|
|
7
|
+
{ value: "refactor", name: "refactor(scope): Changed" },
|
|
8
|
+
{ value: "chore", name: "chore(scope): Changed" },
|
|
9
|
+
{ value: "docs", name: "docs(scope): Documentation" },
|
|
10
|
+
{ value: "dep", name: "dep(scope): Dependencies (single package or batch)" },
|
|
11
|
+
{ value: "vuln", name: "vuln(scope): Security dependency update (single package or batch)" },
|
|
12
|
+
{ value: "fix(security)", name: "fix(security): Security" },
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const questions = [
|
|
16
|
+
{
|
|
17
|
+
type: "list",
|
|
18
|
+
name: "change_type",
|
|
19
|
+
message: "Select the type of change you are committing",
|
|
20
|
+
choices: types,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: "input",
|
|
24
|
+
name: "scope",
|
|
25
|
+
when: (answers) => !["dep", "vuln"].includes(answers.change_type),
|
|
26
|
+
message: "Scope:",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "input",
|
|
30
|
+
name: "packages",
|
|
31
|
+
when: (answers) => ["dep", "vuln"].includes(answers.change_type),
|
|
32
|
+
message: "Packages:",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "list",
|
|
36
|
+
name: "vuln_change_kind",
|
|
37
|
+
when: (answers) => answers.change_type === "vuln",
|
|
38
|
+
message: "Vulnerability change type:",
|
|
39
|
+
choices: [
|
|
40
|
+
{ value: "override", name: "override" },
|
|
41
|
+
{ value: "bump", name: "bump" },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "input",
|
|
46
|
+
name: "vuln_target_version",
|
|
47
|
+
when: (answers) => answers.change_type === "vuln",
|
|
48
|
+
message: "Target version/range (e.g. 5.2.2 or >=5.2.2):",
|
|
49
|
+
validate: (value) => (value && value.trim() ? true : "Provide a target version/range"),
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: "list",
|
|
53
|
+
name: "dep_change_kind",
|
|
54
|
+
when: (answers) => answers.change_type === "dep",
|
|
55
|
+
message: "Dependency change type:",
|
|
56
|
+
choices: [
|
|
57
|
+
{ value: "new", name: "new package" },
|
|
58
|
+
{ value: "update", name: "updated package" },
|
|
59
|
+
{ value: "remove", name: "removed package" },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "input",
|
|
64
|
+
name: "dep_version",
|
|
65
|
+
when: (answers) => answers.change_type === "dep",
|
|
66
|
+
message: "Version (x.y.z):",
|
|
67
|
+
validate: (value) => (/^\d+\.\d+\.\d+$/.test(value) ? true : "Use format x.y.z"),
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: "input",
|
|
71
|
+
name: "shortcut_id",
|
|
72
|
+
when: (answers) => !["dep", "vuln"].includes(answers.change_type),
|
|
73
|
+
message: "Shortcut ID digits only (optional, e.g. 1234):",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: "input",
|
|
77
|
+
name: "message",
|
|
78
|
+
when: (answers) => !["dep", "vuln"].includes(answers.change_type),
|
|
79
|
+
message: "Commit subject (imperative, no trailing period):",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: "input",
|
|
83
|
+
name: "body",
|
|
84
|
+
message: "Optional body (use '|' for newline):",
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
cz.prompt(questions).then((answers) => {
|
|
89
|
+
const type = answers.change_type;
|
|
90
|
+
const scopeValue = ["dep", "vuln"].includes(type) ? answers.packages : answers.scope;
|
|
91
|
+
const needsEmptyParens = ["dep", "vuln"].includes(type) && !scopeValue;
|
|
92
|
+
const scopePart = scopeValue ? `(${scopeValue})` : needsEmptyParens ? "()" : "";
|
|
93
|
+
const shortcutPart = answers.shortcut_id ? ` [sc-${answers.shortcut_id}]` : "";
|
|
94
|
+
const bodyPart = answers.body ? `\n\n${answers.body.split("|").join("\n")}` : "";
|
|
95
|
+
const depSubject =
|
|
96
|
+
answers.dep_change_kind === "new"
|
|
97
|
+
? `add ${answers.dep_version}`
|
|
98
|
+
: answers.dep_change_kind === "remove"
|
|
99
|
+
? `yeet ${answers.dep_version}`
|
|
100
|
+
: `bump to ${answers.dep_version}`;
|
|
101
|
+
const vulnSubject =
|
|
102
|
+
type === "vuln"
|
|
103
|
+
? answers.vuln_change_kind === "override"
|
|
104
|
+
? `override ${answers.vuln_target_version}`
|
|
105
|
+
: `bump to ${answers.vuln_target_version}`
|
|
106
|
+
: "";
|
|
107
|
+
const subject = type === "dep" ? depSubject : type === "vuln" ? vulnSubject : answers.message;
|
|
108
|
+
const commitMessage = `${type}${scopePart}: ${subject}${shortcutPart}${bodyPart}`;
|
|
109
|
+
commit(commitMessage);
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -77,7 +77,7 @@ const progressWidth = computed(() => {
|
|
|
77
77
|
const stepsCount = entries.length
|
|
78
78
|
if (stepsCount <= 1) return '0%'
|
|
79
79
|
|
|
80
|
-
const targetFullIndex = Math.max(
|
|
80
|
+
const targetFullIndex = Math.max(currentStepIndex.value, maxCompletedStepIndex.value, 0)
|
|
81
81
|
|
|
82
82
|
const targetVisibleEntries = entries
|
|
83
83
|
.map(({ index }, visibleIndex) => ({ fullIndex: index, visibleIndex }))
|