feat(1.112): update patches (#2750)

This commit is contained in:
Baptiste Augrain
2026-03-17 19:27:30 +01:00
committed by GitHub
parent 2321c2c695
commit 803457343a
15 changed files with 397 additions and 278 deletions

View File

@@ -1,14 +1,15 @@
diff --git a/build/npm/postinstall.ts b/build/npm/postinstall.ts
index c4bbbf5..2a1c6c5 100644
index ae2651c..3bc46fa 100644
--- a/build/npm/postinstall.ts
+++ b/build/npm/postinstall.ts
@@ -52,5 +52,6 @@ function npmInstall(dir: string, opts?: child_process.SpawnSyncOptions) {
opts.cwd = root;
@@ -74,5 +74,7 @@ async function npmInstallAsync(dir: string, opts?: child_process.SpawnOptions):
- if (process.env['npm_config_arch'] === 'arm64') {
- run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
- run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], syncOpts);
- }
+ const emulateArchList = ['arm64', 'arm', 'ppc64', 'riscv64', 's390x', 'loong64'];
+ if (process.env['DISABLE_QEMU'] !== 'true' && !!process.env['npm_config_arch'] && emulateArchList.includes(process.env['npm_config_arch'])) {
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'tonistiigi/binfmt:latest', '--install', 'all'], opts);
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'tonistiigi/binfmt:latest', '--install', 'all'], syncOpts);
+ }
+
run('sudo', [