-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When creation sbom in the spfx format for my project, multiple licenses get not correctly identified and are marked as NOASSERTION.
Old packages which use the depreacted licenses array all get NOASSERTION as declared license.
Example-Project: https://github.com/mattyork/fuzzy/blob/master/package.json#L18
The depreacted behaviour is also documented in npms documentation: https://docs.npmjs.com/cli/v11/configuring-npm/package-json#license
Expected Behavior
The licenses property in the package.json for old packages is correctly identified.
Steps To Reproduce
npm i fuzzynpm sbom --sbom-format spdx > spdx.json- view
licenseDeclaredfor packagefuzzy
Stackblitz: https://stackblitz.com/edit/stackblitz-starters-roohbvc1?file=spdx.json
Environment
- npm: also tested with npm 11.7.0
- npm config:
❯ npm config ls
; "user" config from /home/.npmrc
global-pnpmfile = "~/.pnpm/.pnpmfile.cjs"
ignore-dep-scripts = true
prefer-symlinked-executables = true
update-notifier = false
verify-store-integrity = false
; node bin location = /usr/local/bin/node
; node version = v20.19.1
; npm local prefix = /home/projects/stackblitz-starters-roohbvc1
; npm version = 10.8.2
; cwd = /home/projects/stackblitz-starters-roohbvc1
; HOME = /home
; Run `npm config ls -l` to show all defaults.Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps