chore: stop building packages during install#180
Conversation
Greptile SummaryThis PR stops four TypeScript workspace packages from compiling as an installation lifecycle side effect.
Confidence Score: 3/5The PR should not merge until the root test workflow explicitly builds its workspace dependencies or otherwise resolves package sources in clean checkouts. Removing the prepare hooks leaves packages/core/package.json, packages/commands/package.json, packages/bindings/package.json, and the root Turbo test orchestration
|
| Filename | Overview |
|---|---|
| packages/core/package.json | Removes the build lifecycle hook even though core's generated dist export is consumed by tests not ordered behind a build. |
| packages/commands/package.json | Removes its install-time build; its tests also transitively require core's generated package output. |
| packages/bindings/package.json | Removes its install-time build; bindings source resolves core through the generated package export. |
| packages/sdk/package.json | Removes the redundant lifecycle build while retaining explicit compilation commands. |
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/core/package.json:13
**Root tests miss required builds**
When a developer runs `pnpm install` followed by the root `pnpm test` command in a clean checkout, `turbo test` does not build workspace packages first, so imports of `@alienplatform/core` resolve to the absent `dist/index.js` and Vitest fails module resolution.
Reviews (1): Last reviewed commit: "chore: stop building packages during ins..." | Re-trigger Greptile
| @@ -11,7 +11,6 @@ | |||
| }, | |||
| "scripts": { | |||
| "build": "tsdown", | |||
There was a problem hiding this comment.
Root tests miss required builds
When a developer runs pnpm install followed by the root pnpm test command in a clean checkout, turbo test does not build workspace packages first, so imports of @alienplatform/core resolve to the absent dist/index.js and Vitest fails module resolution.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/core/package.json
Line: 13
Comment:
**Root tests miss required builds**
When a developer runs `pnpm install` followed by the root `pnpm test` command in a clean checkout, `turbo test` does not build workspace packages first, so imports of `@alienplatform/core` resolve to the absent `dist/index.js` and Vitest fails module resolution.
**Knowledge Base Used:**
- [SDK and bindings: how apps reach storage, KV, queue, and vault](https://app.greptile.com/alien/-/custom-context/knowledge-base/alienplatform/alien/-/docs/sdk-bindings.md)
- [Remote Commands Protocol](https://app.greptile.com/alien/-/custom-context/knowledge-base/alienplatform/alien/-/docs/remote-commands.md)
How can I resolve this? If you propose a fix, please make it concise.
Summary
preparebuild hook from the core, commands, bindings, and SDK packagesbuildcommandsWhy
A workspace
pnpm installcurrently compiles all four packages as a lifecycle side effect. Bootstrap only needs dependencies installed, so that work is unnecessary and makes setup appear stuck.The stable and dev npm release workflows already run
pnpm buildbefore publishing or packing. Aprepackreplacement would keep compilation implicit and duplicate those release build steps.Validation
pnpm install --frozen-lockfilecomplete without invoking the package builds