Skip to content

Commit 4857830

Browse files
committed
chore: add prepare script to support npx from GitHub
prepare runs on git installs, enabling users to test unreleased versions with: npx github:getappmap/appmap-node#branch myapp.js prepack now delegates to prepare so yarn pack continues to work.
1 parent 6955baa commit 4857830

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
cache: yarn
5959
- run: yarn
60-
- run: yarn prepack
60+
- run: yarn prepare
6161
- run: yarn test || yarn jest --no-silent --verbose --onlyFailures
6262
- run: node test/smoketest.mjs
6363

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"node": ">=18"
4444
},
4545
"scripts": {
46-
"prepack": "tsc -p tsconfig.build.json",
46+
"prepare": "tsc -p tsconfig.build.json",
47+
"prepack": "yarn prepare",
4748
"lint": "eslint src test",
4849
"test": "jest",
4950
"watch": "tsc --watch -p tsconfig.build.json"

test/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function ensureBuilt() {
203203
try {
204204
accessSync(probePath);
205205
} catch {
206-
spawnSync("yarn", ["prepack"], { cwd: resolve(__dirname, ".."), stdio: "inherit" });
206+
spawnSync("yarn", ["prepare"], { cwd: resolve(__dirname, ".."), stdio: "inherit" });
207207
}
208208
}
209209

0 commit comments

Comments
 (0)