Skip to content

Conversation

@ggdouglas
Copy link
Contributor

@ggdouglas ggdouglas commented Oct 22, 2025

Summary

This PR migrates the Blueprint monorepo from Yarn v4 to pnpm v10.18.3 as the package manager

Related PRs

To make this large change easier to review, some commits have been split into separate PRs:

Changes in this PR

Core migration changes:

  • Replace Yarn v4 with pnpm v10.18.3
  • Add pnpm-workspace.yaml
  • Remove .yarnrc.yml, yarn.config.cjs, and .yarn/ directory
  • Update package.json
  • Delete yarn.lock, add pnpm-lock.yaml
  • Update .gitignore and .prettierignore for pnpm

CI/CD updates:

  • Adjust caching strategy for pnpm store
  • Add no_output_timeout: 20m for lint job to handle CI resource constraints

Documentation updates:

  • Update documentation to reference pnpm instead of yarn
  • Update package READMEs and inline documentation

Development environment fixes:

  • Suppress Sass deprecation warnings in webpack config (legacy JS API and @import warnings)
  • Fix stylelint-plugin tests to load plugin from local path
  • Update karma test coverage thresholds for affected components

Copy link
Contributor

@mm-wang mm-wang left a comment

Choose a reason for hiding this comment

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

LGTM, would like someone with some more experience in builds to look at it too, but checked it on some repos and seems like no issues! You can circle back to me for approval if needed.

- run: yarn constraints
- run: pnpm install --frozen-lockfile
# TODO: Re-enable constraints check with pnpm equivalent if needed
# - run: pnpm constraints
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Why is this commented out for now? When will we need to run it?

@ggdouglas ggdouglas force-pushed the gdouglas/chore-yarn-to-pnpm branch from 2fab7ed to 5a24628 Compare October 24, 2025 15:39
@ggdouglas ggdouglas force-pushed the gdouglas/chore-yarn-to-pnpm branch from 5a24628 to f27d99b Compare October 24, 2025 16:12
@svc-palantir-github
Copy link

Add `pnpm-lock.yaml`

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

},
"pnpm": {
"overrides": {
"@swc/core": "1.13.20",
Copy link
Contributor Author

@ggdouglas ggdouglas Oct 24, 2025

Choose a reason for hiding this comment

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

Added this to mitigate an issue that seems to be specific to @swc/core@1.13.21

Was encountering local build failures when running pnpm nx dist on docs packages (landing-app, docs-app, and demo-app) with the error: Error: Failed to load native binding. Possibly something to do with @swc/core@1.13.21 having an invalid/corrupted code signature in its native binary for darwin-arm64 (macOS ARM). 1.13.21 was published very recently (10 hours ago as of writing this)

@svc-palantir-github
Copy link

Override `@swc/core` to `1.13.20` to avoid issue with `1.13.21`

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

Revert change to `typeRoots` in `tsconfig.base.json`

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

"cssnano": "^6.0.3",
"fork-ts-checker-notifier-webpack-plugin": "^9.0.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"istanbul-instrumenter-loader": "^3.0.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Referenced here:

loader: fileURLToPath(import.meta.resolve("istanbul-instrumenter-loader")),

"@typescript-eslint/rule-tester": "^8.23.0",
"dedent": "^1.5.1",
"mocha": "^10.2.0",
"tslib": "~2.6.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes an error while running compile on eslint-plugin

    ✖  nx run @blueprintjs/eslint-plugin:compile
       > @blueprintjs/eslint-plugin@6.1.16 compile /Volumes/git/blueprint/packages/eslint-plugin
       > tsc -p src/

       src/rules/no-deprecated-components/index.ts:5:1 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.

       5 export * from "./no-deprecated-components";
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       Found 1 error in src/rules/no-deprecated-components/index.ts:5

export * from "./no-deprecated-components";

Screenshot 2025-10-24 at 15 06 33@2x

# see https://yarnpkg.com/cli/config/set, https://yarnpkg.com/configuration/yarnrc#npmAuthToken
yarn config set npmAuthToken "${NPM_AUTH_TOKEN}"
# see https://pnpm.io/cli/config
pnpm config set //registry.npmjs.org/:_authToken "${NPM_AUTH_TOKEN}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if there is an easy way to test/validate these publish scripts prior to merging

sassOptions: {
includePaths: sassNodeModulesLoadPaths,
// FIXME: https://sass-lang.com/documentation/breaking-changes/
silenceDeprecations: ["import", "legacy-js-api"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Split out into #7606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants