-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Moved non‑standard implementations to Contrib area #1343
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
2b9e1f3 to
9754509
Compare
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 |
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
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 reorganizes non-standard implementations into a new /Contrib area to better separate community-contributed features from core CycloneDX functionality. The refactoring maintains backward compatibility by creating deprecated re-exports at the old locations while establishing new canonical import paths.
Key Changes:
- Introduces a new
/Contribnamespace with submodules forFromNodePackageJson,License, andPackageUrl - Moves existing implementations (factories, builders, utilities, types) from core areas to their respective contrib modules
- Adds package.json exports for all new contrib entry points
- Provides comprehensive deprecation notices for old import paths while keeping symbols functional
Reviewed changes
Copilot reviewed 28 out of 32 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Adds new export entries for /Contrib and its submodules (FromNodePackageJson, License, PackageUrl) |
HISTORY.md |
Documents the refactoring with detailed migration paths for affected symbols |
src/index.node.ts, src/index.web.ts, src/index.common.ts |
Exports new Contrib namespace at the root level |
src/contrib/index.node.ts, src/contrib/index.web.ts, src/contrib/index.common.ts |
New entry points for contrib modules with platform-specific exports |
src/contrib/README.md |
Documentation explaining the contrib area's purpose and guidelines |
src/contrib/fromNodePackageJson/* |
Relocated Node package.json utilities, builders, factories, and types from root modules |
src/contrib/license/* |
Relocated license-related factories and utilities to contrib area |
src/contrib/packageUrl/* |
Relocated PackageURL factory to contrib area |
src/types/index.ts |
Adds deprecated re-exports for NodePackageJson types with migration notices |
src/factories/index.common.ts, src/factories/index.node.ts |
Adds deprecated re-exports for LicenseFactory, PackageUrlFactory, and FromNodePackageJson factories |
src/builders/index.node.ts |
Adds deprecated re-export for FromNodePackageJson builders |
src/utils/index.node.ts |
Adds deprecated re-exports for LicenseUtility and NpmjsUtility |
tests/contrib/license/unit/internals/helpers.mime.node.spec.js |
Updates test import path to reflect new location of mime helper |
Comments suppressed due to low confidence (2)
src/contrib/fromNodePackageJson/factories.ts:34
- Inconsistent quote style in import statement. Use single quotes to match the style of other imports in this file (lines 32-33, 35-41).
src/contrib/fromNodePackageJson/factories.ts:39 - Inconsistent quote style in import statement. Use single quotes to match the style of other imports in this file (lines 32-33, 35-38, 40-41).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Added
/Contriband known submodules (via [feat: Moved non‑standard implementations to Contrib area #1343])See
package.json::exportsfor details.Changed
Deprecated
Note: the symbols themselves remain supported. See documentation and the "Refactored" section below for details.
Refactored
The symbols are still import-able through their old location.
Builders.FromNodePackageJson->Contrib.FromNodePackageJson.BuildersFactories.FromNodePackageJson->Contrib.FromNodePackageJson.FactoriesFactories.LicenseFactory->Contrib.License.Factories.LicenseFactoryFactories.PackageUrlFactory->Contrib.PackageUrl.Factories.PackageUrlFactoryTypes.assertNodePackageJson->Contrib.FromNodePackageJson.Types.assertNodePackageJsonTypes.isNodePackageJson->Contrib.FromNodePackageJson.Types.isNodePackageJsonTypes.NodePackageJson->Contrib.FromNodePackageJson.Types.NodePackageJsonUtils.LicenseUtility->Contrib.License.UtilsUtils.NpmjsUtility->Contrib.FromNodePackageJson.Utilsthe tests will be moved in a later step