forked from noble/noble
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(prebuildify-cross): patching packages to fix prebuilding
- Loading branch information
Marek Serafin
committed
Sep 25, 2024
1 parent
0f5b456
commit 19a4c6f
Showing
4 changed files
with
73 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/node_modules/@vweevers/docker-pull/index.js b/node_modules/@vweevers/docker-pull/index.js | ||
index 67b3e73..bac4a84 100644 | ||
--- a/node_modules/@vweevers/docker-pull/index.js | ||
+++ b/node_modules/@vweevers/docker-pull/index.js | ||
@@ -12,7 +12,7 @@ var pull = function (image, opts, cb) { | ||
image = parse(image) | ||
if (!image) throw new Error('Invalid image') | ||
|
||
- var request = docker({host: opts.host, version: opts.version || 'v1.21'}) | ||
+ var request = docker({host: opts.host, version: opts.version || 'v1.24'}) | ||
var that = new events.EventEmitter() | ||
var layers = {} | ||
var progress = {} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/node_modules/docker-run/index.js b/node_modules/docker-run/index.js | ||
index ea7fc0d..1f08702 100644 | ||
--- a/node_modules/docker-run/index.js | ||
+++ b/node_modules/docker-run/index.js | ||
@@ -14,7 +14,7 @@ var endsWith = function(str, suffix) { | ||
var run = function(image, opts) { | ||
if (!opts) opts = {} | ||
|
||
- var request = docker(opts.host, {version:'v1.14'}) | ||
+ var request = docker(opts.host, {version:'v1.24'}) | ||
var that = new events.EventEmitter() | ||
var tty = !!opts.tty | ||
|
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/node_modules/prebuildify-cross/guest.js b/node_modules/prebuildify-cross/guest.js | ||
index dfd9eb7..c660f86 100644 | ||
--- a/node_modules/prebuildify-cross/guest.js | ||
+++ b/node_modules/prebuildify-cross/guest.js | ||
@@ -10,18 +10,12 @@ const files = JSON.parse(process.env.PREBUILDIFY_CROSS_FILES) | ||
const argv = process.argv.slice(2) | ||
|
||
// Copy host files to working directory | ||
-for (const file of files) { | ||
- const a = path.join('/input', file) | ||
- const b = path.join(cwd, file) | ||
+fs.cpSync("/input", cwd, { recursive: true }) | ||
|
||
- fs.mkdirSync(path.dirname(b), { recursive: true }) | ||
- fs.copyFileSync(a, b, fs.constants.COPYFILE_EXCL) | ||
- fs.chmodSync(b, 0o644) | ||
+if (fs.existsSync(cwd + "/build")) { | ||
+ fs.rmSync(cwd + "/build", { recursive: true, }) | ||
} | ||
|
||
-// Use node_modules of host to avoid a second install step | ||
-fs.symlinkSync('/input/node_modules', path.join(cwd, 'node_modules')) | ||
- | ||
const stdio = ['ignore', 2, 2] | ||
const res = cp.spawnSync('npx', ['--no-install', 'prebuildify', ...argv], { cwd, stdio }) | ||
|