Skip to content

perf: keep typescript out of the runtime install - #44

Merged
PunGrumpy merged 1 commit into
mainfrom
perf/lean-runtime-install
Nov 29, 2026
Merged

PunGrumpy merged 1 commit into
mainfrom
perf/lean-runtime-install

Conversation

@PunGrumpy

Copy link
Copy Markdown
Owner

Why

Every workflow that uses this action runs npm ci --omit=dev in 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 the bun init template, and npm installs peers even with --omit=dev.

What changed

typescript moves from peerDependencies to devDependencies, and both lockfiles follow. The lockfile's own version field also moves from 2.0.0 to 2.1.1 to match package.json. npm install --package-lock-only does that, and no dependency changed version.

Scope

Dependency metadata only. zod stays: it is a peer of @cursor/sdk, and the SDK imports it when it loads. Installing with --ignore-scripts is a separate change.

Blast Radius

Consumers get a smaller install. Development is unchanged: tsc still resolves to 5.9.3.

Verification

  • A scratch npm ci --omit=dev --no-audit --no-fund, the action's own install line: 15 packages and 65 MB on main, 14 packages and 42 MB on this branch, with no node_modules/typescript.
  • The built bundle, run from that tree with a key that cannot be valid, is rejected with Invalid User API Key. So the SDK loads and reaches Cursor. This is the probe the Integration job runs.
  • All 292 lockfile entries compared with main: only the root entry and node_modules/typescript differ.
  • bun install --frozen-lockfile, bun run typecheck, bun run lint, bun run test (111 pass) and bun run build pass, and dist/ is unchanged.

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-bot

changeset-bot Bot commented Nov 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0961112

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@pungrumpy/cursor-action Patch

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

@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cursor-action Ready Ready Preview Nov 29, 2026 8:14am UTC

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fd3a9242-2b49-435b-9ff0-3b98d90a4590
Commits

Reviewing files that changed from the base of the PR and between a0ec6dc and 0961112.

Files ignored due to path filters: 2

  • bun.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 2

  • .changeset/lean-runtime-install.md
  • package.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@PunGrumpy
PunGrumpy merged commit 51fd162 into main Nov 29, 2026
12 checks passed
@PunGrumpy
PunGrumpy deleted the perf/lean-runtime-install branch November 29, 2026 08:19

This branch was successfully deployed

1 active deployment
Preview — 0961112b Deployed Nov 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant