Skip to content

chore: constants codegen release#24728

Draft
mverzilli wants to merge 2 commits into
martin/constants-codegenfrom
martin/constants-codegen-release
Draft

chore: constants codegen release#24728
mverzilli wants to merge 2 commits into
martin/constants-codegenfrom
martin/constants-codegen-release

Conversation

@mverzilli

@mverzilli mverzilli commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Hooks the new package to release workflows (blocked until we decide where in npm that should live and make sure the corresponding org/scope is created)

@mverzilli
mverzilli changed the base branch from next to martin/constants-codegen July 15, 2026 10:43
@mverzilli
mverzilli requested a review from charlielye July 15, 2026 15:43

@charlielye charlielye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ostensibly looks good. When it comes to releasing changes I use the ci-release-pr label to allow publishing a PR for testing it doesn't break, and that the new package lands as expected.

We could continue to own the constants package for now if you want to land this in @Aztec org. But I also know foundation now has the @aztec-foundation npm org and are using it, so maybe we can do the right thing instead and figure out how to support publishing to more than one NPM org. We'll need to add someones (@IlyasRidhuan ?) npm creds into github and pick right creds per package.

And at the moment we need to refresh those creds every 3 months in npm. Faff...

cd "$work_dir/consumer"
npm init --yes >/dev/null
npm install --ignore-scripts "${tarballs[0]}" >/dev/null
./node_modules/.bin/constants-codegen --input "$input" --typescript "$output"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice. Might also be nice to sanity check other languages we support. I think C++ and Solidity right now? Maybe rust?


function test_cmds {
echo "$hash cd protocol/constants-codegen && node --test dest/*.test.js"
echo "$hash cd protocol/constants-codegen && node --test dest/*.test.js && ./scripts/test-package.sh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit, but rather than chaining tests together the idea is that tests can be emitted on own lines.
Depends though on how granular you want to go. e.g. you could have every language output test on its own line as well with arg to test-package script (but that's overkill with all the npm install faff that does).

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.

2 participants