Skip to content

2.0 dev bundler externals rewrite - #1006

Merged
jkowalleck merged 6 commits into
2.0-devfrom
2.0-dev_bundler_externals_rewrite
Aug 5, 2026
Merged

jkowalleck merged 6 commits into
2.0-devfrom
2.0-dev_bundler_externals_rewrite

Conversation

@jkowalleck

@jkowalleck jkowalleck commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

and yes, the bundler already ran, and the result is the same as before :-)
even though the schema module refs were actually fixed

Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
@jkowalleck
jkowalleck marked this pull request as ready for review August 5, 2026 10:33
@jkowalleck
jkowalleck requested a review from a team as a code owner August 5, 2026 10:33
@jkowalleck
jkowalleck requested a lite review from Copilot August 5, 2026 10:33
@jkowalleck jkowalleck added this to the 2.0 milestone Aug 5, 2026
@jkowalleck jkowalleck added the chore A chore label Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the 2.0 schema bundling tool so external (exception-listed) schema $ref paths are rewired relative to the bundled output location, addressing previously unreachable references (notably from model/ schemas) and fixes a couple of incorrect relative $refs in 2.0 model schemas.

Changes:

  • Rewrites exception-listed external $ref paths during bundling to be relative to the root schema output directory.
  • Refactors schema loading/indexing to key schemas by file path and updates validation/rewrite flow accordingly.
  • Fixes unreachable $ref paths in 2.0 model schemas (spdx.schema.json, cryptography-defs.schema.json).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tools/src/main/js/bundler/bundle-schemas.js Rewires exception-listed external $refs relative to bundled target and adjusts schema indexing/validation.
schema/2.0/model/cyclonedx-license-2.0.schema.json Fixes SPDX $ref path so it resolves correctly from the model directory.
schema/2.0/model/cyclonedx-cryptography-2.0.schema.json Fixes cryptography-defs $ref paths so they resolve correctly from the model directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Jan Kowalleck <[email protected]>
if (refExceptionSet && refExceptionSet.has(basename.toLowerCase())) {
newObj[key] = value;
} else {
const filenameRewired = path.relative(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual fix

@jkowalleck
jkowalleck merged commit 3c2d065 into 2.0-dev Aug 5, 2026
10 of 13 checks passed
@jkowalleck
jkowalleck deleted the 2.0-dev_bundler_externals_rewrite branch September 29, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants