Skip to content

fix: derive version from package.json (hard-coded 2.0.0 shipped in v2.1.0) - #16

Merged
kanfil merged 1 commit into
mainfrom
fix/version-from-package-json
Sep 27, 2026
Merged

kanfil merged 1 commit into
mainfrom
fix/version-from-package-json

Conversation

@kanfil

@kanfil kanfil commented Sep 27, 2026

Copy link
Copy Markdown
Member

Problem

adlc-cli version printed 2.0.0 — src/dispatch.mjs:19 hard-coded the constant and was missed in the v2.1.0 bump. Published npm package reports the wrong version.

Fix

  • src/dispatch.mjs: read version from ../package.json via createRequire (works in-repo and installed; zero deps)
  • tests/bins.test.mjs: drift-regression test — spawn the bin, assert output equals package.json version

Verification

$ node bin/adlc-cli.mjs version
adlc-cli 2.1.0
$ npm test
# pass 296 / fail 0

Followed by release v2.1.1.

…2.1.0

adlc-cli version printed the stale hard-coded constant instead of the real
package version. Read package.json via createRequire (src/ → ../package.json,
works in-repo and installed) and pin the contract with a drift-regression
test that spawns the bin and asserts against package.json.
@kanfil
kanfil merged commit cc04101 into main Sep 27, 2026
9 checks passed
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.

1 participant