From a1bff49ef90873bd8a6e22d6b72dc6ba6e40109c Mon Sep 17 00:00:00 2001 From: LongYinan Date: Thu, 10 Sep 2020 10:55:39 +0800 Subject: [PATCH] fix: wrong platform field for musl packages --- package.json | 1 + src/create-npm-dir.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ccc05a9e..ab8c4a37 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "format:source": "prettier --config ./package.json --write './**/*.{js,ts}'", "format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'", "lint": "eslint -c .eslintrc.yml './src/**/*.ts' './test_module/**/*.{ts,js}'", + "prepublishOnly": "npm run build", "test": "ava" }, "bugs": { diff --git a/src/create-npm-dir.ts b/src/create-npm-dir.ts index 8d9e74e4..ba545d15 100644 --- a/src/create-npm-dir.ts +++ b/src/create-npm-dir.ts @@ -40,7 +40,7 @@ export class CreateNpmDirCommand extends Command { { name: `${packageName}-${platform}`, version, - os: [platform], + os: [platform.replace('-musl', '')], main: binaryFileName, files: [binaryFileName], ...pick(