Skip to content
BETAGuardrails are in beta. The library, the configuration format and the CLI command can still change.

Guardrails

nodejs

4 guardrails, all at version v1.

GuardrailDefault severityWhat it checks
nodejs/lockfile-committedwarningThe project commits a lock file, so an install of the same commit resolves the same versions.
nodejs/package-manager-pinnedwarningThe manifest names the package manager and the exact version Corepack should install.
nodejs/single-package-managerwarningThe project commits at most one lock file, so two package managers do not each believe they own the tree.
nodejs/version-declaredwarningThe project declares the Node.js version it is built and run against, and that version is no older than the configured floor.

Shared inputs

Every nodejs guardrail declares these inputs, and each one may add its own.

InputDescriptionDefault
projectDirDirectory holding the project, relative to the directory the CLI runs in..

Shared collectors

Every nodejs guardrail is handed the facts these collectors gather, and each one may ask for more of its own.

CollectorGathers
nodejsThe Node.js project in the project directory: its manifest, the Node version and package manager it asks for, every workspace it declares, the dependencies each manifest names and which of them are pinned, and the lock files committed beside them.

Every guardrail in this category is configured the same way, in the guardrails.checks array of buildnote.json. See Configuring guardrails for every option, and Guardrails to search the whole library.

Buildnote Limited
Registered in England and Wales, Reg: 16140412