Repository navigation
perf: keep typescript out of the runtime install - #44
Merged
Merged
Conversation
typescript was a peerDependency, a leftover from the bun init template, and npm installs peers even with --omit=dev. Every job that used the action therefore downloaded and unpacked 23 MB it never loaded. As a devDependency it stays available to tsc and leaves the consumer install at 42 MB instead of 65 MB. The lockfile's own version field also catches up with package.json.
🦋 Changeset detectedLatest commit: 0961112 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every workflow that uses this action runs
npm ci --omit=devin the action's directory before the agent starts. That install was 65 MB, and 23 MB of it was TypeScript, which the action never loads. TypeScript was listed as a peer dependency, a leftover from thebun inittemplate, and npm installs peers even with--omit=dev.What changed
typescriptmoves frompeerDependenciestodevDependencies, and both lockfiles follow. The lockfile's ownversionfield also moves from 2.0.0 to 2.1.1 to matchpackage.json.npm install --package-lock-onlydoes that, and no dependency changed version.Scope
Dependency metadata only.
zodstays: it is a peer of@cursor/sdk, and the SDK imports it when it loads. Installing with--ignore-scriptsis a separate change.Blast Radius
Consumers get a smaller install. Development is unchanged:
tscstill resolves to 5.9.3.Verification
npm ci --omit=dev --no-audit --no-fund, the action's own install line: 15 packages and 65 MB onmain, 14 packages and 42 MB on this branch, with nonode_modules/typescript.Invalid User API Key. So the SDK loads and reaches Cursor. This is the probe theIntegrationjob runs.main: only the root entry andnode_modules/typescriptdiffer.bun install --frozen-lockfile,bun run typecheck,bun run lint,bun run test(111 pass) andbun run buildpass, anddist/is unchanged.