From 8c3e5276748103c35e60490e8bbe94e1cf445981 Mon Sep 17 00:00:00 2001 From: Jaykumar Gosar Date: Tue, 22 Feb 2022 17:05:23 -0800 Subject: [PATCH] Fix scripts for npm by extracting `run` command out --- .../amazon/smithy/typescript/codegen/TypeScriptSettings.java | 2 +- .../software/amazon/smithy/typescript/codegen/base-package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptSettings.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptSettings.java index dec4dd11df0..ca3e5258a14 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptSettings.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptSettings.java @@ -395,7 +395,7 @@ public SymbolProvider createSymbolProvider(Model model, TypeScriptSettings setti public enum PackageManager { YARN("yarn"), - NPM("npm run-script"); + NPM("npm"); private final String command; diff --git a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json index c09d6272488..26952c02da3 100644 --- a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json +++ b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json @@ -10,7 +10,7 @@ "build:types": "tsc -p tsconfig.types.json", "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", - "prepack": "${packageManager} clean && ${packageManager} build" + "prepack": "${packageManager} run clean && ${packageManager} run build" }, "main": "./dist-cjs/index.js", "types": "./dist-types/index.d.ts",