Skip to content

fix(cli): resolve pnpm catalog: protocol references in CLI build output#12659

Merged
fern-support merged 3 commits intomainfrom
devin/1771819650-fix-catalog-protocol-in-cli-build
Feb 23, 2026
Merged

fix(cli): resolve pnpm catalog: protocol references in CLI build output#12659
fern-support merged 3 commits intomainfrom
devin/1771819650-fix-catalog-protocol-in-cli-build

Conversation

@Swimburger
Copy link
Member

@Swimburger Swimburger commented Feb 23, 2026

Description

Refs: Reported by @Swimburger

The published @fern-api/fern-api-dev (and potentially fern-api) CLI packages had broken package.json files containing raw pnpm catalog: protocol references instead of resolved version numbers:

"dependencies": {
  "@boundaryml/baml": "catalog:"
}

Root cause: The CLI build scripts write catalog: specifiers from the source package.json into the output dist/*/package.json. The publish scripts then used npm publish, which does not understand pnpm's catalog: protocol — so the raw string was published verbatim instead of the resolved version (e.g. ^0.211.2).

Fix: Switch from npm publish to pnpm publish --no-git-checks. pnpm publish natively resolves catalog: references from pnpm-workspace.yaml at publish time. --no-git-checks is needed because the dist directory contains generated (uncommitted) build artifacts.

Link to Devin run

Changes Made

  • Changed publish:cli:dev and publish:cli:prod scripts in packages/cli/cli/package.json from npm publish to pnpm publish --no-git-checks

Human Review Checklist

  • Verify pnpm publish resolves catalog: for excluded directories: The dist/dev and dist/prod directories are explicitly excluded from the pnpm workspace in pnpm-workspace.yaml. Locally verified that pnpm pack does resolve catalog:^0.211.2 for a test package in this location, but worth confirming in CI.
  • Flag passthrough from seed.yml: The publish commands in seed/fern-cli/seed.yml append flags like --access public --tag latest after the script name (e.g. pnpm --filter @fern-api/cli publish:cli:dev --access public --tag latest). Verify these flags are correctly forwarded to pnpm publish.
  • cli-v2 not affected: cli-v2 does not have its own publish scripts in package.json, so no changes needed there.

Testing

  • Manually verified that pnpm pack resolves catalog:^0.211.2 for a test package.json placed in the dist directory
  • Full end-to-end publish not tested (would require npm credentials and a real publish)

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 <>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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 <>
@fern-support fern-support enabled auto-merge (squash) February 23, 2026 04:16
@fern-support fern-support merged commit e208ff7 into main Feb 23, 2026
74 checks passed
@fern-support fern-support deleted the devin/1771819650-fix-catalog-protocol-in-cli-build branch February 23, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants