feat: add node-pre-gyp support#1095
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1095 +/- ##
==========================================
+ Coverage 76.01% 76.30% +0.29%
==========================================
Files 20 21 +1
Lines 688 726 +38
Branches 129 136 +7
==========================================
+ Hits 523 554 +31
- Misses 118 121 +3
- Partials 47 51 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/cli.ts
Outdated
| useElectronClang: !!argv.useElectronClang, | ||
| disablePreGypCopy: !!argv.disablePreGypCopy, | ||
| projectRootPath, | ||
| skipPrebuilds: !!argv.skipPrebuilds, |
There was a problem hiding this comment.
Does this new option also impact prebuild or just node-pre-gyp?
There was a problem hiding this comment.
It also appears to have a buildFromSource behavior rather than "skipping" the module entirely
There was a problem hiding this comment.
renamed prebuild -> buildFromSource
|
@samuelmaddock, you can rebase this on |
a83c50f to
fd708a0
Compare
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
VerteDinde
left a comment
There was a problem hiding this comment.
The code changes look good to me
|
|
||
| export async function cleanupTestModule(testModulePath: string): Promise<void> { | ||
| await fs.remove(testModulePath); | ||
| await fs.rmdir(testModulePath, { recursive: true, maxRetries: 10 }); |
| it('should not fail running prebuild-install', async () => { | ||
| it('should not fail running prebuild-install', async function () { | ||
| if (process.platform === 'darwin' && process.arch === 'arm64') { | ||
| this.skip(); // farmhash module has no prebuilt binaries for ARM64 |
There was a problem hiding this comment.
| this.skip(); // farmhash module has no prebuilt binaries for ARM64 | |
| this.skip(); // farmhash module has no prebuilt binaries for ARM64 | |
| return; |
This reverts commit e71316b.
|
o shoot, I merged before sam's comments loaded :PPP I'll make a new pr to address these |
|
🎉 This PR is included in version 3.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@mapbox/node-pre-gyp is a popular choice for serving prebuilt native node module binaries. These changes add support for downloading prebuilt binaries using it as well as rebuilding in the case that no prebuilt binaries are found.
A
skipPrebuildsoption was added to give tests the ability to force rebuilds without using any prebuilt binary modules.node-sqlite3 is used to test for node-pre-gyp support.
resolves #367