From 30f5fce2ec7c7f18f8cf93b60b2caad37b778844 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Sat, 24 Dec 2022 21:51:35 +0400 Subject: [PATCH] Fix platform names --- index.js | 14 +++++--------- package-lock.json | 4 ++-- package.json | 4 ++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index d9873ab..1deb7a0 100644 --- a/index.js +++ b/index.js @@ -8,20 +8,16 @@ try { } const nameWindows = 'windows'; -const nameArch = `${process.platform}-${process.arch}`; +const platformAndArch = `${process.platform}-${process.arch}`; const platformNames = { - win32: nameWindows, - linux: 'linux', - darwin: 'osx', + 'win32-x64': nameWindows, + 'linux-x64': 'linux', + 'darwin-x64': 'osx', 'linux-arm64': 'aarch64', }; -const platformName = ( - platformNames[process.platform] || - platformNames[nameArch] || - nameArch -); +const platformName = platformNames[platformAndArch] || platformAndArch; const isWindows = platformName === nameWindows; diff --git a/package-lock.json b/package-lock.json index b1f2952..f8bf9c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "addon-tools-raub", - "version": "6.2.0", + "version": "6.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "addon-tools-raub", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "devDependencies": { "adm-zip": "^0.5.10", diff --git a/package.json b/package.json index 8dcb59d..2c733ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Luis Blanco ", "name": "addon-tools-raub", - "version": "6.2.0", + "version": "6.2.1", "description": "Helpers for Node.js addons and dependency packages", "license": "MIT", "main": "index.js", @@ -42,7 +42,7 @@ "scripts": { "eslint": "eslint .", "test": "jest --coverage=false --watch", - "test-ci": "jest --coverage=false --verbose", + "test-ci": "jest --ci --runInBand --coverage=false --forceExit --detectOpenHandles", "test-coverage": "rm -rf doc/jest && jest --coverage --silent", "test-build": "cd test && node-gyp rebuild && cd .." },