balena-io-modules / pinejs-client-js

4 stars 4 forks source link

Type `upsert` and `getOrCreate` as not accepting a `url` #154

Closed Page- closed 4 months ago

Page- commented 4 months ago

This is because they are not designed to support using a url and are likely to break in very weird and unexpected ways, and as such removing it from the typing should reduce potential for surprising errors

Change-type: patch

joshbwlng commented 4 months ago

@Page- Should this technically be a major?

Page- commented 4 months ago

Definitely not @joshbwlng, everything in here should be fully backwards compatible with any valid code - eg whilst it would technically "break" code that expects/uses a property in a response object when that property is missing from the $select that is fine as the code was already invalid/broken and the only change is the typings can now tell you at compile time

Page- commented 4 months ago

I just realized I thought this was about the other PR, but the reasoning still holds - you'll be getting weird, undefined, and likely broken behavior if for some reason you were using them with a url so highlighting/blocking that is a bugfix rather than breaking change (unless you were relying on buggy behavior because by that measure almost any bugfix is also a breaking change)