retire 5.2.2 → 5.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/lib/license.js
CHANGED
|
@@ -15,10 +15,11 @@ function evaluateLicense(licenses, version) {
|
|
|
15
15
|
.slice(splitIndex + 1)
|
|
16
16
|
.trim()
|
|
17
17
|
.split(';')
|
|
18
|
+
.map((x) => x.trim())
|
|
18
19
|
.map((range) => {
|
|
19
20
|
const [from, to] = range.split(' ').map((v) => v.trim());
|
|
20
21
|
if (!from.startsWith('>='))
|
|
21
|
-
throw new Error("Invalid license range: 'from' must start with '>=': " + range);
|
|
22
|
+
throw new Error("Invalid license range: 'from' must start with '>=': " + range + '[' + from + ']' + '[' + to + ']');
|
|
22
23
|
if (to && !to.startsWith('<'))
|
|
23
24
|
throw new Error("Invalid license range: 'to' must start with '<': " + range);
|
|
24
25
|
if (to && to.startsWith('<='))
|
|
@@ -82,9 +82,11 @@ function configureCycloneDXJSONLogger(logger, writer, config, hash) {
|
|
|
82
82
|
existing.evidence.occurrences.push(...missing);
|
|
83
83
|
return undefined;
|
|
84
84
|
}
|
|
85
|
+
const nameParts = dep.component.split('/').reverse();
|
|
85
86
|
const result = {
|
|
86
87
|
type: 'library',
|
|
87
|
-
name:
|
|
88
|
+
name: nameParts[0],
|
|
89
|
+
group: nameParts[1],
|
|
88
90
|
version: dep.version,
|
|
89
91
|
purl: purl,
|
|
90
92
|
hashes: hashes,
|
|
@@ -82,9 +82,11 @@ function configureCycloneDXJSONLogger(logger, writer, config, hash) {
|
|
|
82
82
|
existing.properties.push(...missing);
|
|
83
83
|
return undefined;
|
|
84
84
|
}
|
|
85
|
+
const nameParts = dep.component.split('/').reverse();
|
|
85
86
|
const result = {
|
|
86
87
|
type: 'library',
|
|
87
|
-
name:
|
|
88
|
+
name: nameParts[0],
|
|
89
|
+
group: nameParts[1],
|
|
88
90
|
version: dep.version,
|
|
89
91
|
purl: purl,
|
|
90
92
|
hashes: hashes,
|
|
@@ -77,9 +77,10 @@ function configureCycloneDXLogger(logger, writer, config, hash) {
|
|
|
77
77
|
if (seen.has(purl))
|
|
78
78
|
return '';
|
|
79
79
|
seen.add(purl);
|
|
80
|
+
const nameParts = dep.component.split('/').reverse();
|
|
80
81
|
return `
|
|
81
82
|
<component type="library">
|
|
82
|
-
<name>${
|
|
83
|
+
<name>${nameParts[0]}</name>${nameParts.length > 1 ? `\n <group>${nameParts[1]}</group>` : ''}
|
|
83
84
|
<version>${dep.version}</version>${hashes}
|
|
84
85
|
<licenses>${mapLicenses(dep.licenses)}</licenses>
|
|
85
86
|
<purl>${purl}</purl>
|
package/lib/retire.js
CHANGED
package/package.json
CHANGED