Skip to content

Commit 9a1e515

Browse files
committed
Distribute bundled & compiled code as it is needed for gha runners
Change-type: patch
1 parent 5b5b225 commit 9a1e515

File tree

11 files changed

+641
-939
lines changed

11 files changed

+641
-939
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ __tests__/runner/*
100100
# IDE files
101101
.idea
102102
*.code-workspace
103-
build/
103+
test/**/*.spec.js

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run precommit

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ outputs:
5959
6060
runs:
6161
using: node20
62-
main: build/index.js
62+
main: build/index.cjs

build/index.cjs

Lines changed: 86 additions & 0 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 172 additions & 742 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
"local-action": "npx @github/local-action . src/main.ts .env",
88
"lint": "balena-lint src/ test/ && tsc --noEmit",
99
"lint-fix": "balena-lint src/ test/ --fix",
10-
"build": "tsc",
11-
"test": "NODE_OPTIONS=\"--loader ts-node/esm\" mocha --extensions ts \"test/**/*.spec.ts\""
10+
"build": "esbuild src/index.ts --bundle --platform=node --outfile=build/index.cjs --format=cjs --target=es2022 --minify",
11+
"test": "NODE_OPTIONS=\"--loader ts-node/esm\" mocha --extensions ts \"test/**/*.spec.ts\"",
12+
"prepare": "husky",
13+
"precommit": "npm run lint && npm run test && npm run build"
1214
},
1315
"keywords": [
1416
"balena",
@@ -33,7 +35,6 @@
3335
"description": "",
3436
"dependencies": {
3537
"@actions/core": "^1.11.1",
36-
"balena-sdk": "^21.4.2",
3738
"lodash": "^4.17.21",
3839
"mime-types": "^3.0.1",
3940
"zod": "^3.25.7"
@@ -50,7 +51,9 @@
5051
"@types/sinon": "^17.0.4",
5152
"chai": "^5.2.0",
5253
"chai-as-promised": "^8.0.1",
54+
"esbuild": "^0.25.4",
5355
"esmock": "^2.7.0",
56+
"husky": "^9.1.7",
5457
"mocha": "^11.4.0",
5558
"nock": "^14.0.4",
5659
"sinon": "^20.0.0",

0 commit comments

Comments
 (0)