feat: dual package hazard allow list.#102
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a dual package hazard allowlist feature, allowing developers to suppress warnings for specific packages when using the --detect-dual-package-hazard flag. The implementation includes CLI option parsing, filtering logic, integration with the transform and rewrite pipelines, and comprehensive test coverage.
- Introduces
--dual-package-hazard-allowlistCLI flag accepting comma-separated package names - Implements
filterDualPackageDiagnosticsutility function to filter out allowlisted packages from dual-package hazard diagnostics - Updates dependency from
@knighted/moduleRC version to stable release - Removes test step from publish workflow
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util.js | Adds filterDualPackageDiagnostics and hazardPackageFromMessage helper functions for filtering diagnostics based on package allowlist |
| src/init.js | Adds CLI option definition, parsing, and validation for the allowlist parameter |
| src/duel.js | Integrates allowlist filtering throughout transform and rewrite pipelines; applies filtering to project-scope and file-scope diagnostics |
| src/resolver.js | Passes dual package hazard configuration options (including allowlist) to the rewrite pipeline |
| test/unit.js | Adds unit test verifying filterDualPackageDiagnostics correctly filters diagnostics by allowlist |
| test/integration.js | Adds integration tests verifying hazard warnings are emitted or suppressed based on allowlist configuration |
| README.md | Documents new --dual-package-hazard-allowlist CLI option and clarifies mode behavior |
| docs/v4-migration.md | Adds migration note about default copy strategy and updates reference config boundary description |
| package.json | Bumps version to 4.0.0-rc.6 and updates @knighted/module dependency to stable 1.5.0 |
| package-lock.json | Updates lockfile with new dependency versions |
| .github/workflows/publish.yml | Removes test step from publish workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
==========================================
- Coverage 93.48% 93.02% -0.46%
==========================================
Files 4 4
Lines 2071 2208 +137
==========================================
+ Hits 1936 2054 +118
- Misses 135 154 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.