Skip to content

fix(plugins): activate bun plugin on @types/bun and parse bunfig.toml [test] preload entries#856

Closed
BartWaardenburg wants to merge 3 commits into
mainfrom
fix/issue-847-bun-preload-enabler
Closed

fix(plugins): activate bun plugin on @types/bun and parse bunfig.toml [test] preload entries#856
BartWaardenburg wants to merge 3 commits into
mainfrom
fix/issue-847-bun-preload-enabler

Conversation

@BartWaardenburg
Copy link
Copy Markdown
Collaborator

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/bun to ENABLERS (and TOOLING_DEPENDENCIES) so projects depending on @types/bun activate the bun plugin. Adds bunfig.toml to CONFIG_PATTERNS so resolve_config is invoked on it. Implements extract_preload_entries that parses the TOML table and seeds both the top-level preload array and the [test].preload array as entry patterns via config_parser::normalize_config_path, preventing those files from being reported as unused. Eight unit tests cover each scenario.

Review

Verdict: FIX

Concerns:

  • BLOCKING: Clippy collapsible_if failure in crates/core/src/plugins/bun.rs lines 53-63: the nested if let Some(test) and if 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.
  • Minor (non-blocking): test module mixes naming styles (types_bun_activates_plugin vs test_preload_entries_are_entry_patterns); the test_ prefix is redundant on some names. Cosmetic only.

Closes #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.
@BartWaardenburg BartWaardenburg force-pushed the fix/issue-847-bun-preload-enabler branch from 707e1b3 to 1d901c4 Compare June 1, 2026 21:55
@BartWaardenburg BartWaardenburg marked this pull request as ready for review June 1, 2026 21:55
@BartWaardenburg
Copy link
Copy Markdown
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.

@BartWaardenburg BartWaardenburg deleted the fix/issue-847-bun-preload-enabler branch June 2, 2026 09:09
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.

Bun plugin misses bunfig.toml [test] preload entries and does not activate on @types/bun

1 participant