Conversation
Co-authored-by: Jordan Lawrence <jordanl17@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@jordanl17 Is there a sense of urgency behind this? We just recently released a new major, and getting all surfaces and peer dependency ranges aligned has already taken quite a bit of time. Obviously that's a situation we'd like to improve/make easier, but just questioning whether or not this is really the right time to do another major. I personally do not have the time to cascade this throughout repos. If there's no immediate urgency, I'd like to schedule this under the v9 milestone |
rexxars
left a comment
There was a problem hiding this comment.
Rejecting this based on my previous comment to avoid it getting merged without taking it into account - happy to re-review if urgent.
| @@ -0,0 +1,6 @@ | |||
| <!-- auto-generated --> | |||
| --- | |||
| '@sanity/client': major | |||
There was a problem hiding this comment.
lol clanker, we are not doing a major for this
Co-authored-by: Jordan Lawrence <jordanl17@users.noreply.github.com>
📚 TypeDoc Generation Result✅ TypeDoc generated successfully!
The TypeDoc JSON file has been generated and validated. All documentation scripts completed successfully. |
Note
Hold this for the next major release of
@sanity/client. It is a valid SemVer break and should land with that major, not as a dedicated v9 for this change alone.Fixes SAPP-2685.
Reproduction
The JS client still only warned when
perspective: 'drafts'(or'previewDrafts') was combined withuseCdn: true. Gradient rejects that combination on the API-CDN; the client used to swallow it, switch to the Live API, and print:That matches the original report. We own this path in
@sanity/client.Before / after
Covered in
test/client/cdnPerspective.test.ts.Before:
createClient({useCdn: true, perspective: 'drafts'}).fetch(...)warned and queriedapi.sanity.io.After: the same call throws:
The Sanity client is configured with the perspective set to drafts or previewDrafts, which does not support the API-CDN. Set useCdn: false.Still allowed:
useCdn: false+drafts(Live API)useCdn: true+published/raw(CDN){useCdn: false}on a drafts clientdraftsstill fall back to the Live API with a warning (same as today, so release stacks keep working)This remains a major (
fix!) because existing queries that succeeded with a warning will now throw. The old warning asked callers to hide it; it was not a documented deprecation with a removal window.