microsoft / microsoft/vscode-generator-code

Resolve existing package managers issues (including pnpm)

Open Beginner friendly
#573 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.6k
Forks
262
Avg merge
15d 22h
Merged PRs (30d)
1

Description

When initializing a bundled extension project, the generator does not automatically include dependencies: false in the generated package.json manifest.

Most modern package managers (specifically pnpm, but also npm and yarn) continue to include a node_modules folder or resolve dependencies (npm list --depth 9999) unless explicitly told otherwise (dependencies: false). For extensions that are bundled (e.g., into dist/extension.js), including these dependencies in the VSIX is unnecessary and increases the package size and runs the npm list --depth 9999 command.

Proposed Change

Update the generator to include dependencies: false in the manifest by default whenever a user selects a "bundled" project configuration. This should apply regardless of the chosen package manager.

Context & Dependencies

https://github.com/microsoft/vscode-vsce/pull/1257

While the PR above addresses a race condition to ensure dependencies: false is respected reliably by vsce, the generator should be updated independently to support this field.

Future Work

Once the PR is merged, we should also look into adding support for runPrepublish option specific to each package manager (e.g., pnpm run vscode:prepublish).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the generator code that creates the package.json manifest for bundled extension projects, then trace how the selected package manager affects that output. Confirm that generated manifests include dependencies: false for bundled configurations across the supported package managers, and verify the generated output with the project's existing tests or checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.