Skip to content

[FE-3214] chore: migrate from npm to pnpm with supply chain hardening#579

Open
Kabidoye-17 wants to merge 2 commits into
mainfrom
pnpm-migration
Open

[FE-3214] chore: migrate from npm to pnpm with supply chain hardening#579
Kabidoye-17 wants to merge 2 commits into
mainfrom
pnpm-migration

Conversation

@Kabidoye-17

@Kabidoye-17 Kabidoye-17 commented Jul 8, 2026

Copy link
Copy Markdown

Why?

This repo was surfaced in a follow-up audit as part of the org-wide effort to bring active npm repos onto a supply-chain-hardened footing (per-package script gating, install cooldown, pnpm's stricter dependency graph). Migrating to pnpm 10 aligns Intercom-OpenAPI with the target config already applied across the sibling repos in FE-3214.

How?

pnpm import was used to convert package-lock.json to pnpm-lock.yaml verbatim, preserving every resolved version so no transitive dependency drift shipped alongside the tooling swap. Supply-chain settings (minimumReleaseAge: 10080, trustPolicy: no-downgrade) live in pnpm-workspace.yaml; a preinstall guard enforces pnpm locally and no-ops in CI; the es5-ext cosmetic postinstall is silenced via pnpm.ignoredBuiltDependencies. Disabled workflows under .github/workflows-disabled/ were updated so they continue to work if re-enabled — the new pnpm/action-setup refs are SHA-pinned. Pre-existing GHA hardening gaps (unpinned actions/checkout, missing top-level permissions: blocks) were left out of scope; whoever re-enables any workflow should run the security-review skill end-to-end first.

Follow-up commitfern-api is pinned to 5.65.3 in docs and workflows. pnpm add -g fern-api (unpinned) fails through Intercom's registry proxy because the proxy serves the fern-api manifest without a dist-tags block, and pnpm has no fallback resolver for a missing latest tag. Upstream issues, both open:

When those are fixed (or the proxy is fixed to include dist-tags), the pin can be dropped.

Generated with Claude Code

pnpm's global install has no fallback when a registry manifest lacks
dist-tags, and Intercom's Socket Firewall proxy serves the fern-api
manifest without them, so `pnpm add -g fern-api` (unpinned) fails with
ERR_PNPM_NO_MATCHING_VERSION. Pinning bypasses `latest` resolution.

Upstream: pnpm/pnpm#5564, pnpm/pnpm#9944 (both open).
@Kabidoye-17

Kabidoye-17 commented Jul 8, 2026

Copy link
Copy Markdown
Author

Local Verification — no regressions

Same fern flow run on both sides. The same 3 pre-existing spec errors and 295 warnings appear on main and on this branch — no new errors introduced by the migration.

Master (npm install)

rm -rf node_modules && npm install — 550 packages in 6s; 6 deprecation warnings; 12 vulnerabilities (4 moderate, 8 high) reported by npm audit.

master: npm install output

npm install -g fern-apifern checkfern generate --preview --group ts-sdk — 3 errors, 295 warnings.

master: fern check + generate --preview

This branch (pnpm install)

rm -rf node_modules && pnpm install — 522 packages in 3.3s; preinstall guard runs and exits 0. The ${GITHUB_TOKEN} .npmrc warning is pre-existing (harmless — no @intercom/* runtime deps consume it).

branch: pnpm install output

fern check — 3 errors, 295 warnings (identical to master).

branch: fern check

fern generate --preview --group ts-sdk — 3 errors, 295 warnings (identical to master).

branch: fern generate --preview --group ts-sdk

Errors — identical on both sides

File Error
preview/conversationsAttributes.yml CreateConversationAttributeOptionRequest already declared in preview/__package__.yml
preview/articles.yml PublishArticleDraftRequest already declared in preview/__package__.yml
preview/articles.yml UpdateArticleRequestBody is not defined

Pre-existing spec issues, unrelated to the migration.

~ Automated via Claude

@Kabidoye-17 Kabidoye-17 marked this pull request as ready for review July 8, 2026 14:12
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