fix(cli): resolve pnpm catalog: protocol references in CLI build output#12659
Merged
fern-support merged 3 commits intomainfrom Feb 23, 2026
Merged
Conversation
The build scripts were writing raw 'catalog:' version specifiers into the published package.json instead of resolving them to actual version numbers from pnpm-workspace.yaml. This caused broken dependencies like: "@boundaryml/baml": "catalog:" Now the build reads the pnpm-workspace.yaml catalog and resolves catalog: references to their actual versions (e.g. '^0.211.2') before writing the output package.json. Co-Authored-By: unknown <>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Instead of manually resolving catalog: references in build-utils.mjs, use pnpm publish (which natively resolves catalog: protocol) instead of npm publish. This reverts the build-utils.mjs changes and takes the simpler approach. pnpm publish --no-git-checks resolves catalog: references from pnpm-workspace.yaml automatically at publish time. Co-Authored-By: unknown <>
…blish Co-Authored-By: unknown <>
fern-support
approved these changes
Feb 23, 2026
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.
Description
Refs: Reported by @Swimburger
The published
@fern-api/fern-api-dev(and potentiallyfern-api) CLI packages had brokenpackage.jsonfiles containing raw pnpmcatalog:protocol references instead of resolved version numbers:Root cause: The CLI build scripts write
catalog:specifiers from the sourcepackage.jsoninto the outputdist/*/package.json. The publish scripts then usednpm publish, which does not understand pnpm'scatalog:protocol — so the raw string was published verbatim instead of the resolved version (e.g.^0.211.2).Fix: Switch from
npm publishtopnpm publish --no-git-checks.pnpm publishnatively resolvescatalog:references frompnpm-workspace.yamlat publish time.--no-git-checksis needed because the dist directory contains generated (uncommitted) build artifacts.Link to Devin run
Changes Made
publish:cli:devandpublish:cli:prodscripts inpackages/cli/cli/package.jsonfromnpm publishtopnpm publish --no-git-checksHuman Review Checklist
pnpm publishresolvescatalog:for excluded directories: Thedist/devanddist/proddirectories are explicitly excluded from the pnpm workspace inpnpm-workspace.yaml. Locally verified thatpnpm packdoes resolvecatalog:→^0.211.2for a test package in this location, but worth confirming in CI.seed/fern-cli/seed.ymlappend flags like--access public --tag latestafter the script name (e.g.pnpm --filter @fern-api/cli publish:cli:dev --access public --tag latest). Verify these flags are correctly forwarded topnpm publish.cli-v2does not have its own publish scripts inpackage.json, so no changes needed there.Testing
pnpm packresolvescatalog:→^0.211.2for a testpackage.jsonplaced in the dist directory