Skip to content

Commit

Permalink
feat: support npm11 (#1249)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jkowalleck authored Dec 24, 2024
1 parent c93379f commit 3d7f8e1
Show file tree
Hide file tree
Showing 76 changed files with 392,410 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ jobs:
matrix:
include:
- npm-version: 'latest'
- npm-version: '^11'
## "node": "^20.17.0 || >=22.9.0"
node-version: '^22.9'
- npm-version: '^10'
## "node": "^18.17.0 || >=20.5.0"
node-version: '^20.5'
Expand Down
51 changes: 31 additions & 20 deletions .github/workflows/npm-ls_demo-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,24 @@ jobs:
matrix:
subject:
# - deps-from-git
# - alternative-package-registry
# - bundled-dependencies
# - dev-dependencies
# - juice-shop
# - local-dependencies
- alternative-package-registry
- bundled-dependencies
- dev-dependencies
- juice-shop
- local-dependencies
- local-workspaces
# - package-integrity
# - package-with-build-id
- package-integrity
- package-with-build-id
additional_npm-ls_args: [ '' ]
npm-version:
## see https://www.npmjs.com/package/npm?activeTab=versions
## see also: https://github.com/npm/cli/releases
- '10' # Current
- '9' # Legacy
- '8' # Legacy
- '7' # Legacy
- '6' # Legacy
- '11' # Current
#- '10' # Legacy
#- '9' # Legacy
#- '8' # Legacy
#- '7' # Legacy
#- '6' # Legacy
node-version:
## action based on https://github.com/actions/node-versions/releases
## see also: https://nodejs.org/en/about/releases/
Expand All @@ -51,24 +52,33 @@ jobs:
- macos-latest
include:
- subject: local-workspaces
additional_npm-ls_args: '--workspace==my-local-e'
npm-version: '10' # Current
node-version: '22' # Current
additional_npm-ls_args: '--workspace=my-local-e'
npm-version: '11' # Current
node-version: '22' # LTS
os: ubuntu-latest
- subject: local-workspaces
additional_npm-ls_args: '--workspace==my-local --workspace==my-local-e'
npm-version: '10' # Current
node-version: '22' # Current
additional_npm-ls_args: '--workspace=my-local --workspace=my-local-e'
npm-version: '11' # Current
node-version: '22' # LTS
os: ubuntu-latest
- subject: local-workspaces
additional_npm-ls_args: '--workspaces'
npm-version: '10' # Current
node-version: '22' # Current
npm-version: '11' # Current
node-version: '22' # LTS
os: ubuntu-latest
exclude:
- # macos-latest no longer supports node14
os: macos-latest
node-version: '14'
- # npm11 requires node ^20.17.0 || >=22.9.0
npm-version: '11'
node-version: '18'
- # npm11 requires node ^20.17.0 || >=22.9.0
npm-version: '11'
node-version: '16'
- # npm11 requires node ^20.17.0 || >=22.9.0
npm-version: '11'
node-version: '14'
- # npm10 requires node ^18.17.0 || >=20.5.0
npm-version: '10'
node-version: '16'
Expand Down Expand Up @@ -126,6 +136,7 @@ jobs:
working-directory: '${{ env.DEMO_ROOT_DIR}}/${{ matrix.subject }}'
- name: Artifact RESULTS
# see https://github.com/actions/upload-artifact
if: ${{ ! cancelled() }}
uses: actions/upload-artifact@v4
with:
name: '${{ env.RESULTS_ARTIFACT }}_${{ matrix.subject }}${{ matrix.additional_npm-ls_args }}_npm${{ matrix.npm-version }}_node${{ matrix.node-version }}_${{ matrix.os }}'
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
<!-- unreleased changes go here -->

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

## 1.19.3 -- 2024-07-15

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and might have properties following [`cdx:npm` Namespace Taxonomy](https://githu
## Requirements

* `node` >= `14`
* `npm` in range `6 - 10`
* `npm` in range `6 - 11`

## Installation

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"type": "commonjs",
"engines": {
"node": ">=14",
"npm": "6 - 10"
"npm": "6 - 11"
},
"directories": {
"doc": "docs",
Expand Down

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

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

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

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

Loading

0 comments on commit 3d7f8e1

Please sign in to comment.