-
Notifications
You must be signed in to change notification settings - Fork 16
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
Package still detected as redundant *after* it has been "nolyfilled" #37
Comments
This is a known issue caused by the current |
I think I know where this error is coming from. I've added a couple of console.logs:
So in my case, we're first hitting entry for
This provides information of object.assign@npm:^4.1.3 existing, but NOT about it being already nolyfilled. Then, when it gets to actual top-level object.assign entry, it skips storing it in the referenceMap because "it already has it". Then I thought to myself, why do we even care about dependencies, if all entries of Yarn lockfile are top-level? So I removed this bit: nolyfill/packages/tools/cli/src/lockfile/yarn.ts Lines 52 to 54 in 2106f9b
and everything worked like a charm, AND a bit faster too. The final list of resolutions was identical to the one produced by the code with these lines. Still overly large (#36), but this issue was gone:
|
Traversing |
So what you're saying is that my case where removal of this code did not affect the final resolutions put in the package.json is a sort of an edge case? |
What the nolyfill actually missing is a way to properly read and parse the |
@SukkaW I'm willing to implement a better parser, but I will need to understand what we're missing. |
If you are interested in implementing this, here are a few things to start with:
|
The text was updated successfully, but these errors were encountered: