Skip to content
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

node: skip errors on optional dependencies #355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions node/flatpak_node_generator/providers/npm.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def _process_packages_v2(
'Git sources in lockfile v2 format are not supported yet'
f' (package {install_path} in {lockfile})'
)
elif info.get('optional'):
# Optional dependencies can be skipped
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this at least be printing out a warning? Not sure if we do that anywhere else in the source yet, but it could be useful if the user was actually expecting the optional dep to still make its way inside.

continue
else:
raise NotImplementedError(
f"Don't know how to handle package {install_path} in {lockfile}"
Expand Down