Breaking changes should be published with major releases
See original GitHub issueProblem
The recent 2.9.0 library update has created quite a few issues since apparently the findOne
function can’t be called on non-unique columns anymore. This breaking change (at least for TypeScript) was quite unexpected.
Suggested solution
Please release breaking changes like those with major version releases, e.g.: 3.x
Alternatives
Show a disclaimer in the CLI or on the website or implement feature flags that default to the old behaviour until a next major version release.
Additional context
While always dragging features like this out to the next major version may hinder innovation inertia, I think this should be taken into consideration for a ORM which is a major building block for applications and should thus be relatively stable in its API.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The challenges of major releases and how we tackle them
BC breaking changes can have very tiny causes like small changes to the database, APIs or even translations can necessitate a major release....
Read more >Versioning and Breaking Changes
Major versions contain breaking changes. ... Version numbers are presented Major.Minor. ... Any modifications must be released as a new version. The major...
Read more >beta branch pre-release breaking change not updating ...
commit-analyzer determined the release should be a major/breaking version change. Despite this, the new version published was 1.62.0-beta.2 .
Read more >Minor versions, breaking changes
See yesterday, we stumbled upon a breaking change. And yet we didn't do any major version upgrades. Luckily another colleague of mine, Ruben, ......
Read more >[AskJS] How do you release libraries updates with ...
Major versions can have breaking changes. ... get version 2.0 published first, then you can add major features in next release version 2.1....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great! Yeah seems like we didn’t use the right function, it was simple to change anyways. I’ll close this issue since there seems to be no real problem.
Thanks for these details!
It looks like the previous behaviour wasn’t what we expected, so this may have been an unknown “bug” that got fixed with 2.9.0 as a side effect.
For your use case, you can now use
findFirst
which allows doing basically what yourfindOne
was doing so thatfindOne
is indeed giving the strictness guarantee. It hopefully comes down to a search and replace.I acknowledge the mishap and will check with the team if something changed.