Skip to content
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

chore(biome): fix no delete operator #990

Closed
wants to merge 1 commit into from
Closed

Conversation

setchy
Copy link
Member

@setchy setchy commented Apr 16, 2024

Signed-off-by: Adam Setch <adam.setch@outlook.com>
@setchy
Copy link
Member Author

setchy commented Apr 16, 2024

Good feedback from the CI suite...

@setchy setchy marked this pull request as draft April 17, 2024 10:54
@prabhu
Copy link
Contributor

prabhu commented Apr 17, 2024

Let's revisit this later. I think the validation library must ignore undefined variables, since these would be ignored by json.stringify.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

undefined, Function, and Symbol values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to null (when found in an array). JSON.stringify() can return undefined when passing in "pure" values like JSON.stringify(() => {}) or JSON.stringify(undefined).

@prabhu
Copy link
Contributor

prabhu commented Apr 21, 2024

To unblock, we need to modify the invocation of validate to read from the bom json file options.output instead of the previously read object bomNSData.bomJson. This is because when the bom file gets written, undefined properties will get ignored and removed.

https://github.com/CycloneDX/cdxgen/blob/master/bin/cdxgen.js#L644

@setchy setchy closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants