fix(plugins): activate bun plugin on @types/bun and parse bunfig.toml [test] preload entries#856
Closed
BartWaardenburg wants to merge 3 commits into
Closed
fix(plugins): activate bun plugin on @types/bun and parse bunfig.toml [test] preload entries#856BartWaardenburg wants to merge 3 commits into
BartWaardenburg wants to merge 3 commits into
Conversation
… [test] preload entries Fixes #847
Collapse the [test] preload nested if-let into a single let-chain to satisfy clippy::collapsible_if under -D warnings, matching the top-level preload block. Drop needless raw-string hashes in the empty-bunfig test and rename the test-section case for naming consistency. Add CHANGELOG and detection.md notes.
707e1b3 to
1d901c4
Compare
Collaborator
Author
|
Landed on main via maintainer direct-to-main flow, squashed into b68638d. The linked issue is fixed on main; closing this PR as redundant. |
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.
DRAFT: Opened because the reviewer returned FIX. The clippy collapsible_if issue (see Review section) must be resolved before this is ready to merge.
Summary
Adds
@types/buntoENABLERS(andTOOLING_DEPENDENCIES) so projects depending on@types/bunactivate the bun plugin. Addsbunfig.tomltoCONFIG_PATTERNSsoresolve_configis invoked on it. Implementsextract_preload_entriesthat parses the TOML table and seeds both the top-levelpreloadarray and the[test].preloadarray as entry patterns viaconfig_parser::normalize_config_path, preventing those files from being reported as unused. Eight unit tests cover each scenario.Review
Verdict: FIX
Concerns:
collapsible_iffailure incrates/core/src/plugins/bun.rslines 53-63: the nestedif let Some(test)andif let Some(arr)must be collapsed to a&&let-chain (if let Some(test) = value.get("test").and_then(toml::Value::as_table) && let Some(arr) = test.get("preload").and_then(toml::Value::as_array)). The workspace gate runs-D warnings, so CI will fail.types_bun_activates_pluginvstest_preload_entries_are_entry_patterns); thetest_prefix is redundant on some names. Cosmetic only.Closes #847