test(js): compile CycloneDX 2.0 schema in lint harness#838
Open
Mehrn0ush wants to merge 1 commit intoCycloneDX:2.0-devfrom
Open
test(js): compile CycloneDX 2.0 schema in lint harness#838Mehrn0ush wants to merge 1 commit intoCycloneDX:2.0-devfrom
Mehrn0ush wants to merge 1 commit intoCycloneDX:2.0-devfrom
Conversation
Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-lintpreviously only compiledschema/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-lintCloses #837