-
Notifications
You must be signed in to change notification settings - Fork 30
Adding in support for detecting duplicates of the same version #21
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
base: master
Are you sure you want to change the base?
Conversation
By default duplicates of same version of the package will be ignored. To enable the feature pass in ignoreSameVersionDuplicates: false as part of the webpack config for the plugin. Updating snapshot tests to fix bugs found in the tests. Updating readme files.
|
The yarn.lock files updates came when I installed on an ubuntu box, perhaps the original file was checked in on an OSx box? |
Fixing typo in readme.md.
…oduced by the usage of higher node version on my local box.
Adding in an install step, so that the lib folder gets generated on install.
Babel was not being run on yarn install, as the babel was installed outside of the root folder.
TODO: fix this up properly later on.
… pre-publish no longer works on newer versions of npm.
As yarn installs all packages at the root folder, when traversing the module tree, multiple packages will resolve to the same root. Now webpack bundles by path, thus, when used with yarn the modules will only be duplicated if they do not belong to the same path.
This is to fix travis failures on lower versions of npm
|
This works great - thanks @masterkidan! If I had a criticism it would be that it picks up packages in Is this plugin still being maintained @darrenscerri? Is it possible to get this feature merged in? |

Hello,
This is to address the issue #19 . Essentially this PR adds a flag
ignoreSameVersionDuplicates, which (if set tofalse) will automatically catch duplicates of the same version of the file when they are added as subdependencies.By default ignoreSameVersionDuplicates is set to false, this is to prevent failures for the existing consumers of this plugin.
The change consists of the following updates as well:
Basically, the test had the following versions of the packages
a -> 1.0.0, 2.0.0, 2.5.0
b -> 1.0.0, 2.0.0
c -> 1.0.0
However the test for strict == false was assuming that there would only be 1 package with a major version change, when there are actually two (as can be seen above).