diff options
author | 2023-07-05 13:27:45 -0700 | |
---|---|---|
committer | 2023-07-05 13:27:45 -0700 | |
commit | 968a7cd31497b63363135d16a5a9cd3acbe5e030 (patch) | |
tree | 697798206a4d1c274818b45700a605378d730f7a | |
parent | 1e1fe22be0c0646ef39ebfeb9119b05941b2c8a2 (diff) | |
download | bun-detect-libc.tar.gz bun-detect-libc.tar.zst bun-detect-libc.zip |
Formatdetect-libc
-rw-r--r-- | src/js/thirdparty/detect-libc.js | 5 | ||||
-rw-r--r-- | test/js/first_party/detect-libc.test.ts | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/js/thirdparty/detect-libc.js b/src/js/thirdparty/detect-libc.js index c84ccbf55..badb59c54 100644 --- a/src/js/thirdparty/detect-libc.js +++ b/src/js/thirdparty/detect-libc.js @@ -1,9 +1,6 @@ // https://www.npmjs.com/package/detect-libc -const { - version: libcVersion, - family: libcFamily, -} = globalThis[Symbol.for("Bun.lazy")]("detect-libc"); +const { version: libcVersion, family: libcFamily } = globalThis[Symbol.for("Bun.lazy")]("detect-libc"); export const GLIBC = "glibc"; export const MUSL = "musl"; diff --git a/test/js/first_party/detect-libc.test.ts b/test/js/first_party/detect-libc.test.ts index 260e0d869..f197fcc77 100644 --- a/test/js/first_party/detect-libc.test.ts +++ b/test/js/first_party/detect-libc.test.ts @@ -1,6 +1,15 @@ import { test, expect } from "bun:test"; -// @ts-ignore: @types/detect-libc is not accurate -import { GLIBC, MUSL, version, versionSync, family, familySync, isNonGlibcLinux, isNonGlibcLinuxSync } from "detect-libc"; +import { + GLIBC, + MUSL, + version, + versionSync, + family, + familySync, + isNonGlibcLinux, + isNonGlibcLinuxSync, + // @ts-ignore: @types/detect-libc is not accurate +} from "detect-libc"; test("detect-libc", () => { expect(GLIBC).toBe("glibc"); |