Skip to content

Use pnpm instead of npm in check-data-files.mjs#881

Merged
IEvangelist merged 1 commit intomicrosoft:mainfrom
IEvangelist:dapine/fix-npm-in-pnpm-workspace
May 8, 2026
Merged

Use pnpm instead of npm in check-data-files.mjs#881
IEvangelist merged 1 commit intomicrosoft:mainfrom
IEvangelist:dapine/fix-npm-in-pnpm-workspace

Conversation

@IEvangelist
Copy link
Copy Markdown
Member

Summary

Fixes #872

The repository is configured as a pnpm workspace (pnpm-workspace.yaml, pnpm-lock.yaml, "packageManager": "pnpm@10.30.1"), but src/frontend/scripts/check-data-files.mjs hardcoded:

execSync('npm run update:all', { stdio: 'inherit' });

When pnpm dev is run and missing data files are detected, the script jumps out of the active pnpm environment and forces npm run update:all. Running npm inside a pnpm workspace:

  • Ignores pnpm-lock.yaml
  • Creates an unnecessary package-lock.json
  • Generates an incompatible flat node_modules structure
  • Can corrupt or destabilize the local development environment
  • Breaks workspace dependency consistency

Change

This repo is intended to strictly use pnpm (it ships a pnpm-workspace.yaml and pins packageManager to pnpm@10.30.1), so the script now invokes pnpm directly:

execSync('pnpm run update:all', { stdio: 'inherit' });

This keeps the call site simple and matches every other script invocation in src/frontend/package.json (dev, start, build, lint, test, update:all, etc. all use pnpm).

The repository is configured as a pnpm workspace (pnpm-workspace.yaml,
pnpm-lock.yaml, packageManager: pnpm@10.30.1), but check-data-files.mjs
hardcoded `npm run update:all`. Running npm inside a pnpm workspace
ignores pnpm-lock.yaml, creates an unnecessary package-lock.json, and can
corrupt or destabilize the local development environment.

Fixes microsoft#872

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 7, 2026 18:02
Copy link
Copy Markdown
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

Updates the frontend “missing data files” safety check to keep all script execution inside the repo’s pnpm workspace, avoiding npm lockfile/node_modules side effects.

Changes:

  • Switch check-data-files.mjs to run pnpm run update:all instead of npm run update:all.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IEvangelist IEvangelist enabled auto-merge (squash) May 8, 2026 12:52
@IEvangelist IEvangelist merged commit 460da0a into microsoft:main May 8, 2026
9 checks passed
davidfowl added a commit that referenced this pull request May 8, 2026
* chore: Update integration data and GitHub stats (5/7/26) (#882)

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use pnpm instead of npm in check-data-files.mjs (#881)

The repository is configured as a pnpm workspace (pnpm-workspace.yaml,
pnpm-lock.yaml, packageManager: pnpm@10.30.1), but check-data-files.mjs
hardcoded `npm run update:all`. Running npm inside a pnpm workspace
ignores pnpm-lock.yaml, creates an unnecessary package-lock.json, and can
corrupt or destabilize the local development environment.

Fixes #872

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: Update integration data and GitHub stats (5/8/26) (#890)

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add Hot Reload and watch guidance (#887)

* Add Hot Reload and watch guidance

Document Aspire watch behavior for AppHost changes, resource-specific restart and rebuild workflows, and IDE-managed hot reload/debugging boundaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify dotnet watch AppHost behavior

Document current dotnet watch behavior for Aspire AppHosts and .NET project resources, including restart behavior and known quirks requiring explicit restart or rebuild commands.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify C# projects watch guidance

Rename the project resources tab to C# projects and tighten the dotnet watch wording around C# project behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refine C# dotnet watch guidance

Lead the C# projects section with dotnet watch support for C# AppHosts and move current experience quirks into an Important note.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Reduce C# watch guidance repetition

Tighten the C# projects section so dotnet watch support and defaultWatchEnabled behavior are not repeated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update standalone dashboard docs for Aspire CLI (#886)

* Update standalone dashboard docs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Centralize standalone dashboard prerequisites

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Restore dashboard landing quick start

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address dashboard quick start feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix terminal tabs regression test source

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix standalone dashboard telemetry limits link

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Show both dashboard quick start options

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address standalone dashboard review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
Copilot AI pushed a commit that referenced this pull request May 9, 2026
* chore: Update integration data and GitHub stats (5/7/26) (#882)

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use pnpm instead of npm in check-data-files.mjs (#881)

The repository is configured as a pnpm workspace (pnpm-workspace.yaml,
pnpm-lock.yaml, packageManager: pnpm@10.30.1), but check-data-files.mjs
hardcoded `npm run update:all`. Running npm inside a pnpm workspace
ignores pnpm-lock.yaml, creates an unnecessary package-lock.json, and can
corrupt or destabilize the local development environment.

Fixes #872

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: Update integration data and GitHub stats (5/8/26) (#890)

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add Hot Reload and watch guidance (#887)

* Add Hot Reload and watch guidance

Document Aspire watch behavior for AppHost changes, resource-specific restart and rebuild workflows, and IDE-managed hot reload/debugging boundaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify dotnet watch AppHost behavior

Document current dotnet watch behavior for Aspire AppHosts and .NET project resources, including restart behavior and known quirks requiring explicit restart or rebuild commands.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify C# projects watch guidance

Rename the project resources tab to C# projects and tighten the dotnet watch wording around C# project behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refine C# dotnet watch guidance

Lead the C# projects section with dotnet watch support for C# AppHosts and move current experience quirks into an Important note.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Reduce C# watch guidance repetition

Tighten the C# projects section so dotnet watch support and defaultWatchEnabled behavior are not repeated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update standalone dashboard docs for Aspire CLI (#886)

* Update standalone dashboard docs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Centralize standalone dashboard prerequisites

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Restore dashboard landing quick start

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address dashboard quick start feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix terminal tabs regression test source

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix standalone dashboard telemetry limits link

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Show both dashboard quick start options

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address standalone dashboard review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
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.

check-data-files.mjs executes npm in a pnpm workspace, risking node_modules corruption

3 participants