@sanity/client 6.22.3 → 6.22.5-beta.0

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": "@sanity/client",
3
- "version": "6.22.3",
3
+ "version": "6.22.5-beta.0",
4
4
  "description": "Client for retrieving, creating and patching data from Sanity.io",
5
5
  "keywords": [
6
6
  "sanity",
@@ -117,7 +117,7 @@
117
117
  "singleQuote": true
118
118
  },
119
119
  "dependencies": {
120
- "@sanity/eventsource": "^5.0.2",
120
+ "eventsource": "3.0.0-beta.0",
121
121
  "get-it": "^8.6.5",
122
122
  "rxjs": "^7.0.0"
123
123
  },
@@ -154,7 +154,7 @@
154
154
  "vitest": "2.1.4",
155
155
  "vitest-github-actions-reporter": "0.11.1"
156
156
  },
157
- "packageManager": "npm@10.5.2",
157
+ "packageManager": "npm@10.9.0",
158
158
  "engines": {
159
159
  "node": ">=14.18"
160
160
  }
@@ -85,7 +85,7 @@ export function _listen<R extends Record<string, Any> = Record<string, Any>>(
85
85
  }
86
86
 
87
87
  return new Observable((observer) => {
88
- let es: InstanceType<typeof import('@sanity/eventsource')>
88
+ let es: InstanceType<typeof import('eventsource').EventSource>
89
89
  let reconnectTimer: NodeJS.Timeout
90
90
  let stopped = false
91
91
  // Unsubscribe differs from stopped in that we will never reopen.
@@ -149,9 +149,9 @@ export function _listen<R extends Record<string, Any> = Record<string, Any>>(
149
149
  }
150
150
 
151
151
  async function getEventSource(): Promise<InstanceType<
152
- typeof import('@sanity/eventsource')
152
+ typeof import('eventsource').EventSource
153
153
  > | void> {
154
- const {default: EventSource} = await import('@sanity/eventsource')
154
+ const {EventSource} = await import('eventsource')
155
155
 
156
156
  // If the listener has been unsubscribed from before we managed to load the module,
157
157
  // do not set up the EventSource.
package/src/data/live.ts CHANGED
@@ -136,7 +136,7 @@ export class LiveClient {
136
136
  async function getEventSource() {
137
137
  const EventSourceImplementation: typeof EventSource =
138
138
  typeof EventSource === 'undefined' || esOptions.headers || esOptions.withCredentials
139
- ? ((await import('@sanity/eventsource')).default as unknown as typeof EventSource)
139
+ ? (await import('eventsource')).EventSource
140
140
  : EventSource
141
141
 
142
142
  // If the listener has been unsubscribed from before we managed to load the module,
@@ -12,8 +12,8 @@ export const filterDefault: FilterDefault = ({sourcePath, resultPath, value}) =>
12
12
  return false
13
13
  }
14
14
 
15
- // Skip underscored keys, needs better heuristics but it works for now
16
- if (typeof endPath === 'string' && endPath.startsWith('_')) {
15
+ // Skip underscored keys, and strings that end with `Id`, needs better heuristics but it works for now
16
+ if (typeof endPath === 'string' && (endPath.startsWith('_') || endPath.endsWith('Id'))) {
17
17
  return false
18
18
  }
19
19
 
@@ -98,6 +98,7 @@ const denylist = new Set([
98
98
  'template',
99
99
  'theme',
100
100
  'type',
101
+ 'textTheme',
101
102
  'unit',
102
103
  'url',
103
104
  'username',