Skip to content

Commit 3d7f8e1

Browse files
authored
feat: support npm11 (#1249)
add support for NPM v11 see https://github.com/npm/cli/releases/tag/v11.0.0 fixes #1245 ---- - [x] add the `npm11` engine as supported https://github.com/CycloneDX/cyclonedx-node-npm/blob/c0c3f7d74c8ce50d6c9fab90a58fa745a4aabf64/package.json#L74 - [x] gather test data with https://github.com/CycloneDX/cyclonedx-node-npm/blob/main/.github/workflows/npm-ls_demo-results.yml - [x] deduplicate test data - [x] create new test results - [x] add capabilities in CI and test beds - [x] write history --------- Signed-off-by: Jan Kowalleck <[email protected]>
1 parent c93379f commit 3d7f8e1

File tree

76 files changed

+392410
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+392410
-24
lines changed

.github/workflows/nodejs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ jobs:
175175
matrix:
176176
include:
177177
- npm-version: 'latest'
178+
- npm-version: '^11'
179+
## "node": "^20.17.0 || >=22.9.0"
180+
node-version: '^22.9'
178181
- npm-version: '^10'
179182
## "node": "^18.17.0 || >=20.5.0"
180183
node-version: '^20.5'

.github/workflows/npm-ls_demo-results.yml

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,24 @@ jobs:
2020
matrix:
2121
subject:
2222
# - deps-from-git
23-
# - alternative-package-registry
24-
# - bundled-dependencies
25-
# - dev-dependencies
26-
# - juice-shop
27-
# - local-dependencies
23+
- alternative-package-registry
24+
- bundled-dependencies
25+
- dev-dependencies
26+
- juice-shop
27+
- local-dependencies
2828
- local-workspaces
29-
# - package-integrity
30-
# - package-with-build-id
29+
- package-integrity
30+
- package-with-build-id
3131
additional_npm-ls_args: [ '' ]
3232
npm-version:
3333
## see https://www.npmjs.com/package/npm?activeTab=versions
3434
## see also: https://github.com/npm/cli/releases
35-
- '10' # Current
36-
- '9' # Legacy
37-
- '8' # Legacy
38-
- '7' # Legacy
39-
- '6' # Legacy
35+
- '11' # Current
36+
#- '10' # Legacy
37+
#- '9' # Legacy
38+
#- '8' # Legacy
39+
#- '7' # Legacy
40+
#- '6' # Legacy
4041
node-version:
4142
## action based on https://github.com/actions/node-versions/releases
4243
## see also: https://nodejs.org/en/about/releases/
@@ -51,24 +52,33 @@ jobs:
5152
- macos-latest
5253
include:
5354
- subject: local-workspaces
54-
additional_npm-ls_args: '--workspace==my-local-e'
55-
npm-version: '10' # Current
56-
node-version: '22' # Current
55+
additional_npm-ls_args: '--workspace=my-local-e'
56+
npm-version: '11' # Current
57+
node-version: '22' # LTS
5758
os: ubuntu-latest
5859
- subject: local-workspaces
59-
additional_npm-ls_args: '--workspace==my-local --workspace==my-local-e'
60-
npm-version: '10' # Current
61-
node-version: '22' # Current
60+
additional_npm-ls_args: '--workspace=my-local --workspace=my-local-e'
61+
npm-version: '11' # Current
62+
node-version: '22' # LTS
6263
os: ubuntu-latest
6364
- subject: local-workspaces
6465
additional_npm-ls_args: '--workspaces'
65-
npm-version: '10' # Current
66-
node-version: '22' # Current
66+
npm-version: '11' # Current
67+
node-version: '22' # LTS
6768
os: ubuntu-latest
6869
exclude:
6970
- # macos-latest no longer supports node14
7071
os: macos-latest
7172
node-version: '14'
73+
- # npm11 requires node ^20.17.0 || >=22.9.0
74+
npm-version: '11'
75+
node-version: '18'
76+
- # npm11 requires node ^20.17.0 || >=22.9.0
77+
npm-version: '11'
78+
node-version: '16'
79+
- # npm11 requires node ^20.17.0 || >=22.9.0
80+
npm-version: '11'
81+
node-version: '14'
7282
- # npm10 requires node ^18.17.0 || >=20.5.0
7383
npm-version: '10'
7484
node-version: '16'
@@ -126,6 +136,7 @@ jobs:
126136
working-directory: '${{ env.DEMO_ROOT_DIR}}/${{ matrix.subject }}'
127137
- name: Artifact RESULTS
128138
# see https://github.com/actions/upload-artifact
139+
if: ${{ ! cancelled() }}
129140
uses: actions/upload-artifact@v4
130141
with:
131142
name: '${{ env.RESULTS_ARTIFACT }}_${{ matrix.subject }}${{ matrix.additional_npm-ls_args }}_npm${{ matrix.npm-version }}_node${{ matrix.node-version }}_${{ matrix.os }}'

HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77
<!-- unreleased changes go here -->
88

99
* Added
10+
* Official support for `npm@11` ([#1245] via [#1249])
1011
* Capability to gather license text evidences ([#256] via [#1243])
1112
This feature can be controlled via CLI switch `--gather-license-texts`.
1213
This feature is experimental. This feature is disabled per default.
@@ -20,6 +21,8 @@ All notable changes to this project will be documented in this file.
2021
[#1218]: https://github.com/CycloneDX/cyclonedx-node-npm/pull/1218
2122
[#1237]: https://github.com/CycloneDX/cyclonedx-node-npm/pull/1237
2223
[#1243]: https://github.com/CycloneDX/cyclonedx-node-npm/pull/1243
24+
[#1245]: https://github.com/CycloneDX/cyclonedx-node-npm/issues/1245
25+
[#1249]: https://github.com/CycloneDX/cyclonedx-node-npm/pull/1249
2326

2427
## 1.19.3 -- 2024-07-15
2528

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ and might have properties following [`cdx:npm` Namespace Taxonomy](https://githu
2424
## Requirements
2525

2626
* `node` >= `14`
27-
* `npm` in range `6 - 10`
27+
* `npm` in range `6 - 11`
2828

2929
## Installation
3030

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"type": "commonjs",
7272
"engines": {
7373
"node": ">=14",
74-
"npm": "6 - 10"
74+
"npm": "6 - 11"
7575
},
7676
"directories": {
7777
"doc": "docs",

tests/_data/npm-ls_demo-results/alternative-package-registry/CI_results/npm-ls_npm11_node20_macos-latest.json

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/npm-ls_demo-results/alternative-package-registry/CI_results/npm-ls_npm11_node20_ubuntu-latest.json

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/npm-ls_demo-results/alternative-package-registry/CI_results/npm-ls_npm11_node20_windows-latest.json

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/npm-ls_demo-results/alternative-package-registry/CI_results/npm-ls_npm11_node22_windows-latest.json

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)