Repository navigation
loopguard: count npm, pnpm and yarn test runs past their options and aliases - #336
Open
Rithindatta Gundu (rithindattag) wants to merge 1 commit into
Open
Rithindatta Gundu (rithindattag) wants to merge 1 commit into
Rithindatta Gundu (rithindattag) wants to merge 1 commit into
Conversation
…aliases pnpm --filter web test, npm -w web test, yarn workspace web test, npm t and pnpm vitest run were not counted as test runs, so a failing one after the last edit left the turn green and fed the envelope.
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.
Fixes #335
The loop guard read
npm test,pnpm testandyarn testonly right after the package manager, so a monorepo'spnpm --filter web test,pnpm -r test,npm -w web testoryarn workspace web test, thenpm t/pnpm tstaliases, andpnpm vitest run/yarn jestweren't verifications. A failing one after the last edit left the turn green.Each manager now has its own options before the command (npm's
-wnames a workspace; pnpm's is--workspace-root, a flag), with the value of those that take one, including a$(...). As in #279, an option is read only one way, so a long line of options that runs no tests doesn't backtrack exponentially; a test pins that.npm -w test run build,npm token listandyarn workspace web add jeststill don't count. Not covered here: Yarn Berry'syarn workspaces foreachandbun --cwd.Tested: new
tests/test_loopguard_js_package_managers.py(39 of its 61 cases fail without the change); fullpython -m pytest tests -n 4passes (1629 passed, 40 skipped) on MacOS, Python 3.13.5.