Skip to content

Commit bacec2f

Browse files
hyperpolymathclaude
andcommitted
chore: migrate panll off npm onto Deno (standards#253 step)
Eliminate package.json + package-lock.json. All build orchestration now flows through deno.json tasks using npm: specifiers cached by `deno install`. Resolves the lockfile-drift root cause that band-aided in panll#62 (workflow switched npm ci -> npm install --no-audit --no-fund). With package.json removed, the drift class disappears entirely. Changes: - deno.json: add nodeModulesDir=auto; tailwindcss + rescript + @rescript/core + @rescript/runtime promoted to deno imports; tasks invoke them via deno run -A --allow-scripts=npm:<pkg> npm:<pkg>@ver. Pinned-version trailing-slash forms (npm:/pkg@VER/) keep the res.js subpath imports URL-resolvable. - .github/workflows/build-validation.yml: drop actions/setup-node; npm ci/npm run res:build replaced with deno install + deno task res:build; drop stale src-tauri/ manifest-path (Gossamer migration completed previously); rust gate now cargo check / cargo test --lib at workspace root. Linux deps step renamed Tauri -> Gossamer. - .github/workflows/e2e.yml: replace `npx rescript build` with `deno task res:build` (3 jobs). - Delete package.json + package-lock.json (no .npmrc was present). - deno.lock auto-tidies: packageJson block removed, workspace. dependencies absorbs the four formerly-package.json deps. Verified locally: - `deno install` OK (77 npm packages resolved) - `deno task res:build` OK (.res.js outputs produced, warnings only) - `deno task bundle` OK (public/app.bundle.js 5.6MB) - `deno task css:build` OK (public/styles.css 81KB) - `deno task test` 2545 passed / 21 failed — IDENTICAL to main (failures are pre-existing, unrelated) - `cargo check --lib` OK - `deno cache scripts/bundle.ts` OK Tailwind decision: kept via `npm:tailwindcss@^3.4.19` specifier as a transitional choice. No fully deno-native drop-in worth the swap right now (windicss/unocss have semantic divergences from the existing classes). Worth a follow-up issue under standards#253 for a future tailwind -> deno-native swap. Refs: - standards#253 (estate npm->Deno umbrella) - panll#62 (band-aid superseded — `npm install --no-audit --no-fund` no longer needed) - session_2026_05_30_snifs_build_mode_arc (lockfile drift origin) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ff57277 commit bacec2f

6 files changed

Lines changed: 30 additions & 1243 deletions

File tree

.github/workflows/build-validation.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,12 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2222

23-
- name: Setup Node.js
24-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v4.4.0
25-
with:
26-
node-version: "20"
27-
2823
- name: Setup Deno
2924
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2
3025
with:
3126
deno-version: "2.x"
3227

33-
- name: Install Linux dependencies for Tauri
28+
- name: Install Linux dependencies for Gossamer
3429
run: |
3530
sudo apt-get update
3631
sudo apt-get install -y \
@@ -40,29 +35,20 @@ jobs:
4035
librsvg2-dev \
4136
patchelf
4237
43-
- name: Install npm dependencies
44-
# `npm ci` requires package-lock.json to be a complete resolution
45-
# of package.json. The committed lockfile is incomplete: tailwindcss's
46-
# nested deps (chokidar wants picomatch@^2.3.1 at the top level)
47-
# are missing entries, so `npm ci` refuses with "Missing: picomatch@2.3.2
48-
# from lock file". `npm install` is non-strict and regenerates the
49-
# missing entries in-place during CI, unblocking the gate without
50-
# committing a touched lockfile. The real fix is the npm→Deno
51-
# migration tracked in hyperpolymath/standards#253; this is a
52-
# band-aid to keep CI green until then.
53-
run: npm install --no-audit --no-fund
38+
- name: Warm Deno cache (npm + jsr specifiers)
39+
run: deno install
5440

5541
- name: ReScript build gate
56-
run: npx --no-install rescript build
42+
run: deno task res:build
5743

5844
- name: Deno test gate
5945
run: deno task test
6046

6147
- name: Rust cargo check gate
62-
run: cargo check --manifest-path src-tauri/Cargo.toml
48+
run: cargo check
6349

6450
- name: Rust test gate
65-
run: cargo test --manifest-path src-tauri/Cargo.toml -- --test-threads=1
51+
run: cargo test --lib -- --test-threads=1
6652

6753
- name: Setup Rust toolchain for PCC
6854
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
@@ -74,4 +60,3 @@ jobs:
7460

7561
- name: Panel wiring verification gate
7662
run: ./tools/pcc/target/release/panll panel verify --repo-root .
77-

.github/workflows/e2e.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ jobs:
4646
deno-version: v2.x
4747

4848
- name: Install dependencies
49-
run: deno install --node-modules-dir=auto
49+
run: deno install
5050

5151
- name: Build ReScript
52-
run: npx rescript build || echo "ReScript build attempted"
52+
run: deno task res:build || echo "ReScript build attempted"
5353

5454
- name: Run E2E tests
5555
run: deno test tests/e2e_*.js tests/cross_panel_integration_test.js tests/update_integration_test.js --allow-read --allow-env
@@ -69,10 +69,10 @@ jobs:
6969
deno-version: v2.x
7070

7171
- name: Install dependencies
72-
run: deno install --node-modules-dir=auto
72+
run: deno install
7373

7474
- name: Build ReScript
75-
run: npx rescript build || echo "ReScript build attempted"
75+
run: deno task res:build || echo "ReScript build attempted"
7676

7777
- name: Run crosscutting aspect tests
7878
run: deno test tests/*_crosscutting_test.js tests/panelbus_propagation_test.js --allow-read --allow-env
@@ -92,10 +92,10 @@ jobs:
9292
deno-version: v2.x
9393

9494
- name: Install dependencies
95-
run: deno install --node-modules-dir=auto
95+
run: deno install
9696

9797
- name: Build ReScript
98-
run: npx rescript build || echo "ReScript build attempted"
98+
run: deno task res:build || echo "ReScript build attempted"
9999

100100
- name: Run benchmarks
101101
run: deno test tests/*_bench_test.js --allow-read --allow-env 2>&1 | tee /tmp/bench-results.txt

deno.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
"license": "AGPL-3.0-or-later",
55
"description": "Panel workspace framework — TEA (The Elm Architecture) for ReScript with tiling layout, smart routing, keyboard navigation, undo engine, and security-hardened DOM. Build panel-based UIs for desktop and web.",
66
"exports": "./mod.js",
7+
"nodeModulesDir": "auto",
78
"tasks": {
89
"dev": "cargo build && cargo run --bin panll-gossamer & deno task bundle && deno task serve:dev",
910
"build": "cargo build --release && deno task bundle && deno task css:build",
1011
"gossamer:dev": "cargo build && cargo run --bin panll-gossamer & deno task bundle && deno task serve:dev",
1112
"gossamer:build": "cargo build --release && deno task bundle && deno task css:build",
1213
"gossamer:run": "cargo run --bin panll-gossamer",
13-
"bundle": "DENO_NO_PACKAGE_JSON=1 deno run -A scripts/bundle.ts",
14-
"bundle:watch": "DENO_NO_PACKAGE_JSON=1 deno run -A scripts/bundle.ts --watch",
15-
"css:build": "deno run -A npm:tailwindcss -i ./src/styles/input.css -o ./public/styles.css --minify",
16-
"css:watch": "deno run -A npm:tailwindcss -i ./src/styles/input.css -o ./public/styles.css --watch",
14+
"bundle": "deno run -A scripts/bundle.ts",
15+
"bundle:watch": "deno run -A scripts/bundle.ts --watch",
16+
"css:build": "deno run -A --allow-scripts=npm:tailwindcss npm:tailwindcss@^3.4.19 -i ./src/styles/input.css -o ./public/styles.css --minify",
17+
"css:watch": "deno run -A --allow-scripts=npm:tailwindcss npm:tailwindcss@^3.4.19 -i ./src/styles/input.css -o ./public/styles.css --watch",
1718
"serve:dev": "deno run --allow-net=127.0.0.1:8000 --allow-read=. scripts/dev-server.ts",
1819
"test": "deno test --no-check --allow-read --allow-env tests/",
1920
"test:watch": "deno test --no-check --watch --allow-read --allow-env tests/",
@@ -23,16 +24,19 @@
2324
"lint": "deno lint scripts/",
2425
"fmt": "deno fmt scripts/",
2526
"mock:echidna": "deno run --allow-net=127.0.0.1:9000 scripts/mock-echidna.ts",
26-
"res:build": "deno run -A npm:rescript build",
27-
"res:clean": "deno run -A npm:rescript clean",
28-
"res:watch": "deno run -A npm:rescript watch"
27+
"res:build": "deno run -A --allow-scripts=npm:rescript npm:rescript@^12.0.0 build",
28+
"res:clean": "deno run -A --allow-scripts=npm:rescript npm:rescript@^12.0.0 clean",
29+
"res:watch": "deno run -A --allow-scripts=npm:rescript npm:rescript@^12.0.0 watch"
2930
},
3031
"imports": {
3132
"@std/": "jsr:@std/",
3233
"@gossamer/api": "./src-gossamer/bindings/rescript/src/Gossamer.res.js",
3334
"rescript": "npm:rescript@^12.0.0",
34-
"@rescript/core/": "npm:@rescript/core@1.6.1/",
35-
"@rescript/runtime/": "npm:@rescript/runtime@12.2.0/"
35+
"@rescript/core": "npm:@rescript/core@^1.6.1",
36+
"@rescript/core/": "npm:/@rescript/core@1.6.1/",
37+
"@rescript/runtime": "npm:@rescript/runtime@^12.2.0",
38+
"@rescript/runtime/": "npm:/@rescript/runtime@12.2.0/",
39+
"tailwindcss": "npm:tailwindcss@^3.4.19"
3640
},
3741
"publish": {
3842
"include": [

deno.lock

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)