fg-devkit 1.24.3 → 1.25.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "toolchain": {
3
- "packageManager": "pnpm@12.11.2",
3
+ "packageManager": "pnpm@12.14.0",
4
4
  "node": {
5
5
  "nvmrc": "22",
6
6
  "engines": ">=22.13.0",
@@ -17,8 +17,8 @@
17
17
  "@lexical/rich-text": "0.52.0",
18
18
  "@lexical/link": "0.52.0",
19
19
  "@piwikpro/vue-piwik-pro": "2.0.0",
20
- "@sentry/vue": "11.7.0",
21
- "@tanstack/vue-query": "5.104.3",
20
+ "@sentry/vue": "11.8.0",
21
+ "@tanstack/vue-query": "5.104.5",
22
22
  "@types/leaflet": "1.9.22",
23
23
  "@unhead/vue": "2.0.5",
24
24
  "@vue-leaflet/vue-leaflet": "0.10.1",
@@ -30,13 +30,13 @@
30
30
  "content-disposition-header": "0.6.0",
31
31
  "date-fns": "4.4.0",
32
32
  "element-plus": "2.14.7",
33
- "fds-vue-core": "8.11.0",
33
+ "fds-vue-core": "8.11.2",
34
34
  "imask": "7.6.1",
35
35
  "leaflet": "1.9.4",
36
36
  "lexical": "0.52.0",
37
37
  "lodash": "4.18.1",
38
38
  "lodash-es": "4.18.1",
39
- "markdown-it": "15.0.2",
39
+ "markdown-it": "15.0.3",
40
40
  "pinia": "4.1.0",
41
41
  "playwright": "1.64.1",
42
42
  "quill": "2.0.3",
@@ -45,7 +45,7 @@
45
45
  "vega-embed": "7.3.0",
46
46
  "vega-lite": "6.5.0",
47
47
  "vue-chartjs": "5.3.4",
48
- "vue-i18n": "11.4.14",
48
+ "vue-i18n": "11.4.16",
49
49
  "vue-quilly": "1.1.6",
50
50
  "vue-router": "5.4.0",
51
51
  "vue3-touch-keyboard": "1.3.9",
@@ -54,37 +54,37 @@
54
54
  "yup": "1.7.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@chromatic-com/storybook": "5.5.1",
57
+ "@chromatic-com/storybook": "5.6.0",
58
58
  "@eslint/js": "9.39.1",
59
- "@intlify/unplugin-vue-i18n": "11.2.6",
59
+ "@intlify/unplugin-vue-i18n": "11.2.7",
60
60
  "@playwright/test": "1.64.1",
61
- "@storybook/addon-a11y": "10.6.2",
62
- "@storybook/addon-docs": "10.6.2",
63
- "@storybook/addon-vitest": "10.6.2",
64
- "@storybook/vue3": "10.6.2",
65
- "@storybook/vue3-vite": "10.6.2",
66
- "@tanstack/vue-query-devtools": "6.3.3",
61
+ "@storybook/addon-a11y": "10.6.3",
62
+ "@storybook/addon-docs": "10.6.3",
63
+ "@storybook/addon-vitest": "10.6.3",
64
+ "@storybook/vue3": "10.6.3",
65
+ "@storybook/vue3-vite": "10.6.3",
66
+ "@tanstack/vue-query-devtools": "6.3.5",
67
67
  "@tsconfig/node22": "22.0.6",
68
68
  "@types/lodash-es": "4.17.12",
69
69
  "@types/node": "22.16.5",
70
- "@vitest/browser": "5.0.4",
70
+ "@vitest/browser": "5.0.5",
71
71
  "@vue/compiler-dom": "3.5.44",
72
72
  "@vue/eslint-config-standard": "8.0.1",
73
73
  "@vue/server-renderer": "3.5.44",
74
74
  "@vue/test-utils": "2.5.1",
75
75
  "arg": "5.0.2",
76
76
  "babel-eslint": "10.1.0",
77
- "eslint-plugin-storybook": "10.6.2",
77
+ "eslint-plugin-storybook": "10.6.3",
78
78
  "globals": "15.11.0",
79
- "jsdom": "30.1.2",
80
- "sass": "1.105.1",
81
- "storybook": "10.6.2",
79
+ "jsdom": "30.1.3",
80
+ "sass": "1.106.0",
81
+ "storybook": "10.6.3",
82
82
  "tsx": "4.23.15",
83
83
  "vega": "6.4.0",
84
84
  "vite-plugin-dts": "5.1.2",
85
85
  "vite-plugin-vue-devtools": "8.2.1",
86
86
  "vite-plugin-vue-inspector": "7.0.0",
87
- "vitest": "5.0.4",
87
+ "vitest": "5.0.5",
88
88
  "yaml": "2.9.1"
89
89
  }
90
90
  },
@@ -95,7 +95,7 @@
95
95
  "dotenv": "18.0.8",
96
96
  "qrcode.vue": "3.11.0",
97
97
  "tailwindcss": "4.3.3",
98
- "vite": "8.3.4",
98
+ "vite": "8.3.5",
99
99
  "vue": "3.5.44"
100
100
  }
101
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fg-devkit",
3
- "version": "1.24.3",
3
+ "version": "1.25.0",
4
4
  "description": "Shared configs, scripts, and DX tooling for Vue / TypeScript frontend repos",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -47,20 +47,20 @@
47
47
  "vue"
48
48
  ],
49
49
  "dependencies": {
50
- "@inquirer/checkbox": "5.2.6",
51
- "@inquirer/confirm": "6.3.3",
52
- "@inquirer/input": "5.1.7",
53
- "@inquirer/select": "5.2.6",
50
+ "@inquirer/checkbox": "5.2.7",
51
+ "@inquirer/confirm": "6.3.4",
52
+ "@inquirer/input": "5.1.8",
53
+ "@inquirer/select": "5.2.7",
54
54
  "@intlify/eslint-plugin-vue-i18n": "4.5.1",
55
- "@typescript-eslint/eslint-plugin": "8.71.2",
56
- "@typescript-eslint/parser": "8.71.2",
55
+ "@typescript-eslint/eslint-plugin": "8.72.0",
56
+ "@typescript-eslint/parser": "8.72.0",
57
57
  "@vitest/eslint-plugin": "1.6.27",
58
58
  "@vue/eslint-config-prettier": "10.2.0",
59
- "eslint": "10.12.0",
59
+ "eslint": "10.13.0",
60
60
  "eslint-plugin-prettier": "5.5.7",
61
61
  "eslint-plugin-vue": "10.11.1",
62
62
  "eslint-plugin-vuejs-accessibility": "2.6.2",
63
- "fallow": "3.33.1",
63
+ "fallow": "3.34.1",
64
64
  "git-cliff": "2.14.2",
65
65
  "lefthook": "2.2.2",
66
66
  "npm-check-updates": "23.1.1",
@@ -16,30 +16,30 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@tailwindcss/vite": "4.3.3",
19
- "@tanstack/vue-query": "5.104.3",
19
+ "@tanstack/vue-query": "5.104.5",
20
20
  "axios": "1.20.0",
21
21
  "content-disposition-header": "0.6.0",
22
22
  "date-fns": "4.4.0",
23
23
  "dotenv": "18.0.8",
24
- "fds-vue-core": "8.11.0",
24
+ "fds-vue-core": "8.11.2",
25
25
  "pinia": "4.1.0",
26
26
  "qrcode.vue": "3.11.0",
27
27
  "vue": "3.5.44",
28
- "vue-i18n": "11.4.14",
28
+ "vue-i18n": "11.4.16",
29
29
  "vue-router": "5.4.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@intlify/unplugin-vue-i18n": "11.2.6",
33
- "@tanstack/vue-query-devtools": "6.3.3",
32
+ "@intlify/unplugin-vue-i18n": "11.2.7",
33
+ "@tanstack/vue-query-devtools": "6.3.5",
34
34
  "@types/node": "22.16.5",
35
- "fg-devkit": "1.24.3",
35
+ "fg-devkit": "1.25.0",
36
36
  "@vitejs/plugin-vue": "6.0.10",
37
37
  "tailwindcss": "4.3.3",
38
38
  "tsx": "4.23.15",
39
- "vite": "8.3.4",
39
+ "vite": "8.3.5",
40
40
  "vite-plugin-vue-inspector": "7.0.0"
41
41
  },
42
- "packageManager": "pnpm@12.11.2",
42
+ "packageManager": "pnpm@12.14.0",
43
43
  "engines": {
44
44
  "node": ">=22.13.0"
45
45
  }
@@ -195,8 +195,15 @@ function assertCleanGitState() {
195
195
  }
196
196
  }
197
197
 
198
+ let gitPrefix
199
+
200
+ function repoPath(file) {
201
+ gitPrefix ??= runOrFail('git', ['rev-parse', '--show-prefix'], { capture: true }).stdout.trim()
202
+ return `${gitPrefix}${file}`
203
+ }
204
+
198
205
  function headContent(file) {
199
- const result = run('git', ['show', `HEAD:${file}`], { capture: true })
206
+ const result = run('git', ['show', `HEAD:${repoPath(file)}`], { capture: true })
200
207
  return result.status === 0 ? result.stdout : undefined
201
208
  }
202
209
 
@@ -205,11 +212,11 @@ function stageContents(contents) {
205
212
  let staged = 0
206
213
  for (const [file, content] of Object.entries(contents)) {
207
214
  if (content === undefined || content === headContent(file)) continue
208
- const sha = runOrFail('git', ['hash-object', '-w', '--stdin', `--path=${file}`], {
215
+ const sha = runOrFail('git', ['hash-object', '-w', '--stdin', `--path=${repoPath(file)}`], {
209
216
  capture: true,
210
217
  input: content,
211
218
  }).stdout.trim()
212
- runOrFail('git', ['update-index', '--add', '--cacheinfo', `100644,${sha},${file}`])
219
+ runOrFail('git', ['update-index', '--add', '--cacheinfo', `100644,${sha},${repoPath(file)}`])
213
220
  staged += 1
214
221
  }
215
222
  return staged
@@ -43,6 +43,14 @@ function isPnpmProject(pkg) {
43
43
  )
44
44
  }
45
45
 
46
+ const SEVERITY_ORDER = ['critical', 'high', 'moderate', 'low', 'info']
47
+
48
+ function formatSeverityCounts(severityMap = {}) {
49
+ return SEVERITY_ORDER.filter((severity) => Number(severityMap[severity] || 0) > 0)
50
+ .map((severity) => `${severity}=${severityMap[severity]}`)
51
+ .join(', ')
52
+ }
53
+
46
54
  function countTotal(severityMap = {}) {
47
55
  return Object.values(severityMap).reduce((sum, n) => sum + Number(n || 0), 0)
48
56
  }
@@ -153,9 +161,11 @@ for (const repoDir of uniqueRepos) {
153
161
 
154
162
  results.push({
155
163
  repoName,
164
+ repoLabel: path.relative(projectsRoot, repoDir).split(path.sep).join('/') || repoName,
156
165
  vulnerabilities,
157
166
  total,
158
167
  dependencies: report.metadata?.totalDependencies ?? 0,
168
+ advisories: Object.values(report.advisories ?? {}),
159
169
  })
160
170
 
161
171
  if (delayMs > 0) {
@@ -165,10 +175,38 @@ for (const repoDir of uniqueRepos) {
165
175
 
166
176
  console.log('\n[fleet-vulns] Summary')
167
177
  for (const r of results) {
168
- const v = r.vulnerabilities
169
- console.log(
170
- `- ${r.repoName}: total=${r.total} (critical=${v.critical ?? 0}, high=${v.high ?? 0}, moderate=${v.moderate ?? 0}, low=${v.low ?? 0}, info=${v.info ?? 0}) deps=${r.dependencies}`,
178
+ const severityCounts = formatSeverityCounts(r.vulnerabilities)
179
+ console.log(`- ${r.repoName}: total=${r.total}${severityCounts ? ` (${severityCounts})` : ''} deps=${r.dependencies}`)
180
+ }
181
+
182
+ const advisoriesById = new Map()
183
+ for (const r of results) {
184
+ for (const advisory of r.advisories) {
185
+ const key = advisory.github_advisory_id ?? String(advisory.id)
186
+ const entry = advisoriesById.get(key) ?? { advisory, repos: new Map() }
187
+ const versions = entry.repos.get(r.repoLabel) ?? new Set()
188
+ for (const finding of advisory.findings ?? []) versions.add(finding.version)
189
+ entry.repos.set(r.repoLabel, versions)
190
+ advisoriesById.set(key, entry)
191
+ }
192
+ }
193
+
194
+ if (advisoriesById.size > 0) {
195
+ console.log('\n[fleet-vulns] Vulnerabilities')
196
+ const sortedEntries = [...advisoriesById.values()].sort(
197
+ (a, b) =>
198
+ SEVERITY_ORDER.indexOf(a.advisory.severity) - SEVERITY_ORDER.indexOf(b.advisory.severity) ||
199
+ b.repos.size - a.repos.size ||
200
+ a.advisory.module_name.localeCompare(b.advisory.module_name),
171
201
  )
202
+ for (const { advisory, repos } of sortedEntries) {
203
+ console.log(`- [${advisory.severity}] ${advisory.module_name}: ${advisory.title}`)
204
+ console.log(` ${advisory.url} (patched: ${advisory.patched_versions ?? 'no fix yet'})`)
205
+ console.log(` repos (${repos.size}):`)
206
+ for (const [repoLabel, versions] of repos) {
207
+ console.log(` - ${repoLabel} @ ${[...versions].join(', ')}`)
208
+ }
209
+ }
172
210
  }
173
211
 
174
212
  if (results.length === 0) {