Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

Addresses build and test failures preventing pnpm support from merging.

Changes

  • Fixed TypeScript error in PackageManagerService.isPackageInstalled(): Changed const args to let args to allow reassignment in pnpm case, which constructs a different argument structure than npm/yarn
  • Fixed test expecting no package manager detection: Test now removes all lock files before asserting error is thrown
  • Added missing package-lock.json in react test fixtures: File existed in core but was absent in react, causing test failures

Example

// Before: compilation error
const args: string[] = [packageManager, "list", "--depth=1", "--json"];
// ...
case PackageManagerType.pnpm:
  args = [packageManager, "list", packageName, "--json", "--depth=1"]; // Error: Cannot assign to const

// After: compiles correctly
let args: string[] = [packageManager, "list", "--depth=1", "--json"];
// ...
case PackageManagerType.pnpm:
  args = [packageManager, "list", packageName, "--json", "--depth=1"]; // OK

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 7, 2025 15:41
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build and make tests pass for pnpm support Fix TypeScript compilation error and test failures in pnpm support Nov 7, 2025
Copilot AI requested a review from neilime November 7, 2025 15:46
Copilot finished work on behalf of neilime November 7, 2025 15:46
@neilime neilime marked this pull request as ready for review November 7, 2025 15:49
@neilime neilime changed the title Fix TypeScript compilation error and test failures in pnpm support fix: typeScript compilation error and test failures in pnpm support Nov 7, 2025
@neilime neilime merged commit cf5dd0a into feat/supports-pnpm Nov 7, 2025
2 of 4 checks passed
@neilime neilime deleted the copilot/sub-pr-1629 branch November 7, 2025 15:58
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.

2 participants