-
-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced
@mapbox/node-pre-gyp
in favor of prebuild
+ `prebuild-in…
…stall` fixes #1641 fixes #1721 fixes #1714 fixes #1713 fixes #1700 fixes #1704 - `@mapbox/node-pre-gyp` is effectively unmaintained [1] as has a few bugs which our users keep running into - it seems the prebuilt binary world has moved in favor of prebuild + it's various other forms - one option would be to use prebuildify to bundle all binaries into the package, but that's a step too far removed from the current situation for now - instead, we can use prebuild-install to download the binaries, and `prebuild` to build + upload the binaries - this means we can remove node-pre-gyp and fix a bunch of issues! - eventually, we could start providing electron prebuilt binaries too [1]: mapbox/node-pre-gyp#657
- Loading branch information
1 parent
a2cee71
commit 605c7f9
Showing
7 changed files
with
26 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,4 @@ setup.sh | |
*.tgz | ||
package-lock.json | ||
yarn.lock | ||
prebuilds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
const binary = require('@mapbox/node-pre-gyp'); | ||
const path = require('path'); | ||
const binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json'))); | ||
const binding = require(binding_path); | ||
module.exports = exports = binding; | ||
module.exports = require('bindings')('node_sqlite3.node'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,19 +12,12 @@ WORKDIR /usr/src/build | |
COPY . . | ||
RUN npm install --ignore-scripts | ||
|
||
# Workaround for https://github.com/mapbox/node-pre-gyp/issues/644 | ||
RUN cd node_modules/\@mapbox/node-pre-gyp \ | ||
&& npm install [email protected] \ | ||
&& sed -i -e s/\'fs/\'fs-extra/ -e s/fs\.renameSync/fs.moveSync/ ./lib/util/napi.js | ||
|
||
ENV CFLAGS="${CFLAGS:-} -include ../src/gcc-preinclude.h" | ||
ENV CXXFLAGS="${CXXFLAGS:-} -include ../src/gcc-preinclude.h" | ||
RUN npx node-pre-gyp configure | ||
RUN npx node-pre-gyp build | ||
RUN npm run prebuild | ||
|
||
RUN if case $VARIANT in "alpine"*) false;; *) true;; esac; then ldd lib/binding/*/node_sqlite3.node; nm lib/binding/*/node_sqlite3.node | grep \"GLIBC_\" | c++filt || true ; fi | ||
RUN if case $VARIANT in "alpine"*) false;; *) true;; esac; then ldd build/**/node_sqlite3.node; nm build/**/node_sqlite3.node | grep \"GLIBC_\" | c++filt || true ; fi | ||
|
||
RUN npm run test | ||
RUN npx node-pre-gyp package | ||
|
||
CMD ["sh"] |