@regardio/dev 1.15.0 → 1.16.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/README.md CHANGED
@@ -27,7 +27,7 @@ The goal is code that's correct, consistent, and a pleasure to work with.
27
27
  | **Testing** | Vitest, Playwright, Testing Library |
28
28
  | **Build** | TypeScript, tsx, Vite |
29
29
  | **Workflow** | Husky, GitLab Flow |
30
- | **CLI utilities** | exec-clean, exec-p, exec-s, exec-ts, flow-release, flow-ship, flow-hotfix, lint-biome, lint-md, lint-package |
30
+ | **CLI utilities** | exec-clean, exec-p, exec-s, exec-ts, ship-staging, ship-production, ship-hotfix, lint-biome, lint-md, lint-package |
31
31
 
32
32
  ## Quick Start
33
33
 
@@ -1 +1 @@
1
- {"version":3,"file":"hotfix.d.ts","sourceRoot":"","sources":["../../../src/bin/flow/hotfix.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"hotfix.d.ts","sourceRoot":"","sources":["../../../src/bin/ship/hotfix.ts"],"names":[],"mappings":""}
@@ -7,7 +7,7 @@ const subArgs = process.argv.slice(3);
7
7
  if (subcommand === 'start') {
8
8
  const name = subArgs[0];
9
9
  if (!name) {
10
- console.error('Usage: flow-hotfix start <name>');
10
+ console.error('Usage: ship-hotfix start <name>');
11
11
  process.exit(1);
12
12
  }
13
13
  const hotfixBranch = `hotfix/${name}`;
@@ -27,20 +27,20 @@ if (subcommand === 'start') {
27
27
  git('pull', '--ff-only', 'origin', 'production');
28
28
  git('checkout', '-b', hotfixBranch);
29
29
  console.log(`\n✅ Hotfix branch "${hotfixBranch}" created from production.`);
30
- console.log('Apply your fix, then run: flow-hotfix finish <patch|minor> "description"');
30
+ console.log('Apply your fix, then run: ship-hotfix finish <patch|minor> "description"');
31
31
  process.exit(0);
32
32
  }
33
33
  if (subcommand === 'finish') {
34
34
  const bumpType = subArgs[0];
35
35
  const message = subArgs.slice(1).join(' ');
36
36
  if (!bumpType || !['patch', 'minor'].includes(bumpType)) {
37
- console.error('Usage: flow-hotfix finish <patch|minor> "description"');
37
+ console.error('Usage: ship-hotfix finish <patch|minor> "description"');
38
38
  console.error('Hotfixes use patch or minor bumps only.');
39
39
  process.exit(1);
40
40
  }
41
41
  if (!message) {
42
42
  console.error('A description is required.');
43
- console.error('Example: flow-hotfix finish patch "Fix critical auth bug"');
43
+ console.error('Example: ship-hotfix finish patch "Fix critical auth bug"');
44
44
  process.exit(1);
45
45
  }
46
46
  const currentBranch = gitRead('branch', '--show-current');
@@ -111,6 +111,6 @@ if (subcommand === 'finish') {
111
111
  process.exit(0);
112
112
  }
113
113
  console.error('Usage:');
114
- console.error(' flow-hotfix start <name>');
115
- console.error(' flow-hotfix finish <patch|minor> "description"');
114
+ console.error(' ship-hotfix start <name>');
115
+ console.error(' ship-hotfix finish <patch|minor> "description"');
116
116
  process.exit(1);
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=production.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"production.d.ts","sourceRoot":"","sources":["../../../src/bin/ship/production.ts"],"names":[],"mappings":""}
@@ -5,8 +5,8 @@ import { branchExists, bumpVersion, confirm, git, gitRead, insertChangelog, runQ
5
5
  const args = process.argv.slice(2);
6
6
  const bumpType = args[0];
7
7
  if (!bumpType || !['patch', 'minor', 'major'].includes(bumpType)) {
8
- console.error('Usage: flow-ship <patch|minor|major>');
9
- console.error('Example: flow-ship minor');
8
+ console.error('Usage: ship-production <patch|minor|major>');
9
+ console.error('Example: ship-production minor');
10
10
  process.exit(1);
11
11
  }
12
12
  const currentBranch = gitRead('branch', '--show-current');
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=staging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staging.d.ts","sourceRoot":"","sources":["../../../src/bin/ship/staging.ts"],"names":[],"mappings":""}
@@ -59,4 +59,4 @@ git('push', 'origin', 'staging');
59
59
  git('checkout', 'main');
60
60
  git('push', 'origin', 'main');
61
61
  console.log('\n✅ Changes deployed to staging');
62
- console.log('Run flow-ship <patch|minor|major> when ready to promote to production.');
62
+ console.log('Run ship-production <patch|minor|major> when ready to promote to production.');
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/bin/flow/utils.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,MAAM,EAAE,KAAG,IAGvC,CAAC;AAMF,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,MAAM,EAAE,KAAG,MACa,CAAC;AAM1D,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,KAAG,IAG1C,CAAC;AAKF,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,MAAM,MAAM,KAAG,MAS3D,CAAC;AAMF,eAAO,MAAM,eAAe,GAAI,eAAe,MAAM,EAAE,OAAO,MAAM,KAAG,IAetE,CAAC;AAKF,eAAO,MAAM,gBAAgB,QAAO,IAInC,CAAC;AAMF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,OAE0B,CAAC;AAOvE,eAAO,MAAM,OAAO,GAAI,QAAQ,MAAM,EAAE,gBAAoB,KAAG,OAe9D,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/bin/ship/utils.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,MAAM,EAAE,KAAG,IAGvC,CAAC;AAMF,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,MAAM,EAAE,KAAG,MACa,CAAC;AAM1D,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,KAAG,IAG1C,CAAC;AAKF,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,MAAM,MAAM,KAAG,MAS3D,CAAC;AAMF,eAAO,MAAM,eAAe,GAAI,eAAe,MAAM,EAAE,OAAO,MAAM,KAAG,IAetE,CAAC;AAKF,eAAO,MAAM,gBAAgB,QAAO,IAInC,CAAC;AAMF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,OAE0B,CAAC;AAOvE,eAAO,MAAM,OAAO,GAAI,QAAQ,MAAM,EAAE,gBAAoB,KAAG,OAe9D,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../src/bin/ship/utils.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "@regardio/dev",
4
- "version": "1.15.0",
4
+ "version": "1.16.0",
5
5
  "private": false,
6
6
  "description": "Regardio developer tooling for testing, linting, and build workflows",
7
7
  "keywords": [
@@ -61,13 +61,13 @@
61
61
  "exec-s": "dist/bin/exec/s.js",
62
62
  "exec-ts": "dist/bin/exec/ts.js",
63
63
  "exec-tsc": "dist/bin/exec/tsc.js",
64
- "flow-hotfix": "dist/bin/flow/hotfix.js",
65
- "flow-release": "dist/bin/flow/release.js",
66
- "flow-ship": "dist/bin/flow/ship.js",
67
64
  "lint-biome": "dist/bin/lint/biome.js",
68
65
  "lint-commit": "dist/bin/lint/commit.js",
69
66
  "lint-md": "dist/bin/lint/md.js",
70
- "lint-package": "dist/bin/lint/package.js"
67
+ "lint-package": "dist/bin/lint/package.js",
68
+ "ship-hotfix": "dist/bin/ship/hotfix.js",
69
+ "ship-production": "dist/bin/ship/production.js",
70
+ "ship-staging": "dist/bin/ship/staging.js"
71
71
  },
72
72
  "files": ["dist", "src"],
73
73
  "scripts": {
@@ -77,15 +77,15 @@
77
77
  "fix:biome": "biome check --write --unsafe .",
78
78
  "fix:md": "markdownlint-cli2 --fix",
79
79
  "fix:pkg": "tsx src/bin/lint/package.ts --fix",
80
- "flow:hotfix": "tsx src/bin/flow/hotfix.ts",
81
- "flow:release": "tsx src/bin/flow/release.ts",
82
- "flow:ship": "tsx src/bin/flow/ship.ts",
83
80
  "lint": "run-s lint:md lint:biome",
84
81
  "lint:biome": "biome check .",
85
82
  "lint:md": "markdownlint-cli2",
86
83
  "lint:pkg": "tsx src/bin/lint/package.ts",
87
84
  "prepare": "husky",
88
85
  "report": "vitest run --coverage",
86
+ "ship:hotfix": "tsx src/bin/ship/hotfix.ts",
87
+ "ship:production": "tsx src/bin/ship/production.ts",
88
+ "ship:staging": "tsx src/bin/ship/staging.ts",
89
89
  "test": "run-p test:*",
90
90
  "test:unit": "vitest run",
91
91
  "typecheck": "tsc --noEmit"
@@ -98,7 +98,7 @@
98
98
  "@testing-library/jest-dom": "6.9.1",
99
99
  "@testing-library/react": "16.3.2",
100
100
  "@total-typescript/ts-reset": "0.6.1",
101
- "@types/node": "25.3.1",
101
+ "@types/node": "25.3.2",
102
102
  "@vitest/coverage-v8": "4.0.18",
103
103
  "@vitest/ui": "4.0.18",
104
104
  "husky": "9.1.7",
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * flow-hotfix: Manage hotfix branches based on production code.
3
+ * ship-hotfix: Manage hotfix branches based on production code.
4
4
  *
5
5
  * Usage:
6
- * flow-hotfix start <name> - Create hotfix/<name> from production
7
- * flow-hotfix finish <patch|minor> "description" - Finish and propagate the hotfix
6
+ * ship-hotfix start <name> - Create hotfix/<name> from production
7
+ * ship-hotfix finish <patch|minor> "description" - Finish and propagate the hotfix
8
8
  *
9
9
  * GitLab workflow:
10
10
  * production → hotfix/<name> → production → staging → main
@@ -44,7 +44,7 @@ const subArgs = process.argv.slice(3);
44
44
  if (subcommand === 'start') {
45
45
  const name = subArgs[0];
46
46
  if (!name) {
47
- console.error('Usage: flow-hotfix start <name>');
47
+ console.error('Usage: ship-hotfix start <name>');
48
48
  process.exit(1);
49
49
  }
50
50
 
@@ -72,7 +72,7 @@ if (subcommand === 'start') {
72
72
  git('checkout', '-b', hotfixBranch);
73
73
 
74
74
  console.log(`\n✅ Hotfix branch "${hotfixBranch}" created from production.`);
75
- console.log('Apply your fix, then run: flow-hotfix finish <patch|minor> "description"');
75
+ console.log('Apply your fix, then run: ship-hotfix finish <patch|minor> "description"');
76
76
  process.exit(0);
77
77
  }
78
78
 
@@ -84,14 +84,14 @@ if (subcommand === 'finish') {
84
84
  const message = subArgs.slice(1).join(' ');
85
85
 
86
86
  if (!bumpType || !['patch', 'minor'].includes(bumpType)) {
87
- console.error('Usage: flow-hotfix finish <patch|minor> "description"');
87
+ console.error('Usage: ship-hotfix finish <patch|minor> "description"');
88
88
  console.error('Hotfixes use patch or minor bumps only.');
89
89
  process.exit(1);
90
90
  }
91
91
 
92
92
  if (!message) {
93
93
  console.error('A description is required.');
94
- console.error('Example: flow-hotfix finish patch "Fix critical auth bug"');
94
+ console.error('Example: ship-hotfix finish patch "Fix critical auth bug"');
95
95
  process.exit(1);
96
96
  }
97
97
 
@@ -205,6 +205,6 @@ if (subcommand === 'finish') {
205
205
  // Unknown subcommand
206
206
  // ---------------------------------------------------------------------------
207
207
  console.error('Usage:');
208
- console.error(' flow-hotfix start <name>');
209
- console.error(' flow-hotfix finish <patch|minor> "description"');
208
+ console.error(' ship-hotfix start <name>');
209
+ console.error(' ship-hotfix finish <patch|minor> "description"');
210
210
  process.exit(1);
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * flow-ship: Version and promote staging to production following the GitLab workflow.
3
+ * ship-production: Version and promote staging to production following the GitLab workflow.
4
4
  *
5
- * Usage: flow-ship <patch|minor|major>
5
+ * Usage: ship-production <patch|minor|major>
6
6
  *
7
7
  * GitLab workflow:
8
8
  * staging → (version bump commit) → production
@@ -20,7 +20,7 @@
20
20
  * 7. Commits the version bump on staging
21
21
  * 8. Merges staging into production (fast-forward) and pushes
22
22
  * 9. Merges production back into main to carry the version commit forward
23
- * 10. Syncs staging with main so the next flow-release can ff-merge cleanly
23
+ * 10. Syncs staging with main so the next ship-staging can ff-merge cleanly
24
24
  * 11. Returns to main
25
25
  */
26
26
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
@@ -41,8 +41,8 @@ const args = process.argv.slice(2);
41
41
  const bumpType = args[0];
42
42
 
43
43
  if (!bumpType || !['patch', 'minor', 'major'].includes(bumpType)) {
44
- console.error('Usage: flow-ship <patch|minor|major>');
45
- console.error('Example: flow-ship minor');
44
+ console.error('Usage: ship-production <patch|minor|major>');
45
+ console.error('Example: ship-production minor');
46
46
  process.exit(1);
47
47
  }
48
48
 
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * flow-release: Deploy changes to staging following the GitLab workflow.
3
+ * ship-staging: Deploy changes to staging following the GitLab workflow.
4
4
  *
5
- * Usage: flow-release [message]
5
+ * Usage: ship-staging [message]
6
6
  *
7
7
  * GitLab workflow:
8
8
  * main → staging (staging deploy, no version bump yet)
9
9
  *
10
- * Versioning happens at ship time (flow-ship), not here.
10
+ * Versioning happens at ship time (ship-production), not here.
11
11
  * This keeps version numbers reserved for production-verified code.
12
12
  *
13
13
  * This script:
@@ -120,4 +120,4 @@ git('checkout', 'main');
120
120
  git('push', 'origin', 'main');
121
121
 
122
122
  console.log('\n✅ Changes deployed to staging');
123
- console.log('Run flow-ship <patch|minor|major> when ready to promote to production.');
123
+ console.log('Run ship-production <patch|minor|major> when ready to promote to production.');
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Shared utilities for flow-release, flow-ship, and flow-hotfix.
2
+ * Shared utilities for ship-staging, ship-production, and ship-hotfix.
3
3
  *
4
4
  * Git commands use execFileSync (not a shell string) so user-provided
5
5
  * strings such as commit messages are never interpolated by the shell.
@@ -2,7 +2,7 @@
2
2
  # Copy this file to .github/workflows/release.yml in your package
3
3
  #
4
4
  # Required setup:
5
- # 1. Add "flow:release": "flow-release", "flow:ship": "flow-ship" to package.json scripts
5
+ # 1. Add "ship:staging": "ship-staging", "ship:production": "ship-production" to package.json scripts
6
6
  # 2. Create staging and production branches:
7
7
  # git checkout -b staging && git push -u origin staging
8
8
  # git checkout -b production && git push -u origin production
@@ -10,8 +10,8 @@
10
10
  # pnpm build && npm publish --access public
11
11
  #
12
12
  # Usage:
13
- # - Run `pnpm flow:release "message"` to deploy changes to staging
14
- # - Run `pnpm flow:ship patch|minor|major` to version, promote to production, and trigger this workflow
13
+ # - Run `pnpm ship:staging "message"` to deploy changes to staging
14
+ # - Run `pnpm ship:production patch|minor|major` to version, promote to production, and trigger this workflow
15
15
 
16
16
  name: Release
17
17
 
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=release.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/bin/flow/release.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=ship.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ship.d.ts","sourceRoot":"","sources":["../../../src/bin/flow/ship.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../src/bin/flow/utils.test.ts"],"names":[],"mappings":""}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes