fix(ci): remove invalid .npmrc config and add lockfile platform validation#2193
Merged
markscott-ms merged 3 commits intofinos:mainfrom Feb 28, 2026
Merged
Conversation
…ation The supportedArchitectures keys in .npmrc are pnpm-only and produce "Unknown project config" warnings on every npm CI run. The actual fix for missing native bindings was lockfile regeneration (npm/cli#4828). - Remove pnpm-only supportedArchitectures block from .npmrc - Add scripts/validate-lockfile-platforms.js to verify linux-x64 variants exist for all packages with darwin variants - Add validate-lockfile CI workflow triggered on package-lock.json changes - Document lockfile regeneration process in AGENTS.md
Contributor
There was a problem hiding this comment.
Pull request overview
Removes pnpm-only .npmrc config that causes warnings under npm, and adds CI validation to ensure package-lock.json retains required platform-specific optional dependencies (preventing Linux CI breakages when the lockfile is regenerated on macOS).
Changes:
- Remove unsupported
supportedArchitectures[...]keys from.npmrc. - Add
scripts/validate-lockfile-platforms.jsto validate darwin ↔ linux-x64 platform variant presence inpackage-lock.json. - Add a
validate-lockfileGitHub Actions workflow and document the clean lockfile regeneration procedure inAGENTS.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
scripts/validate-lockfile-platforms.js |
New lockfile validation script for platform-specific optional dependency variants. |
AGENTS.md |
Documents the correct (clean) lockfile regeneration process to avoid npm optional-deps pruning issues. |
.npmrc |
Removes pnpm-only config keys that trigger npm warnings. |
.github/workflows/validate-lockfile.yml |
Adds CI workflow to run lockfile platform validation on package-lock.json changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The platform-suffix regex only matched names with a dash before the OS segment (e.g. @rollup/rollup-darwin-arm64) but missed scoped packages like @esbuild/darwin-arm64 where the OS follows a slash. Update the regex to match both [-/] separators so all platform-specific package groups are validated (6 groups instead of 5).
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.
Description
The supportedArchitectures keys in .npmrc are pnpm-only and produce "Unknown project config" warnings on every npm CI run. The actual fix for missing native bindings was lockfile regeneration (npm/cli#4828).
variants exist for all packages with darwin variants
Resolves #2191
Type of Change
Affected Components
cli/)shared/)calm-widgets/)calm-hub/)calm-hub-ui/)docs/)calm-plugins/vscode/)Commit Message Format ✅
Testing
Checklist