Repository navigation
Description
Description
The commit-action direnv pilot (vig-os/commit-action#32) needed Node/TypeScript
support, which today has to be hand-wired in every consumer:
extraPackages = [ pkgs.nodejs ]in the flake- npm-mapped
justfile.projectrecipes (sync=npm ci,lint,test,build,
bundle) - Node/Action
.gitignorefragment (node_modules/,*.tsbuildinfo,
coverage/; and not blanket-ignoringdist/) — see [BUG] Scaffold .gitignore is Python-only: blanket dist/ breaks JS Action repos, Node ignores dropped, not upgrade-persistent #1024 codeql.ymllanguagejavascript-typescriptinstead ofpython— see [BUG] Scaffold codeql.yml: hardcoded python matrix + conflicts with GitHub default code-scanning setup #1025- (missing today) eslint/prettier pre-commit hooks
sync-issues-action — and every future TS action — needs the byte-identical
setup. This asks for a node (and/or typescript) capability module so a
consumer opts in with modules = [ "node" ] (DEVKIT_MODULES in .vig-os)
instead of copy-pasting the above.
Key design question (raise before implementing)
Per docs/rfcs/ADR-capability-modules.md, a v1 module is packages + env +
shellHook only. That means a node module can put nodejs in the dev-shell —
but it cannot by itself provide the npm justfile recipes, the .gitignore
fragment, the pre-commit hooks, or the codeql language. Those are scaffold
files, not shell contributions.
So turnkey Node support spans two mechanisms:
- The shell module (v1):
nodejs(+ optionalpnpm/yarn) in
mkProjectShell, with a selectable Node version — the pilot used
pkgs.nodejs(24) while the action runtime isnode20(action.yml); the
module should let a consumer pin to their runtime. - Language-aware scaffold (needs a decision): npm
justfile.projectrecipes,
the Node.gitignorefragment ([BUG] Scaffold .gitignore is Python-only: blanket dist/ breaks JS Action repos, Node ignores dropped, not upgrade-persistent #1024), eslint/prettier pre-commit hooks, and
codeqllanguage ([BUG] Scaffold codeql.yml: hardcoded python matrix + conflicts with GitHub default code-scanning setup #1025) — either by extending the module contract so
modules can contribute scaffold fragments, or by a language-aware scaffold
keyed onpackage.jsonthat the module composes with.
Decide (1) alone (shell packages only, leave the rest to #1024/#1025 + manual) vs
(1)+(2) (a true "flavour" that ships everything). The pilot shows (2) is where
the real per-repo toil is.
Acceptance criteria (proposed)
-
modules = [ "node" ]puts a version-selectable Node (+ npm) in the shell,
stacking cleanly with other modules. - Decision recorded on whether the module also drives npm recipes / gitignore
/ hooks / codeql, or those stay in a language-aware scaffold. -
commit-actionandsync-issues-actioncan drop their hand-wired
extraPackages/recipes in favor of the module.
Related
Capability modules #884; scaffold language-awareness #1024 (.gitignore), #1025
(codeql.yml). Pilot: vig-os/commit-action#32.
Activity
c-vigo commentedon Jul 14, 2026
Design decision (pre-implementation)
Per
docs/rfcs/ADR-capability-modules.md, the answer to the key design question is (1) + (2), but split across the two mechanisms the codebase already has — no module-contract extension:Shell module (v1 contract, this issue): a
nodemodule innix/modules/contributingnodejs(+ npm) as packages. Version selection uses the ADR's recorded migration path —modulesaccepts an attrset entry alongside plain strings:{ name = "node"; version = 20; }(plain"node"= nixpkgs default). [feature] node/typescript capability module (+ language-aware scaffold for npm recipes/gitignore/hooks/codeql) #1027 is the "first module that needs it", so this lands the per-module-options mechanism the ADR deferred. Per the ADR, each new module ships with its generatedchecks.<system>.module-nodeflake check plus atests/test_flake_modules.pysmoke test.Scaffold pieces (already landing separately): language-aware scaffold rendering now exists in
init-workspace.sh(DETECTED_LANGUAGES, keyed onpackage.jsonetc.) via [BUG] Scaffold .gitignore is Python-only: blanket dist/ breaks JS Action repos, Node ignores dropped, not upgrade-persistent #1024/[BUG] Scaffold codeql.yml: hardcoded python matrix + conflicts with GitHub default code-scanning setup #1025 (PR fix(setup): render language-aware scaffold .gitignore and codeql matrix #1035), and the release bundle step via [BUG] Release pipeline is python-shaped: no artifact/bundle step for node/TS consumers, stale 'Sync Python dependencies' labels #1029 (PR fix(ci): make scaffolded CI and release pipeline language-neutral #1033). What remains in scope here is seeding npm-mapped recipes intojustfile.projectonly at first scaffold (it is a preserved, consumer-owned file) when node is detected — plus eslint/prettier hooks, which stay out of scope for this issue (they belong with the feat(workspace): generate .pre-commit-config.yaml from the flake (git-hooks.nix) — composable base hooks, consumer-extensible in the project flake #883 consumer-hooks seam; will file separately if wanted).This keeps the v1 module contract intact (packages/env/shellHook only), avoids inventing a scaffold-fragment contract, and still delivers turnkey Node:
modules = [ "node" ]+ automatic language-aware statics + first-scaffold npm recipes.Acceptance mapping: version-selectable Node ✔ (attrset option); decision recorded ✔ (this comment);
commit-action/sync-issues-actioncan dropextraPackages+ hand-written recipes ✔.fix(setup): render language-aware scaffold .gitignore and codeql matr…
fix(ci): make scaffolded CI and release pipeline language-neutral (#1033
c-vigo commentedon Jul 14, 2026
Implemented in #1042 (merged to dev), per the design decision recorded above:
nodev1 shell module with version selection via the new per-module-options mechanism ({ name = "node"; version = 22; }), plus first-scaffold npmjustfile.projectseeding for node-detected consumers. Scaffold statics landed separately via #1024/#1025, release bundling via #1029. eslint/prettier hooks deferred to the #883 seam.feat(image): add node capability module with first-scaffold npm recip…
ci(codeql): trigger push analysis on TypeScript paths, not Python (#67)
feat(setup): generate provenance banners in scaffolded assets (#1043)
chore: release 1.2.0 (#253)
chore: release 1.2.0 (#1068)