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

Changes in patch version #478

Closed
IceCreamYou opened this issue Nov 19, 2021 · 3 comments
Closed

Changes in patch version #478

IceCreamYou opened this issue Nov 19, 2021 · 3 comments

Comments

@IceCreamYou
Copy link

Hello and thanks for the work you do on hashids.js.

Per semver, I normally expect patch releases to be backwards-compatible. But the jump between 2.2.8 and 2.2.9 of this module changed the location of dist files and changed the output to ES6. Moving files around is not such a big deal but I am in an environment that requires ES5 output, so this is a breaking change that requires me to introduce a new step to our build pipeline to downlevel the hashids output. Currently we only use tsc to downlevel to ES5, but the hashids TypeScript source is not included in the package, so that means I also have to add a new dependency or figure out some other way to make this work.

I'm not complaining about the changes per se - I mean, things were working for me before and now they're not working, but how you do builds is your call, and I don't want to be annoying about it. What I would prefer though is if a change of this magnitude got a major release or at least a minor release, and if the changes were covered in the release notes, so the users of this module could better anticipate when extra work is likely to be required for an upgrade.

Thanks!

@niieani
Copy link
Owner

niieani commented Nov 20, 2021

hey @IceCreamYou! Thanks for your feedback. Since version 2.0, the output has already not been ES5 compliant and required some ES6 features, namely Array.from. So in that respect, I did not consider it a breaking change, as hashids hasn't supported ES5 since the breaking change of version 2.0.

The location of outward facing distribution files has also not changed, not sure what change you are referring to? Since version 2.0, files were placed in esm and cjs directories respectively, while the UMD build was placed in dist folder.

Source files should be published, this is a bug in package.json that I'll fix.

niieani added a commit that referenced this issue Nov 20, 2021
Source files were supposed to have been published all along. See #478.
@IceCreamYou
Copy link
Author

hashids hasn't supported ES5 since the breaking change of version 2.0.

Hmm, I guess so. I noticed the ES6 break because we use esbuild and esbuild will throw an error if you try to downlevel const or class.

The location of outward facing distribution files has also not changed, not sure what change you are referring to?

In 2.2.8 we used dist/hashids.min.js. In 2.2.9 there is only dist/hashids.js (which is now minified). Not a big deal once I realized what was happening 🙂

@niieani
Copy link
Owner

niieani commented Nov 21, 2021

Ooh, right! Sorry about that. I guess right now we only ship the minified dist.
I guess this is okay to close then?

@niieani niieani closed this as completed Nov 21, 2021
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