Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

chore: Upgrade TypeScript & Storybook #479

Merged
merged 9 commits into from
Nov 1, 2022
Merged

Conversation

arelra
Copy link
Member

@arelra arelra commented Nov 1, 2022

What does this change?

Whilst working on another PR I was getting erroneous TypeScript errors for discriminated unions.

Upgrading to typescript@^4.8.4 fixed the erroneous errors.

However this then started a thread pulling exercise of having to upgrade ts-loader and @storybook to compatible versions:

  "@storybook/addon-docs": "^6.5.13",
  "@storybook/addon-viewport": "^6.5.13",
  "@storybook/addons": "^6.5.13",
  "@storybook/react": "^6.5.13",
  "ts-loader": "^8.4.0",

In addtion to the dependency bumps I had to dedupe @babel scope using:

npx yarn-deduplicate --scopes @babel

as Storybook has an issue with its various tools using slightly different versions of @babel/core as explained here:

storybookjs/storybook#14197 (comment)

There are still lots of deprecation warnings from Storybook but I don't think they will go away until we move to the next major version.

How to test

Build and Storybook work as expected

How can we measure success?

Build and Storybook work as expected

@changeset-bot
Copy link

changeset-bot bot commented Nov 1, 2022

🦋 Changeset detected

Latest commit: e4268d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/atoms-rendering Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

Size Change: -1.11 kB (-2%)

Total Size: 67 kB

Filename Size Change
dist/commonjs/Answers.js 1.24 kB -20 B (-2%)
dist/commonjs/AudioAtom.js 2.71 kB -32 B (-1%)
dist/commonjs/ChartAtom.js 391 B -9 B (-2%)
dist/commonjs/common/MaintainAspectRatio.js 647 B -8 B (-1%)
dist/commonjs/expandableAtom/Body.js 963 B -16 B (-2%)
dist/commonjs/expandableAtom/Container.js 759 B -10 B (-1%)
dist/commonjs/expandableAtom/Footer.js 1.19 kB -19 B (-2%)
dist/commonjs/expandableAtom/Summary.js 990 B -15 B (-1%)
dist/commonjs/ExplainerAtom.js 649 B -15 B (-2%)
dist/commonjs/GuideAtom.js 585 B -11 B (-2%)
dist/commonjs/InteractiveAtom.js 487 B -7 B (-1%)
dist/commonjs/InteractiveLayoutAtom.js 428 B -15 B (-3%)
dist/commonjs/KnowledgeQuiz.js 2.39 kB -38 B (-2%)
dist/commonjs/lib/unifyPageContent.js 688 B -6 B (-1%)
dist/commonjs/lib/useIsInView.js 697 B +5 B (+1%)
dist/commonjs/loadYouTubeIframeApi.js 1.03 kB +4 B (0%)
dist/commonjs/PersonalityQuiz.js 2.59 kB -23 B (-1%)
dist/commonjs/Picture.js 1.64 kB -12 B (-1%)
dist/commonjs/ProfileAtom.js 582 B -10 B (-2%)
dist/commonjs/QandaAtom.js 566 B -8 B (-1%)
dist/commonjs/RecipeSchemaAtom.js 281 B -14 B (-5%)
dist/commonjs/SharingIcons.js 869 B -10 B (-1%)
dist/commonjs/TimelineAtom.js 1.19 kB -25 B (-2%)
dist/commonjs/VideoAtom.js 506 B -16 B (-3%)
dist/commonjs/YoutubeAtom.js 1.48 kB -17 B (-1%)
dist/commonjs/YoutubeAtomOverlay.js 1.13 kB -15 B (-1%)
dist/commonjs/YoutubeAtomPlaceholder.js 376 B +4 B (+1%)
dist/commonjs/YoutubeAtomPlayer.js 3.57 kB +14 B (0%)
dist/commonjs/YoutubeAtomSticky.js 2.08 kB -16 B (-1%)
dist/commonjs/YouTubePlayer.js 646 B +6 B (+1%)
dist/esm/Answers.js 1.11 kB -36 B (-3%)
dist/esm/AudioAtom.js 2.62 kB -57 B (-2%)
dist/esm/ChartAtom.js 312 B -18 B (-5%)
dist/esm/common/MaintainAspectRatio.js 575 B -21 B (-4%)
dist/esm/expandableAtom/Body.js 881 B -26 B (-3%)
dist/esm/expandableAtom/Container.js 681 B -25 B (-4%)
dist/esm/expandableAtom/Footer.js 1.1 kB -31 B (-3%)
dist/esm/expandableAtom/Summary.js 915 B -29 B (-3%)
dist/esm/ExplainerAtom.js 577 B -29 B (-5%)
dist/esm/GuideAtom.js 504 B -26 B (-5%)
dist/esm/ImaAdContainer.js 169 B -7 B (-4%)
dist/esm/InteractiveAtom.js 412 B -21 B (-5%)
dist/esm/InteractiveLayoutAtom.js 358 B -29 B (-7%)
dist/esm/KnowledgeQuiz.js 2.29 kB -54 B (-2%)
dist/esm/lib/unifyPageContent.js 617 B -18 B (-3%)
dist/esm/PersonalityQuiz.js 2.45 kB -43 B (-2%)
dist/esm/Picture.js 1.55 kB -25 B (-2%)
dist/esm/ProfileAtom.js 503 B -25 B (-5%)
dist/esm/QandaAtom.js 485 B -22 B (-4%)
dist/esm/RecipeSchemaAtom.js 211 B -23 B (-10%) 👏
dist/esm/SharingIcons.js 786 B -27 B (-3%)
dist/esm/TimelineAtom.js 1.09 kB -43 B (-4%)
dist/esm/VideoAtom.js 439 B -28 B (-6%)
dist/esm/YoutubeAtom.js 1.39 kB -27 B (-2%)
dist/esm/YoutubeAtomOverlay.js 1.03 kB -27 B (-3%)
dist/esm/YoutubeAtomPlaceholder.js 307 B -6 B (-2%)
dist/esm/YoutubeAtomPlayer.js 3.4 kB -7 B (0%)
dist/esm/YoutubeAtomSticky.js 1.91 kB -28 B (-1%)
ℹ️ View Unchanged
Filename Size
dist/commonjs/ImaAdContainer.js 236 B
dist/commonjs/index.js 534 B
dist/commonjs/lib/formatTime.js 384 B
dist/commonjs/lib/ophan.js 320 B
dist/commonjs/lib/pillarPalette.js 279 B
dist/commonjs/types.js 97 B
dist/esm/index.js 269 B
dist/esm/lib/formatTime.js 317 B
dist/esm/lib/ophan.js 252 B
dist/esm/lib/pillarPalette.js 230 B
dist/esm/lib/useIsInView.js 554 B
dist/esm/loadYouTubeIframeApi.js 958 B
dist/esm/types.js 31 B
dist/esm/YouTubePlayer.js 538 B

compressed-size-action

@arelra arelra merged commit d7be69b into main Nov 1, 2022
@arelra arelra deleted the ravi/upgrade-ts-storybook branch November 1, 2022 12:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants