Skip to content

Conversation

@palas
Copy link
Contributor

@palas palas commented Oct 16, 2025

Changelog

- description: |
    Added NPM package building to GHA
  type:
  - feature        # introduces a new feature
  projects:
  - cardano-wasm

Context

In order to make the publishing of the cardano-wasm package more deterministic, this change allows GHA to build a .tgz file that is ready for publishing.

How to trust this PR

The generated .tgz can be found in the CI run.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@palas palas self-assigned this Oct 16, 2025
@palas palas changed the base branch from master to add-support-for-nodejs-grpc October 16, 2025 18:37
@palas palas force-pushed the add-npm-package-creation-to-ci branch from 8e5448a to 6c07d8c Compare October 16, 2025 18:41
Base automatically changed from add-support-for-nodejs-grpc to master October 17, 2025 15:30
Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested it, but it looks fine.

cp result/cardano_node_grpc_web_pb.js cardano-wasm/npm-wrapper/src/
cp -r result/node cardano-wasm/npm-wrapper/src/
cd cardano-wasm/npm-wrapper
npm install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is running in nix anyway, I'm wondering if we could provide dependencies from nix instead. I'm not too familiar with building using npm in nix, so I'm not 100% if that's possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The js proto bundle is being built with nix, and I think it probably is deterministical, but the actual cardano-wasm JavaScript package is not being built with nix. Maybe it should, good point.

I am not sure what the options for doing it with nix and their consequences are either. I did something like that for the generation of JS files from proto files (here) but, I basically provided a package-lock.json file and it hashes it, I think. On the other hand, package-lock.json file already has hashes for all dependencies. Even though I didn't commit that file to the repo either. Not sure

@palas palas added this pull request to the merge queue Oct 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 21, 2025
@palas palas added this pull request to the merge queue Oct 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 21, 2025
@palas palas added this pull request to the merge queue Oct 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 22, 2025
@palas palas added this pull request to the merge queue Oct 22, 2025
Merged via the queue into master with commit 5338f61 Oct 22, 2025
30 checks passed
@palas palas deleted the add-npm-package-creation-to-ci branch October 22, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants