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

test: check pkglock is updated correctly #1

Merged
merged 1 commit into from
Oct 30, 2018
Merged

test: check pkglock is updated correctly #1

merged 1 commit into from
Oct 30, 2018

Conversation

feelepxyz
Copy link

@larsgw awesome work on this fix! I've been trying to understand what it's doing and added a few tests to check the lockfile was updated correctly.

Let me know if this makes sense and is helpful!

Also fyi, pushed a fix for the failing spec in the release-next branch: npm#88

@larsgw larsgw self-requested a review October 29, 2018 15:09
Copy link
Owner

@larsgw larsgw left a comment

Choose a reason for hiding this comment

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

Thanks for the tests, that side of the behaviour is definitely important, especially now that that's the biggest problem it solves. Here's some feedback (first time using the review tool!).

@@ -89,6 +105,47 @@ test('development dependency identification', function (t) {
t.is(code, 0, 'no error code')
t.is(stderr, '', 'no error output')
t.notOk(fs.existsSync(path.join(devDir, 'node_modules')), 'did not install anything')
t.similar(JSON.parse(fs.readFileSync(path.join(optionalDir, 'package-lock.json'), 'utf8')), {
Copy link
Owner

Choose a reason for hiding this comment

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

This should be devDir right?

dependencies: {
a: {
version: 'file:../a-1.0.0.tgz',
optional: true,
Copy link
Owner

Choose a reason for hiding this comment

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

And these ones changed accordingly to dev: true.

test/tap/install-dep-classification.js Show resolved Hide resolved
optional: true,
}
}
}, 'locks dependencies as optional')
Copy link
Owner

@larsgw larsgw Oct 29, 2018

Choose a reason for hiding this comment

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

And then this should be dev too.

@feelepxyz
Copy link
Author

@larsgw nice one, thanks for the feedback! Pushed the fixes 👌

@larsgw larsgw merged commit 26e3e2a into larsgw:patch-4 Oct 30, 2018
@feelepxyz feelepxyz deleted the add-lockfile-test branch November 5, 2018 08:15
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