@supabase/postgrest-js 3.0.0-next.24 → 3.0.0-next.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/postgrest-js",
3
- "version": "3.0.0-next.24",
3
+ "version": "3.0.0-next.25",
4
4
  "description": "Isomorphic PostgREST client",
5
5
  "keywords": [
6
6
  "postgrest",
@@ -322,13 +322,13 @@ export default abstract class PostgrestBuilder<
322
322
  ),
323
323
  signal: this.signal,
324
324
  })
325
- } catch (fetchError) {
325
+ // JS allows throwing any value, and serverless or realm-crossing fetch
326
+ // implementations can reject with non-Error objects. `instanceof Error`
327
+ // is too narrow here; narrow at the use site with optional chaining.
328
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
329
+ } catch (fetchError: any) {
326
330
  // Never retry aborted requests
327
- if (
328
- fetchError instanceof Error &&
329
- (fetchError.name === 'AbortError' ||
330
- ('code' in fetchError && (fetchError as { code?: string }).code === 'ABORT_ERR'))
331
- ) {
331
+ if (fetchError?.name === 'AbortError' || fetchError?.code === 'ABORT_ERR') {
332
332
  throw fetchError
333
333
  }
334
334
 
package/src/version.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '3.0.0-next.24'
7
+ export const version = '3.0.0-next.25'