Skip to content

Commit 216d46c

Browse files
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 812ddcc commit 216d46c

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ jobs:
7373
cache: 'npm'
7474
cache-dependency-path: 'src/js-host-api/package-lock.json'
7575

76-
- name: Validate version format
77-
run: node -e "if (!/^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?$/.test(process.env.VERSION)) { console.error('Invalid version:', process.env.VERSION); process.exit(1); }"
78-
env:
79-
VERSION: ${{ inputs.version }}
80-
8176
- name: Install dependencies
8277
working-directory: ${{ env.WORKING_DIR }}
8378
run: npm ci --ignore-scripts --omit=optional
@@ -120,7 +115,7 @@ jobs:
120115
cache-dependency-path: 'src/js-host-api/package-lock.json'
121116

122117
- name: Validate version format
123-
run: node -e "if (!/^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?$/.test(process.env.VERSION)) { console.error('Invalid version:', process.env.VERSION); process.exit(1); }"
118+
run: npx --yes semver "$VERSION" >/dev/null 2>&1 || { echo "Invalid version: $VERSION"; exit 1; }
124119
env:
125120
VERSION: ${{ inputs.version }}
126121

src/js-host-api/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ node_modules/
88
target/
99
Cargo.lock
1010
*.tgz
11+
*.node
1112
npm-debug.log*
1213
yarn-debug.log*
1314
yarn-error.log*

src/js-host-api/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
},
2323
"license": "Apache-2.0",
2424
"optionalDependencies": {
25-
"@hyperlight/js-host-api-linux-x64-gnu": "0.17.0",
26-
"@hyperlight/js-host-api-linux-x64-musl": "0.17.0",
27-
"@hyperlight/js-host-api-win32-x64-msvc": "0.17.0"
25+
"@hyperlight/js-host-api-linux-x64-gnu": "workspace:*",
26+
"@hyperlight/js-host-api-linux-x64-musl": "workspace:*",
27+
"@hyperlight/js-host-api-win32-x64-msvc": "workspace:*"
2828
},
2929
"devDependencies": {
3030
"@eslint/js": "^10.0.1",

0 commit comments

Comments
 (0)