Skip to content

Releases

v2.0.0

Choose a tag to compare

@cldmv-bot cldmv-bot released this 29 Nov 04:00
v2.0.0
09f8bbe

@cldmv/wisp v2.0.0 Changelog

Release Date: November 2026
Release Type: Major
Branch: release/2.0.0


Overview

require("@cldmv/wisp") now returns the module object { default, wisp, wispSync }, the same exports import gives you, instead of the wisp function. That is the only change to the public surface, and it only affects CommonJS callers that called the result of require() directly. ESM import is unchanged, and so are the options, the JSON loading behaviour and the supported Node.js range.

Caller detection loses a dead flag and dist/ is now built one minified file per module instead of a tsup bundle, neither of which changes behaviour. The rest of the release is test and CI housekeeping and development-dependency bumps. The package still has no runtime dependencies.


💥 Breaking Changes

The CommonJS entry returns the module object (#86, fixes #85)

src/index.cjs, published as dist/index.cjs, is now the generic CLDMV shim. It loads index.mjs through synchronous require(esm) and hands back what import sees. The ESM entry exports two distinct values, wisp and wispSync (default is wisp), so require("@cldmv/wisp") returns the module object { default, wisp, wispSync } and not the wisp function. Before, the CommonJS entry unwrapped the function, so require("@cldmv/wisp")("./data.json") worked. It now throws, because the module object is not callable.

  • require(x)(…) becomes require(x).wisp(…), or const { wisp } = require(x).
  • .wisp, .wispSync, .default and destructuring keep working.
  • ESM import is unchanged.

The require() Node.js range is the same as in v1.0.9: ^20.19.0 or >=22.13.0, with the same ERR_REQUIRE_ESM message pointing at import() on older versions.


🐛 Bug Fixes

  • Dead flag removed from caller detection (#89, resolves #12). pickPrimaryBaseFile() tracked a second flag for leaving a root index.* file but never read it. wisp has no root index.* file any more, so the only rule is the one the code already used: the first frame after the stack leaves src/ or dist/ is the caller. The flag and its eslint-disable are gone and the docstring matches. Behaviour is unchanged, and a new test covers an ESM caller importing the package by name, through src/index.mjs under wisp-dev and through dist/index.mjs after a build.

🔧 CI & tooling

  • npm test also runs the suite against the build. The new test:dist script builds the package and runs the Vitest suite with --mode=dist, so the published dist/ is tested as well as src/. test and ci:coverage call it (#74).
  • The wisp-dev condition is set with devCondition(). test.nodeOptions is not a Vitest option and passed nothing to the workers. The Vitest configuration now uses devCondition() from @cldmv/configs 1.4.0, which sets resolve.conditions, ssr.resolve.conditions and test.execArgv (#72).
  • sync-release-notes.yml added. The companion workflow syncs release bodies from the per-version changelog files and creates missing version tags (#80).
  • ci.yml synced with the v4.43.0 template (#82).
  • dist/ is built one file per module. The tsup bundle is replaced by scripts/build.mjs, which minifies each src file in place with esbuild (bundle: false, keepNames, node16 target, source maps written next to the output but left out of the tarball) and copies src/index.cjs verbatim. dist/ now mirrors src/, so dist/index.mjs imports dist/wisp.mjs, which imports dist/lib/resolve-from-caller.mjs, and every module exists once. The require() and import export shapes are unchanged. The caller-resolution tests moved from tests/bundle to tests/built and also check the per-module layout. tsup is gone and esbuild is a dev dependency (#91, resolves #83).
  • Superseded CI runs on next and hotfixes are cancelled, so a new push no longer queues behind runs for commits that have already been replaced. The block is synced with the CLDMV/.github v4.46.0 template (#87, fixes #84).

📚 Documentation

  • The README's usage section now says what require("@cldmv/wisp") returns, and the Contributing section describes test and test:dist (#86, #74).
  • NEW: docs/changelog/v2/v2.0.0.md: this changelog.
  • README What's New promoted to v2.0.0.

🔧 Dependencies

  • Runtime: none, unchanged.
  • vitest and @vitest/coverage-v8 5.0.5 → 5.1.0 (#75).
  • @cldmv/fix-headers 2.2.4 → 2.2.6 (#76).
  • @cldmv/configs 1.3.0 → 1.4.0 (#72).

Upgrade notes

  • If you load wisp from CommonJS and call the result of require() directly, change require("@cldmv/wisp")(…) to require("@cldmv/wisp").wisp(…), or use const { wisp } = require("@cldmv/wisp").
  • .wisp, .wispSync, .default and destructuring work as before, and ESM import needs no change.
  • dist/ now has one file per module (dist/index.mjs, dist/wisp.mjs, dist/lib/…) instead of a single bundle. Deep imports into dist/ were never supported, and the exports map is unchanged.
  • Nothing changes for the Node.js version: engines.node is still >=16.0.0, and require() needs ^20.19.0 or >=22.13.0.

coverage

Metric Coverage
Statements 100.0%
Branches 98.9%
Functions 100.0%
Lines 100.0%

Avg: 99.7% · 96931da · Node lts/*

👥 Contributors

v1.0.9

Choose a tag to compare

@cldmv-bot cldmv-bot released this 02 Nov 02:52
v1.0.9
5277b9f

@cldmv/wisp v1.0.9 Changelog

Release Date: November 2026
Release Type: Patch
Branch: release/1.0.9


Overview

This release renames the CommonJS entry's source file to match its published name and adds tests for caller resolution through it. JSON loading behaves exactly as in v1.0.8: the only change in src/ is the version range named in the require() error message, and the published dist/index.cjs differs only in that message, a comment explaining it and its file header.

The supported Node.js range does not change. engines.node stays >=16.0.0, since wisp exists to load JSON on every Node.js version, and dist/index.mjs is still built for the Node.js 16 syntax level.


📦 Requirements

Node.js support is unchanged; developing wisp needs 22.22.0 (#65, #70)

  • import works on Node.js 16 and later, as before. require() needs Node.js ^20.19.0 or >=22.13.0, because the CommonJS entry loads the ES module build through synchronous require(esm). 22.13 rather than 22.12 because Node.js 22.12 prints an ExperimentalWarning on require(esm).
  • The CommonJS entry's ERR_REQUIRE_ESM message now reads require() needs Node.js ^20.19.0 or >=22.13.0 and still points to import().
  • Developing wisp needs Node.js 22.22.0 or newer, the floor of the build and test toolchain (Vitest 5, tsup 9). That floor is declared in the new devEngines.runtime field with onFail: "error", which npm checks only for this project's own npm install, npm ci and npm run, never for consumers (#70).
  • The CI test matrix starts at Node.js 22.22.0 instead of 22.12.0, matching devEngines. That is not wisp's support floor, and the workflow input descriptions now say the value must match devEngines, not engines (#70).

📦 Packaging

  • CommonJS entry renamed in source. src/cjs-shim.cjs is now src/index.cjs, next to the ESM entry src/index.mjs it loads, so the source and the published dist/index.cjs share a name (#65, fixes #63). The wisp-dev export condition's require target now points at src/index.cjs. Nothing changes for consumers of the published package.
  • Caller resolution through the CommonJS entry is tested. wisp resolves relative paths from the file that calls it by skipping index.* entry frames in src/ and dist/. New tests load the package by name from a CommonJS fixture, once with the wisp-dev condition (src/index.cjs) and once without it (dist/index.cjs), and check that paths still resolve against the calling file (#65).

🔒 Security & supply chain

  • The dev toolchain update moves Vite (via Vitest) from 8.3.2 to 8.3.5 and esbuild (via tsup) from 0.27.7 to 0.28.2, clearing the open Dependabot alerts (#66).
  • overrides now force katex to >=0.19.1 <1.0.0 (0.16.47 → 0.19.1) and minimatch to ^11.0.3 (10.2.6 → 11.0.3), the patched versions (#67). Both are development-only transitive dependencies; the package still has no runtime dependencies.

🔧 CI & tooling

  • The test setup passes the wisp-dev condition: resolve.conditions and ssr.resolve.conditions in the Vitest configuration, and --conditions=wisp-dev on the node --test run in test:cjs, so loading the package by name in tests reaches src/ (#65).
  • The failed-import retry test is gated on behaviour, not the Node.js major. Node.js 22.22 retries a URL whose first import failed on its attributes, as 24 and later do, so the old >= 24 check ran the cached-failure test on a Node.js that no longer caches. The suite now probes the behaviour once at startup (#65).

📚 Documentation

  • The README's Requirements section states the require() range (^20.19.0 or >=22.13.0) next to the Node.js 16 floor for import and notes that development needs Node.js 22.22.0 (devEngines), and the Contributing section explains how the wisp-dev condition switches a checkout between dist/ and src/ (#65, #70).
  • NEW: docs/changelog/v1/v1.0.9.md: this changelog.
  • README What's New promoted to v1.0.9.

🔧 Dependencies

  • Runtime: none, unchanged.
  • tsup 9: tsup 8.5.1 → 9.0.0 (#66).
  • Dev toolchain bumps (#66, #49): vitest and @vitest/coverage-v8 5.0.3 → 5.0.5, @cldmv/vitest-runner 1.5.3 → 1.5.6, eslint 10.12.0 → 10.14.0, prettier 3.9.9 → 3.9.10, @eslint/css 2.0.0 → 2.0.1, @eslint/json 2.1.0 → 2.1.1, globals 17.13.0 → 17.14.0, @types/node 26.6.4 → 26.6.6.
  • CLDMV tooling (#66): @cldmv/fix-headers 2.2.0 → 2.2.4, @cldmv/configs 1.2.4 → 1.3.0, @cldmv/jsonv 1.1.3 → 1.1.5, @cldmv/eslint-plugin-jsonv 1.0.15 → 1.0.17, @cldmv/prettier-plugin-jsonv 1.1.3 → 1.1.4.
  • typescript stays on ^6.0.3, and the generated types/ are unchanged.
  • overrides for katex and minimatch, see Security & supply chain (#67).

Upgrade notes

  • Nothing to do for the Node.js version: engines.node is still >=16.0.0. Code that calls require() needs Node.js ^20.19.0 or >=22.13.0; on older versions load the package with import().
  • No API changes: the exports, options and JSON loading behaviour are the same as v1.0.8.

coverage

Metric Coverage
Statements 100.0%
Branches 100.0%
Functions 100.0%
Lines 100.0%

Avg: 100.0% · 1aaf6cf · Node lts/*

👥 Contributors

v1.0.8

Choose a tag to compare

@cldmv-bot cldmv-bot released this 12 Oct 16:52
v1.0.8
2e0ad68

@cldmv/wisp v1.0.8 Changelog

Release Date: October 2026
Release Type: Patch
Branch: release/1.0.8


Overview

A one-line development-dependency patch: @types/node 26.6.3 → 26.6.4 (#46). The only files that differ from v1.0.7 are package.json (the version number) and package-lock.json. The package.json range ^26.6.2 already allowed the new version, so the lockfile is the only place the bump is recorded.

@types/node is a development dependency used by the TypeScript type check (npm run types:check, part of npm run build:ci). It does not enter the published tarball, which still contains only dist/, types/, README.md and LICENSE, and the package still has no runtime dependencies. With the bump in place npm run build:ci (lint, format check, tsc, the build, the test suite and the type check) passes.


🔧 Dependencies

  • @types/node 26.6.3 → 26.6.4 (#46), a lockfile-only patch update within the existing ^26.6.2 range. It is the only entry in the lockfile that changed, and its declared dependencies are unchanged.

📚 Documentation


Upgrade notes

  • No breaking changes and no runtime change: drop-in for v1.0.7. engines.node (>=16.0.0) is unchanged, and the supported Node.js versions for import and require() are the same.

coverage

Metric Coverage
Statements 100.0%
Branches 100.0%
Functions 100.0%
Lines 100.0%

Avg: 100.0% · 3595850 · Node lts/*

👥 Contributors

v1.0.7

Choose a tag to compare

@cldmv-bot cldmv-bot released this 05 Oct 04:08
v1.0.7
4f7f995

Wisp v1.0.7 Changelog

Release Date: October 2026
Release Type: Patch
Branch: release/1.0.7


Overview

Fixes the CommonJS entry point so require("@cldmv/wisp") works inside esbuild and webpack bundles, and makes require() fail with a clear message on Node.js versions that cannot load ES modules synchronously. It also stops a failed validate check from silently loading the fallback file, fixes an endless loop when the fallback itself could not be loaded, and relicenses the package under Apache-2.0.

Two more wisp() fixes for modules loaded through import(): a reviver or validate on a module without a default export now works instead of ending in "Unsupported type", and a validate rejection on any import() path throws the validation error once.

The published package is now built: src/ is bundled with tsup into dist/index.mjs, dist/index.cjs is a thin require() wrapper around it, and the tarball ships only dist/, types/, README.md and LICENSE. The @cldmv/wisp entry points and their exports are unchanged; only code that reached into the package's files directly is affected (see Upgrade notes). The test suite moved from mocha to @cldmv/vitest-runner with 100% coverage, and the standard lint/format setup was added.


🐛 Bug Fixes

require() works in bundles and fails clearly on older Node.js (#30)

index.cjs loaded index.mjs through createRequire(__filename), which bundlers such as esbuild and webpack cannot follow. It now uses the plain require("./index.mjs") that a .cjs file already has in scope.

index.cjs has always depended on Node.js's synchronous require(esm), so require("@cldmv/wisp") never worked on Node.js versions without it. Those versions used to fail with a bare loader error; index.cjs now checks process.features.require_module first and throws an ERR_REQUIRE_ESM error that names the supported versions (^20.19.0 or >=22.12.0) and points to import() instead. import("@cldmv/wisp") keeps working on every Node.js version the package supports.

The exports are the same as before: require("@cldmv/wisp") returns wisp, with .default, .wisp and .wispSync attached. The CommonJS entry now ships as dist/index.cjs (see Packaging below).

A failed validation throws instead of loading the fallback (#35, fixes #33)

wisp and wispSync ran validate inside the same try block as reading and parsing the file, so when the primary file loaded fine but the caller's validate rejected it, wisp fell through to fallback as if the file were missing. The data the caller asked to reject was silently replaced by the fallback's. The fallback is now used only when the primary file cannot be read or parsed (missing, unreadable, or not valid JSON). A validation failure throws, in the same format as before: Failed to load JSON file at <url>: @cldmv/wisp: <message>.

The same change fixes a second bug: the fallback was loaded with the same options, fallback included, so a fallback that also failed to load or validate retried itself forever. wispSync ended with Maximum call stack size exceeded and wisp never settled. The fallback is now loaded without a further fallback and throws if it fails.

reviver and validate work on a module without a default export (#41, fixes #38)

When wisp() loaded a module through import() and was given a reviver or validate, it copied the module's value with structuredClone before handing it over. For a module with no default export that value is the module namespace object, which structuredClone cannot copy. The resulting DataCloneError was swallowed as a failed import strategy, and the call ended in the generic Unsupported type '<type>' or failed to load module at <url> error. wisp() now copies the namespace's exports to a plain object first, so reviver and validate receive a plain-object copy of the module's exports. Without either option the namespace itself is still returned, as before. wispSync only parses JSON files and is not affected.

A validate rejection on an import() path throws the validation error once (#41, fixes #39)

validate ran inside each import() strategy's try block, so a rejection counted as that strategy failing: the next strategy imported the module again and validated it again. For type: "json" the call ended on the file-system path and threw the validation error there, after calling validate up to three times; for any other type it ended in Unsupported type, hiding the validation error entirely. validate now runs once, after the module has loaded, and a rejection throws the same error as the file-system path, Failed to load JSON file at <url>: @cldmv/wisp: <message>, with the original error as cause. The same release refactors the strategy loop to clear a CodeQL js/unused-loop-variable finding; behaviour is unchanged by that part.


📄 License

The package is relicensed from MIT to Apache-2.0 (#34), and the LICENSE file now carries the Apache-2.0 text.


📦 Packaging

  • Built dist/ output (#40) — tsup bundles src/index.mjs into a minified dist/index.mjs (target Node.js 16, function names kept). dist/index.cjs is not a second bundle: it is the CommonJS wrapper from #30, copied in verbatim, and loads ./index.mjs through require(esm). The root index.mjs / index.cjs files are gone (the sources now live at src/index.mjs and src/cjs-shim.cjs).
  • files now lists only dist/ (without sourcemaps), types/, README.md and LICENSE. src/ and the root entry files are no longer published.
  • exports — import resolves to dist/index.mjs, require to dist/index.cjs, and a types condition plus top-level main, module and types fields point at the built files and at types/index.d.mts. A wisp-dev condition serves src/ directly for local development.
  • Caller-relative path resolution is checked against the built dist/ output, for both import and require(), by the new tests/bundle/caller-resolution.test.mjs.

🔧 CI & tooling

  • Test suite on @cldmv/vitest-runner (#37) — the mocha + chai suite under test/ moved to vitest under tests/ (*.test.vitest.mjs), with new tests for the import strategies and the caller resolver. Coverage is 100% and the coverage badge and PR coverage comment are enabled in CI. The legacy assert-strategy tests run on Node.js 24+, because Node.js 20 and 22 cache a failed import() of the same URL; older versions check the unsupported-type error instead.
  • Standard lint/format setup (#36) — prettier and ESLint configs in .configs/, a .prettierignore, lint / lint:fix / format / format:check scripts, and a check-only pre-commit hook installed by prepare.
  • Build scripts (#40) — build runs tsup, types:build / types:check replace build:types, prepack builds types and dist/ before packing, and build:ci runs lint, format check, types, build and tests. CI, publish and release workflows build dist/ alongside the types, the coverage jobs run build:ci before measuring, and the bundle-size check measures dist/index.mjs and dist/index.cjs.
  • BUGS.md was reformatted by prettier (code-fence languages and spacing; no content change), and one /* v8 ignore next */ comment marks a type check in src/lib/resolve-from-caller.mjs that the exported wrappers make unreachable. Neither changes behaviour.
  • New tests for wisp and wispSync: a primary that fails validation throws without using the fallback, a primary that is invalid JSON uses the fallback, and a fallback that fails validation throws.
  • New tests/cjs/entry.test.cjs (run by npm test through npm run test:cjs, which now builds dist/ first) checks that require() returns the same functions as import, and that the version check fires when require(esm) is unavailable.

📚 Documentation

  • NEW: docs/changelog/v1/ — per-version changelogs for every release from v1.0.0.
  • README reorganized; the error-handling example now shows the actual error message, and the wispSync return type and the type / fallback options are documented.

🔧 Dependencies

No runtime dependencies were added or changed; the package still has none, and engines.node stays >=16.0.0. All changes are to development dependencies:

  • Test toolchain (#37): added @cldmv/vitest-runner (^1.5.3), vitest (^5.0.3) and @vitest/coverage-v8 (^5.0.3); removed mocha and chai.
  • Build (#40): added tsup (^8.5.1).
  • Lint and format (#36): added prettier (^3.9.9), @eslint/json, @eslint/markdown, @eslint/css, @cldmv/eslint-plugin-jsonv, @cldmv/prettier-plugin-jsonv and @cldmv/jsonv; eslint ^10.10.0 → ^10.12.0 and globals ^17.12.0 → ^17.13.0.
  • @cldmv/fix-headers ^2.1.2 → ^2.2.0 (#42 took it to ^2.1.4, #44 to ^2.2.0). Version 2.1.4 no longer writes a JavaScript comment into JSON or Markdown files, processes every repeated --input, and never walks dependency folders such as node_modules. Version 2.2.0 makes the @Last modified by header ...
Read more

v1.0.3

Choose a tag to compare

@cldmv-bot cldmv-bot released this 15 Nov 21:06
v1.0.3
70ae75d

Wisp v1.0.3 Changelog

Release Date: August 2026
Release Type: Patch


Overview

A development-dependency security update. No runtime code changed.

This version was tagged on GitHub but was not published to npm; npm went from v1.0.1 to v1.0.5.


🔧 Dependencies

  • picomatch 2.3.1 → 2.3.2, a development-only transitive dependency of mocha (#3, #4).

Upgrade notes

  • No runtime change — drop-in for v1.0.2.

v1.0.6

Choose a tag to compare

@cldmv-bot cldmv-bot released this 03 Oct 03:33
v1.0.6
85acc2a

Wisp v1.0.6 Changelog

Release Date: October 2026
Release Type: Patch


Overview

Uniform file headers, a CI fix and a development-dependency security update. No runtime code changed; the published .mjs / .cjs files differ only in their header comments.


🔧 CI & tooling

  • Adopted the shared CLDMV @cldmv/fix-headers config (npm run fix:headers) and stamped uniform file headers across the source and workflow files (#28).
  • The in-repo PR mirror job now runs instead of being skipped (#29).

🔧 Dependencies

  • brace-expansion 5.0.9 → 5.0.12 and serialize-javascript 7.1.1 → 7.1.2, development-only transitive dependencies (#26).
  • Added @cldmv/fix-headers and @cldmv/configs as development dependencies.

Upgrade notes

  • No runtime change — drop-in for v1.0.5.
👥 Contributors

v1.0.5

Choose a tag to compare

@cldmv-bot cldmv-bot released this 02 Oct 21:19
v1.0.5
110c7c3

Wisp v1.0.5 Changelog

Release Date: October 2026
Release Type: Patch


Overview

Development toolchain updates (TypeScript 6, chai 6, @types/node 26) and v4 workflow syncs. The only source change is a type-checker cast; runtime behavior is unchanged. This is the first npm release since v1.0.1, so it also delivers the changes from v1.0.2–v1.0.4 to npm.


🔧 CI & tooling

  • Synced the v4 workflows with the CLDMV/.github v4.29.2 templates (#20), added the bundle-size workflow measuring the published JS files (#22), and stopped a skipped PR-run mirror job from satisfying the required PR check (#24).
  • tsconfig.json moved to module / moduleResolution NodeNext for TypeScript 6. The legacy import(…, { assert }) call in src/wisp.mjs gained a type cast so the checker accepts the assert key; the call itself is unchanged.

🔧 Dependencies

  • typescript ^5.2.0 → ^6.0.3 (#21)
  • chai 4.5.0 → 6.2.2 (#15)
  • @types/node 20.19.24 → 26.6.3 (#18, #23)
  • eslint 10.10.0 → 10.11.0 (#17)
  • mocha 12.0.1 → 12.0.2 (#16)

All are development dependencies; the package still has no runtime dependencies.


Upgrade notes

  • No runtime change — drop-in for v1.0.1 (the previous npm release). See v1.0.4 for the error.cause addition that reaches npm with this version.
👥 Contributors

v1.0.4

Choose a tag to compare

@cldmv-bot cldmv-bot released this 13 Sep 23:02
v1.0.4
2aaea28

Wisp v1.0.4 Changelog

Release Date: September 2026
Release Type: Patch


Overview

Wires up ESLint for the first time, keeps the original error attached to the errors wisp throws, and moves the test toolchain to mocha 12.

This version was tagged on GitHub but was not published to npm; npm went from v1.0.1 to v1.0.5.


🐛 Bug Fixes

Errors keep their original cause

Errors thrown by wisp and wispSync (validation failures and "Failed to load JSON file" errors) now pass the underlying error as cause, so error.cause holds the original ENOENT, SyntaxError or validation error. The messages are unchanged.

Lint cleanup

wispSync no longer destructures the type option it never used, and an unused variable was removed from the caller resolver. Neither changes behavior.


🔧 CI & tooling

  • ESLint is now actually configured (.configs/eslint.config.mjs); the lint script previously pointed at a missing setup.
  • Added .github/dependabot.yml targeting next, the feature-pr.yml auto-PR workflow, and moved the release and feature-PR workflows to the current thin-caller templates (#6).
  • The hotfix redirector now uses the v4 reusable workflow and signs its security cherry-picks (#8).
  • The CI Node.js matrix now runs from 22.12.0 up to 26 (#10).

🔧 Dependencies

  • mocha ^10.2.0 → ^12.0.1, which fixes ESM/CJS interop on Node.js 26 and removes a large set of old transitive dependencies (#9, #10).
  • Development dependency group update (#5).
  • Added eslint, @eslint/js and globals as development dependencies.

Upgrade notes

  • No API changes — drop-in for v1.0.3. Code that inspects error.cause now gets the original error instead of undefined.
👥 Contributors

v1.0.2

Choose a tag to compare

@cldmv-bot cldmv-bot released this 31 Jul 05:53
v1.0.2
a683a42

Wisp v1.0.2 Changelog

Release Date: July 2026
Release Type: Patch


Overview

Moves the repository onto the CLDMV v4 staging-branch release flow. No runtime code changed.

This version was tagged on GitHub but was not published to npm; npm went from v1.0.1 to v1.0.5.


🔧 CI & tooling

  • Replaced the old release workflow with the CLDMV v4 workflow set: work merges into next, a persistent release PR carries it to master, and hotfixes handles urgent fixes (#2).
  • Added CodeQL, OpenSSF Scorecard, dependency review, CLA, labeler, PR-title normalization, stale, branch-retention, tag-health and release-notification workflows.

Upgrade notes

  • No runtime change — drop-in for v1.0.1.
👥 Contributors

v1.0.0

Choose a tag to compare

@cldmv-bot cldmv-bot released this 15 Nov 21:06
v1.0.0
858172b

Wisp v1.0.0 Changelog

Release Date: November 2025
Release Type: Major (initial release)


Overview

First public release of @cldmv/wisp, a small library for loading JSON files in Node.js without caring which JSON import syntax the running Node.js version supports.


✨ Features

Version-agnostic JSON loading

  • wisp(input, options) loads a JSON file asynchronously. It tries import(url, { with: { type: "json" } }) first, then the legacy import(url, { assert: { type: "json" } }), and finally reads and parses the file with fs.readFile.
  • wispSync(input, options) loads a JSON file synchronously with fs.readFileSync.
  • input accepts a relative path, an absolute path, a file:// string or a URL. Relative paths resolve from the file that called wisp / wispSync, unless options.base is given.
  • Options: base (base path or URL for relative inputs), validate (called with the parsed value; a throw rejects the load), reviver (passed to JSON.parse), type (import attribute type, "json" by default, async only) and fallback (a second path or URL to try when the first one cannot be loaded).
  • Values returned with a reviver or validate are deep-cloned (with structuredClone when available), so the module cache is never mutated.

Packaging

  • Dual entry points: index.mjs for import and index.cjs for require(), with wisp as the default export.
  • Declared engines.node of >=16.14.

Upgrade notes

  • Initial release; nothing to upgrade from.
  • Relative-path resolution from the caller's location does not work correctly in this version when the package is installed as a dependency (paths resolve from inside the package). Upgrade to v1.0.1.