-
-
Notifications
You must be signed in to change notification settings - Fork 14
fix: 6.4.0 deprecated types #1351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes type declarations for deprecated symbols by changing the deprecation strategy from simple re-exports to class extensions and type aliases, allowing deprecated types to be used as types again (fixing issue #1350).
Key changes include:
- Refactored deprecated exports in
factoriesandbuildersfrom direct re-exports to class extensions - Created new wrapper files for deprecated symbols (
bomUtility.ts,licenseUtility.node.ts,npmjsUtility.node.ts, etc.) - Updated deprecation documentation to be more concise and consistent
- Added comprehensive test examples demonstrating deprecated APIs still work
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 38 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/npmjsUtility.node.ts | New wrapper file that re-exports parsePackageIntegrity and defaultRegistryMatcher as deprecated aliases |
| src/utils/licenseUtility.node.ts | New wrapper file that re-exports license utility types and classes as deprecated aliases |
| src/utils/bomUtility.ts | New wrapper file that re-exports randomSerialNumber as a deprecated alias |
| src/utils/index.node.ts | Changed from direct re-exports to namespace re-exports using new wrapper files |
| src/utils/index.common.ts | Changed from direct re-exports to namespace re-exports using new wrapper file |
| src/factories/packageUrl.ts | New wrapper file with class extension for deprecated PackageUrlFactory |
| src/factories/license.ts | New wrapper file with class extension for deprecated LicenseFactory |
| src/factories/fromNodePackageJson.node.ts | New wrapper file with class extensions for deprecated factories |
| src/factories/index.node.ts | Changed from direct re-exports to namespace re-exports using new wrapper file |
| src/factories/index.common.ts | Changed from direct re-exports to namespace re-exports using new wrapper files |
| src/builders/index.node.ts | Changed from direct re-exports to namespace re-exports using new wrapper file |
| src/builders/fromNodePackageJson.node.ts | New wrapper file with class extensions for deprecated builders |
| src/types/index.ts | Updated deprecation documentation to be more concise |
| package.json | Added explicit "node" keys to exports configuration for better Node.js resolution |
| examples//deprecated. | New example files demonstrating usage of all deprecated APIs |
| examples/*/tsconfig.json | Added deprecated example files to compilation |
| examples/*/package.json | Updated scripts to run both regular and deprecated examples |
| examples/node/javascript/.gitignore | Added deprecated example files to git tracking |
| HISTORY.md | Documented the fix and refactoring changes |
| .github/workflows/nodejs.yml | Added workflow step to run deprecated API examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@jkowalleck I've opened a new pull request, #1352, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixed
Refactor
Note: this change adds runtime overhead for the sake of documentation.
docs preview: https://cyclonedx-javascript-library--1351.org.readthedocs.build/en/1351/