Skip to content

chore: migrate from yarn to pnpm - #5849

Draft
jmfrancois wants to merge 12 commits into
masterfrom
chore/migrate-yarn-to-pnpm
Draft

chore: migrate from yarn to pnpm#5849
jmfrancois wants to merge 12 commits into
masterfrom
chore/migrate-yarn-to-pnpm

Conversation

@jmfrancois

@jmfrancois jmfrancois commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate the monorepo from Yarn Classic to pnpm (isolated/strict node_modules), converting root config, all tools/scripts-* CLIs that shelled out to yarn, and CI workflows.
  • Delete tools/scripts-config-react-webpack and tools/scripts-config-cdn (dead, zero real consumers) instead of patching their yarn-hoisting-coupled code, in line with the ongoing webpack→vite / jest→vitest migration.
  • Fix phantom-dependency issues that only worked under yarn's flat hoist (scripts-core's prettier/stylelint resolution, per-package resolutions in packages/components) and a critical one caught during validation: internal @talend/* deps don't use the workspace: protocol, so plain pnpm install silently resolved them from the npm registry instead of linking local workspace code — fixed via linkWorkspacePackages: true.
  • Retire .github/workflows/yarn-deduplicate.yml (pnpm dedupes natively).
  • Drop @talend/scripts-publish-local entirely (unused local-registry helper, no consumers) and its pending changeset.

Test plan

  • pnpm install completes clean with no phantom-dependency errors
  • pnpm build:lib succeeds across all 26 workspace packages
  • talend-scripts extends resolves all 5 generated config branches (prettier/stylelint/eslint/babel/typescript) end-to-end
  • Rewritten talend-yarn-workspace CLI runs correctly against pnpm -r run --if-present
  • ESLint config loads and runs under pnpm (only pre-existing lint debt surfaced, no resolution crashes)
  • CI green on this PR (workflows converted but not yet run)

🤖 Generated with Claude Code

Switches package management from Yarn Classic to pnpm (isolated linker),
retiring the webpack/CDN tooling that carried yarn-hoisting assumptions
(scripts-config-react-webpack, scripts-config-cdn) instead of patching
them, in line with the ongoing webpack->vite and jest->vitest migration.

- Delete scripts-config-react-webpack and scripts-config-cdn (dead,
  no real consumers; held every yarn-hoisting-coupled hack found).
- Remove dead jest branch in scripts-core/extends.js and orphaned jest
  config block in packages/http.
- Declare scripts-config-prettier/stylelint as real deps of scripts-core
  (previously phantom deps that only worked via yarn's flat hoist).
- Rewrite scripts-yarn-workspace to shell out to `pnpm -r run
  --if-present` instead of parsing `yarn workspaces info`.
- Swap scripts-publish-local's yarn CLI calls (registry/cache config)
  to pnpm equivalents.
- Root package.json/pnpm-workspace.yaml: packageManager, workspaces,
  resolutions -> overrides (including a stray per-package resolutions
  block pnpm doesn't read), script invocations, linkWorkspacePackages
  (needed since internal @talend/* deps don't use the workspace:
  protocol, so plain pnpm install silently resolved from the registry
  instead of linking local packages).
- Convert yarn.lock to pnpm-lock.yaml, update CI (composite setup
  action + all workflows), retire yarn-deduplicate.yml (pnpm dedupes
  natively).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2a71e68

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

This PR includes changesets to release 3 packages
Name Type
@talend/scripts-core Minor
@talend/react-components Patch
@talend/http Patch

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

jmfrancois and others added 3 commits September 4, 2026 17:37
Per-package changesets for the packages whose behavior actually changed in
the yarn->pnpm migration: react-components (build script + dropped
resolutions), http (dropped orphaned jest config), scripts-core (real deps
instead of phantom hoisted ones, dropped jest-config generation),
scripts-yarn-workspace (rewritten to shell out to pnpm, now requires pnpm),
scripts-publish-local (registry/cache setup now uses pnpm, now requires
pnpm). scripts-config-cdn and scripts-config-react-webpack are deleted
entirely, so changesets can't target them (not in the workspace); no
changeset added for those two.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The package had already been rewritten to shell out to pnpm during the
yarn->pnpm migration, making it a thin wrapper around `pnpm -r run
<script> --if-present --workspace-concurrency=1`. Inline that pnpm
command directly into the two root scripts that used it
(vitest:update, test:cron) and remove the now-unused package, its
devDependency, and the superseded changeset that documented its
rewrite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Unused local-registry helper superseded by pnpm equivalents; remove package and its pending changeset.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jmfrancois

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request by droping the yarn.lock file

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request by droping the yarn.lock file

Verified that yarn.lock is already removed from the PR head; pnpm-lock.yaml is present and the working tree is clean. No additional conflict-resolution commit is needed.

GITHUB_TOKEN can't read private cross-repo packages. @talend/daikon-tql-client
is still private, so pnpm's cold install hits a 403 that yarn's warm cache
was masking. Revert the NPM_TOKEN input (and NODE_AUTH_TOKEN env) back to
secrets.NPM_TOKEN, as it was before ad59239.

Requires the NPM_TOKEN repo secret (a PAT with read:packages) to be
recreated in repo settings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 9, 2026 15:31 — with GitHub Actions Active
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.

2 participants