fix(release): build before bumping versions to avoid stale nested install#9
Merged
Merged
Conversation
…tall `npm version --workspaces` triggers an automatic install that re-resolves each workspace's dependencies. After the bump, packages/cli's dep specifier `"@tokenometer/core": "0.0.2"` no longer satisfies the new workspace version `0.1.0`, so npm fetches the published `0.0.2` from the registry into `packages/cli/node_modules/@tokenometer/core/`. That nested copy shadows the workspace symlink at the root, and TypeScript resolves cli's `@tokenometer/core` import to the stale registry types — which lack the `contextWindow`/`maxOutputTokens` fields added in ec35c5e — producing TS2339 build errors. Reorder the workflow so build/test runs against the committed source before any version bump, and sync cross-package deps after the bump so the published `tokenometer@x.y.z` correctly depends on `@tokenometer/core@x.y.z` instead of the previous version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
faraa2m
added a commit
that referenced
this pull request
May 11, 2026
…tall (#9) `npm version --workspaces` triggers an automatic install that re-resolves each workspace's dependencies. After the bump, packages/cli's dep specifier `"@tokenometer/core": "0.0.2"` no longer satisfies the new workspace version `0.1.0`, so npm fetches the published `0.0.2` from the registry into `packages/cli/node_modules/@tokenometer/core/`. That nested copy shadows the workspace symlink at the root, and TypeScript resolves cli's `@tokenometer/core` import to the stale registry types — which lack the `contextWindow`/`maxOutputTokens` fields added in a1cf6ea — producing TS2339 build errors. Reorder the workflow so build/test runs against the committed source before any version bump, and sync cross-package deps after the bump so the published `tokenometer@x.y.z` correctly depends on `@tokenometer/core@x.y.z` instead of the previous version. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
version: 0.1.0) failed atnpm run buildwith TS2339 errors onpackages/cli/src/render.ts(contextWindow,maxOutputTokens"missing" fromModelDescriptor— even though the type clearly declares them).npm version --workspacestriggers an automatic install. After the bump,packages/cli's dep specifier"@tokenometer/core": "0.0.2"no longer matches the new workspace version0.1.0, so npm fetches the published@tokenometer/core@0.0.2from the registry intopackages/cli/node_modules/@tokenometer/core/. That nested copy has the pre-tokenlensModelDescriptor(justid+provider) and shadows the workspace symlink → cli's TypeScript resolves to stale types.npm ci), and sync cross-package deps after the bump (so the publishedtokenometer@x.y.zcorrectly lists@tokenometer/core@x.y.zinstead of the previous version, which is also a publish-time correctness bug independent of the build failure).Test plan
npm ci, thennpm version 0.1.0 --workspaces && npm run build→ identical TS2339 errors as CI.packages/cli/node_modules/@tokenometer/core/dist/types.d.tsis the published 0.0.2 (nocontextWindow/maxOutputTokens); rootnode_modules/@tokenometer/coreis still the workspace symlink.npm run build(pre-bump): cleannpm test: 48/48 passnpm version 0.1.0 --workspaces: bumps all packages to0.1.0packages/cli/package.jsonandpackages/action/package.jsonnow list@tokenometer/core@0.1.0releaseworkflow withversion: 0.1.0after merge to confirm green build + correct published deps.🤖 Generated with Claude Code