chore: unpin node-red-standards and declare the coverage configuration - #47
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This repo was the reason
node-red-standards0.5.0 grew two new checks.The reference was frozen at a commit
devDependencies["node-red-standards"]washttps://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, whilestandards-checkkept 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.ymlhere 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 reportsunpin (was frozen at a commit).The missing c8 block was a hidden 90% gate
There was no
c8block, andc8 --check-coveragewith no block falls back to c8's own defaults — 90% lines (branches, functions and statements default to 0). Measured here:So the moment the current
node.js.ymlarrives with itsnpm run coverage:checkstep, 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 emitslcovso the workflow's coverage artifact contains something readable instead of only c8's raw V8 dump undercoverage/tmp/.node-red-standards0.5.1 adds an audit check for exactly this:c8.linesmust be stated, because omitting it silently means 90%.Verified locally: lint, format:check, 20 tests, and
coverage:checknow exits 0. Audit 18/18.