Fix license check script to ignore sub-dependencies of ignored packages#21606
Fix license check script to ignore sub-dependencies of ignored packages#21606
Conversation
|
Size Change: 0 B Total Size: 842 kB ℹ️ View Unchanged
|
|
This is a bit of a tricky problem, thanks for diving into it, @ceyhun! To give some history, the This is clearly a special case worth working around, so I would suggest reworking I suspect the simplest option will be to switch to path = `${ pkg._where }/node_modules${ pkg._location }`;With this in place, the dependency tree recursor can just skip any module (and its dependencies) that are passed in the |
|
Thanks for the suggestion @pento! Pushed the changes implementing that and it seems to work, feel free to take a look. |
pento
left a comment
There was a problem hiding this comment.
Looks good to me, nice work on the clean rewrite, @ceyhun!
Given the size of the output from npm ls, there's the potential for weird failures in the future, should the dependency tree grow big enough to overrun the buffer size. I'm okay with leaving it as is for now, we can investigate converting it to using a streaming JSON parser if it turns out to be a problem in the future.
|
It would be great to cherry-pick changes applied to |
|
I agree the script changes should go to master 👍 |
|
Sounds good 👍 |
cd0c3cc to
b8a745e
Compare
This reverts commit fe2aa19.
|
Awesome, thanks for all updates 👍 |
Description
This is a part of the migration of gutenberg-mobile to the gutenberg repo.
Related to #19861
Updated
check-licensesscript to parse JSON dependency tree recursively so sub-dependencies of packages passed in--ignoreflag are ignored as well.How has this been tested?
npm run check-licensesshould complete without errorsScreenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: