Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.

<!-- add unreleased items here -->

* Added
* Support yarn protocol `jsr` ([#289] via [#])

[#289]: https://github.com/CycloneDX/cyclonedx-node-yarn/issues/289
[#]:

## 3.0.2 - 2025-04-10

Maintenance release with provenance.
Expand Down
4 changes: 4 additions & 0 deletions src/builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ export class BomBuilder {
// Therefore, do not do anything speculative.
break
}
case locator.reference.startsWith('jsr:'): {
// TODO - https://github.com/CycloneDX/cyclonedx-node-yarn/issues/289
break
}
case YarnPluginGitUtils.isGitUrl(locator.reference): {
component.externalReferences.add(new ExternalReference(
trySanitizeGitUrl(locator.reference),
Expand Down
136 changes: 136 additions & 0 deletions tests/_data/snapshots/plain_jsr-protocol-dependency.json.bin

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 103 additions & 0 deletions tests/_data/snapshots/plain_jsr-protocol-dependency.xml.bin

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions tests/_data/testbeds/jsr-protocol-dependency/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*
!/.gitignore
!/README.md
!/package.json
!/yarn.lock

5 changes: 5 additions & 0 deletions tests/_data/testbeds/jsr-protocol-dependency/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Integration test: git protocol

*ATTENTION*: this demo might use known vulnerable dependencies for showcasing purposes.

Install dependencies directly via `jsr` protocol.
15 changes: 15 additions & 0 deletions tests/_data/testbeds/jsr-protocol-dependency/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"private": true,
"name": "jsr-protocol-dependency",
"description": "demo: jsr-protocol-dependency -- showcase how install via jsr protocol looks like",
"version": "0.0.0",
"license": "Apache-2.0",
"repository": "git@github.com:CycloneDX/cyclonedx-node-yarn.git",
"dependencies": {
"@act/act": "jsr:^0.1.3"
},
"scripts": {
"SBOM": "YARN_PLUGINS=$PROJECT_CWD/../../../../bundles/@yarnpkg/plugin-cyclonedx.js yarn cyclonedx"
},
"packageManager": "yarn@4.9.0"
}
28 changes: 28 additions & 0 deletions tests/_data/testbeds/jsr-protocol-dependency/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/integration/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const testSetups = [
'git-protocol-dependency',
'github-protocol-dependency',
'http-protocol-dependency',
'jsr-protocol-dependency',
// 'juice-shop',
'local-dependencies',
'local-workspaces',
Expand Down
1 change: 1 addition & 0 deletions tests/integration/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const testbedsPath = path.join(testRootPath, '_data', 'testbeds');
'git-protocol-dependency',
'github-protocol-dependency',
'http-protocol-dependency',
'jsr-protocol-dependency',
// 'juice-shop', << may have problems to install on certain systems ...
'local-dependencies',
'local-workspaces',
Expand Down
Loading