-
Notifications
You must be signed in to change notification settings - Fork 35
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
Workspaces support #36
Comments
What's the point of the |
@codepunkt Are you asking what the production flag's point is in my specific scenario or in the library as a whole? Disregarding the production flag discussion, workspace checks still yield incomplete results. |
@GMaiolo Are the packages/workspaces in your monorepo being built with webpack, rollup or other bundlers? |
Hi. I'm facing the same issue. As a workaround I'm running the check now from the root of our monorepo. But of course that then reports on all dependencies. It would be nicer to be able to run this within each NPM workspace. @codepunkt We don't use any bundlers, just plain NPM workspaces |
Hi @restfulhead , @fredrikaverpil just pointed me to this issue - sorry for the delay; this is not a well-maintained repo, as I rarely find enough time to care for it, but it's not abandoned as well. I never heard of npm workspaces before reading about it here and first have to read and understand the documentation. It looks like an important feature, supporting npm workspaces, as probably more and more people will use them. So I'd love to hear from you: How would you expect or want license-checker-rseidelsohn (sorry for the clumsy name) to behave when it is run on npm workspaces? Should it run on all workspaces and separate the output per workspace? Cheers and thank you for your input, Roman. |
I'll let others chime in as I'm not a js/ts/node expert, but I was hoping to implement a license checker in our company and we sometimes make use of npm workspaces for repos that hosts multiple packages.
|
Thanks for considering this issue. Basically I'd like to be able to run the checker inside each workspace and then it would report the licenses of all dependencies just for that workspace. For example if I have the following package.json inside a workspace: "scripts": {
"license-checker": "npx license-checker-rseidelsohn"
}
"devDependencies": {
"license-checker-rseidelsohn": "4.1.1"
} Then I'd like to be able to run It currently seems to run, but not reporting the correct licenses. Keep in mind that with this setup, there is no |
Hello @restfulhead, @fredrikaverpil, @codepunkt and @GMaiolo, I will most likely start working on this feature in two weeks (my new employer allows me to work on my OS project every 2nd friday). I finally had a look at the docs and played around with the new Cheers, Roman. |
Hello folks, thanks to @AgentOren, who provided a bugfix PR to the |
This would be a great addition! Are there any updates on this? |
For me it looks as if if you run the licence checker in the workspace, it would find the |
It can be more complicated than that as you can have workspaces that end up with a node_modules folder as well as the root path with one (depending on version dependencies). |
Been trying to get this to work with a monorepo with workspaces and it's impossible to use the
--production
flag as it yields empty results. It's also not possible to navigate to each project and run thelicense-checker
as thenode_modules
folder is empty in these directories.In such environments, each workspace has its own
package.json
but thenode_modules
is located on the root and shared between these workspaces.Does anyone know if a workaround is possible with this setup?
The text was updated successfully, but these errors were encountered: