Single-source the version from package.json (closes #5)
check / check (push) Successful in 25s
check / check (push) Successful in 25s
src/index.ts imports package.json for VERSION and bin/quak.ts passes VERSION to commander, so package.json is the only place the version is written. tsc copies package.json to dist/package.json, so the import resolves from the built output; script/build runs the built CLI with --version to prove it. A test checks VERSION and quak --version against package.json. Model: opus-5-5
This commit was merged in pull request #95.
This commit is contained in:
+5
-1
@@ -1,4 +1,8 @@
|
||||
export const VERSION = "0.0.0";
|
||||
// package.json is the one place the version is written. tsc copies it to
|
||||
// dist/package.json, so this path resolves from source and from dist/src/.
|
||||
import pkg from "../package.json" with { type: "json" };
|
||||
|
||||
export const VERSION: string = pkg.version;
|
||||
|
||||
export {
|
||||
Client,
|
||||
|
||||
Reference in New Issue
Block a user