Skip to content

template: drop the npm requirement + fix kernel-matrix lvh tags#26

Merged
julian-goldstein merged 2 commits into
masterfrom
remove-npm-requirement
Jun 23, 2026
Merged

template: drop the npm requirement + fix kernel-matrix lvh tags#26
julian-goldstein merged 2 commits into
masterfrom
remove-npm-requirement

Conversation

@julian-goldstein

@julian-goldstein julian-goldstein commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Two commits:

1. Drop the npm requirement from the build

The starter imports only yeet:* builtins and local @/ modules, and esbuild is already vendored by the toolchain (build/toolchain.lock → fetched into the per-machine cache → $(ESBUILD)). The Makefile's npm install only installed a second, unused copy of esbuild into node_modules.

  • template/Makefile — drop the node_modules target, the NPM var, and bundle's dependency on it. bundle runs the vendored esbuild directly.
  • template/package.json — drop the esbuild devDep and the build script; kept as a slim manifest so optional npm/jsr deps still work.
  • template/package-lock.json — deleted; scripts/new no longer substitutes __NAME__ into it.
  • template/README.mdnpm/node removed from prerequisites; deps documented as optional, resolved from node_modules with any package manager.
  • template/build/toolchain.lockESBUILD_VERSION is now the sole esbuild pin.

Verified: a freshly generated project bundles cleanly with no node_modules present.

2. Fix kernel-matrix lvh tags (cherry-picked from #24)

The floating <ver>-main tags can't be consumed by little-vm-helper@v0.0.30 (it strips a trailing numeric build stamp to derive the VM image filename, so -main → "invalid reference format"). Each job now resolves its kernel line to the newest date-stamped tag (<ver>-YYYYMMDD.HHMMSS) from the quay registry at run time.

Note: this overlaps with #24, which removes npm by deleting package.json (pure-JS route) and also carries this same CI fix. This PR keeps package.json as a manifest instead. The two can't both merge — pick one.

🤖 Generated with Claude Code

julian-goldstein and others added 2 commits June 22, 2026 21:57
The starter imports only `yeet:*` builtins and local `@/` modules, and
esbuild is vendored by the toolchain (build/toolchain.lock) — so the
`npm install` the Makefile ran only installed a second, unused copy of
esbuild into node_modules. Remove npm from the required build path:

- Makefile: drop the node_modules target, the NPM var, and bundle's
  dependency on node_modules; bundle now runs the vendored esbuild
  directly.
- package.json: drop the esbuild devDep and the build script (it shelled
  out to a bare `esbuild`); slim to a manifest with empty dependencies.
- package-lock.json: delete (dead npm artifact); scripts/new no longer
  substitutes __NAME__ into it.
- README: npm/node removed from prerequisites; the build and npm/jsr
  sections now explain deps are optional and resolved from node_modules
  with any package manager.
- toolchain.lock: ESBUILD_VERSION is now the sole esbuild pin.

The deps door stays open — esbuild inlines whatever is in node_modules —
but npm is no longer required to build the starter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cherry-picked from #24. The floating `<ver>-main` tags can't be consumed
by little-vm-helper@v0.0.30: it derives the VM qcow2 filename by stripping
a trailing numeric build stamp, so a `-main` tag yields a name that doesn't
match the file lvh unpacks and the run fails with "invalid reference
format".

Keep the readable list of kernel lines in the matrix and have each job
look up that line's newest date-stamped tag (`<ver>-YYYYMMDD.HHMMSS`, which
the action handles) from the quay registry at run time — tracking the
latest build with no tag to bump, immune to quay pruning old stamps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@julian-goldstein julian-goldstein changed the title template: drop the npm requirement from the build template: drop the npm requirement + fix kernel-matrix lvh tags Jun 23, 2026
@julian-goldstein julian-goldstein merged commit 83ed89b into master Jun 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant