question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaking changes should be published with major releases

See original GitHub issue

Problem

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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dnlsndrcommented, Oct 21, 2020

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.

1reaction
thebiglabaskycommented, Oct 21, 2020

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 your findOne was doing so that findOne 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found