Skip to content

chore: unpin node-red-standards and declare the coverage configuration - #47

Merged
windkh merged 2 commits into
mainfrom
chore/standards-0.5.0
Aug 20, 2026
Merged

chore: unpin node-red-standards and declare the coverage configuration#47
windkh merged 2 commits into
mainfrom
chore/standards-0.5.0

Conversation

@windkh

@windkh windkh commented Aug 20, 2026

Copy link
Copy Markdown
Owner

This repo was the reason node-red-standards 0.5.0 grew two new checks.

The reference was frozen at a commit

devDependencies["node-red-standards"] was
https://codeload.github.com/windkh/node-red-standards/tar.gz/1726fe5…node-red-standards 0.3.0. So this repo stopped receiving the standard three releases ago, while standards-check kept reporting a clean 10/10 against the frozen copy. Nothing could catch that: a Git specifier has no semver major, so the "raise a floor below the baseline" logic never looked at it.

That is also why .github/workflows/node.js.yml here still has no coverage step at all — the workflow that added one never arrived.

Now github:windkh/node-red-standards, which dependabot can move. 0.5.0 treats any other specifier for itself as drift and reports unpin (was frozen at a commit).

The missing c8 block was a hidden 90% gate

There was no c8 block, and c8 --check-coverage with no block falls back to c8's own defaults — 90% lines (branches, functions and statements default to 0). Measured here:

All files | 56.56 % lines | 71.6 % branches | 64 % functions

So the moment the current node.js.yml arrives with its npm run coverage:check step, CI would have gone red on a threshold nobody chose. The thresholds are therefore set explicitly at the measured floor (lines 56, statements 56, branches 71, functions 64), and the reporter now emits lcov so the workflow's coverage artifact contains something readable instead of only c8's raw V8 dump under coverage/tmp/.

node-red-standards 0.5.1 adds an audit check for exactly this: c8.lines must be stated, because omitting it silently means 90%.

Verified locally: lint, format:check, 20 tests, and coverage:check now exits 0. Audit 18/18.

Note: this repo's standards-check.yml is the 0.3.0-era template and does npm ci + npx nrstd audit, i.e. it runs the local devDependency with the npm cache rather than refetching from GitHub on every run. That is arguably better than the current template's npx --yes github:… and worth folding back into the standard — not changed here.

windka and others added 2 commits August 20, 2026 11:31
The standard was pinned to a commit tarball
(codeload.../tar.gz/1726fe5, node-red-standards 0.3.0), so this repo stopped
receiving it three releases ago while `standards-check` kept reporting a clean
audit against the frozen copy. That is also why .github/workflows/node.js.yml
here still has no coverage step: the workflow that added one never arrived.
Now `github:windkh/node-red-standards`, which dependabot can move; 0.5.0 treats
any other specifier for itself as drift.

Adding the c8 block matters more than it looks. There was none, and
`c8 --check-coverage` with no block falls back to c8's own defaults -- 90% lines.
Measured here: 56.56% lines, 71.6% branches, 64% functions. So the moment the
current node.js.yml arrives with its `npm run coverage:check` step, CI would have
gone red on a threshold nobody chose. The thresholds are therefore set explicitly
at the measured floor, and the reporter now emits lcov so the workflow's coverage
artifact contains something readable instead of only c8's raw V8 dump.

Verified: lint, format:check, 20 tests, coverage:check all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0.5.1 adds one audit check: c8.lines must be stated explicitly. c8 defaults it
to 90 rather than 0, so an omitted floor is a coverage gate nobody chose. This
repo already declares one, so the check passes as-is.

Refreshed with `npm update` rather than `npm install`, which does not re-resolve
a git dependency whose existing entry already satisfies the specifier -- the
mechanism that had kept this reference stale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@windkh
windkh merged commit 5957150 into main Aug 20, 2026
3 checks passed
@windkh
windkh deleted the chore/standards-0.5.0 branch August 20, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant