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

Use npm install if no lock files found #25

Merged
merged 1 commit into from
Jul 29, 2018

Conversation

hudochenkov
Copy link
Contributor

We at stylelint faced a problem: we couldn't release with new npmpub 4, because we don't use package-lock.json. We don't use it, because we need to be sure, that users, who rely on SemVer, won't get breaking stylelint. (related discussion).

This PR allow npmpub to use npm install if no lockfiles are found. It removes breaking change from v4, while not break anything else.

@MoOx MoOx merged commit 48fa66f into MoOx:master Jul 29, 2018
@MoOx
Copy link
Owner

MoOx commented Jul 29, 2018

Looks good! Thanks for this

@MoOx
Copy link
Owner

MoOx commented Jul 29, 2018

I merged and released this but keep in mind that I think that not adding a lock file to your project is a mistake (see https://yarnpkg.com/blog/2016/11/24/lockfiles-for-all/)

@hudochenkov hudochenkov deleted the use-npm-install branch July 29, 2018 22:03
@ntwb
Copy link

ntwb commented Jul 30, 2018

Thanks @MoOx, greatly appreciated, the reason stylelint does not have a lock file is because I'm opposed to packages using them:

via sindresorhus/ama#479 (comment)
"Lockfiles for apps, but not for packages"

@MoOx
Copy link
Owner

MoOx commented Aug 1, 2018

Problem of this argument is that it's working only at the time you publish or install stuff, as explained in the post above. So I consider it's not relevant enough for me. Most of the time "semver errors" happens, you don't see it on publish but when a user open an issue. And in this case lock file might help to quickly identify which package is the culprit with a simple git diff with a fresh lock file :)

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.

3 participants