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/semver@7.5.8 None 0 23.3 kB types
npm/archiver@7.0.1 filesystem +2 868 kB ctalkington
npm/cac@6.7.14 None 0 81.8 kB egoist
npm/chalk@4.1.2 None +3 85.9 kB sindresorhus
npm/chokidar@3.6.0 environment, filesystem +2 149 kB paulmillr

🚮 Removed packages: npm/@sanity/google-maps-input@4.0.1, npm/@sanity/icons@2.11.8, npm/@sanity/image-url@1.0.2, npm/@sanity/import@3.37.3, npm/@sanity/locale-ko-kr@1.1.4, npm/@sanity/locale-nb-no@1.1.7, npm/@sanity/locale-nn-no@1.1.6, npm/@sanity/locale-pt-pt@1.1.3, npm/@sanity/locale-sv-se@1.2.4, npm/@sanity/logos@2.1.11, npm/@sanity/pkg-utils@6.8.9, npm/@sanity/presentation@1.11.4, npm/@sanity/presentation@1.12.10, npm/@sanity/prettier-config@1.0.2, npm/@sanity/preview-url-secret@1.6.11, npm/@sanity/react-loader@1.9.16, npm/@sanity/telemetry@0.7.7, npm/@sanity/test@0.0.1-alpha.1, npm/@sanity/tsdoc@1.0.42, npm/@sanity/ui-workshop@1.2.11, npm/@sanity/ui@2.1.4, npm/@sanity/uuid@3.0.2, npm/@sanity/visual-editing@1.8.16, npm/@tanstack/react-virtual@3.0.0-beta.54, npm/@testing-library/jest-dom@6.4.2, npm/@testing-library/react@13.4.0, npm/@testing-library/user-event@13.5.0, npm/@turf/helpers@6.5.0, npm/@turf/points-within-polygon@5.1.5, npm/@types/archiver@6.0.2, npm/@types/arrify@1.0.4, npm/@types/arrify@2.0.1, npm/@types/babel__core@7.20.5, npm/@types/babel__generator@7.6.8, npm/@types/babel__register@7.17.3, npm/@types/babel__traverse@7.20.5, npm/@types/configstore@5.0.1, npm/@types/connect-history-api-fallback@1.5.4, npm/@types/cpx@1.5.5, npm/@types/decompress@4.2.7, npm/@types/express-ws@3.0.4, npm/@types/express@4.17.21, npm/@types/glob@7.2.0, npm/@types/inquirer@6.5.0, npm/@types/jsdom@20.0.1, npm/@types/log-symbols@2.0.0, npm/@types/minimist@1.2.5, npm/@types/moment@2.13.0, npm/@types/node-ipc@9.2.3, npm/@types/node@18.19.31, npm/@types/object-inspect@1.13.0

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.

None yet

2 participants