Skip to content

Commit 98dde79

Browse files
committed
fix plugin name
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 0437c61 commit 98dde79

File tree

5 files changed

+86
-40
lines changed

5 files changed

+86
-40
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Then, import the bundle into your project using `yarn import ...`,
4141
or reference it in environment variable [`YARN_PLUGINS`](https://yarnpkg.com/advanced/plugin-tutorial#dynamically-loading-plugins-using-the-yarn_plugins-environment-variable) — like so:
4242

4343
```shell
44-
YARN_PLUGINS=.../bundles/@yarnpkg/plugin-sbom.js yarn sbom --help
44+
YARN_PLUGINS=.../bundles/@yarnpkg/plugin-cyclonedx.js yarn sbom --help
4545
```
4646

4747
## Usage
@@ -53,7 +53,7 @@ Generates CycloneDX SBOM for current workspace.
5353
5454
━━━ Usage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5555
56-
$ yarn CycloneDX make-sbom
56+
$ yarn cyclonedx
5757
5858
━━━ Options ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5959

package.json

+48-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,54 @@
11
{
22
"private": true,
3-
"name": "yarn-plugin-sbom",
3+
"name": "@cyclonedx/yarn-plugin-cyclonedx",
44
"version": "1.0-dev",
5+
"description": "Create CycloneDX Software Bill of Materials (SBOM) from yarn projects.",
56
"license": "Apache-2.0",
7+
"keywords": [
8+
"CycloneDX",
9+
"SBOM",
10+
"BOM",
11+
"inventory",
12+
"bill-of-materials",
13+
"software-bill-of-materials",
14+
"component",
15+
"dependency",
16+
"package-url",
17+
"PURL",
18+
"spdx",
19+
"node",
20+
"yarn"
21+
],
22+
"homepage": "https://github.com/CycloneDX/cyclonedx-node-yarn#readme",
23+
"repository": {
24+
"type": "git",
25+
"url": "git+https://github.com/CycloneDX/cyclonedx-node-yarn.git"
26+
},
27+
"bugs": {
28+
"url": "https://github.com/CycloneDX/cyclonedx-node-yarn/issues"
29+
},
30+
"funding": [
31+
{
32+
"type": "individual",
33+
"url": "https://owasp.org/donate/?reponame=www-project-cyclonedx&title=OWASP+CycloneDX"
34+
}
35+
],
36+
"contributors": [
37+
{
38+
"name": "Jan Kowalleck",
39+
"url": "https://github.com/jkowalleck"
40+
},
41+
{
42+
"name": "Augustus Kling",
43+
"url": "https://github.com/AugustusKling"
44+
}
45+
],
46+
"maintainers": [
47+
{
48+
"name": "Jan Kowalleck",
49+
"url": "https://github.com/jkowalleck"
50+
}
51+
],
652
"main": "./sources/index.ts",
753
"engines": {
854
"yarn": ">=4",
@@ -50,7 +96,7 @@
5096
"test:lint": "tsc --noEmit",
5197
"test:node": "c8 mocha -p",
5298
"cs-fix": "eslint --fix .",
53-
"dogfooding": "YARN_PLUGINS=$PROJECT_CWD/bundles/@yarnpkg/plugin-sbom.js yarn sbom"
99+
"dogfooding": "YARN_PLUGINS=$PROJECT_CWD/bundles/@yarnpkg/plugin-cyclonedx.js yarn cyclonedx"
54100
},
55101
"packageManager": "[email protected]"
56102
}

sources/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import { generateSBOM, type OutputOptions, OutputStdOut } from './sbom'
3333

3434
class SBOMCommand extends BaseCommand {
3535
static override readonly paths = [
36+
['cyclonedx'], // <-- this is the preferred entry point
3637
['CycloneDX', 'make-sbom'],
37-
['cyclonedx'],
3838
['sbom']
3939
]
4040

tests/integration/index.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ const latestCdxSpecVersion = '1.5'
4444
suite('integration', () => {
4545
const UPDATE_SNAPSHOTS = !!process.env.CYARN_TEST_UPDATE_SNAPSHOTS
4646

47-
const thisYarnPlugin = path.resolve(__dirname, '..', '..', 'bundles', '@yarnpkg', 'plugin-sbom.js')
47+
const thisYarnPlugin = path.resolve(__dirname, '..', '..', 'bundles', '@yarnpkg', 'plugin-cyclonedx.js')
4848

4949
suite('make SBOM', () => {
5050
testSetups.forEach((testSetup) => {
5151
test(`${testSetup}`, () => {
5252
const expectedOutSnap = path.resolve(__dirname, '_snapshots', `${testSetup}.json.bin`)
5353

5454
const makeSBOM = spawnSync(
55-
'yarn', ['sbom',
55+
'yarn', ['cyclonedx',
5656
'-vvv',
5757
'--reproducible',
5858
// no intention to test all the spec-versions nor all the output-formats - this would be not our scope.
@@ -69,7 +69,7 @@ suite('integration', () => {
6969
YARN_PLUGINS: thisYarnPlugin
7070
}
7171
})
72-
assert.strictEqual(makeSBOM.status, 0, makeSBOM.stderr.toString())
72+
assert.strictEqual(makeSBOM.status, 0, makeSBOM.stdout)
7373

7474
const actualOutput = makeReproducible('json', makeSBOM.stdout.toString())
7575

yarn.lock

+32-32
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,38 @@ __metadata:
186186
languageName: node
187187
linkType: hard
188188

189+
"@cyclonedx/yarn-plugin-cyclonedx@workspace:.":
190+
version: 0.0.0-use.local
191+
resolution: "@cyclonedx/yarn-plugin-cyclonedx@workspace:."
192+
dependencies:
193+
"@cyclonedx/cyclonedx-library": "npm:^6.4.0"
194+
"@types/mocha": "npm:^10.0.6"
195+
"@types/node": "npm:ts5.4"
196+
"@typescript-eslint/eslint-plugin": "npm:6.21.0"
197+
"@typescript-eslint/parser": "npm:6.21.0"
198+
"@yarnpkg/builder": "npm:4.0.0"
199+
"@yarnpkg/cli": "npm:^4.1.0"
200+
"@yarnpkg/core": "npm:^4.0.3"
201+
c8: "npm:^9.1.0"
202+
clipanion: "npm:^4.0.0-rc.3"
203+
eslint: "npm:8.57.0"
204+
eslint-config-standard: "npm:^17.1.0"
205+
eslint-config-standard-with-typescript: "npm:43.0.1"
206+
eslint-plugin-header: "npm:3.1.1"
207+
eslint-plugin-import: "npm:2.29.1"
208+
eslint-plugin-jsdoc: "npm:48.2.1"
209+
eslint-plugin-n: "npm:16.6.2"
210+
eslint-plugin-promise: "npm:6.1.1"
211+
eslint-plugin-simple-import-sort: "npm:12.0.0"
212+
mocha: "npm:10.3.0"
213+
npm-run-all2: "npm:^6.1.2"
214+
packageurl-js: "npm:^1.2.1"
215+
rimraf: "npm:^5.0.5"
216+
typescript: "npm:5.4.3"
217+
xmlbuilder2: "npm:^3.1.1"
218+
languageName: unknown
219+
linkType: soft
220+
189221
"@es-joy/jsdoccomment@npm:~0.42.0":
190222
version: 0.42.0
191223
resolution: "@es-joy/jsdoccomment@npm:0.42.0"
@@ -5885,38 +5917,6 @@ __metadata:
58855917
languageName: node
58865918
linkType: hard
58875919

5888-
"yarn-plugin-sbom@workspace:.":
5889-
version: 0.0.0-use.local
5890-
resolution: "yarn-plugin-sbom@workspace:."
5891-
dependencies:
5892-
"@cyclonedx/cyclonedx-library": "npm:^6.4.0"
5893-
"@types/mocha": "npm:^10.0.6"
5894-
"@types/node": "npm:ts5.4"
5895-
"@typescript-eslint/eslint-plugin": "npm:6.21.0"
5896-
"@typescript-eslint/parser": "npm:6.21.0"
5897-
"@yarnpkg/builder": "npm:4.0.0"
5898-
"@yarnpkg/cli": "npm:^4.1.0"
5899-
"@yarnpkg/core": "npm:^4.0.3"
5900-
c8: "npm:^9.1.0"
5901-
clipanion: "npm:^4.0.0-rc.3"
5902-
eslint: "npm:8.57.0"
5903-
eslint-config-standard: "npm:^17.1.0"
5904-
eslint-config-standard-with-typescript: "npm:43.0.1"
5905-
eslint-plugin-header: "npm:3.1.1"
5906-
eslint-plugin-import: "npm:2.29.1"
5907-
eslint-plugin-jsdoc: "npm:48.2.1"
5908-
eslint-plugin-n: "npm:16.6.2"
5909-
eslint-plugin-promise: "npm:6.1.1"
5910-
eslint-plugin-simple-import-sort: "npm:12.0.0"
5911-
mocha: "npm:10.3.0"
5912-
npm-run-all2: "npm:^6.1.2"
5913-
packageurl-js: "npm:^1.2.1"
5914-
rimraf: "npm:^5.0.5"
5915-
typescript: "npm:5.4.3"
5916-
xmlbuilder2: "npm:^3.1.1"
5917-
languageName: unknown
5918-
linkType: soft
5919-
59205920
"yocto-queue@npm:^0.1.0":
59215921
version: 0.1.0
59225922
resolution: "yocto-queue@npm:0.1.0"

0 commit comments

Comments
 (0)