Skip to content

Remove unused gulp-sourcemaps dependency - #14729

Merged
Sean McManus (sean-mcmanus) merged 5 commits into
mainfrom
seanmcm/devbox2-wsl/agent161/remove-unused-gulp-sourcemaps
Sep 3, 2026
Merged

Remove unused gulp-sourcemaps dependency#14729
Sean McManus (sean-mcmanus) merged 5 commits into
mainfrom
seanmcm/devbox2-wsl/agent161/remove-unused-gulp-sourcemaps

Conversation

@sean-mcmanus

Copy link
Copy Markdown
Contributor

Summary

Remove the unused gulp-sourcemaps initialization from the localization pipelines and drop the dependency. This removes the vulnerable transitive decode-uri-component@0.2.2 package while preserving localization behavior because the metadata generator does not consume source maps.

Validation

  • yarn install --frozen-lockfile --ignore-scripts
  • yarn compile
  • yarn translations-generate
  • yarn gulp translations-export

This PR was investigated and created by GitHub Copilot in VS Code. Any message starting with ✨Copilot: was sent by Copilot.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The dependency and all usages are removed consistently without affecting metadata generation.

Pull request overview

Removes unused source-map initialization from localization pipelines and eliminates its vulnerable dependency chain.

Changes:

  • Removes gulp-sourcemaps usage and dependency.
  • Prunes related transitive packages from the lockfile.
  • Preserves existing localization pipeline behavior.
File summaries
File Description
Extension/gulpfile.js Removes source-map initialization from localization tasks.
Extension/package.json Removes the unused development dependency.
Extension/yarn.lock Prunes gulp-sourcemaps and orphaned transitive dependencies.
Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✨Copilot (agent165): Reviewed at a7bd689 against base 2f25880, with local verification.

The core change is correct. vscode-nls-dev@4.0.4's createMetaDataFiles() calls processFile(file.contents.toString('utf8')) with no source-map argument, so the maps were never consumed — only rewriteLocalizeCalls() reads file.sourceMap, and this gulpfile does not use it. The transpiled JS is also filtered out of both pipelines before gulp.dest, so it never reaches disk.

Empirical A/B: with node_modules installed from the base lockfile and only gulpfile.js swapped, gulp translations-generate and gulp translations-export produce byte-identical output (180 files under dist/, and the 312,756-byte vscode-cpptools.xlf). Re-running both at this head after yarn install --frozen-lockfile reproduces the same outputs. yarn test-yarn-lock and yarn verify-yarn-lock pass, and gulp-sourcemaps, source-map-resolve, and decode-uri-component are gone from node_modules.

No debugging regression: gulp-typescript already forces inlineSourceMap: false / sourceMap: true at project creation and then sets sourceMap from whether inputs carry a map, so this only stops an unused map from being generated. Shipped source maps still come from tsc --build (inlineSourceMap) and webpack (devtool: 'source-map').

Security rationale checks out: decode-uri-component@0.2.2 is still covered by GHSA-vcc3-ghjq-m6fr (<= 0.4.2, patched in 0.5.0), so calling it vulnerable is accurate even though it postdates the older GHSA-w573-4hg7-7wgq fix.

One [Minor] follow-through comment on the leftover resolutions entries. Build-time-only change with no product-code impact; low release risk.

Comment thread Extension/package.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The dependency cleanup is complete and consistent with the unchanged localization pipeline behavior.

Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@sean-mcmanus
Sean McManus (sean-mcmanus) marked this pull request as ready for review September 3, 2026 02:15
@sean-mcmanus
Sean McManus (sean-mcmanus) requested a review from a team as a code owner September 3, 2026 02:15
sean-mcmanus

This comment was marked as low quality.

@sean-mcmanus
Sean McManus (sean-mcmanus) merged commit 2857a07 into main Sep 3, 2026
6 checks passed
@sean-mcmanus
Sean McManus (sean-mcmanus) deleted the seanmcm/devbox2-wsl/agent161/remove-unused-gulp-sourcemaps branch September 3, 2026 16:09
@github-project-automation github-project-automation Bot moved this from Pull Request to Done in cpptools Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants