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

feat: enhance package.json finder #1284

Open
jkowalleck opened this issue May 23, 2024 · 2 comments
Open

feat: enhance package.json finder #1284

jkowalleck opened this issue May 23, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jkowalleck
Copy link
Member

in case the found package.json was invalid/insufficient,
the process should traverse up and find the next one.
this upwards traversal is to be stopped as soon as one of the following occurs:

  • the base name of the search path is node_modules
  • the search pat s the detected project root path
@jkowalleck
Copy link
Member Author

closes #1237 #778

@jkowalleck jkowalleck added help wanted Extra attention is needed good first issue Good for newcomers labels May 23, 2024
@jkowalleck
Copy link
Member Author

oh, i have an addition, regarding yarn/pnp installs:
we need also to stop traversing up, as soon as the base name ends with .zip

jkowalleck added a commit that referenced this issue Jun 17, 2024
implements #1284

For assets loaded from a subdirectory of `node_modules`, it will pick
the first `package.json` that actually has `name` and `version`
attributes.
Added a testcase for this, which verifies this functionality for the
`luxon` and `libphonenumber-js` packages.
The `package.json` for `libphonenumber-js/max` [misses a version
number](https://unpkg.com/browse/libphonenumber-js@1.11.3/max/package.json)
while for `luxon` [the name is
missing](https://unpkg.com/browse/luxon@3.4.4/src/package.json).

The snapshot has quite a lot of changes:
- For some reason the `purl` entries are no longer url encoded.
- The `@apollo/client/*` entries have been merged into a single
`@apollo/client` entry
- The `@babel/runtime` was added as dependency

---------

Signed-off-by: Tristan Bastian <tristan.bastian@softwareag.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant