gr2m / moment-parseformat

A moment.js plugin to extract the format of a date/time string
http://gr2m.github.io/moment-parseformat
Apache License 2.0
45 stars 30 forks source link

Suggestion to make 3.1.0 release a major version update 4.0.0 #109

Closed harshit-j closed 3 years ago

harshit-j commented 3 years ago

We used moment-parseformat to validate if the timestamps submitted by users are in a particular format or not. Some users submitted timezone as +04:00 and others as -0400. Both formats gave the same result 3.0.0 but in 3.1.0, this gave a different result and gave validation errors. Shouldn't this be a 4.0.0 update? For now, I have changed "^3.0.0" to "3.0.0" in package.json.

gr2m commented 3 years ago

I was not aware of this change. Yes I can revert the last change in a fix version, then publish 4.0.0, hold on

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 3.1.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

gr2m commented 3 years ago

v4.0.0 is released now, too

hillmanov commented 3 years ago

@gr2m and @harshit-j

The changes introduced in 3.1.0 do give a different result, but give the correct result:

Z => -07:00 -06:00 ... +06:00 +07:00
ZZ => -0700 -0600 ... +0600 +0700

according to the moment docs.

So, in some cases I could see it being considered a breaking change if you rely on the library giving a wrong result, but then any bug change could be considered a breaking change.

gr2m commented 3 years ago

I agree with @hillmanov, but it was easy enough to release a breaking version instead out of caution. You added so many great new features in this release, it's possible that people relied on other behavior we'd consider a bug.