Skip to content

chore: remove node-pre-gyp dependency#334

Merged
aabmass merged 1 commit into
google:mainfrom
aabmass:remove-node-pre-gyp
Jun 26, 2026
Merged

chore: remove node-pre-gyp dependency#334
aabmass merged 1 commit into
google:mainfrom
aabmass:remove-node-pre-gyp

Conversation

@aabmass

@aabmass aabmass commented Jun 26, 2026

Copy link
Copy Markdown
Member

This resolves issue #320 and CVE-2026-24842 by completely removing the @mapbox/node-pre-gyp dependency.

Context

Prebuilt binaries were only being built and uploaded for older Node.js versions (Node 12, 14, 16, 17). Users running on Node 18+ were already compiling from source on installation because node-pre-gyp fell back to source builds when no prebuilt binary was found on GCS.

Changes

This resolves the security vulnerability in tar by removing it from the dependency graph entirely, while preserving Node 14+ compatibility.

@aabmass aabmass force-pushed the remove-node-pre-gyp branch from 839ab0b to 7e00a4a Compare June 26, 2026 18:57
@aabmass aabmass requested a review from psx95 June 26, 2026 20:16
@aabmass

aabmass commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

I'm working on removing the "ci/kokoro: system test (prebuild binaries)" test, since it's no longer needed as we won't be providing prebuilt binaries.

Comment thread kokoro_system_test_log.txt Outdated
This resolves issue google#320 and CVE-2026-24842 by completely removing the @mapbox/node-pre-gyp dependency, which is no longer needed since we don't need to support prebuilt binaries on older Node.js versions.

- Removed @mapbox/node-pre-gyp from dependencies and simplified gyp build target in binding.gyp.
- Refactored heap-profiler-bindings.ts and time-profiler-bindings.ts to load the native addon using the bindings package directly.
- Updated npm install/pretest scripts in package.json to rebuild the native addon directly with node-gyp.

TAG=agy
CONV=4ca117e0-d8fa-4e4c-8cfa-b52e896710d3
@aabmass aabmass force-pushed the remove-node-pre-gyp branch from 7e00a4a to ad14b4d Compare June 26, 2026 20:19
@aabmass aabmass enabled auto-merge (squash) June 26, 2026 20:32
@aabmass aabmass merged commit 01d4059 into google:main Jun 26, 2026
13 checks passed
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.75%. Comparing base (dead429) to head (ad14b4d).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #334      +/-   ##
==========================================
- Coverage   41.92%   41.75%   -0.17%     
==========================================
  Files          14       14              
  Lines        2092     2086       -6     
  Branches       42       42              
==========================================
- Hits          877      871       -6     
  Misses       1197     1197              
  Partials       18       18              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aabmass aabmass deleted the remove-node-pre-gyp branch June 26, 2026 22:00
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.

3 participants