Skip to content
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

do not remove pattern from lockfile if it is overridden by resolution #5572

Conversation

MhMadHamster
Copy link
Contributor

Summary
This pr addresses issue #5250 and #4778 . Currently if package.json contains resolutions, pattern which is overriden by resolution will be removed from lockfile, which causing integrity-check fail and as following new lockfile being generated. So i just removed code which deletes the pattern and since resolutions test are passing i assuming that part of code should not be there or some test cases are missing. Issue #4778 was fixed with #4793, so i reverted the code from that pr.

Test plan

Added a new test case in resolutions which will fail in a current master.

@buildsize
Copy link

buildsize bot commented Mar 25, 2018

File name Previous Size New Size Change
yarn-[version].noarch.rpm 911.9 KB 911.78 KB -118 bytes (0%)
yarn-[version].js 3.96 MB 3.96 MB -325 bytes (0%)
yarn-legacy-[version].js 4.11 MB 4.11 MB -433 bytes (0%)
yarn-v[version].tar.gz 917.04 KB 916.98 KB -61 bytes (0%)
yarn_[version]all.deb 677.29 KB 677.17 KB -124 bytes (0%)

Copy link
Member

@arcanis arcanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaylieEB can you give this PR a look when you have some time?

expect(lockfile.indexOf('foobar')).toBeGreaterThanOrEqual(0);
},
);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rather test that we correctly bailout (ie install with resolution settings should correctly bailout during the integrity check)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@arcanis arcanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to me! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants