Skip to content

fix: bundled extensions (fix package managers)#1257

Open
Mopsgamer wants to merge 12 commits intomicrosoft:mainfrom
Mopsgamer:arborist
Open

fix: bundled extensions (fix package managers)#1257
Mopsgamer wants to merge 12 commits intomicrosoft:mainfrom
Mopsgamer:arborist

Conversation

@Mopsgamer
Copy link
Copy Markdown

@Mopsgamer Mopsgamer commented Apr 3, 2026

Summary

Enables support for pnpm, modern yarn (Berry, ZPM), vlt, bun, and other alternative package managers by properly handling the --no-dependencies flag. This PR fixes a race condition (?) (Promise.all(promises).then(util.flatten)) and ensures the flag is enabled automatically when these managers are detected.

The core logic assumes that extensions using alternative managers are bundling their output; therefore, the node_modules directory does not need to be analyzed via npm list, eliminating "missing dependency" errors.

Features

  • Automatic Detection: bun, vlt, pnpm, and yarn (v2+) are detected out of the box.
  • Custom Prepublish Commands: Introduced the VSCE_RUN_PREPUBLISH environment variable and vsce.runPrepublish configuration option. This allows for custom commands like bun run vscode:prerelease, which is much faster and actually supports cross-platform scripts properly. You can provide empty VSCE_RUN_PREPUBLISH or false value for vsce.runPrepublish to disable it entirely (probably should remove it).
  • When Bun detected, uses bun pm version instead of npm version. So Node-less Bun environments should work.
  • For node_modules/** --no-dependecies option will be enabled now if not provided. This makes things faster.
  • Fixes #1108.
  • Fixes #421.
  • Fixes #517.

... Other package manager issues.

I can trip this PR down to remove autodetection and keep

@Mopsgamer Mopsgamer mentioned this pull request Apr 3, 2026
@Mopsgamer Mopsgamer marked this pull request as draft April 4, 2026 19:03
@Mopsgamer Mopsgamer closed this Apr 4, 2026
@Mopsgamer Mopsgamer reopened this Apr 4, 2026
@Mopsgamer Mopsgamer changed the title fix!: robust dependency resolution fix: bundled extensions (fix package managers) Apr 4, 2026
@Mopsgamer Mopsgamer marked this pull request as ready for review April 4, 2026 23:37
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.

1 participant