Skip to content

Detect bun test via package.json scripts matcher#13

Merged
nielsbosma merged 1 commit into
mainfrom
fix/bun-test-scripts-matcher
Jun 23, 2026
Merged

Detect bun test via package.json scripts matcher#13
nielsbosma merged 1 commit into
mainfrom
fix/bun-test-scripts-matcher

Conversation

@nielsbosma

Copy link
Copy Markdown
Contributor

Implements the deferred follow-up from the testing-detectors PR (#5).

New engine facet: scriptsRegex on MatchSpec. package.json scripts values are now parsed (NpmParser -> ParsedManifest.Scripts -> ComponentContext.Scripts) and matched as a strong signal in RuleEngine.

New detector: bun-test (category testing) keys off scripts.test containing bun test — bun's runner has no dependency or config-file marker, so this was previously undetectable.

Reusable for any tool invoked only via a script. Tests: 105/105 (3 new). Snapshots: rulesLoaded 759->760.

Adds a scriptsRegex match facet to the rule engine. package.json scripts are now
parsed (NpmParser -> ParsedManifest.Scripts -> ComponentContext.Scripts) and matched
against RuleDef ScriptsRegex. New 'bun test' testing detector keys off scripts.test
containing 'bun test'. Closes the deferral from the testing-detectors PR; the facet is
reusable for any tool invoked only via a script. rulesLoaded 759->760.
@nielsbosma nielsbosma merged commit f57a88a into main Jun 23, 2026
1 check passed
@nielsbosma nielsbosma deleted the fix/bun-test-scripts-matcher branch June 23, 2026 15:45
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