Skip to content

test(js): compile CycloneDX 2.0 schema in lint harness - #838

Open
Mehrn0ush wants to merge 1 commit into
CycloneDX:2.0-devfrom
Mehrn0ush:fix/tests-js-lint-2.0
Open

test(js): compile CycloneDX 2.0 schema in lint harness#838
Mehrn0ush wants to merge 1 commit into
CycloneDX:2.0-devfrom
Mehrn0ush:fix/tests-js-lint-2.0

Conversation

@Mehrn0ush

Copy link
Copy Markdown
Contributor

What

Extend the JS schema compile test (tools/src/test/js/json-schema-lint-tests.js) to include CycloneDX 2.0 by compiling:

  • schema/2.0/cyclonedx-2.0-bundled.schema.json (draft 2020-12) using Ajv 2020.

Also hardens the 1.x version parsing / strict-mode selection by using numeric parsing (supports multi-digit minors).

Why

npm run test:json-schema-lint previously only compiled schema/bom-*.schema.json (1.x), so it provided no coverage that 2.0 schemas are compilable.

Testing

  • cd tools/src/test/js && npm install && npm run test:json-schema-lint

Closes #837

Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
@Mehrn0ush
Mehrn0ush requested a review from a team as a code owner February 21, 2026 15:24
@jkowalleck
jkowalleck self-requested a review February 25, 2026 08:22
@jkowalleck jkowalleck self-assigned this Feb 25, 2026
@jkowalleck jkowalleck added this to the 2.0 milestone Feb 25, 2026
@jkowalleck jkowalleck added the chore: QA A chore related to Quality Assurance label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore: QA A chore related to Quality Assurance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants