Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: inline swr, date-fns-tz and @vvo/tzdb to restore embedded studios #6553

Merged
merged 1 commit into from
May 3, 2024

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented May 2, 2024

Description

The deps changes in #6416 unfortunately broke some embedded studios. We don't have a reliable reproduction (I tried all the tricks I know) but we have enough user reports of embedded next studios no longer working if they upgrade from v3.38.0 and to any versions past that. Errors are usually in the form of:

Attempted import error: 'swr' does not contain a default export (imported as 'useSWR').

The fix is to inline these dependencies, which is the tried and true fix we've used in similar cases in the past.
We've asked users that are experiencing this issue to submit a repro, once that happens I'll open another PR with a similar test-studio as test-next-studio that can act as a guard against this happening again in the future.

What to review

Everything in Scheduled Publishing should work as before, as we're just inlining modules we're not changing anything else.

Testing

Existing tests should be sufficient.

Notes for release

Fixes a Attempted import error related to using swr

@stipsan stipsan requested a review from a team as a code owner May 2, 2024 18:44
@stipsan stipsan requested review from rexxars and removed request for a team May 2, 2024 18:44
Copy link

vercel bot commented May 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview May 2, 2024 6:44pm
test-next-studio ✅ Ready (Inspect) Visit Preview May 2, 2024 6:44pm
test-studio ✅ Ready (Inspect) Visit Preview May 2, 2024 6:44pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) May 2, 2024 6:44pm

@stipsan stipsan enabled auto-merge May 2, 2024 18:44
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 23.3 kB types
npm/[email protected] filesystem +2 868 kB ctalkington
npm/[email protected] None 0 81.8 kB egoist
npm/[email protected] None +3 85.9 kB sindresorhus
npm/[email protected] environment, filesystem +2 149 kB paulmillr

🚮 Removed packages: npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@tanstack/[email protected], npm/@testing-library/[email protected], npm/@testing-library/[email protected], npm/@testing-library/[email protected], npm/@turf/[email protected], npm/@turf/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected]

View full report↗︎

Copy link
Contributor

github-actions bot commented May 2, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented May 2, 2024

Component Testing Report Updated May 2, 2024 6:51 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 20s 6 3 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 4s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 8s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 20s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 22s 9 0 0

Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super happy about the lack of repro for this, but not going to let that block

@stipsan stipsan added this pull request to the merge queue May 3, 2024
Merged via the queue into next with commit 9a50252 May 3, 2024
40 checks passed
@stipsan stipsan deleted the fix-next-embedded-studio branch May 3, 2024 07:56
@stipsan
Copy link
Member Author

stipsan commented May 3, 2024

Me neither @rexxars, me neither 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants