feat: dual package hazard allow list.#48
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
==========================================
- Coverage 93.40% 93.40% -0.01%
==========================================
Files 26 26
Lines 5167 5197 +30
Branches 1140 1148 +8
==========================================
+ Hits 4826 4854 +28
+ Misses 306 305 -1
- Partials 35 38 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds a dual package hazard allowlist feature that allows users to suppress dual package hazard diagnostics for specific packages. The feature is useful when intentional dual package patterns are known to be safe in the user's context.
Key changes:
- Added
dualPackageHazardAllowlistoption accepting an array of package names to exclude from dual package hazard checks - CLI flag
--dual-package-hazard-allowlistaccepts comma-separated package names or multiple invocations - Package names are automatically trimmed and empty values filtered out
- Version bumped from
1.5.0-rc.0to1.5.0
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Added dualPackageHazardAllowlist?: string[] option to ModuleOptions type |
| src/module.ts | Added default empty array for allowlist and passed it to diagnostics function |
| src/format.ts | Implemented normalizeAllowlist function to trim/filter entries and added allowlist filtering in dualPackageHazardDiagnostics |
| src/cli.ts | Added CLI flag parsing with parseAllowlist function that handles comma-separated values and multiple invocations |
| test/module.ts | Added test verifying allowlist suppresses hazards with whitespace-padded package name |
| test/cli.ts | Added CLI test verifying allowlist flag works with whitespace-padded package name |
| README.md | Documented the new dualPackageHazardAllowlist option with type and usage details |
| package.json | Version bumped from 1.5.0-rc.0 to 1.5.0 |
| package-lock.json | Version synchronized with package.json |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.