You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[This other
PR](#22941) of mine
was motivation for this because there we need to stamp aztec version
into contract artifact and the current `getPackageVersion` was not
helpful in that because it failed to resolve the actual version (e.g.
`v4.3.0-nightly.20260427` instead of `v4.3.0`). To workaround this I
will no longer read the version from `.release-please-manifest.json` and
will read it from package.json instead where the version is stamped
during a release. If the code is not run from a release the version is
simply populated with "dev" which seems better then returning undefined
and forcing the callsites to deal with it.
Bothering Adam and Alex with a review here since you are the only people
that seemed to have touched the function.
## AI Summary
- `getPackageVersion` previously read from
`.release-please-manifest.json`, which holds the *next* stable target
(currently `5.0.0`) — not the actually-installed/built version. So
nightlies and stable releases reported a stale version.
- It now reads from the stdlib `package.json` (which release tooling
stamps at publish time) and substitutes `DEV_VERSION` (`'dev'`) for the
`0.1.0` placeholder used in a monorepo checkout.
- Return type narrowed from `string | undefined` to `string`, and the
now-dead `?? '<fallback>'` chains in callers (`aztec-node`, `aztec` CLI,
`cli-wallet`, `txe`) are dropped.
- `warnIfAztecVersionMismatch` gets an early return on `DEV_VERSION` so
monorepo checkouts no longer spam warnings about every aztec-nr dep tag
mismatch (previously it would compare against `v5.0.0`, now it would
have compared against `vdev` — both wrong).
`.release-please-manifest.json` is left in place for now since release
tooling may still consume it; removing it can be a separate change.
Context from #21382 review thread:
https://github.com/AztecProtocol/aztec-packages/pull/21382/files#r3182335186
0 commit comments