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: Fix path-based local package detection #412

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hexchain
Copy link

@hexchain hexchain commented May 30, 2024

(Please correct me if I'm wrong)

The conditions here, if I understand correctly, are to detect whether a package is from a local source, with these two clues:

  • none of its parent directories (up to the lockfile) is called node_modules, and
  • it has a package.json

The first one, however, has two issues:

This change fixes these issues.

I tested this by running flatpak-node-generator -r npm package-lock.json under Insomnia source tree.

  • Before, it only emits about 1300 entries, which is not sufficient for an offline install (for example, missing supports-color@8.1.0).
  • After this change it can emit almost all entries, but it fails later when dealing with playwright, which is another problem.

@razzeee
Copy link
Contributor

razzeee commented Nov 6, 2024

Logic wise, this seems fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants