Skip to content

Add basic npm overrides parsing to package.json #4130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions src/packagedcode/npm.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ def _parse(cls, json_data, package_only=False):
if value:
extra_data[extra_data_field] = value

overrides = json_data.get('overrides')
if overrides:
extra_data['overrides'] = overrides
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is okay as a start but we need to do a bit more here.
See the go replace directives PR and reviews which is a similar issue: #3693 (comment)


package.extra_data = extra_data

for source, func in field_mappers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
key: bash-exception-gpl
short_name: Bash exception to GPL
name: Bash exception to GPL
category: Copyleft
owner: Free Software Foundation (FSF)
notes: this used with GPL 1.0 and 2.0. It was removed from the V3 text https://git.savannah.gnu.org/cgit/bash.git/commit/COPYING?id=3185942a5234e26ab13fa02f9c51d340cec514f8
is_exception: yes
spdx_license_key: LicenseRef-scancode-bash-exception-gpl-2.0
text_urls:
- https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283
---

The Free Software Foundation has exempted Bash from the requirement of
Paragraph 2c of the General Public License. This is to say, there is
no requirement for Bash to print a notice when it is started
interactively in the usual way. We made this exception because users
and standards expect shells not to print such messages. This
exception applies to any program that serves as a shell and that is
---
key: bash-exception-gpl
short_name: Bash exception to GPL
name: Bash exception to GPL
category: Copyleft
owner: Free Software Foundation (FSF)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are not related to the issue, please remove these. Probably caused by your IDE settings

notes: this used with GPL 1.0 and 2.0. It was removed from the V3 text https://git.savannah.gnu.org/cgit/bash.git/commit/COPYING?id=3185942a5234e26ab13fa02f9c51d340cec514f8
is_exception: yes
spdx_license_key: LicenseRef-scancode-bash-exception-gpl-2.0
text_urls:
- https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283
---
The Free Software Foundation has exempted Bash from the requirement of
Paragraph 2c of the General Public License. This is to say, there is
no requirement for Bash to print a notice when it is started
interactively in the usual way. We made this exception because users
and standards expect shells not to print such messages. This
exception applies to any program that serves as a shell and that is
based primarily on Bash as opposed to other GNU software.
Loading
Loading