From 18eea3eb11d6e784ebea775504a7a5ef3e156f00 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:15:58 +0000 Subject: [PATCH] Update dependency detect-libc to v2 (#1407) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- package.json | 3 +-- scripts/hak/target.ts | 6 +++--- yarn.lock | 10 +++++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 82ccdfc..446830c 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "@electron/asar": "^3.2.3", "@types/auto-launch": "^5.0.1", "@types/counterpart": "^0.18.1", - "@types/detect-libc": "^1.0.0", "@types/jest": "^29.0.0", "@types/minimist": "^1.2.1", "@types/mkdirp": "^1.0.2", @@ -92,7 +91,7 @@ "app-builder-lib": "24.9.4", "babel-jest": "^29.0.0", "chokidar": "^3.5.2", - "detect-libc": "^1.0.3", + "detect-libc": "^2.0.0", "electron": "^28.0.0", "electron-builder": "24.9.1", "electron-builder-squirrel-windows": "24.9.4", diff --git a/scripts/hak/target.ts b/scripts/hak/target.ts index 02442ca..81a47e7 100644 --- a/scripts/hak/target.ts +++ b/scripts/hak/target.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { GLIBC, MUSL, family as processLibC } from "detect-libc"; +import { GLIBC, MUSL, familySync as processLibC } from "detect-libc"; // We borrow Rust's target naming scheme as a way of expressing all target // details in a single string. @@ -61,7 +61,7 @@ export type WindowsTarget = Target & { export type LinuxTarget = Target & { platform: "linux"; - libC: typeof processLibC; + libC: typeof GLIBC | typeof MUSL; }; export type UniversalTarget = Target & { @@ -212,7 +212,7 @@ export function getHost(): Target | undefined { (target) => target.platform === process.platform && target.arch === process.arch && - (process.platform !== "linux" || (target as LinuxTarget).libC === processLibC), + (process.platform !== "linux" || (target as LinuxTarget).libC === processLibC()), ); } diff --git a/yarn.lock b/yarn.lock index 1e5ed73..eefa255 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1960,11 +1960,6 @@ dependencies: "@types/ms" "*" -"@types/detect-libc@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@types/detect-libc/-/detect-libc-1.0.3.tgz#d40e391c806be913c1927bf49a7281e5d344e64b" - integrity sha512-MnWWu7vPdUVq4kC8WN67ko44zkE1t80TM1NmMQheADz9AoRMLLdvPbLOQBWo8wJKiZsvlFfRkJtxZgRD2YIciQ== - "@types/fs-extra@9.0.13", "@types/fs-extra@^9.0.11": version "9.0.13" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" @@ -3415,6 +3410,11 @@ detect-libc@^1.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== +detect-libc@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"