build: switch to pnpm for development - #488
Merged
Merged
Conversation
Replace npm with pnpm as the development package manager: - package-lock.json -> pnpm-lock.yaml (converted with `pnpm import`, so resolved versions are preserved) - npm `overrides` -> `overrides` in pnpm-workspace.yaml (pnpm 11 no longer reads settings from the package.json `pnpm` field); the nested npm form maps to `parent>child` selectors - aws-sdk's postinstall is not needed (it is only require()d by node-pre-gyp when publishing prebuilts), so it is denied via `allowBuilds` rather than approved - CI installs pnpm via `npm i -g pnpm@11` (works in the MSYS2 shell too) and passes --build-from-source as the npm_config_build_from_source env var, since pnpm rejects unknown CLI flags - dev docs updated; consumer-facing `npm install node-gtk` docs and the create-app scaffold stay npm, since those run on user machines Consumers are unaffected: the package still publishes to npm and the install script still goes through npx node-pre-gyp. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The first CI run silently tested the stale v4.1.1 S3 prebuilt: unlike npm, pnpm does not forward inherited npm_config_* env vars (or unknown CLI flags) to lifecycle scripts, so npm_config_build_from_source=true never reached node-pre-gyp and the install script downloaded the prebuilt. That surfaced as conversion__gvalue_autobox.js failing on every job, since the merge ref includes #487 but the prebuilt predates it. Skip the install script entirely and run the source build as an explicit step instead: pnpm install --ignore-scripts pnpm run build:full # node-pre-gyp rebuild Verified locally: against the downloaded prebuilt the autobox test reproduces CI's failure; after `pnpm run build:full` it passes and the suite is green (101 passing, plus the known environmental require.js failure that also occurs on master). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switches the development package manager from npm to pnpm. Consumers are unaffected: the package still publishes to npm, and the
installscript still goes throughnpx node-pre-gyp install --fallback-to-buildunder whatever package manager the end user runs.Changes
package-lock.json→pnpm-lock.yaml, converted withpnpm importso resolved versions are preserved.overridesblock moves topnpm-workspace.yamlasparent>childselectors. Note that pnpm 11 no longer reads settings from thepnpmfield in package.json, so the file is used purely as a settings carrier (this is still a single-package repo, no workspaces).allowBuilds— it's onlyrequire()d by node-pre-gyp when publishing prebuilts, which still resolves fine under pnpm since aws-sdk is a direct devDependency at the root ofnode_modules.npm i -g pnpm@11(the npm shim also works inside the MSYS2 shell), andnpm install --build-from-sourcebecomesnpm_config_build_from_source=true pnpm installbecause pnpm rejects unknown CLI flags.ci.shnow callspnpm test/pnpm run build:test-fixtures.npm install node-gtkdocs, the create-app scaffold output, and the release checklist'snpm version/npm publish(registry commands, PM-agnostic) intentionally stay npm.Verification
Local (Linux, Node 26.4.0):
pnpm installfetches the S3 prebuilt and runs the root install script; overrides verified applied (aws-sdk>uuidresolves to 11.1.1); full test suite: 100 passing, 1 failing — the failure (tests/require.js, system libpeas typelibs requiring GIRepository 3.0) reproduces identically on npm-based master, i.e. pre-existing/environmental, not a regression.🤖 Generated with Claude Code