Node Base safe mode
Safe mode is the default Mezair Node Base workflow. It installs dependencies without running lifecycle scripts and then reports which packages wanted install-time execution.
mezair-npm-ci-safeUnder the hood, safe mode runs:
npm ci --ignore-scriptsWhat safe mode writes
Reports are written to .mezair/reports by default. Override the location with:
MEZAIR_REPORT_DIR=/tmp/mezair-reports mezair-npm-ci-safeSafe mode writes lifecycle-scripts.json. Depending on the workflow, you can also run:
mezair-dep-reportThat generates dependency reports from an existing node_modules tree without reinstalling.
When safe mode should pass
Safe mode should pass when:
npm ci --ignore-scriptssucceeds.- Reports are generated.
- Strict mode is disabled, or strict mode finds no configured failure condition.
If packages contain lifecycle scripts, safe mode can still succeed unless strict mode says otherwise. The report is the point: it makes install-time execution visible without running it.
Strict safe mode
To fail when lifecycle scripts are present:
MEZAIR_STRICT=true MEZAIR_STRICT_LIFECYCLE_MODE=any mezair-npm-ci-safeTo fail only when lifecycle-script findings are risky:
MEZAIR_STRICT=true MEZAIR_STRICT_LIFECYCLE_MODE=risk mezair-npm-ci-safeUse any for high-control environments and risk when you need fewer false positives.
Pull request review
Safe mode works well for dependency bump pull requests:
- Run
mezair-npm-ci-safe. - Upload
.mezair/reportsas CI artifacts. - Review packages with lifecycle scripts.
- Use Mezair Registry explain output for package decisions.
- Switch to observed mode only for packages that genuinely require scripts.