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

chore(deps): use React v17 consistently #2397

Merged
merged 9 commits into from
May 11, 2022

Conversation

thomasheyenbrock
Copy link
Collaborator

This updates all packages and examples to use React v17. This should help us to avoid any errors related to different versions of React being loaded at the same time.

We also:

  • Upgrade to parcel@2 in the parcel example
  • Fix dynamically importing codemirror for the parcel example
  • Fix the CDN example by using the correct URL for the GraphQL-SWAPI
  • Upgrade @storybook dependencies to avoid loading React v16 as sub-dependency

@changeset-bot
Copy link

changeset-bot bot commented May 11, 2022

⚠️ No Changeset found

Latest commit: 40753d4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #2397 (40753d4) into main (2d91916) will decrease coverage by 0.92%.
The diff coverage is 74.01%.

@@            Coverage Diff             @@
##             main    #2397      +/-   ##
==========================================
- Coverage   65.70%   64.77%   -0.93%     
==========================================
  Files          85       81       -4     
  Lines        5106     5332     +226     
  Branches     1631     1724      +93     
==========================================
+ Hits         3355     3454      +99     
- Misses       1747     1874     +127     
  Partials        4        4              
Impacted Files Coverage Δ
packages/codemirror-graphql/src/hint.ts 94.73% <ø> (ø)
packages/codemirror-graphql/src/lint.ts 100.00% <ø> (ø)
packages/codemirror-graphql/src/results/mode.ts 47.05% <ø> (ø)
...kages/codemirror-graphql/src/utils/forEachState.ts 100.00% <ø> (ø)
packages/codemirror-graphql/src/utils/hintList.ts 95.65% <ø> (ø)
...ackages/codemirror-graphql/src/utils/info-addon.ts 1.02% <ø> (ø)
...ckages/codemirror-graphql/src/utils/mode-indent.ts 0.00% <0.00%> (ø)
packages/codemirror-graphql/src/variables/hint.ts 89.70% <ø> (ø)
packages/codemirror-graphql/src/variables/mode.ts 79.48% <ø> (ø)
packages/graphiql/src/components/ToolbarMenu.tsx 2.50% <ø> (ø)
... and 78 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8de8d33...40753d4. Read the comment docs.

Copy link
Member

@timsuchanek timsuchanek left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -20,7 +20,11 @@ export async function importCodeMirror(
addons: Promise<any>[],
options?: { useCommonAddons?: boolean },
) {
const { default: CodeMirror } = await import('codemirror');
const CodeMirror = await import('codemirror').then(c =>
// Depending on bundler and settings the dynamic import either returns a
Copy link
Member

Choose a reason for hiding this comment

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

great find!

@acao
Copy link
Member

acao commented May 11, 2022

The funky dynamic import logic is all for SSR, but the component is still not compatible with next.js transparently. It worked with earlier versions of next.js but now it doesn’t and you still have to use a funky workaround

@thomasheyenbrock thomasheyenbrock merged commit a63ff95 into graphql:main May 11, 2022
@thomasheyenbrock thomasheyenbrock deleted the chore/react-17 branch May 11, 2022 20:48
@acao acao mentioned this pull request May 12, 2022
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.

3 participants