You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation: pnpm's recursive runner (`pnpm -r run`) is fail-fast by default
and runs in topological (dependency-graph) order, so the root `bootstrap`
and `prerelease` no longer need the non-fail-fast `npm run <s> --workspaces`
pattern that buried the real root cause under cascading failures.
Workspace + package manager:
- Replace the root `workspaces` array with pnpm-workspace.yaml
- Add `packageManager: pnpm@10.33.0` and switch devEngines to pnpm ^10
- Allow only esbuild's build script via onlyBuiltDependencies (pnpm 10 blocks
dependency lifecycle scripts by default); no shamefully-hoist needed
- Replace package-lock.json with pnpm-lock.yaml; keep node_modules isolated
Internal deps -> workspace:* protocol (cmake-rn, ferric, gyp-to-cmake, host,
node-addon-examples, node-tests, ferric-example, test-app). Add explicit
`weak-node-api` edges to node-addon-examples and node-tests so the topological
bootstrap sequences weak-node-api (which builds the xcframework/.so they link)
before its consumers.
Phantom dependencies surfaced by pnpm's isolated node_modules (npm hoisting
had masked these):
- host: add `@types/babel__core` (used by src/node/babel-plugin/plugin.ts)
- host: add `weak-node-api` as a devDependency (used by
scripts/generate-injector.mts; previously only a peerDependency)
Scripts:
- bootstrap: `tsc --build && pnpm -r run bootstrap` (fail-fast, topological)
- prerelease/release: make the build explicit instead of relying on npm's
implicit prerelease hook (pnpm disables pre/post scripts by default)
- test: `pnpm --filter ... run test`
- depcheck/run-in-published: replace `npm query .workspace` with `pnpm ls -r`
- Pin prettier to 3.6.2: 3.7+ is incompatible with @prettier/plugin-oxc@0.0.4
(regenerating any lockfile floated it to 3.9.5 and crashed the plugin)
CI: port check.yml and release.yml to pnpm (pnpm/action-setup, cache: pnpm,
`pnpm install --frozen-lockfile`, `--filter`, `pnpm exec`). The ephemeral,
non-workspace macOS test app keeps its own `npm install` in
scripts/init-macos-test-app.ts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DnwodAoNbqPec77191HVXn
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,14 +33,14 @@ See the [README.md](../README.md#packages) for detailed descriptions of each pac
33
33
### Development Setup
34
34
35
35
```bash
36
-
npm ci&&npm run build# Install deps and build all packages
37
-
npm run bootstrap # Build native components (weak-node-api, examples)
36
+
pnpm install&&pnpm run build # Install deps and build all packages
37
+
pnpm run bootstrap# Build native components (weak-node-api, examples)
38
38
```
39
39
40
40
### Package Development
41
41
42
42
-**TypeScript project references**: Use `tsc --build` for incremental compilation
43
-
-**Workspace scripts**: Most build/test commands use npm workspaces (`--workspace` flag)
43
+
-**Workspace scripts**: Most build/test commands use pnpm workspaces (`--filter` flag), run in topological (dependency) order and fail fast
44
44
-**Focus on Node.js packages**: AI development primarily targets the Node.js tooling packages rather than native mobile code
45
45
-**No TypeScript type asserts**: You have to ask explicitly and justify if you want to add `as` type assertions.
46
46
@@ -70,8 +70,8 @@ Library names use double-dash separation: `package-name--path-component--addon-n
70
70
71
71
### Testing
72
72
73
-
-**Individual packages**: Some packages have VS Code test tasks and others have their own `npm test` scripts for focused iteration (e.g., `npm test --workspace cmake-rn`). Use the latter only if the former is missing.
74
-
-**Cross-package**: Use root-level `npm test` for cross-package testing once individual package tests pass
73
+
-**Individual packages**: Some packages have VS Code test tasks and others have their own test scripts for focused iteration (e.g., `pnpm --filter cmake-rn run test`). Use the latter only if the former is missing.
74
+
-**Cross-package**: Use root-level `pnpm test` for cross-package testing once individual package tests pass
75
75
-**Mobile integration**: Available but not the primary AI development focus - ask the developer to run those tests as needed
76
76
77
77
**Documentation**: Integration details, platform setup, and toolchain configuration are covered in existing repo documentation files.
0 commit comments