You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area: coreTouches core library / runtime source codepriority: lowMinor issue or improvement that can be deferred without impactstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: enhancementAn improvement to existing functionality without adding a new feature
Before this gets picked up: don't use the fire-and-forget (async () => { await import("../devcheck.mjs") })() block from the task list. It doesn't gate anything. Code that imports the package and calls it straight away runs before devcheck exits, from ESM and from CJS. Load it synchronously at the top of src/index.mjs instead:
import{createRequire}from"node:module";try{createRequire(import.meta.url)("../devcheck.mjs");}catch(error){if(error?.code!=="MODULE_NOT_FOUND")throwerror;// devcheck.mjs is not published}
Still no top-level await, so the CJS entry's require(esm) keeps working. Keep ../devcheck.mjs external in tsup. The dist test should look for the "../devcheck.mjs" specifier in dist/index.mjs, not for import(...).
For the caller-resolution check: devcheck now runs while index.mjs is being evaluated, before any export can be called, so it still never shows up in a caller's stack. Worth confirming with those tests anyway.
Working copy is fix-headers' src/index.mjs in CLDMV/fix-headers#165 (ships in 2.2.4).
Correction to my comment above: don't use that block either. The static import { createRequire } from "node:module" breaks browser bundles (esbuild and webpack fail the build, Vite's bundle throws at load). Use this instead:
constnodeModule=typeofprocess==="undefined" ? undefined : process.getBuiltinModule?.("node:module");if(nodeModule){try{nodeModule.createRequire(import.meta.url)("../devcheck.mjs");}catch(error){if(error?.code!=="MODULE_NOT_FOUND")throwerror;// devcheck.mjs is not published}}
Same synchronous gate, nothing for a bundler to resolve, and it skips itself in a browser. Checked against esbuild/webpack/Vite (browser and node), headless Chrome loading src/ directly, Node 20.19 / 22.12 / 26, ESM and CJS. The caller-resolution note still applies. Working copy is still CLDMV/fix-headers#165.
One more thing with the sync devcheck load: on Node 22.12.x, require() of devcheck.mjs prints an ExperimentalWarning (require of an ES module) on every source-checkout run. 20.19 and 22.13+ don't warn. Consumers of the published package never hit it since devcheck.mjs isn't shipped.
When you adopt it, set engines.node to ^20.19.0 || >=22.13.0 (the CJS shim needs require(esm) anyway, so anything below 20.19 is already wrong) and keep the CI min_node_version off 22.12. fix-headers went to >=22.13.0 in CLDMV/fix-headers#165.
changed the title [-]Add devcheck for the wisp-dev condition, and raise engines to the require(esm) floor[/-][+]Raise engines to the require(esm) floor[/+]on Nov 1, 2026
Dropped the devcheck part, it's being removed from all the packages instead (the -dev condition already picks src or dist). Only the engines floor is left.
Not doing this. wisp is meant to load JSON on older Node.js, so its engines stay at >=16.0.0 (#70). The require() guard names ^20.19.0 or >=22.13.0, and the 22.22.0 toolchain floor lives in devEngines.
area: coreTouches core library / runtime source codepriority: lowMinor issue or improvement that can be deferred without impactstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: enhancementAn improvement to existing functionality without adding a new feature
Activity
Shinrai commentedon Oct 31, 2026
Before this gets picked up: don't use the fire-and-forget
(async () => { await import("../devcheck.mjs") })()block from the task list. It doesn't gate anything. Code that imports the package and calls it straight away runs before devcheck exits, from ESM and from CJS. Load it synchronously at the top ofsrc/index.mjsinstead:Still no top-level await, so the CJS entry's
require(esm)keeps working. Keep../devcheck.mjsexternal in tsup. The dist test should look for the"../devcheck.mjs"specifier indist/index.mjs, not forimport(...).For the caller-resolution check: devcheck now runs while
index.mjsis being evaluated, before any export can be called, so it still never shows up in a caller's stack. Worth confirming with those tests anyway.Working copy is fix-headers'
src/index.mjsin CLDMV/fix-headers#165 (ships in 2.2.4).Shinrai commentedon Oct 31, 2026
Correction to my comment above: don't use that block either. The static
import { createRequire } from "node:module"breaks browser bundles (esbuild and webpack fail the build, Vite's bundle throws at load). Use this instead:Same synchronous gate, nothing for a bundler to resolve, and it skips itself in a browser. Checked against esbuild/webpack/Vite (browser and node), headless Chrome loading
src/directly, Node 20.19 / 22.12 / 26, ESM and CJS. The caller-resolution note still applies. Working copy is still CLDMV/fix-headers#165.Shinrai commentedon Nov 1, 2026
One more thing with the sync devcheck load: on Node 22.12.x,
require()ofdevcheck.mjsprints anExperimentalWarning(require of an ES module) on every source-checkout run. 20.19 and 22.13+ don't warn. Consumers of the published package never hit it sincedevcheck.mjsisn't shipped.When you adopt it, set
engines.nodeto^20.19.0 || >=22.13.0(the CJS shim needsrequire(esm)anyway, so anything below 20.19 is already wrong) and keep the CImin_node_versionoff 22.12. fix-headers went to>=22.13.0in CLDMV/fix-headers#165.[-]Add devcheck for the wisp-dev condition, and raise engines to the require(esm) floor[/-][+]Raise engines to the require(esm) floor[/+]Shinrai commentedon Nov 1, 2026
Dropped the devcheck part, it's being removed from all the packages instead (the -dev condition already picks src or dist). Only the engines floor is left.
cldmv-bot commentedon Nov 1, 2026
Marked
status: implemented— resolved by #65, merged intonext. This issue closes automatically when that work ships to the default branch.docs: don't mark #64 fixed; wisp keeps its Node.js 16 floor
Shinrai commentedon Nov 2, 2026
Not doing this. wisp is meant to load JSON on older Node.js, so its engines stay at >=16.0.0 (#70). The require() guard names ^20.19.0 or >=22.13.0, and the 22.22.0 toolchain floor lives in devEngines.