cli icon indicating copy to clipboard operation
cli copied to clipboard

fix(arborist): don't checkEngine/checkPlatform for extraneous deps

Open YodaDaCoda opened this issue 7 months ago • 4 comments

Fixes #7622

The linked issue describes the problem in detail, I won't replicate that here.

YodaDaCoda avatar May 20 '25 11:05 YodaDaCoda

@YodaDaCoda Are you able to add a test that would fail before the fix?

owlstronaut avatar May 20 '25 17:05 owlstronaut

I have made an attempt... but it doesn't work how I expect it to. The test passes whether or not the fix is in place (i.e. it doesn't throw). I need help from someone more familiar with the codebase to figure out how to properly trigger the condition.

YodaDaCoda avatar May 21 '25 04:05 YodaDaCoda

Strict mode throws. You can pass in the values and set strict to true. A good example is here

wraithgar avatar May 21 '25 16:05 wraithgar

I worded that very poorly. It probably would throw, if the problematic dep wasn't being pruned. Not clear to me why it's pruned in the test, but not in Real Life. The package.json / package-lock.json probably need to be tweaked somehow.

It's the checkPlatform() method that I've experienced causing the error, not checkEngine(), so the engineStrict option doesn't help.

That example you've shared does help me clean up the test somewhat though, thanks.

YodaDaCoda avatar May 22 '25 02:05 YodaDaCoda