Skip to content

Commit fdce23a

Browse files
committed
polish
1 parent d05df8c commit fdce23a

File tree

8 files changed

+71
-56
lines changed

8 files changed

+71
-56
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ jobs:
5656
name: published-packages
5757
path: ${{ runner.temp }}
5858
- uses: ./.github/actions/setup
59-
- name: Deploy
60-
run: pnpm runx deploy-workers-production
59+
- name: Deploy Published Workers
60+
run: pnpm runx deploy-published-workers
6161
env:
6262
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
6363
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.syncpackrc.cjs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,10 @@ const config = {
4646
snapTo: ['@repo/eslint-config'],
4747
},
4848
{
49-
label: 'pin zod@next in packages/tools',
49+
label: 'use zod v4 in packages/tools',
5050
dependencies: ['zod'],
51-
pinVersion: 'next',
52-
packages: ['packages/tools'],
53-
},
54-
{
55-
label: 'use zod@3 for everything else',
56-
dependencies: ['zod'],
57-
preferVersion: 'highestSemver',
58-
packages: ['**'],
51+
pinVersion: '4.0.0-beta.20250505T195954',
52+
packages: ['@repo/tools'],
5953
},
6054
],
6155
semverGroups: [

packages/tools/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
11
# @repo/tools
22

33
A collection of shared scripts for automating the monorepo while ensuring consistency across packages.
4+
5+
## Scripts
6+
7+
### Bin Scripts
8+
9+
Simple shell scripts for common development tasks:
10+
11+
- `run-tsc`: Run TypeScript type checking
12+
- `run-eslint-workers`: Run ESLint checks
13+
- `run-vitest`: Run tests
14+
- `run-vitest-ci`: Run tests in CI mode
15+
- `run-turbo`: Run Turbo commands with tracking disabled
16+
- `run-wrangler-deploy`: Deploy using Wrangler
17+
- `run-wrangler-types`: Generate Wrangler types
18+
- `run-fix-deps`: Fix dependencies
19+
20+
### Runx CLI
21+
22+
A TypeScript-based CLI for more complex automation tasks. While the bin scripts work well for simple tasks, the runx CLI provides better type safety and more sophisticated programmatic control.
23+
24+
Usage:
25+
26+
```bash
27+
pnpm runx <command> [options]
28+
```
29+
30+
Available commands:
31+
32+
- `deploy-published-workers`: Deploy published Workers based packages that changesets marked as published in the current release.
33+
34+
Note:
35+
36+
The CLI will automatically use Bun if available, but falls back to tsx if not installed.

packages/tools/bin/runx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env sh
22
set -eu
33

4-
script_path="$(realpath "$(dirname "$0")/../../src/bin/runx.ts")"
4+
script_path="$(realpath "$(dirname "$0")/../src/bin/runx.ts")"
55

66
bin_dir="$(realpath "$(dirname "$0")")"
77
tsx_path="$(realpath "$bin_dir/../node_modules/.bin/tsx")"

packages/tools/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"commander": "13.1.0",
1919
"empathic": "1.1.0",
2020
"tsx": "4.19.3",
21-
"zod": "3.24.2",
22-
"zod-validation-error": "3.4.1",
21+
"zod": "4.0.0-beta.20250505T195954",
2322
"zx": "8.5.4"
2423
}
2524
}

packages/tools/src/bin/runx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'zx/globals'
33
import { program } from '@commander-js/extra-typings'
44
import { catchProcessError } from '@jahands/cli-tools'
55

6-
import { deployWorkersProductionCmd } from '../cmd/deploy'
6+
import { deployPublishedWorkersCmd } from '../cmd/deploy-published-packages'
77

88
program
99
.name('runx')
@@ -12,7 +12,7 @@ program
1212
// While `packages/tools/bin` scripts work well for simple tasks,
1313
// a typescript CLI is nicer for more complex things.
1414

15-
.addCommand(deployWorkersProductionCmd)
15+
.addCommand(deployPublishedWorkersCmd)
1616

1717
// Don't hang for unresolved promises
1818
.hook('postAction', () => process.exit(0))

packages/tools/src/cmd/deploy.ts renamed to packages/tools/src/cmd/deploy-published-packages.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import { Command } from '@commander-js/extra-typings'
22

33
import { getPublishedPackages } from '../changesets'
44

5-
export const deployWorkersProductionCmd = new Command('deploy-workers-production')
6-
.description('Deploy Cloudflare Workers to production (based on changesets)')
5+
export const deployPublishedWorkersCmd = new Command('deploy-published-workers')
6+
.description(
7+
'Deploy Cloudflare Workers to production (based on which packages changesets marked as published in the release)'
8+
)
79
.action(async () => {
810
const publishedPackages = await getPublishedPackages()
911

pnpm-lock.yaml

Lines changed: 25 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)