Skip to content

fix(ci): remove invalid .npmrc config and add lockfile platform validation#2193

Merged
markscott-ms merged 3 commits intofinos:mainfrom
rocketstack-matt:fix/npmrc-warnings-lockfile-validation
Feb 28, 2026
Merged

fix(ci): remove invalid .npmrc config and add lockfile platform validation#2193
markscott-ms merged 3 commits intofinos:mainfrom
rocketstack-matt:fix/npmrc-warnings-lockfile-validation

Conversation

@rocketstack-matt
Copy link
Member

@rocketstack-matt rocketstack-matt commented Feb 28, 2026

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).

  • 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

Resolves #2191

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Shared (shared/)
  • CALM Widgets (calm-widgets/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • Documentation (docs/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

…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
Copilot AI review requested due to automatic review settings February 28, 2026 18:42
@rocketstack-matt rocketstack-matt requested a review from a team as a code owner February 28, 2026 18:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.js to validate darwin ↔ linux-x64 platform variant presence in package-lock.json.
  • Add a validate-lockfile GitHub Actions workflow and document the clean lockfile regeneration procedure in AGENTS.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.

rocketstack-matt and others added 2 commits February 28, 2026 18:49
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).
Copy link
Contributor

@markscott-ms markscott-ms left a comment

Choose a reason for hiding this comment

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

Great!

@markscott-ms markscott-ms merged commit b6ae935 into finos:main Feb 28, 2026
13 checks passed
@rocketstack-matt rocketstack-matt deleted the fix/npmrc-warnings-lockfile-validation branch February 28, 2026 19:48
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.

.npmrc contains invalid config about supportedArchitectures

3 participants