Summary
The published @contextmesh/cli@1.0.0 package reports 0.1.0 from contextmesh --version.
Reproduction
tmp=$(mktemp -d /tmp/contextmesh-repro-XXXXXX)
cd "$tmp"
npm init -y >/dev/null
npm install --ignore-scripts --no-audit --no-fund @contextmesh/cli@1.0.0
./node_modules/.bin/contextmesh --version
node -e "console.log(require('./node_modules/@contextmesh/cli/package.json').version)"
Actual behavior
Expected behavior
contextmesh --version should print the installed package version, 1.0.0.
Root cause
src/cli.ts currently calls .version('0.1.0'), so the compiled CLI keeps the development version even when release tooling publishes a package with updated metadata.
Proposed fix
I have a small PR ready that:
- reads the version from the runtime package's
package.json,
- keeps
0.1.0 as a fallback for unusual development/runtime cases,
- adds a Jest CLI smoke test that simulates a release package whose package metadata version differs from the source checkout version.
Verification performed locally:
npm install --ignore-scripts --no-audit --no-fund
npm run build
npx jest src/__tests__/cli.test.ts --runInBand
npm test -- --runInBand
npm run typecheck
npm run lint:check
npm pack --pack-destination /tmp/earn-micro-scan/contextmesh-pack
# fresh install smoke from a packed tarball with package.json version set to 1.0.0
Summary
The published
@contextmesh/cli@1.0.0package reports0.1.0fromcontextmesh --version.Reproduction
Actual behavior
Expected behavior
contextmesh --versionshould print the installed package version,1.0.0.Root cause
src/cli.tscurrently calls.version('0.1.0'), so the compiled CLI keeps the development version even when release tooling publishes a package with updated metadata.Proposed fix
I have a small PR ready that:
package.json,0.1.0as a fallback for unusual development/runtime cases,Verification performed locally: