@erclx/canon 4.9.2 → 4.10.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "canon",
3
3
  "description": "Automated governance, versioning, and discovery tools for Claude Code.",
4
- "version": "4.9.2",
4
+ "version": "4.10.0",
5
5
  "author": {
6
6
  "name": "Eric Le",
7
7
  "url": "https://github.com/erclx"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erclx/canon",
3
3
  "type": "module",
4
- "version": "4.9.2",
4
+ "version": "4.10.0",
5
5
  "description": "Infrastructure and quality tooling for developer workflows",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -8,7 +8,8 @@ PROJECT_ROOT="${PROJECT_ROOT:-$(cd "$SCRIPT_DIR/../.." && pwd)}"
8
8
  source "$PROJECT_ROOT/scripts/lib/ui.sh"
9
9
 
10
10
  TMP_ROOT="$PROJECT_ROOT/.canon/tmp/install-check"
11
- CLONE_DIR="$TMP_ROOT/clone"
11
+ PACK_DIR="$TMP_ROOT/pack"
12
+ EXTRACT_DIR="$TMP_ROOT/extract"
12
13
  TARGET_DIR="$TMP_ROOT/target"
13
14
  KEEP=0
14
15
 
@@ -19,12 +20,13 @@ for arg in "$@"; do
19
20
  cat <<HELP
20
21
  Usage: scripts/core/install-check.sh [--keep]
21
22
 
22
- Verifies the README install path end to end:
23
- 1. Clones this repo into .canon/tmp/install-check/clone
24
- 2. Runs bun install in the clone
25
- 3. Runs the CLI with --help to confirm it executes
26
- 4. Scaffolds a fresh project in .canon/tmp/install-check/target
27
- 5. Runs canon init and asserts a scaffold landed
23
+ Verifies the published install path end to end:
24
+ 1. Packs this repo into a tarball at .canon/tmp/install-check/pack
25
+ 2. Extracts it and asserts scripts/sandbox is absent from the tree
26
+ 3. Runs bun install --production in the extracted tree
27
+ 4. Runs the CLI with --help from the extracted tree to confirm it resolves
28
+ 5. Scaffolds a fresh project in .canon/tmp/install-check/target
29
+ 6. Runs canon init from the extracted package and asserts a scaffold landed
28
30
 
29
31
  Flags:
30
32
  --keep Keep the tmp tree on exit for inspection
@@ -45,21 +47,31 @@ cleanup() {
45
47
  trap cleanup EXIT
46
48
 
47
49
  rm -rf "$TMP_ROOT"
48
- mkdir -p "$TMP_ROOT"
50
+ mkdir -p "$PACK_DIR" "$EXTRACT_DIR"
49
51
 
50
52
  open_timeline "Install verification"
51
53
 
52
- log_step "Clone"
53
- git clone --quiet "$PROJECT_ROOT" "$CLONE_DIR" 2>&1 | pipe_output || true
54
- log_info "Cloned to $CLONE_DIR"
54
+ log_step "Pack"
55
+ TARBALL_PATH="$(cd "$PROJECT_ROOT" && bun pm pack --quiet --ignore-scripts --destination "$PACK_DIR" | tail -n 1)"
56
+ log_info "Packed to $TARBALL_PATH"
55
57
 
56
- log_step "Install dependencies"
57
- (cd "$CLONE_DIR" && bun install --silent 2>&1 | pipe_output) || log_error "bun install failed"
58
- log_info "Dependencies installed"
58
+ log_step "Extract"
59
+ tar -xzf "$TARBALL_PATH" -C "$EXTRACT_DIR" --strip-components=1
60
+ log_info "Extracted to $EXTRACT_DIR"
61
+
62
+ log_step "Assert excluded path is absent"
63
+ if [ -e "$EXTRACT_DIR/scripts/sandbox" ]; then
64
+ log_error "scripts/sandbox shipped in the tarball, and the files field in package.json excludes it"
65
+ fi
66
+ log_info "Absent: scripts/sandbox"
67
+
68
+ log_step "Install dependencies (production)"
69
+ (cd "$EXTRACT_DIR" && bun install --production --ignore-scripts --silent 2>&1 | pipe_output) || log_error "bun install --production failed"
70
+ log_info "Dependencies installed without devDependencies"
59
71
 
60
72
  log_step "Confirm CLI runs"
61
- (cd "$CLONE_DIR" && bun run src/cli.ts --help >/dev/null) || log_error "canon --help failed"
62
- log_info "canon --help ran clean"
73
+ (cd "$EXTRACT_DIR" && bun run src/cli.ts --help >/dev/null) || log_error "canon --help failed"
74
+ log_info "canon --help ran clean from the extracted package"
63
75
 
64
76
  log_step "Scaffold fresh project"
65
77
  mkdir -p "$TARGET_DIR"
@@ -67,7 +79,7 @@ mkdir -p "$TARGET_DIR"
67
79
  log_info "Initialized git in $TARGET_DIR"
68
80
 
69
81
  log_step "Run canon init"
70
- (cd "$TARGET_DIR" && CANON_NON_INTERACTIVE=1 bun run "$CLONE_DIR/src/cli.ts" init --stack base 2>&1 | pipe_output) || log_error "canon init failed"
82
+ (cd "$TARGET_DIR" && CANON_NON_INTERACTIVE=1 bun run "$EXTRACT_DIR/src/cli.ts" init --stack base 2>&1 | pipe_output) || log_error "canon init failed"
71
83
  log_info "canon init completed"
72
84
 
73
85
  log_step "Assert scaffold"