fds-vue-core 6.0.11 → 6.0.13
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/dist/apply.css +1 -1
- package/dist/fds-vue-core.cjs.js +44 -6
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +44 -6
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +42 -22
- package/scripts/vuln-commit.mjs +129 -0
- package/src/apply.css +1 -1
- package/src/style.css +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fds-vue-core",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.13",
|
|
4
4
|
"description": "FDS Vue Core Component Library",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"fds-vuln-commit": "./scripts/vuln-commit.mjs"
|
|
8
|
+
},
|
|
6
9
|
"main": "./dist/fds-vue-core.cjs.js",
|
|
7
10
|
"module": "./dist/fds-vue-core.es.js",
|
|
8
11
|
"types": "./components.d.ts",
|
|
@@ -24,7 +27,8 @@
|
|
|
24
27
|
"./tsconfig.base.json": "./configs/tsconfig.base.json",
|
|
25
28
|
"./eslint.config.base.js": "./configs/eslint.config.base.js",
|
|
26
29
|
"./prettier.config.js": "./configs/prettier.config.js",
|
|
27
|
-
"./vscode-settings.json": "./configs/vscode-settings.json"
|
|
30
|
+
"./vscode-settings.json": "./configs/vscode-settings.json",
|
|
31
|
+
"./vuln-commit": "./scripts/vuln-commit.mjs"
|
|
28
32
|
},
|
|
29
33
|
"files": [
|
|
30
34
|
"dist",
|
|
@@ -45,11 +49,31 @@
|
|
|
45
49
|
"engines": {
|
|
46
50
|
"node": "^20.19.0 || >=22.12.0"
|
|
47
51
|
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"serve": "vite",
|
|
54
|
+
"build": "vite build && npm run build:types && cp ./src/tokens.css ./dist/tokens.css && cp ./src/slot-styles.css ./dist/slot-styles.css && cp ./src/apply.css ./dist/apply.css && cp ./src/fonts.css ./dist/fonts.css && cp -r ./public/assets ./dist/assets && mkdir -p ./dist/assets/img/logos && cp -r ./src/assets/img/logos/* ./dist/assets/img/logos/",
|
|
55
|
+
"build:types": "vue-tsc --project tsconfig.build.json",
|
|
56
|
+
"preview": "vite preview",
|
|
57
|
+
"lint": "eslint . --fix",
|
|
58
|
+
"lint:ts": "vue-tsc --noEmit --project tsconfig.app.json && vue-tsc --noEmit --project tsconfig.node.json",
|
|
59
|
+
"lint:all": "pnpm lint && pnpm lint:ts",
|
|
60
|
+
"format": "prettier --write src/",
|
|
61
|
+
"prepublishOnly": "npm run build",
|
|
62
|
+
"storybook": "STORYBOOK=true storybook dev -p 6006",
|
|
63
|
+
"build-storybook": "STORYBOOK=true storybook build",
|
|
64
|
+
"sync:peers": "node scripts/sync-peers-from-dev.mjs",
|
|
65
|
+
"postinstall": "test -f scripts/sync-peers-from-dev.mjs && node scripts/sync-peers-from-dev.mjs || true",
|
|
66
|
+
"yalc:publish": "npm run build && yalc publish",
|
|
67
|
+
"yalc:push": "npm run build && yalc push",
|
|
68
|
+
"serve:playground": "pnpm --dir playground-consumer dev",
|
|
69
|
+
"create:release": "bash ./scripts/release.sh",
|
|
70
|
+
"vuln-commit": "node scripts/vuln-commit.mjs"
|
|
71
|
+
},
|
|
48
72
|
"peerDependencies": {
|
|
49
73
|
"vue": "^3.5.25"
|
|
50
74
|
},
|
|
51
75
|
"dependencies": {
|
|
52
|
-
"axios": "
|
|
76
|
+
"axios": "1.15.0",
|
|
53
77
|
"imask": "^7.6.1",
|
|
54
78
|
"tailwindcss": "^4.1.18"
|
|
55
79
|
},
|
|
@@ -95,22 +119,18 @@
|
|
|
95
119
|
"src/apply.css"
|
|
96
120
|
]
|
|
97
121
|
},
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"serve:playground": "pnpm --dir playground-consumer dev",
|
|
114
|
-
"create:release": "bash ./scripts/release.sh"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
122
|
+
"pnpm": {
|
|
123
|
+
"overrides": {
|
|
124
|
+
"minimatch": "^10.2.3",
|
|
125
|
+
"flatted": "^3.4.2",
|
|
126
|
+
"lodash": ">=4.18.0"
|
|
127
|
+
},
|
|
128
|
+
"onlyBuiltDependencies": [
|
|
129
|
+
"@parcel/watcher",
|
|
130
|
+
"core-js-pure",
|
|
131
|
+
"esbuild",
|
|
132
|
+
"vue-demi"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"packageManager": "pnpm@10.17.1"
|
|
136
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execSync } from "node:child_process";
|
|
4
|
+
|
|
5
|
+
function run(command) {
|
|
6
|
+
try {
|
|
7
|
+
return execSync(command, { encoding: "utf8" }).trim();
|
|
8
|
+
} catch {
|
|
9
|
+
return "";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function runOrThrow(command) {
|
|
14
|
+
return execSync(command, { encoding: "utf8", stdio: "inherit" });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function out(text = "") {
|
|
18
|
+
process.stdout.write(`${text}\n`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function parseJsonAtRef(refPath) {
|
|
22
|
+
const raw = run(`git show ${refPath}`);
|
|
23
|
+
if (!raw) return null;
|
|
24
|
+
try {
|
|
25
|
+
return JSON.parse(raw);
|
|
26
|
+
} catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function readStagedFile(path) {
|
|
32
|
+
return parseJsonAtRef(`:${path}`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function readHeadFile(path) {
|
|
36
|
+
return parseJsonAtRef(`HEAD:${path}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function collectDeps(pkgJson) {
|
|
40
|
+
if (!pkgJson) return {};
|
|
41
|
+
return {
|
|
42
|
+
...(pkgJson.dependencies || {}),
|
|
43
|
+
...(pkgJson.devDependencies || {}),
|
|
44
|
+
...(pkgJson.peerDependencies || {}),
|
|
45
|
+
...(pkgJson.optionalDependencies || {}),
|
|
46
|
+
...(pkgJson.overrides || {}),
|
|
47
|
+
...((pkgJson.pnpm && pkgJson.pnpm.overrides) || {}),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function normalize(version) {
|
|
52
|
+
if (typeof version !== "string") return version;
|
|
53
|
+
return version.trim();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function semverFrom(value) {
|
|
57
|
+
if (typeof value !== "string") return null;
|
|
58
|
+
const match = value.match(/(\d+\.\d+\.\d+)/);
|
|
59
|
+
return match ? match[1] : null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function main() {
|
|
63
|
+
const stagedFiles = run("git diff --cached --name-only")
|
|
64
|
+
.split("\n")
|
|
65
|
+
.map((s) => s.trim())
|
|
66
|
+
.filter(Boolean);
|
|
67
|
+
|
|
68
|
+
const packageJsonPaths = stagedFiles.filter((p) => p.endsWith("package.json"));
|
|
69
|
+
if (packageJsonPaths.length === 0) {
|
|
70
|
+
out("No staged package.json changes found.");
|
|
71
|
+
process.exit(0);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const updates = [];
|
|
75
|
+
|
|
76
|
+
for (const path of packageJsonPaths) {
|
|
77
|
+
const stagedPkg = readStagedFile(path);
|
|
78
|
+
const headPkg = readHeadFile(path) || {};
|
|
79
|
+
if (!stagedPkg) continue;
|
|
80
|
+
|
|
81
|
+
const before = collectDeps(headPkg);
|
|
82
|
+
const after = collectDeps(stagedPkg);
|
|
83
|
+
const keys = new Set([...Object.keys(before), ...Object.keys(after)]);
|
|
84
|
+
|
|
85
|
+
for (const name of keys) {
|
|
86
|
+
const oldV = normalize(before[name]);
|
|
87
|
+
const newV = normalize(after[name]);
|
|
88
|
+
if (oldV && newV && oldV !== newV) {
|
|
89
|
+
updates.push({ name, from: oldV, to: newV, path });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (updates.length === 0) {
|
|
95
|
+
out("No staged dependency version changes found in package.json.");
|
|
96
|
+
process.exit(0);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
out("Detected staged dependency updates:\n");
|
|
100
|
+
for (const u of updates) {
|
|
101
|
+
out(`- ${u.name}: ${u.from} -> ${u.to} (${u.path})`);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const commitMessage =
|
|
105
|
+
updates.length === 1
|
|
106
|
+
? `vuln(${updates[0].name}@${semverFrom(updates[0].from) || updates[0].from}): bump to ${semverFrom(updates[0].to) || updates[0].to}`
|
|
107
|
+
: "vuln(): updated dependencies";
|
|
108
|
+
const commitBody =
|
|
109
|
+
updates.length > 1
|
|
110
|
+
? `updated dependencies\n${updates.map((u) => `- ${u.name}: ${u.from} -> ${u.to}`).join("\n")}`
|
|
111
|
+
: "";
|
|
112
|
+
|
|
113
|
+
const hasStagedChanges = run("git diff --cached --name-only");
|
|
114
|
+
if (!hasStagedChanges) {
|
|
115
|
+
out("\nNo staged changes to commit.");
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const escapedMessage = commitMessage.replace(/"/g, '\\"');
|
|
120
|
+
const escapedBody = commitBody.replace(/"/g, '\\"');
|
|
121
|
+
const commitCommand = commitBody
|
|
122
|
+
? `git commit -m "${escapedMessage}" -m "${escapedBody}"`
|
|
123
|
+
: `git commit -m "${escapedMessage}"`;
|
|
124
|
+
|
|
125
|
+
out(`\nCreating commit:\n${commitMessage}\n`);
|
|
126
|
+
runOrThrow(commitCommand);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
main();
|
package/src/apply.css
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
.link,
|
|
41
41
|
.html a {
|
|
42
|
-
@apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500;
|
|
42
|
+
@apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500 cursor-pointer;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.link--with-parens::before {
|
package/src/style.css
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
.link,
|
|
51
51
|
.html a {
|
|
52
|
-
@apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500;
|
|
52
|
+
@apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500 cursor-pointer;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.capitalize-first::first-letter {
|