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

Dealing with unpublished packages #187

Open
splix opened this issue Apr 25, 2022 · 2 comments
Open

Dealing with unpublished packages #187

splix opened this issue Apr 25, 2022 · 2 comments

Comments

@splix
Copy link
Contributor

splix commented Apr 25, 2022

We have 2 independent projects one depend on another. Say ProjectApp which uses ProjetLib. During the development we publish each commit to the ProjectLib as a tarbal accessible by an URL. And we want to use that development/snapshot version in ProjectApp. Which works fine by itself, we are able to reference it by URL.

But the problem that js-green-license doesn't work in that situation because it tries to download package.json of ProjectLib from NPM, which doesn't exist:

VersionNotFoundError: Version `^0.9.0-dev` for package `@emeraldpay/emerald-vault-core` could not be found

I see a couple of ways how js-green-license can deal with it, and I can submit a PR with one of the solution, but I'd like to hear js-green-license authors opinion on this.

I think that the most straightforward solution would be using packageAllowlist and ignoring unpublished dependencies which are in this list. I mean just skip VersionNotFoundError for such packages, but check them if they exist. Is that ok?

@splix
Copy link
Contributor Author

splix commented Jul 2, 2023

@bcoe do you think the approach I suggested with packageAllowlist is acceptable? I'm willing to make a PR to fix this but want to make sure it aligns with the project direction, and I guess you're the maintainer of the project now. What do you think?

@bcoe
Copy link
Contributor

bcoe commented Nov 21, 2023

Hello @splix, apologies for the slow reply.

This library is not currently used by our team, and my contributions have been isolated to dependency updates in the past.

Your recommendation for handling unpublished packages seems reasonable, but I'm not sure how timely the review will be on this repository. It may be worth considering forking the project, along with sending us a patch.

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

No branches or pull requests

2 participants