feat(js-host-api): add npm publishing workflow#36
Conversation
jprendes
left a comment
There was a problem hiding this comment.
LGTM, it would be great if we could test it in a local repo before publishing to npm, to make sure that it works as expected. There is a lot of nodejs magic in here :-)
- Add npm-publish.yml workflow for cross-platform builds (Linux/Windows x64) - Add platform-specific npm packages for native binaries - Integrate npm publish into CreateRelease workflow - Add .npmignore to control published files - Update README with publishing documentation
907020a to
ac9f766
Compare
There was a problem hiding this comment.
Pull request overview
Adds an npm publishing pipeline for @hyperlight/js-host-api, including platform-specific binary sub-packages and documentation, and wires publishing into the release workflow.
Changes:
- Introduces a new GitHub Actions workflow to build Linux/Windows N-API binaries and publish main + platform npm packages.
- Updates
@hyperlight/js-host-apimetadata and adds platform package manifests undersrc/js-host-api/npm/. - Adds
.npmignorerules and README documentation describing the publishing process.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/js-host-api/package.json |
Adds repository metadata, napi targets, and optionalDependencies for platform packages. |
src/js-host-api/package-lock.json |
Updates lockfile to reflect new optional dependencies (currently incomplete vs package.json). |
src/js-host-api/npm/win32-x64-msvc/package.json |
New Windows platform package manifest for the .node binary. |
src/js-host-api/npm/linux-x64-musl/package.json |
New Linux musl platform package manifest for the .node binary. |
src/js-host-api/npm/linux-x64-gnu/package.json |
New Linux glibc platform package manifest for the .node binary. |
src/js-host-api/README.md |
Documents automated/manual npm publishing and platform selection behavior. |
src/js-host-api/.npmignore |
Adds publish-time include/exclude rules (currently missing an exclusion for npm/). |
.github/workflows/npm-publish.yml |
New workflow to build artifacts and publish npm packages (contains a critical input reference issue). |
.github/workflows/CreateRelease.yml |
Calls the npm publish workflow after creating a GitHub release and passes the derived version. |
Files not reviewed (1)
- src/js-host-api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
ac9f766 to
d420f31
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- src/js-host-api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d420f31 to
1863153
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- src/js-host-api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1863153 to
e295274
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- src/js-host-api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Files not reviewed (1)
- src/js-host-api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
216d46c to
ef94fd1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- src/js-host-api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Adds cross-platform npm publishing for
@hyperlight/js-host-api.Changes
Usage
release/vX.Y.ZbranchesSetup Required
Add
NPM_TOKENsecret (npm access token with publish permissions for@hyperlightscope)