chore(cli): add bun run link scripts + fix init template versions
- Add link/link:consume/link:unlink scripts to root package.json - Document cross-repo bun link workflow in CLAUDE.md - Fix hardcoded @uncaged/workflow-runtime "^0.1.0" → "*" in init workspace and init template scaffolds (actual version is 0.3.x)
This commit is contained in:
@@ -245,6 +245,23 @@ bun run format # biome format --write
|
||||
bun test # run tests
|
||||
```
|
||||
|
||||
### Cross-repo Development (bun link)
|
||||
|
||||
For developing workflows in a separate repo (e.g. `xingyue-workflows`) against local monorepo packages:
|
||||
|
||||
```bash
|
||||
# 1. Register all @uncaged/* packages (run once from monorepo root)
|
||||
bun run link
|
||||
|
||||
# 2. Consume linked packages (run from the external workflow repo)
|
||||
bun run link:consume
|
||||
|
||||
# 3. Restore original npm versions (undo link)
|
||||
bun run link:unlink
|
||||
```
|
||||
|
||||
The script is at `scripts/link-all.sh`. It links/unlinks all 16 `@uncaged/*` packages.
|
||||
|
||||
## Commit Convention
|
||||
|
||||
```
|
||||
|
||||
+4
-1
@@ -9,7 +9,10 @@
|
||||
"check": "bunx tsc --build && biome check .",
|
||||
"typecheck": "bunx tsc --build",
|
||||
"format": "biome format --write .",
|
||||
"test": "bun run --filter '*' test"
|
||||
"test": "bun run --filter '*' test",
|
||||
"link": "./scripts/link-all.sh",
|
||||
"link:consume": "./scripts/link-all.sh --consume",
|
||||
"link:unlink": "./scripts/link-all.sh --unlink"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.4.14",
|
||||
|
||||
@@ -6,7 +6,7 @@ export function templatePackageJson(templateName: string): string {
|
||||
private: true,
|
||||
type: "module",
|
||||
dependencies: {
|
||||
"@uncaged/workflow-runtime": "^0.1.0",
|
||||
"@uncaged/workflow-runtime": "*",
|
||||
zod: "^4.0.0",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ function workflowsPackageJson(): string {
|
||||
private: true,
|
||||
type: "module",
|
||||
dependencies: {
|
||||
"@uncaged/workflow-runtime": "^0.1.0",
|
||||
"@uncaged/workflow-runtime": "*",
|
||||
zod: "^4.0.0",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user