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

Prevent accidentally dropping support for older Node.js versions in a non-major version bump #88

Open
sindresorhus opened this issue Aug 28, 2016 · 4 comments · May be fixed by #686
Open

Comments

@sindresorhus
Copy link
Owner

Scenario: Your package is at version 1.1.0. You decide to drop support for Node.js 0.12. You later do other changes and then publish a minor release. You've now accidentally done a breaking change in a minor release. This happens all the time. And will happen a lot more now that maintainers are starting to drop support for Node.js 0.10 and 0.12.

We could check if the engine field is higher than the latest version, and if not a major release, throw an error.

Thoughts?

Idea from: npm/npm#13549 // @bajtos

@jfmengels
Copy link

Sounds like a good idea to me 👍

What should then be done if the engine field was not set in the latest version, and now is? It could be done to make the package requirements clearer ("we didn't support 0.12 before, but now it's written in the package.json"), or when dropping support of a version ("We are stopping support for 0.12, and we have heard of the engine field so we're setting it now").
For lack of better options, probably better to let it pass?

@sindresorhus
Copy link
Owner Author

Let it pass.

@tommy-mitchell
Copy link
Collaborator

Should this check tsconfig.json too?

@sindresorhus
Copy link
Owner Author

@tommy-mitchell Do you mean the target field? If so, yes, that would be useful.

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

Successfully merging a pull request may close this issue.

3 participants