test(ts/cli): anchor the stderr warning filter on Node's own prefix - #18
Merged
aslakhellesoy merged 1 commit intoJul 29, 2026
Merged
Conversation
Contributor
|
Please remove the unrelated Rust code from this PR. And/or merge main into this PR. |
The CLI run tests assert that stderr is empty, filtering out Node's one-time `ExperimentalWarning: globSync` notice. The filter matched `ExperimentalWarning` and `--trace-warnings` as unanchored substrings, so any line the CLI itself emitted containing either literal — a step name, a diagnostic, a hint — would be silently dropped from the assertions instead of failing them. Anchor on the prefixes of Node's own two-line notice instead, so only Node's notice is filtered and the CLI's own output is always asserted on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AndreasKoestler
force-pushed
the
fix/issue-12-ts-polish
branch
from
July 29, 2026 01:08
20b5c3b to
2b10cea
Compare
Contributor
Author
|
Sorry about the Rust noise here — I'd branched this off a fork I've force-pushed this branch: rebased onto current |
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.
Refs #12. Rebased onto current
mainand cut down to the one item that is still real.packages/cli/tests/run.test.tsassertsfilterWarnings(r.stderr)is'', filtering out Node's one-timeExperimentalWarning: globSyncnotice. The filter matchedExperimentalWarningand--trace-warningsas unanchored substrings, so any line the CLI itself emitted containing either literal — a step name, a diagnostic, a hint — was silently dropped from the assertion instead of failing it.Now anchored on the prefixes of Node's own two-line notice:
/^\(node:\d+\) ExperimentalWarning://^\(Use \node --trace-warnings/`Verification
The suite being green does not verify the patterns here: on Node v22.22.2 the CLI emits nothing on stderr at all (
globSyncis no longer experimental), so the filter is inert and both the old and new versions pass trivially. I checked the patterns against the notice format directly instead — both notice lines are filtered, and CLI-style lines containing the same literals are kept:Worth noting on the back of that: the filter may be dead weight on current Node. Happy to delete it instead if you'd rather — but that's your call on the supported Node range, so this PR just makes it correct.
pnpm checkandpnpm buildgreen;release/lint-commits.shOK.Dropped from the original PR
The second item — documenting that external consumers need
@varar/coreresolvable from the package holding their oaths — no longer applies, so I removed it rather than rebasing it:@varar/vitest/runtime, andplugin.ts:123-128says explicitly that this is so importing@varar/core"would fail under pnpm's strict node_modules layout". That path is already fixed in the plugin.resolve.dedupestill lists@varar/core, but the module-level mutable state (stepEntries,customTypes) lives inpackages/varar/src/internal.ts, and@varar/vararis a direct consumer dependency, so it dedupes fine.@varar/corehas no module-level mutable state, so a split instance is harmless.Documenting a requirement that isn't one seemed worse than dropping it.
The third item from #12 (the
registry.tsnon-null assertion) was already resolved. Left #12 open rather than auto-closing it, since only part of it is mine to close.