fg-devkit 1.7.12 → 1.7.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fg-devkit",
3
- "version": "1.7.12",
3
+ "version": "1.7.14",
4
4
  "description": "Shared configs, scripts, and DX tooling for Vue / TypeScript frontend repos",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -34,7 +34,7 @@
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.7.12",
37
+ "fg-devkit": "1.7.14",
38
38
  "start-server-and-test": "2.1.3",
39
39
  "tailwindcss": "4.2.4",
40
40
  "tsx": "4.21.0",
@@ -27,7 +27,7 @@ function runNcu(args = []) {
27
27
  const effectiveArgs =
28
28
  args.length > 0
29
29
  ? args
30
- : ['--interactive', '--format', 'group', '--upgrade', '--packageManager', 'pnpm', '--install', 'never']
30
+ : ['--interactive', '--format', 'group', '--upgrade', '--packageManager', 'pnpm', '--install', 'always']
31
31
 
32
32
  const result = spawnSync(process.execPath, [ncuBin, ...effectiveArgs], {
33
33
  stdio: 'inherit',
@@ -54,6 +54,12 @@ function runGit(args) {
54
54
  return result.status ?? 1
55
55
  }
56
56
 
57
+ function stageExistingFiles(files) {
58
+ const existingFiles = files.filter((filePath) => fs.existsSync(path.join(process.cwd(), filePath)))
59
+ if (existingFiles.length === 0) return 0
60
+ return runGit(['add', '--', ...existingFiles])
61
+ }
62
+
57
63
  function readJson(jsonPath) {
58
64
  return JSON.parse(fs.readFileSync(jsonPath, 'utf8'))
59
65
  }
@@ -123,7 +129,7 @@ function main() {
123
129
  }
124
130
 
125
131
  const [only] = changed
126
- const stageExitCode = runGit(['add', '--', 'package.json'])
132
+ const stageExitCode = stageExistingFiles(['package.json', 'pnpm-lock.yaml'])
127
133
  if (stageExitCode !== 0) {
128
134
  process.exit(stageExitCode)
129
135
  }