@joshuafolkken/kit 1.883.0 → 1.887.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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.883.0",
2
+ "version": "1.887.0",
3
3
  "name": "@joshuafolkken/kit",
4
4
  "type": "module",
5
5
  "license": "MIT",
@@ -120,7 +120,7 @@
120
120
  "devDependencies": {
121
121
  "@actions/expressions": "^0.3.61",
122
122
  "@ianvs/prettier-plugin-sort-imports": "^4.7.1",
123
- "@secretlint/secretlint-rule-preset-recommend": "^13.0.5",
123
+ "@secretlint/secretlint-rule-preset-recommend": "^13.0.6",
124
124
  "@types/node": "^26.6.3",
125
125
  "@types/semver": "^7.8.0",
126
126
  "cspell": "^10.3.4",
@@ -132,9 +132,9 @@
132
132
  "prettier-plugin-tailwindcss": "^0.8.1",
133
133
  "rollup": "^4.63.5",
134
134
  "rollup-plugin-dts": "^6.5.1",
135
- "secretlint": "^13.0.5",
135
+ "secretlint": "^13.0.6",
136
136
  "typescript": "^6.0.3",
137
- "vitest": "^5.0.1"
137
+ "vitest": "^5.0.2"
138
138
  },
139
139
  "dependencies": {
140
140
  "@eslint/compat": "^2.1.1",
@@ -13,6 +13,8 @@ import type { PropagateTarget } from './propagate-targets'
13
13
  const STEP_PRECHECK = 'working tree check'
14
14
  const STEP_UPGRADE = 'josh vu'
15
15
  const STEP_SYNC = 'josh sync'
16
+ const STEP_LINT_RELATED = 'related lint check'
17
+ const STEP_TEST_RELATED = 'related test check'
16
18
  const STEP_VERIFY = 'verification gate'
17
19
  const STEP_ISSUE = 'open issue'
18
20
  const STEP_PR = 'josh git'
@@ -23,6 +25,8 @@ const STEP_ORDER: ReadonlyArray<string> = [
23
25
  STEP_PRECHECK,
24
26
  STEP_UPGRADE,
25
27
  STEP_SYNC,
28
+ STEP_LINT_RELATED,
29
+ STEP_TEST_RELATED,
26
30
  STEP_VERIFY,
27
31
  STEP_ISSUE,
28
32
  STEP_PR,
@@ -187,6 +191,8 @@ const propagate_run = {
187
191
  STEP_ISSUE,
188
192
  STEP_UPGRADE,
189
193
  STEP_SYNC,
194
+ STEP_LINT_RELATED,
195
+ STEP_TEST_RELATED,
190
196
  STEP_VERIFY,
191
197
  STEP_PR,
192
198
  STEP_ORDER,
@@ -29,6 +29,8 @@ const VERIFY_SCRIPT = `pnpm josh ${GATE_COMMAND}`
29
29
  // The commands the release-independent spawning steps run inside the target's own directory. The
30
30
  // upgrade and the sync are not here: both are per toolkit, so they are built from the plan instead.
31
31
  const STEP_COMMANDS: Readonly<Record<string, ReadonlyArray<string>>> = {
32
+ [propagate_run.STEP_LINT_RELATED]: ['pnpm', 'josh', 'lint:related'],
33
+ [propagate_run.STEP_TEST_RELATED]: ['pnpm', 'josh', 'test:related'],
32
34
  [propagate_run.STEP_VERIFY]: ['sh', '-c', VERIFY_SCRIPT],
33
35
  }
34
36
 
@@ -0,0 +1,14 @@
1
+ const UPGRADE_FLAG = '--upgrade'
2
+
3
+ function validate(version_arguments: ReadonlyArray<string>): string | undefined {
4
+ if (
5
+ version_arguments.length === 0 ||
6
+ (version_arguments.length === 1 && version_arguments[0] === UPGRADE_FLAG)
7
+ ) {
8
+ return undefined
9
+ }
10
+
11
+ return `Unsupported version argument: ${version_arguments.join(' ')}. Use ${UPGRADE_FLAG} to update.`
12
+ }
13
+
14
+ export const version_check_arguments = { validate }
@@ -1,14 +1,21 @@
1
1
  #!/usr/bin/env tsx
2
2
  import { kit_version_config } from './kit-version-config'
3
+ import { version_check_arguments } from './version-check-arguments'
3
4
  import { version_commands } from './version-commands'
4
5
 
5
6
  // `version` shows the installed versions; `version --upgrade` updates both the global and the project
6
7
  // @joshuafolkken/kit install. The upgrade was a separate `version:upgrade` command until
7
8
  // joshuafolkken/kit#1928 folded it into this flag, so the version surface is one command again.
8
9
  const UPGRADE_FLAG = '--upgrade'
10
+ const ARGUMENT_OFFSET = 2
11
+ const version_arguments = process.argv.slice(ARGUMENT_OFFSET)
12
+ const error = version_check_arguments.validate(version_arguments)
9
13
 
10
- if (process.argv.includes(UPGRADE_FLAG)) {
14
+ if (error) {
15
+ console.error(error)
16
+ process.exitCode = 1
17
+ } else if (version_arguments.includes(UPGRADE_FLAG)) {
11
18
  process.exit(version_commands.run_upgrade(kit_version_config))
19
+ } else {
20
+ version_commands.run_check(kit_version_config)
12
21
  }
13
-
14
- version_commands.run_check(kit_version_config)