Skip to content
cutenodePublic

About

A utility for Node.js version information.

Topics

Resources

Code of conduct

Stars

15 stars

Watchers

1 watching

Forks

Latest commit

 

History

229 Commits

Folders and files

Repository files navigation

nodevu

nodevu is a Node.js Version Utility meant to collect, merge, and reason about Node.js versions in a way that's explicitly developer friendly. Its docs live at cutenode.github.io/nodevu.

nodevu is composed of a set of modules, each supporting Node.js 24 and later:

  • Foundational Modules
    • core: this is the core, online-only module. It calls out to sources that have version information about Node.js and does the heavy lifting of coercion, merging, and reasoning about that data into a format that is easily accessible and (hopefully!) extremely useful. It transparently provides data from the sources it fetches from, but also adds additional useful context that it figures out based on time, context, and other signals.
    • static: this is the offline-only version of nodevu. It's simply an interface to both the full context of core, in addition to a few subsets of the data core provides. It is automatically updated when there's new information available, though there aren't guarantees on when that will be available. This is mostly useful if you're not particularly picky about when your version information is available.
  • Additional Utilities
    • oldest: this is a utility for finding the oldest LTS or Security release in a Node.js release line.
    • newest: this is a utility for finding the newest LTS or Security release in a Node.js release line.
    • ranges: a module that provides information about ranges of Node.js versions.
    • aliases: a module that provides information about aliases for Node.js versions.
    • translate: a module that translates from the version structure that the Node.js project proposed for the support property in package.json to aliases.
  • Helper Modules
    • parsefiles: this is a utility for parsing the files property of the Node.js distributions JSON file to understand the available files for any given set of identifiers from that list. It also provides additional, potentially useful information.
    • opt: this is a utility for generating a usable options for @nodevu/core.
    • fetchindex: this is a utility for fetching /dist/index.json from nodejs.org for @nodevu/core. Might be useful for other projects.

Development

Installing needs npm 11.17 or newer, which ships with Node.js 24 and later. .npmrc skips packages published in the last 3 days and blocks git and URL dependencies. npm only runs the dependency install scripts that allowScripts in package.json approves, and npm approve-scripts <pkg> adds one pinned to its installed version.

  • npm test and npm run coverage run every module's tests. The tests share the release data snapshot and its helpers through fixtures/, a private workspace that isn't published. npm run test:update -w fixtures refreshes the snapshot.
  • npm run lint checks the whole repo with oxlint (warnings fail it too) and oxfmt, and checks with docov that everything the modules export has JSDoc. docov.jsonc sets what it scans. npm run lint:harden tests tools/harden/ and runs @lavamoat/harden to check that .npmrc and package.json keep every hardening setting, except the ones tools/harden/decisions.json turns off. tools/oxlint/nodevu/ holds the repo's own oxlint rule, which stops code from reaching into another package's folder by relative path, and npm run lint:rules tests it. npm run lint:pack packs every module and checks the tarball with publint and Are the Types Wrong?. npm run lint:workspaces checks that every config naming the modules (tsconfig, CI, release, Dependabot, the docs sidebar) matches workspaces in package.json. npm run knip runs knip to find unused files, exports and dependencies. knip.jsonc lists what it skips and why. npm run lint runs all of them.
  • CI also checks spelling with typos (_typos.toml lists words it shouldn't flag), relative links and anchors with lychee, the workflows with actionlint and zizmor, and that a PR adds no dependency with a known advisory. A weekly run tests every module on Linux, macOS and Windows, tries 50 times as many fast-check cases, and checks external links.
  • npm run types type-checks the JSDoc, the tests and the scripts, and writes each module's TypeScript declarations to its types/ folder. Commit them: CI fails when they're out of date.
  • npm run docs:dev builds the docs from docs/pages/ with doc-kit and serves them locally. npm run docs only builds them, into out/.

Merging to main publishes the docs to GitHub Pages.

About

A utility for Node.js version information.

Topics

Resources

Code of conduct

Stars

15 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages