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

add option to make sbom reproducible & more privates & various fixes #288

Merged
merged 1 commit into from
Apr 24, 2022

Conversation

jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Apr 24, 2022

}

toXML () {
return { hash: { '@alg': this._algorithm, '#text': this._value } }
return { hash: { '@alg': this.#algorithm, '#text': this.#value } }
Copy link

Choose a reason for hiding this comment

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

E020: Expected '}' to match '{' from line 89 and instead saw 'algorithm'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

}

toJSON () {
return { alg: this._algorithm, content: this._value }
return { alg: this.#algorithm, content: this.#value }
Copy link

Choose a reason for hiding this comment

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

E020: Expected '}' to match '{' from line 85 and instead saw 'algorithm'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

const hashes = this.#hashes.length > 0 && process.env.BOM_REPRODUCIBLE
? Array.from(this.#hashes).sort((a, b) => a.compare(b))
: this.#hashes
return hashes.map(h => h.toJSON())
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw ')'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@@ -20,8 +20,11 @@
const ExternalReference = require('./ExternalReference')

class ExternalReferenceList {
/** @type {Array<ExternalReference>} */
#externalReferences

constructor (pkg) {
Copy link

Choose a reason for hiding this comment

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

E054: Class properties must be methods. Expected '(' but instead saw 'constructor'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

}

toJSON () {
return { alg: this._algorithm, content: this._value }
return { alg: this.#algorithm, content: this.#value }
Copy link

Choose a reason for hiding this comment

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

E020: Expected '}' to match '{' from line 84 and instead saw ':'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

return this._externalReferences
? this._externalReferences.length
return this.#externalReferences
? this.#externalReferences.length
: 0
Copy link

Choose a reason for hiding this comment

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

E020: Expected '}' to match '{' from line 37 and instead saw ':'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@@ -21,8 +21,11 @@ const ssri = require('ssri')
const Hash = require('./Hash')

class HashList {
/** @type {Array<Hash>} */
#hashes
Copy link

Choose a reason for hiding this comment

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

E024: Unexpected '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

}

toXML () {
return { reference: { '@type': this._type, url: this._url } }
return { reference: { '@type': this.#type, url: this.#url } }
Copy link

Choose a reason for hiding this comment

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

E041: Unrecoverable syntax error. (86% scanned).

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

return this._hashes
? this._hashes.length
return this.#hashes
? this.#hashes.length
: 0
}
Copy link

Choose a reason for hiding this comment

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

E054: Class properties must be methods. Expected '(' but instead saw '}'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

}

toXML () {
return { reference: { '@type': this._type, url: this._url } }
return { reference: { '@type': this.#type, url: this.#url } }
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

}

toXML () {
return { reference: { '@type': this._type, url: this._url } }
return { reference: { '@type': this.#type, url: this.#url } }
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

}

toJSON () {
return { type: this._type, url: this._url }
return { type: this.#type, url: this.#url }
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

set comment (value) {
this._comment = this.validateType('Comment', value, String)
this.#comment = this.validateType('Comment', value, String)
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

get comment () {
return this._comment
return this.#comment
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

set type (value) {
this._type = this.validateChoice('Reference type', value, this.validChoices())
this.#type = this.validateChoice('Reference type', value, this.validChoices())
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

get type () {
return this._type
return this.#type
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

set url (value) {
this._url = this.validateType('URL', value, String)
this.#url = this.validateType('URL', value, String, true)
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

get url () {
return this._url
return this.#url
Copy link

Choose a reason for hiding this comment

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

E030: Expected an identifier and instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

/** @type {ExternalReference.ExternalReferenceType} */
#type
/** @type {string} */
#url
Copy link

Choose a reason for hiding this comment

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

E054: Class properties must be methods. Expected '(' but instead saw '#'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

}

toJSON () {
return { type: this._type, url: this._url }
return { type: this.#type, url: this.#url }
Copy link

Choose a reason for hiding this comment

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

E058: Missing semicolon.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

set comment (value) {
this._comment = this.validateType('Comment', value, String)
this.#comment = this.validateType('Comment', value, String)
Copy link

Choose a reason for hiding this comment

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

E058: Missing semicolon.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

get comment () {
return this._comment
return this.#comment
Copy link

Choose a reason for hiding this comment

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

E058: Missing semicolon.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

set type (value) {
this._type = this.validateChoice('Reference type', value, this.validChoices())
this.#type = this.validateChoice('Reference type', value, this.validChoices())
Copy link

Choose a reason for hiding this comment

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

E058: Missing semicolon.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

get type () {
return this._type
return this.#type
Copy link

Choose a reason for hiding this comment

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

E058: Missing semicolon.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

set url (value) {
this._url = this.validateType('URL', value, String)
this.#url = this.validateType('URL', value, String, true)
Copy link

Choose a reason for hiding this comment

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

E058: Missing semicolon.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

get url () {
return this._url
return this.#url
Copy link

Choose a reason for hiding this comment

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

E058: Missing semicolon.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@jkowalleck jkowalleck changed the title add option to make sbom reproducible add option to make sbom reproducible & more privates & various fixes Apr 24, 2022
@jkowalleck jkowalleck merged commit 8dd62c7 into master Apr 24, 2022
@jkowalleck jkowalleck deleted the reproducibility branch April 24, 2022 13:44
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