Skip to content

refactor(FEC-924): migrate from Yarn 3 to pnpm#3239

Draft
misama-ct wants to merge 7 commits into
mainfrom
migration/pnpm
Draft

refactor(FEC-924): migrate from Yarn 3 to pnpm#3239
misama-ct wants to merge 7 commits into
mainfrom
migration/pnpm

Conversation

@misama-ct
Copy link
Copy Markdown
Contributor

@misama-ct misama-ct commented May 13, 2026

TL;DR

Migrates commercetools/ui-kit from Yarn 3.8.7 to pnpm 10.33.4, aligning the repository with the rest of the MCF organisation. No public API change, no consumer-facing behaviour change; ships as a minor bump in the 20.x line.

Tracks Jira FEC-924. Follow-up to closed PR #3228 (April spike) — same mechanical migration, now coordinated end-to-end: CI green, Percy approved, byte-parity documented, canary validated against merchant-center-application-kit.

Why

ui-kit was the org's last frontend repo on Yarn 3. The original spike (#3228) proved the migration was technically feasible but closed without merging because none of the gating signals (CI green end-to-end, Changesets publish flow, Percy, internal-consumer canary) had been exercised. This PR is the coordinated execution.

What changes

Yarn surface pnpm equivalent
yarn.lock pnpm-lock.yaml
.yarnrc.yml + .yarn/ pnpm-workspace.yaml + .npmrc (shamefully-hoist=true)
packageManager: yarn@3.8.7 + engines.yarn packageManager: pnpm@10.33.4 (no engines.yarn)
constraints.pro (Prolog rules) scripts/check-workspace-constraints.js (same checks: license / repository / publishConfig)
resolutions (37 entries, yarn-specific key syntax) pnpm.overrides (ported verbatim; pnpm accepts the same package@range syntax)
yarn workspace … / manypkg run / manypkg exec pnpm --filter … run … / pnpm -r exec …
yarn-plugin-postinstall fork npm postinstall lifecycle hook wired to ./scripts/postinstall.sh
GitHub Actions: actions/setup-node + yarn cache pnpm/action-setup@v4 + setup-node@v6 (package-manager-cache: false) + explicit actions/cache@v5 for pnpm store
Vercel preview: default installer installCommand / buildCommand overridden, ENABLE_EXPERIMENTAL_COREPACK=1

shamefully-hoist=true is deliberate, per FEC-924's "Resolved decisions" — tightening it to targeted public-hoist-pattern[] is a separate ticket. The publint gate below mitigates the risk that comes with it.

What surfaced along the way

The mechanical conversion is well-trodden ground. The interesting work was the set of failures encountered on the way to green CI and a working canary. Each item below is a one-time discovery; none of them changes anything consumers can observe:

  • Puppeteer's Chrome download gets silently skipped. pnpm's side-effects-cache caches postinstall side-effects in the store. When CI restores the store from the GitHub Actions cache, pnpm skips re-running puppeteer's postinstall — but Chrome lives outside node_modules / the pnpm store, so the binary is missing on the runner. Yarn's eager postinstall masked this. Resolved by an explicit pnpm exec puppeteer browsers install chrome step before the VRT job.

  • design-system had three phantom devDependencies (prettier, rcfile, yaml) used by its build scripts but never declared on the package. Yarn's hoisted layout resolved them transitively; pnpm's strict isolation does not. Declared explicitly. The same risk class — for publishable packages — motivated the publint gate below.

  • One phantom import in a story file: packages/components/dropdowns/dropdown-menu/src/dropdown-menu.stories.tsx imported @commercetools-uikit/constraints/src (a deep import into the source folder rather than the published entry point). Surfaced by pnpm's stricter isolation, unrelated to the lockfile flip. Normalised to the top-level export.

  • setup-node@v6 + registry-url: + the runner's pre-installed yarn 1.22.22 is a footgun. v6's new package-manager-cache: true default auto-detects the package manager; combined with registry-url, it picks up the runner's pre-installed yarn 1 instead of pnpm and aborts at yarn config get cacheFolder before any of the workflow's own steps run. The error message yarn-1 emits — "packageManager": "yarn@pnpm@10.33.4" — is a yarn-1 message-construction quirk, not a malformed field. Resolved by package-manager-cache: false on the affected workflows; the pnpm store cache is managed explicitly via actions/cache@v5 below the setup-node step.

  • @babel/runtime resolves to a newer patch under a fresh pnpm install (7.27/7.287.29, both within the existing ^7.20.13 range). Documented in the byte-parity check below; output is strictly smaller / more modern but semantically identical. Normal lockfile-refresh effect, not migration-specific.

  • The [preview_deployment] PR comment couldn't run against this branch pre-merge. GitHub resolves uses: ./.github/workflows/... references against the default branch on issue_comment events. So [preview_deployment] was always going to load main's (still-yarn) workflow and run it against this branch's pnpm-only code — guaranteed to fail. Resolved by landing the pnpm version of preview-release-on-comment.yml as a precursor PR (ci(preview-release): migrate workflow to pnpm ahead of FEC-924 #3240) on main first, then triggering [preview_deployment] against this branch. Once this PR merges, the precursor's content is just part of main; no orphan state.

  • patch-package silently doesn't apply under pnpm, taking pnpm generate-readmes down with it. patch-package writes to node_modules/<pkg>/; under pnpm's strict layout that path is a symlink into .pnpm/<pkg>@<ver>/node_modules/<pkg>/, and patch-package doesn't follow the symlink to patch the canonical file. The lone patch in this repo (typescript-react-function-component-props-handler+1.1.1.patch — an Array.isArray guard before .params.length inside react-docgen's prop extractor) therefore never applied, and pnpm generate-readmes threw TypeError: Cannot read properties of undefined (reading 'length'). Resolved by migrating to native pnpm patch — patches are now wired via pnpm.patchedDependencies and applied directly into the .pnpm store at install time. patch-package removed from devDependencies, postinstall step trimmed. pnpm generate-readmes now runs to completion.

Validation evidence

Three independent angles, summarised below; detailed artefacts (per-package tarballs, extracted trees, diff -r outputs, publint snapshots) are preserved locally for inspection.

publint parity vs the npm registry. Pulled the published 20.5.0 tarball of every non-private workspace package, packed every package locally on this branch with pnpm, diffed normalised publint --pack pnpm output. 97/97 packages identical. Zero migration-introduced findings. shamefully-hoist=true did not let any undeclared import slip through. The new pnpm lint:publint CI step locks this property in going forward.

npm pack byte-parity vs main. Built main in a worktree under yarn 3.8.7, packed every non-private package, packed the same set on this branch under pnpm 10.33.4, extracted both, ran diff -r on the package/ directories.

  • 9 packages byte-identical: aggregator / re-export packages unaffected by babel-runtime resolution.

  • 88 packages differ, in well-understood categories:

    • 11: README only — install snippet yarn addpnpm add (deliberate).
    • 16: Bundle only — newer @babel/runtime[-corejs3] patch (7.27/7.287.29, range ^7.20.13 already permits this). Concretely: _taggedTemplateLiteral helper + _templateObject declarations gone; concat polyfill replaced by template literals; internal _context variable numbering shifts. Strictly smaller, more modern output; semantically identical.
    • 59: README + bundle (Class A ∪ Class B).
    • 1 (design-system): build:tokens:watch script wording (dev-only, never executed by consumers) + the three declared devDependencies mentioned above (not installed by consumers).
    • 1 (data-table-manager): content-derived chunk-hash rename, content delta itself is Class B.

    No code-generation drift, no API or runtime behaviour change, no unintended file additions / removals.

merchant-center-application-kit canary CI. PR commercetools/merchant-center-application-kit#4008 pinned every @commercetools-uikit/* dep — direct and transitive — to the published snapshot 0.0.0-migration-pnpm-20260513114959 (tag migration-pnpm) via pnpm.overrides. Required because the 0.0.0- prefix doesn't satisfy ^20.4.0 semver ranges; the override resolves the whole dep graph to one consistent canary version. All 20+ checks green on the first run: lint_and_test, test_visual, all 4 starter-template tests (js/ts × custom-app/custom-view) plus their _installation variants, test_playground, both Percy builds, all 4 Orca scans, both Vercel previews. Percy reported zero visual changes between current 20.5.0 and the migration snapshot — confirms the byte-parity prediction that the babel-runtime patch bump is semantically identical at the rendered-output level. PR closed after validation.

Local + CI validation

  • pnpm install / pnpm build / pnpm typecheck / pnpm test (125 suites, 1402 tests) / pnpm lint (1307 files)
  • pnpm lint:publint — 97 published packages, zero publint errors
  • node scripts/check-workspace-constraints.js
  • rg '\byarn\b' returns zero hits in source / scripts / CI (excluding .yarn/, node_modules, CHANGELOG*, pnpm-lock.yaml)
  • GitHub Actions main workflow — green end-to-end, no suppressions
  • Percy — approved by the PR author
  • Vercel preview deploy — green
  • Changesets snapshot publish (migration-pnpm tag) — green
  • mc-app-kit canary CI — green, zero Percy diff

Commit structure & merge strategy

Seven commits, organised by topic so reviewers can read in chunks:

# Commit Notes
1 0f3eb87 chore: bulk text replace yarn → pnpm in docs and tooling Mechanical s/yarn/pnpm/g across 95 files (READMEs, generator templates, jest configs, lint-staged, svgr). Low cognitive load.
2 5390457 refactor: replace yarn tooling with pnpm at the workspace level The heart of the migration: lockfile, workspace config, packageManager pin, 37 resolutionspnpm.overrides, constraints.pro → JS validator, root + per-workspace package.json, shell scripts, husky, phantom-import fix, includes the immutable@^4.3.8 pin for CVE-2026-29063.
3 2416423 ci: migrate GitHub Actions workflows and Vercel preview to pnpm main.yml + publish-release.yml + vercel.json, including the setup-node@v6 fix and the Puppeteer Chrome install step.
4 c42e11f feat(ci): gate phantom-dep regressions via publint scripts/check-publint.js + the CI step calling it.
5 c465531 chore: regenerate icons 161 generated-icon files, output of pnpm generate-icons.
6 a7d16a3 chore(changeset): pnpm migration Anchor changeset for the fixed-version group.
7 06b4e58 refactor: migrate patch-package to native pnpm patch Replaces the silently-broken patch-package flow with pnpm.patchedDependencies; restores pnpm generate-readmes as a side effect.

Merge strategy: squash-merge per the FEC-924 plan. The chunking exists so reviewers can read the migration in pieces; the final history on main is one commit.

Out of scope (follow-up tickets)

  • Tighten hoisting: replace shamefully-hoist=true with targeted public-hoist-pattern[].
  • Pre-existing publint warnings/suggestions: per-package findings about pkg.exports, pkg.type, pkg.engines.node, .esm.js interpreted as CJS, repository.url formatting. Identical on yarn-built main and pnpm-built migration; CI gate doesn't fail on them.
  • Regenerate stale package READMEs: the docgen-based generator now runs again (see commit 7 above). Running it produces real prop-table updates in ~10 components — out of scope here, separate maintenance task.
  • pnpm catalogs adoption.
  • bundlewatch vs bundlesize reconciliation.

Refs

@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

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

Project Deployment Actions Updated (UTC)
ui-kit Ready Ready Preview, Comment May 13, 2026 0:33am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

🦋 Changeset detected

Latest commit: 06b4e58

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

This PR includes changesets to release 98 packages
Name Type
@commercetools-uikit/design-system Minor
@commercetools-uikit/calendar-utils Minor
@commercetools-uikit/avatar Minor
@commercetools-uikit/card Minor
@commercetools-uikit/collapsible-panel Minor
@commercetools-uikit/constraints Minor
@commercetools-uikit/data-table-manager Minor
@commercetools-uikit/data-table Minor
@commercetools-uikit/field-label Minor
@commercetools-uikit/filters Minor
@commercetools-uikit/icons Minor
@commercetools-uikit/label Minor
@commercetools-uikit/link Minor
@commercetools-uikit/loading-spinner Minor
@commercetools-uikit/notifications Minor
@commercetools-uikit/pagination Minor
@commercetools-uikit/primary-action-dropdown Minor
@commercetools-uikit/progress-bar Minor
@commercetools-uikit/quick-filters Minor
@commercetools-uikit/stamp Minor
@commercetools-uikit/tag Minor
@commercetools-uikit/text Minor
@commercetools-uikit/tooltip Minor
@commercetools-uikit/view-switcher Minor
@commercetools-uikit/accessible-button Minor
@commercetools-uikit/flat-button Minor
@commercetools-uikit/icon-button Minor
@commercetools-uikit/link-button Minor
@commercetools-uikit/primary-button Minor
@commercetools-uikit/secondary-button Minor
@commercetools-uikit/secondary-icon-button Minor
@commercetools-uikit/dropdown-menu Minor
@commercetools-uikit/async-creatable-select-field Minor
@commercetools-uikit/async-select-field Minor
@commercetools-uikit/creatable-select-field Minor
@commercetools-uikit/date-field Minor
@commercetools-uikit/date-range-field Minor
@commercetools-uikit/date-time-field Minor
@commercetools-uikit/localized-multiline-text-field Minor
@commercetools-uikit/localized-text-field Minor
@commercetools-uikit/money-field Minor
@commercetools-uikit/multiline-text-field Minor
@commercetools-uikit/number-field Minor
@commercetools-uikit/password-field Minor
@commercetools-uikit/radio-field Minor
@commercetools-uikit/search-select-field Minor
@commercetools-uikit/select-field Minor
@commercetools-uikit/text-field Minor
@commercetools-uikit/time-field Minor
@commercetools-uikit/async-creatable-select-input Minor
@commercetools-uikit/async-select-input Minor
@commercetools-uikit/checkbox-input Minor
@commercetools-uikit/creatable-select-input Minor
@commercetools-uikit/date-input Minor
@commercetools-uikit/date-range-input Minor
@commercetools-uikit/date-time-input Minor
@commercetools-uikit/input-utils Minor
@commercetools-uikit/localized-money-input Minor
@commercetools-uikit/localized-multiline-text-input Minor
@commercetools-uikit/localized-rich-text-input Minor
@commercetools-uikit/localized-text-input Minor
@commercetools-uikit/money-input Minor
@commercetools-uikit/multiline-text-input Minor
@commercetools-uikit/number-input Minor
@commercetools-uikit/password-input Minor
@commercetools-uikit/radio-input Minor
@commercetools-uikit/rich-text-input Minor
@commercetools-uikit/rich-text-utils Minor
@commercetools-uikit/search-select-input Minor
@commercetools-uikit/search-text-input Minor
@commercetools-uikit/select-input Minor
@commercetools-uikit/select-utils Minor
@commercetools-uikit/selectable-search-input Minor
@commercetools-uikit/text-input Minor
@commercetools-uikit/time-input Minor
@commercetools-uikit/toggle-input Minor
@commercetools-uikit/spacings-inline Minor
@commercetools-uikit/spacings-inset-squish Minor
@commercetools-uikit/spacings-inset Minor
@commercetools-uikit/spacings-stack Minor
@commercetools-uikit/buttons Minor
@commercetools-frontend/ui-kit Minor
visual-testing-app Patch
@commercetools-uikit/messages Minor
@commercetools-uikit/fields Minor
@commercetools-uikit/inputs Minor
@commercetools-uikit/spacings Minor
@commercetools-uikit/field-errors Minor
@commercetools-uikit/field-warnings Minor
@commercetools-uikit/calendar-time-utils Minor
@commercetools-uikit/hooks Minor
@commercetools-uikit/i18n Minor
@commercetools-uikit/localized-utils Minor
@commercetools-uikit/utils Minor
@commercetools-uikit/accessible-hidden Minor
@commercetools-uikit/collapsible-motion Minor
@commercetools-uikit/collapsible Minor
@commercetools-uikit/grid Minor

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

Copy link
Copy Markdown

@orca-security-eu orca-security-eu Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Failed Failed Vulnerabilities high 1   medium 0   low 0   info 0 View in Orca
☢️ The following Vulnerabilities (CVEs) have been detected
PACKAGE FILE CVE ID INSTALLED VERSION FIXED VERSION
critical immutable ./pnpm-lock.yaml CVE-2026-29063 4.3.7 4.3.8, 5.1.5, 3.8.3 View in code

@misama-ct
Copy link
Copy Markdown
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Copy Markdown
Contributor

ct-changesets Bot commented May 13, 2026

Release workflow failed ❌\nSee details: Workflow Run

@misama-ct
Copy link
Copy Markdown
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Copy Markdown
Contributor

ct-changesets Bot commented May 13, 2026

Release workflow failed ❌\nSee details: Workflow Run

misama-ct added a commit that referenced this pull request May 13, 2026
Replaces the yarn-based steps in preview-release-on-comment.yml with
the pnpm equivalents that the FEC-924 migration branch (#3239) needs
to publish a snapshot via the [preview_deployment] PR comment.

Why this lands ahead of the full migration:
GitHub resolves `uses: ./.github/workflows/...` references against the
calling workflow's commit. For issue_comment events that's always the
default branch (main), regardless of which PR triggered the comment.
So the [preview_deployment] comment on PR #3239 runs main's version of
this file — currently the yarn version — against the pnpm-only PR
branch's code, and fails immediately.

This is a CI-only precursor; no published artifacts change. main's
other workflows (main.yml, publish-release.yml) remain yarn-based and
keep working until the full migration lands.

Temporary side effect: between this PR merging and PR #3239 merging,
[preview_deployment] only works for pnpm-based PRs. There are no
other open developer PRs that rely on it.

Includes the setup-node@v6 fix: package-manager-cache: false. v6's
built-in auto-cache combined with registry-url picks the runner's
pre-installed yarn 1 instead of pnpm and aborts before any of the
workflow's own steps run. We manage the pnpm store cache explicitly
via actions/cache@v5 below the setup-node step.
@misama-ct
Copy link
Copy Markdown
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Copy Markdown
Contributor

ct-changesets Bot commented May 13, 2026

Release workflow succeeded ✅\nSee details: Workflow Run

misama-ct added 6 commits May 13, 2026 14:29
Mechanical s/yarn/pnpm/g across non-code surfaces:

- 87 *.md / *.mdx files: AGENTS, CLAUDE, CONTRIBUTING, Storybook
  welcome pages, Percy README, ~75 per-package READMEs, generator
  templates.
- README generators (generators/readme + generators/package-json):
  the autogenerated header `<!-- created by the yarn generate-readme
  script -->` and the install instruction blocks (`yarn add` →
  `pnpm add`).
- Tool configs that invoke the package manager by name:
  jest-puppeteer (visual-testing-app:preview server command),
  lint-staged (prettier --write trigger), svgr (icon-generation
  header comment), and the three jest project configs.

No code change, no behaviour change. Split out so the rest of the
migration commits stay focused on real configuration / logic.
The core of the migration. Swaps every yarn-specific surface for its
pnpm equivalent in a single atomic change:

Lockfile & package-manager pin
- yarn.lock removed; pnpm-lock.yaml generated against current deps.
- packageManager: yarn@3.8.7 → pnpm@10.33.4. engines.yarn dropped.
- workspace:* protocol used for local @commercetools-local/generator-*
  references (was bare *).

Workspace configuration
- .yarnrc.yml + .yarn/ (plugins, yarn 3.8.7 release) deleted.
- pnpm-workspace.yaml + .npmrc (shamefully-hoist=true, deliberate per
  FEC-924 "Resolved decisions") added.
- pnpm.onlyBuiltDependencies allowlist for postinstall scripts that
  need to run under pnpm's strict allow-list (@percy/core, @swc/core,
  core-js, esbuild, puppeteer, unrs-resolver).

Resolutions / overrides
- 37 yarn `resolutions` entries → pnpm.overrides, ported verbatim.
- yarn-specific `package@range` syntax preserved (path-to-regexp@^1.7.0,
  picomatch@^2.0.4, etc.) — pnpm supports the same format.
- Adds immutable@^4.3.8 override (CVE-2026-29063, was transitive on
  yarn too).

Workspace constraints
- constraints.pro (Prolog rules) replaced by
  scripts/check-workspace-constraints.js — same checks (license,
  repository, publishConfig.access) in a tool that doesn't require
  yarn-specific Prolog tooling.

Scripts (root package.json)
- yarn workspace … → pnpm --filter … run …
- manypkg run / exec → pnpm --filter … run … / pnpm -r exec …
- changeset:version-and-format swaps to `pnpm install --no-frozen-lockfile`.
- postinstall lifecycle hook wired to ./scripts/postinstall.sh (was
  previously the deleted yarn-plugin-postinstall fork).

Per-workspace package.json
- design-system gains explicit `prettier`, `rcfile`, `yaml`
  devDependencies. yarn's flat hoisting masked these transitively;
  pnpm's strict isolation requires them declared on the workspace
  that actually imports them.
- storybook package.json trivially adjusted.

Shell scripts & git hooks
- scripts/build.sh, build_watch.sh, postinstall.sh, print_release_version.sh
  use `pnpm` / `pnpm --filter` invocations.
- .husky/commit-msg + pre-commit reflect the same.

Phantom-import fix
- packages/components/dropdowns/dropdown-menu/src/dropdown-menu.stories.tsx:
  deep import `@commercetools-uikit/constraints/src` → top-level
  `@commercetools-uikit/constraints`. Surfaced by pnpm's stricter
  isolation, unrelated to the lockfile flip.

Refs: FEC-924
GitHub Actions
- main.yml + publish-release.yml: `pnpm/action-setup@v4` + `pnpm store`
  cache + `pnpm install --frozen-lockfile`. `yarn` invocations replaced
  with `pnpm` / `pnpm --filter` equivalents.
- setup-node@v6 gets `package-manager-cache: false`: v6's built-in
  auto-cache combined with `registry-url` picks up the runner's
  pre-installed yarn 1 instead of pnpm and aborts before any of the
  workflow's own steps run. We manage the pnpm store cache explicitly
  via actions/cache@v5 below.
- Explicit `pnpm exec puppeteer browsers install chrome` step before
  VRT: pnpm's side-effects cache silently skips puppeteer's postinstall
  on cache restore, leaving the Chrome binary missing on the runner.
  Yarn's eager postinstall masked this.
- preview-release-on-comment.yml is untouched here — that file was
  landed as a precursor (#3240) so the [preview_deployment] PR comment
  could publish a snapshot for the mc-app-kit canary against this PR
  before merge. Including the precursor's content here would have
  produced an empty diff.

Vercel preview build
- vercel.json: installCommand / buildCommand overridden to use pnpm
  via Corepack (ENABLE_EXPERIMENTAL_COREPACK=1) since Vercel's default
  installer doesn't auto-pick pnpm from the packageManager field.

Refs: FEC-924
Adds a CI gate that catches the class of regression FEC-924 risk #4
worries about: shamefully-hoist=true (which this PR ships, intentionally)
can let a publishable package import a dep it never declares. Works
locally, breaks for consumers on strict pnpm.

publint lints the *packed* tarball, so it detects the regression at
exactly the layer that matters — what consumers receive from npm.

- scripts/check-publint.js: iterates every non-private workspace
  package, runs `pnpm exec publint --pack pnpm` per package, fails CI
  on any non-zero aggregate exit. publint's defaults exit non-zero
  only on Errors (missing files referenced from package.json,
  unresolved imports, malformed exports). Warnings and Suggestions
  are logged but don't fail — pre-existing per-package findings
  (about pkg.exports / pkg.type / .esm.js handling / repository.url
  formatting) are unchanged between yarn-built main and pnpm-built
  migration, so they're out of scope.
- main.yml: adds a `Running publint check` step after typecheck. The
  step depends on `pnpm build` having run, since publint packs the
  built artifacts.

Pre-flight validation: pulled the published 20.5.0 tarball of every
non-private package from npm registry, packed every package locally
on this branch with pnpm, diffed normalised publint output. 97/97
identical — no migration-introduced findings.

Wired script + package.json entries (lint:publint, publint devDep)
already landed in the prior workspace-tooling commit.

Refs: FEC-924
Re-runs `pnpm generate-icons` so the generated source files in
packages/components/icons + checkbox-input/src/icons +
rich-text-utils/src/rich-text-body/icons reflect the new generator
output under pnpm — primarily updates the header comment
(`yarn generate-icons` → `pnpm generate-icons`) plus minor
formatting normalisation from `prettier --write` on the resulting
files.

Mechanical output, no code change.
Anchor changeset so the Changesets fixed-version group bumps every
published @commercetools-uikit/* + @commercetools-frontend/* package
in lockstep on next release. Triggers a minor bump in the 20.x line
per FEC-924's release decision.

Message reads "internal: package manager migrated from Yarn 3 to
pnpm; no consumer-facing changes." per the ticket.
patch-package and pnpm don't play well together. patch-package writes
to the top-level node_modules/<pkg>/ path; under pnpm's strict layout
that location is a symlink into the .pnpm/<pkg>@<ver>/node_modules/<pkg>/
store directory, but patch-package doesn't follow the symlink to patch
the canonical file. The patch silently fails to apply, and the
postinstall step reports success regardless.

Concrete impact on this branch (before this commit): the lone patch
in patches/ — typescript-react-function-component-props-handler+1.1.1
— never took effect under pnpm. That patch adds an Array.isArray guard
before reading .params.length inside react-docgen's prop-extraction
pipeline; without it, `pnpm generate-readmes` throws
`TypeError: Cannot read properties of undefined (reading 'length')`
on certain components.

Native pnpm patch writes the patched file directly into the .pnpm
store via `pnpm.patchedDependencies` in root package.json. The patch
is now correctly applied at install time.

Mechanics:
- `pnpm patch typescript-react-function-component-props-handler@1.1.1`
  → applied the same Array.isArray fix
- `pnpm patch-commit` wrote patches/typescript-react-function-component-props-handler@1.1.1.patch
  (note `@` separator vs patch-package's `+`) and the
  patchedDependencies entry in root package.json
- Deleted patches/typescript-react-function-component-props-handler+1.1.1.patch
- Removed `patch-package` from devDependencies
- Removed `pnpm patch-package` invocation from scripts/postinstall.sh
- Reinstalled to regenerate pnpm-lock.yaml (patch-package + transitive
  deps removed, patch hash recorded against the patched package)

Verification: `pnpm generate-readmes` now runs to completion. Stale
README content in 10 packages exists as a separate concern — fixed in
the generator/tooling here; regenerating the actual README outputs is
a separate maintenance task.

Resolves FEC-924 follow-up: "patch-package → native pnpm patch".
Side-effect: also resolves "broken pnpm generate-readmes" since the
generator's underlying bug is what the patch was written to fix.
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