Archived
1
0

Update node to 10.15.1 (#472)

* Update Node to 10.15.1

* Remove string replace that was used for oclif

* Update nbin

* Package node-pty and spdlog with nbin

* Label stderr/stdout from shared process

* Remove fork override

* Prevent "already disposed" errors when trying to kill disposed proxies

* Include spdlog dependencies

* Shim /node_modules

* Add node_modules to Docker ignore

It keeps using my already-built .node files which results in a
mismatching GLIBC version error.

* Update nbin
This commit is contained in:
Asher
2019-04-15 19:48:12 -05:00
committed by GitHub
parent dfabc070b9
commit aabb2ecda7
22 changed files with 95 additions and 647 deletions

View File

@ -10,7 +10,9 @@ const root = path.join(__dirname, "..");
module.exports = (options = {}) => ({
context: root,
devtool: "none",
externals: ["fsevents"],
externals: {
fsevents: "fsevents",
},
module: {
rules: [{
loader: "string-replace-loader",
@ -44,48 +46,6 @@ module.exports = (options = {}) => ({
}, {
test: /\.wasm$/,
type: "javascript/auto",
}, {
// Fixes spdlog.
test: /spdlog(\\|\/)index\.js/,
loader: "string-replace-loader",
options: {
multiple: [{
search: "const spdlog.*;",
replace: "const spdlog = __non_webpack_require__(global.SPDLOG_LOCATION);",
flags: "g",
}],
},
}, {
// This is required otherwise it attempts to require("package.json")
test: /@oclif(\\|\/)command(\\|\/)lib(\\|\/)index\.js/,
loader: "string-replace-loader",
options: {
multiple: [{
search: "checkNodeVersion\\(\\);",
replace: "",
flags: "g",
}],
},
}, {
test: /node\-pty\-prebuilt(\\|\/)lib(\\|\/)index\.js/,
loader: "string-replace-loader",
options: {
multiple: [{
search: "exports\\.native.*;",
replace: "exports.native = null;",
flags: "g",
}],
},
}, {
test: /node\-pty\-prebuilt(\\|\/)lib(\\|\/).*\.js/,
loader: "string-replace-loader",
options: {
multiple: [{
search: "var pty = .*pty\.node.*;",
replace: "var pty = __non_webpack_require__(global.NODEPTY_LOCATION);",
flags: "g",
}],
},
}],
},
resolve: {

View File

@ -5,4 +5,8 @@ module.exports = (options = {}) => merge(
devtool: "none",
mode: "production",
target: "node",
externals: {
spdlog: "commonjs spdlog",
"node-pty": "commonjs node-pty",
}
});