avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+42 -10
View File
@@ -1,21 +1,50 @@
const { existsSync } = require('node:fs');
const path = require('node:path');
const { platform, arch, report } = require('node:process');
const { spawnSync } = require('node:child_process');
const isMusl = () => {
const getReportHeader = () => {
try {
return !report.getReport().header.glibcVersionRuntime;
if (platform !== 'win32') {
return report.getReport().header;
}
// This is needed because report.getReport() crashes the process on Windows sometimes.
const script =
"console.log(JSON.stringify(require('node:process').report.getReport().header));";
const child = spawnSync(process.execPath, ['-p', script], {
encoding: 'utf8',
timeout: 3000,
windowsHide: true
});
if (child.status !== 0) {
return null;
}
// The output from node -p might include a trailing 'undefined' and newline
const stdout = child.stdout?.replace(/undefined\r?\n?$/, '').trim();
if (!stdout) {
return null;
}
return JSON.parse(stdout);
} catch {
return false;
return null;
}
};
let reportHeader;
const isMingw32 = () => {
try {
return report.getReport().header.osName.startsWith('MINGW32_NT');
} catch {
return false;
}
reportHeader ??= getReportHeader();
return reportHeader?.osName?.startsWith('MINGW32_NT') ?? false;
};
const isMusl = () => {
reportHeader ??= getReportHeader();
return reportHeader ? !reportHeader.glibcVersionRuntime : false;
};
const bindingsByPlatformAndArch = {
@@ -34,12 +63,15 @@ const bindingsByPlatformAndArch = {
linux: {
arm: { base: 'linux-arm-gnueabihf', musl: 'linux-arm-musleabihf' },
arm64: { base: 'linux-arm64-gnu', musl: 'linux-arm64-musl' },
loong64: { base: 'linux-loong64-gnu', musl: null },
ppc64: { base: 'linux-ppc64-gnu', musl: null },
loong64: { base: 'linux-loong64-gnu', musl: 'linux-loong64-musl' },
ppc64: { base: 'linux-ppc64-gnu', musl: 'linux-ppc64-musl' },
riscv64: { base: 'linux-riscv64-gnu', musl: 'linux-riscv64-musl' },
s390x: { base: 'linux-s390x-gnu', musl: null },
x64: { base: 'linux-x64-gnu', musl: 'linux-x64-musl' }
},
openbsd: {
x64: { base: 'openbsd-x64' }
},
openharmony: {
arm64: { base: 'openharmony-arm64' }
},