@iamk77/skill-checklist 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,7 +43,7 @@ npm run build # compile src/ -> dist/
43
43
  npm link # put `checklist` on PATH
44
44
  ```
45
45
 
46
- `npm run dev` (`tsc --watch`) keeps `dist/` current while you edit `src/`. The version string is set in two places — `package.json` and `src/index.ts` (`.version('…')`) keep them in sync on a bump.
46
+ `npm run dev` (`tsc --watch`) keeps `dist/` current while you edit `src/`. The version is read from `package.json` at runtime (single source of truth), and releases are automated from Conventional Commits — see [RELEASING.md](RELEASING.md).
47
47
 
48
48
  In normal use you never pass any flags. The skill calls `checklist init ${CLAUDE_SKILL_DIR} --force`, and later commands resolve the directory from `$CLAUDE_SKILL_DIR` or the active pointer (see How directories are resolved).
49
49
 
package/bin/checklist.js CHANGED
@@ -1,2 +1,12 @@
1
1
  #!/usr/bin/env node
2
- require('../dist/index.js');
2
+ try {
3
+ require('../dist/index.js');
4
+ } catch (err) {
5
+ // The bin runs the compiled build. If someone runs from a source checkout
6
+ // before building, point them at the fix instead of a raw module-not-found.
7
+ if (err && err.code === 'MODULE_NOT_FOUND' && /dist[/\\]index\.js/.test(err.message)) {
8
+ console.error('checklist: missing build output (dist/). Run "npm run build" in the package directory, or install it with "npm install -g @iamk77/skill-checklist".');
9
+ process.exit(1);
10
+ }
11
+ throw err;
12
+ }
package/dist/index.js CHANGED
@@ -1,16 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const commander_1 = require("commander");
4
+ const node_fs_1 = require("node:fs");
5
+ const node_path_1 = require("node:path");
4
6
  const init_js_1 = require("./commands/init.js");
5
7
  const show_js_1 = require("./commands/show.js");
6
8
  const verify_js_1 = require("./commands/verify.js");
7
9
  const check_js_1 = require("./commands/check.js");
8
10
  const phases_js_1 = require("./commands/phases.js");
9
11
  const reset_js_1 = require("./commands/reset.js");
12
+ // Single source of truth for the version: read it from package.json at
13
+ // runtime rather than hard-coding it here. Works from both src/ (tests) and
14
+ // dist/ (the shipped build) because package.json is one level up in each.
15
+ // This is what lets release-please bump the version in package.json alone.
16
+ const { version } = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, '..', 'package.json'), 'utf8'));
10
17
  const program = new commander_1.Command()
11
18
  .name('checklist')
12
19
  .description('Flight checklist CLI for Claude Code skills')
13
- .version('0.2.0');
20
+ .version(version);
14
21
  // Flags are uniform across every command so an agent never has to remember
15
22
  // which command accepts what. In the normal skill flow none are needed:
16
23
  // `--dir` defaults to $CLAUDE_SKILL_DIR / the active checklist, and `--path`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamk77/skill-checklist",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Flight checklist CLI that gates a Claude Code skill's phases — a stage cannot open until every check in every prior stage is recorded as passing",
5
5
  "keywords": [
6
6
  "claude",