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

tmp-promise@2.1.0 contains a breaking change and should be republished as 3.0.0 #43

Closed
mbargiel opened this issue May 5, 2020 · 8 comments

Comments

@mbargiel
Copy link

mbargiel commented May 5, 2020

The change introduced by #42 bumps the tmp dependencies from 0.1.0 to ^0.2.0.

tmp@0.2.0 actually contains a breaking change over tmp@0.1.0 which will affect consumers of tmp-promise since it is a pluggable wrapper that directly exposes tmp, so the proper version of tmp-promise should be 3.0.0 rather than 2.1.0.

An example of a breaking change is the use of tmp.dir({ dir: '/etc/arbitrary-path' }), which is no longer allowed in 0.2.0 (see raszi/node-tmp#250).

@mbargiel mbargiel changed the title tmp-promise@2.1.0 contains a breaking change tmp-promise@2.1.0 contains a breaking change and should be republished as 3.0.0 May 5, 2020
@benjamingr
Copy link
Owner

I will unpublish immediately and republish with an appropriate version number.

Apologies.

@benjamingr
Copy link
Owner

npm ERR! code E405
npm ERR! 405 Method Not Allowed - PUT https://registry.npmjs.org/tmp-promise/-rev/15-431df1ac349c08cd4b86be27db5e5bc8 - You can no longer unpublish this package.
npm ERR! Failed criteria:
npm ERR! has dependent packages in the registry
npm ERR!
npm ERR! Please deprecate it instead:
npm ERR! npm deprecate -f 'tmp-promise@2.1.0' "this package has been deprecated"
npm ERR! To learn more about our unpublish policies, see https://www.npmjs.com/policies/unpublish

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\benja\AppData\Roaming\npm-cache\_logs\2020-05-05T16_02_28_131Z-debug.log

@benjamingr
Copy link
Owner

Hey, I deprecated 2.1.0 with a warning and published 3.0.0.

I tested this locally and didn't run into the issue, if you can contribute a test to make sure I don't make this sort of mistake in the future I would appreciate it.

@benjamingr
Copy link
Owner

Would it be appropraite to publish a 2.2.0 using tmp ^0.1.0 ?

@mbargiel
Copy link
Author

mbargiel commented May 5, 2020

Thanks for reacting quickly! Don't worry about the mistake, it happens :)

Normally minor version bumps are backwards-compatible, but this is only true if the major version component is 1 or higher. When the major version component is 0, then minor version components convey the breaking nature of changes. That's a quirk of SemVer (Semantic Versioning).

if you can contribute a test to make sure I don't make this sort of mistake in the future I would appreciate it.

Versioning issues are pretty hard to guard against with automated tests, so unfortunately I don't really see what I could contribute. Normally I'd be happy to open a PR for this.

Would it be appropriate to publish a 2.2.0 using tmp ^0.1.0 ?

That's a good idea. I think you could republish the previous version (2.0.2) as 2.1.1 with a note saying it's reverting 2.1.0, which was yanked - that's pretty much how the SemVer spec recommends dealing with these versioning mistakes. With the deprecation notice for 2.1.0, that should cover any case of people using ^2.0.0 or similar.

@mbargiel
Copy link
Author

mbargiel commented May 5, 2020

Or if it's simpler, manually fix the dependency and set the version to 2.1.1 to have the same effect.

@benjamingr
Copy link
Owner

Hey, I published 2.1.1 that depends on 0.1.0 - I'm not too happy with this because 2.1.0 is still out there with the bad dependency but nothing I can do.

Thanks for the report and responsiveness and humble apologies 🙏

@mbargiel
Copy link
Author

mbargiel commented May 5, 2020

Don't worry about those in the wilds - either it'll work for the consumers of they'll be looking for a fix soon, and now they'll find it ;)

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

No branches or pull requests

2 participants