From 4df1d37ddc54242c339765f22fb90ba2e9e3a99a Mon Sep 17 00:00:00 2001 From: dave caruso Date: Thu, 1 Jun 2023 21:16:47 -0400 Subject: Bundle and minify `.exports.js` files. (#3036) * move all exports.js into src/js * finalize the sort of this * and it works * add test.ts to gitignore * okay * convert some to ts just to show * finish up * fixup makefile * minify syntax in dev * finish rebase * dont minify all modules * merge * finish rebase merge * flaky test that hangs --- src/js/thirdparty/detect-libc.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/js/thirdparty/detect-libc.js (limited to 'src/js/thirdparty/detect-libc.js') diff --git a/src/js/thirdparty/detect-libc.js b/src/js/thirdparty/detect-libc.js new file mode 100644 index 000000000..303cbdb9e --- /dev/null +++ b/src/js/thirdparty/detect-libc.js @@ -0,0 +1,35 @@ +// Hardcoded module "detect-libc" +export function family() { + return Promise.resolve(familySync()); +} + +export function familySync() { + if (process.platform === "linux") { + return GLIBC; + } else { + return null; + } +} + +export const GLIBC = "glibc"; +export const MUSL = "musl"; + +export function versionAsync() { + return Promise.resolve(version()); +} + +export function version() { + if (process.platform === "linux") { + return "2.29"; + } else { + return null; + } +} + +export function isNonGlibcLinuxSync() { + return false; +} + +export function isNonGlibcLinux() { + return Promise.resolve(isNonGlibcLinuxSync()); +} -- cgit v1.2.3