Skip to content

Comments

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

Open
Mehrn0ush wants to merge 1 commit intoCycloneDX: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 intoCycloneDX:2.0-devfrom
Mehrn0ush:fix/tests-js-lint-2.0

Conversation

@Mehrn0ush
Copy link
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant