fg-devkit 1.8.0 → 1.8.1

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.
@@ -5,33 +5,33 @@
5
5
  "@lexical/html": "0.30.0",
6
6
  "@lexical/list": "0.30.0",
7
7
  "@lexical/rich-text": "0.30.0",
8
- "@piwikpro/vue-piwik-pro": "1.4.0",
9
- "@sentry/browser": "10.50.0",
8
+ "@piwikpro/vue-piwik-pro": "1.7.0",
9
+ "@sentry/browser": "10.52.0",
10
10
  "@sentry/tracing": "7.120.4",
11
- "@sentry/vue": "10.50.0",
12
- "@sentry/wasm": "10.50.0",
13
- "@tailwindcss/postcss": "4.2.4",
11
+ "@sentry/vue": "10.52.0",
12
+ "@sentry/wasm": "10.52.0",
13
+ "@tailwindcss/postcss": "4.3.0",
14
14
  "@tanstack/vue-query": "5.100.9",
15
- "@types/leaflet": "1.5.7",
15
+ "@types/leaflet": "1.9.21",
16
16
  "@unhead/vue": "2.0.5",
17
17
  "@vue-leaflet/vue-leaflet": "0.10.1",
18
18
  "@vuelidate/core": "2.0.3",
19
19
  "@vuelidate/validators": "2.0.4",
20
20
  "@vueuse/components": "12.7.0",
21
- "@vueuse/core": "14.2.1",
21
+ "@vueuse/core": "14.3.0",
22
22
  "chart.js": "4.5.1",
23
23
  "content-disposition-header": "0.6.0",
24
24
  "date-fns": "4.1.0",
25
- "element-plus": "2.9.7",
26
- "fds-vue-core": "7.1.4",
25
+ "element-plus": "2.14.0",
26
+ "fds-vue-core": "7.1.6",
27
27
  "imask": "7.6.1",
28
- "leaflet": "1.8.0",
28
+ "leaflet": "1.9.4",
29
29
  "lexical": "0.30.0",
30
30
  "lodash": "4.18.1",
31
31
  "lodash-es": "4.18.1",
32
32
  "markdown-it": "14.1.1",
33
33
  "pinia": "3.0.4",
34
- "playwright": "1.57.0",
34
+ "playwright": "1.59.1",
35
35
  "quill": "2.0.3",
36
36
  "randexp": "0.5.3",
37
37
  "register-service-worker": "1.7.2",
@@ -39,7 +39,7 @@
39
39
  "vega-lite": "6.4.3",
40
40
  "vue-chartjs": "5.3.3",
41
41
  "vue-i18n": "11.4.2",
42
- "vue-quilly": "1.0.5",
42
+ "vue-quilly": "1.1.6",
43
43
  "vue-router": "4.6.3",
44
44
  "vue3-touch-keyboard": "1.3.9",
45
45
  "vuex": "4.1.0",
@@ -47,15 +47,15 @@
47
47
  "yup": "1.7.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@chromatic-com/storybook": "5.0.1",
50
+ "@chromatic-com/storybook": "5.1.2",
51
51
  "@eslint/js": "9.39.1",
52
52
  "@intlify/unplugin-vue-i18n": "11.1.2",
53
53
  "@playwright/test": "1.59.1",
54
- "@storybook/addon-a11y": "10.1.10",
55
- "@storybook/addon-docs": "10.1.10",
56
- "@storybook/addon-vitest": "10.2.12",
57
- "@storybook/vue3": "10.2.12",
58
- "@storybook/vue3-vite": "10.2.12",
54
+ "@storybook/addon-a11y": "10.3.6",
55
+ "@storybook/addon-docs": "10.3.6",
56
+ "@storybook/addon-vitest": "10.3.6",
57
+ "@storybook/vue3": "10.3.6",
58
+ "@storybook/vue3-vite": "10.3.6",
59
59
  "@tanstack/vue-query-devtools": "6.1.28",
60
60
  "@tsconfig/node22": "22.0.5",
61
61
  "@types/lodash-es": "4.17.12",
@@ -68,28 +68,28 @@
68
68
  "@vuepic/vue-datepicker": "6.0.3",
69
69
  "arg": "5.0.2",
70
70
  "babel-eslint": "10.1.0",
71
- "eslint-plugin-storybook": "10.1.10",
71
+ "eslint-plugin-storybook": "10.3.6",
72
72
  "globals": "15.11.0",
73
73
  "jsdom": "26.1.0",
74
74
  "postcss": "8.5.14",
75
75
  "sass": "1.99.0",
76
76
  "start-server-and-test": "2.1.3",
77
- "storybook": "10.2.12",
77
+ "storybook": "10.3.6",
78
78
  "tsx": "4.21.0",
79
79
  "vega": "6.2.0",
80
80
  "vite-plugin-dts": "4.5.4",
81
- "vite-plugin-vue-devtools": "8.1.1",
81
+ "vite-plugin-vue-devtools": "8.1.2",
82
82
  "vitest": "3.2.4",
83
- "yaml": "2.8.4"
83
+ "yaml": "2.9.0"
84
84
  }
85
85
  },
86
86
  "managedAnywhere": {
87
- "@tailwindcss/vite": "4.2.4",
87
+ "@tailwindcss/vite": "4.3.0",
88
88
  "@vitejs/plugin-vue": "6.0.6",
89
89
  "axios": "1.16.0",
90
90
  "dotenv": "16.4.5",
91
- "qrcode.vue": "3.8.1",
92
- "tailwindcss": "4.2.4",
91
+ "qrcode.vue": "3.9.0",
92
+ "tailwindcss": "4.3.0",
93
93
  "vite": "7.3.2",
94
94
  "vue": "3.5.34"
95
95
  },
@@ -1,7 +1,7 @@
1
1
  pre-commit:
2
2
  commands:
3
3
  audit:
4
- run: zsh -lc "pnpm audit"
4
+ run: zsh -lc "node ./node_modules/fg-devkit/scripts/lefthook-audit-if-enabled.mjs"
5
5
  lint-check:
6
6
  run: zsh -lc "node ./node_modules/fg-devkit/scripts/fg-devkit.mjs lint ."
7
7
  typecheck:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fg-devkit",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Shared configs, scripts, and DX tooling for Vue / TypeScript frontend repos",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -45,6 +45,7 @@
45
45
  "./scripts/poeditor-upload.mjs": "./scripts/poeditor-upload.mjs",
46
46
  "./scripts/scaffold-vue.mjs": "./scripts/scaffold-vue.mjs",
47
47
  "./scripts/fg-devkit.mjs": "./scripts/fg-devkit.mjs",
48
+ "./scripts/lefthook-audit-if-enabled.mjs": "./scripts/lefthook-audit-if-enabled.mjs",
48
49
  "./scripts/release.sh": "./scripts/release.sh",
49
50
  "./scripts/cz/.cz-config.cjs": "./scripts/cz/.cz-config.cjs",
50
51
  "./cursor-rules/core-coding-standards.mdc": "./.cursor/rules/core-coding-standards.mdc"
@@ -15,16 +15,16 @@
15
15
  "poeditor:upload": "pnpm exec fg-devkit poeditor-upload"
16
16
  },
17
17
  "dependencies": {
18
- "@tailwindcss/postcss": "4.2.4",
19
- "@tailwindcss/vite": "4.2.4",
18
+ "@tailwindcss/postcss": "4.3.0",
19
+ "@tailwindcss/vite": "4.3.0",
20
20
  "@tanstack/vue-query": "5.100.9",
21
21
  "axios": "1.16.0",
22
22
  "content-disposition-header": "0.6.0",
23
23
  "date-fns": "4.1.0",
24
24
  "dotenv": "16.4.5",
25
- "fds-vue-core": "7.1.4",
25
+ "fds-vue-core": "7.1.6",
26
26
  "pinia": "3.0.4",
27
- "qrcode.vue": "3.8.1",
27
+ "qrcode.vue": "3.9.0",
28
28
  "vue": "3.5.34",
29
29
  "vue-i18n": "11.4.2",
30
30
  "vue-router": "4.6.3"
@@ -34,9 +34,9 @@
34
34
  "@tanstack/vue-query-devtools": "6.1.28",
35
35
  "@types/node": "22.16.5",
36
36
  "@vitejs/plugin-vue": "6.0.6",
37
- "fg-devkit": "1.8.0",
37
+ "fg-devkit": "1.8.1",
38
38
  "start-server-and-test": "2.1.3",
39
- "tailwindcss": "4.2.4",
39
+ "tailwindcss": "4.3.0",
40
40
  "tsx": "4.21.0",
41
41
  "vite": "7.3.2"
42
42
  },
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * cz-git config used by fg-devkit commit flows.
3
3
  * Keep this in czrc-compatible shape for `czg --config`.
4
+ *
5
+ * Note: interactive `fg-devkit commit` asks each dep/vuln commit whether Lefthook should run
6
+ * `pnpm audit` for that commit only (via env, not persisted).
4
7
  */
5
8
  module.exports = {
6
9
  types: [
@@ -273,6 +273,18 @@ async function runCzg(args = [], extraEnv = {}) {
273
273
  })
274
274
  }
275
275
 
276
+ let runLefthookAuditThisCommit = true
277
+ if (isDepOrVuln) {
278
+ runLefthookAuditThisCommit = await selectPrompt({
279
+ message: 'Run pnpm audit on commit (Lefthook pre-commit)?',
280
+ choices: [
281
+ { value: true, name: 'Yes' },
282
+ { value: false, name: 'No' },
283
+ ],
284
+ default: true,
285
+ })
286
+ }
287
+
276
288
  if (!isDepOrVuln) {
277
289
  shortcutId = await ask('Shortcut ID digits only (optional, e.g. 1234):')
278
290
  subject = await ask('Commit subject (imperative, no trailing period):', {
@@ -293,10 +305,16 @@ async function runCzg(args = [], extraEnv = {}) {
293
305
  const finalSubject = selectedType === 'dep' ? depSubject : selectedType === 'vuln' ? vulnSubject : subject
294
306
  const commitMessage = `${selectedType}${scopePart}: ${finalSubject}${shortcutPart}${bodyPart}`
295
307
 
308
+ const gitEnv = { ...process.env, ...extraEnv }
309
+ delete gitEnv.FG_DEVKIT_LEFTHOOK_AUDIT
310
+ if (isDepOrVuln) {
311
+ gitEnv.FG_DEVKIT_LEFTHOOK_AUDIT = runLefthookAuditThisCommit ? '1' : '0'
312
+ }
313
+
296
314
  const r = spawnSync('git', ['commit', ...args, '-m', commitMessage], {
297
315
  stdio: 'inherit',
298
316
  cwd: process.cwd(),
299
- env: { ...process.env, ...extraEnv },
317
+ env: gitEnv,
300
318
  })
301
319
  if (r.error) {
302
320
  console.error('[fg-devkit]', r.error.message)
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Lefthook pre-commit helper: runs `pnpm audit` unless this commit was started with
4
+ * `FG_DEVKIT_LEFTHOOK_AUDIT=0` (set only for the current `git commit` by `fg-devkit commit`
5
+ * when the user chooses "No" on dep/vuln). Unset or `1` runs audit.
6
+ */
7
+ import { spawnSync } from 'node:child_process'
8
+
9
+ function shouldRunAudit() {
10
+ const v = process.env.FG_DEVKIT_LEFTHOOK_AUDIT
11
+ return v !== '0' && v !== 'false'
12
+ }
13
+
14
+ if (!shouldRunAudit()) {
15
+ console.log('[fg-devkit] Skipping pnpm audit (FG_DEVKIT_LEFTHOOK_AUDIT=0 for this commit).')
16
+ process.exit(0)
17
+ }
18
+
19
+ const r = spawnSync('pnpm', ['audit'], {
20
+ stdio: 'inherit',
21
+ cwd: process.cwd(),
22
+ })
23
+ process.exit(r.status ?? 1)
@@ -6,6 +6,8 @@
6
6
  * - removes legacy lint-staged config block from package.json
7
7
  * - removes legacy prepare hook scripts for husky/lefthook bootstrap
8
8
  *
9
+ * Lefthook `audit` skips only when `FG_DEVKIT_LEFTHOOK_AUDIT=0` for that commit (dep/vuln flow).
10
+ *
9
11
  * Usage:
10
12
  * node node_modules/fg-devkit/scripts/sync-consumer-lefthook.mjs
11
13
  * pnpm exec fg-devkit setup-lefthook