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

[fixexternals] Fix how react-dom/server is imported #2272

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

somewhatabstract
Copy link
Member

@somewhatabstract somewhatabstract commented Jul 12, 2024

Summary:

Turns out that the rollup plugin, autoexternals, doesn't handle sub-package improts, like react-dom/server. However, reading the issue report on that package, I saw a link to another, more up-to-date package, that does handle this. So I switched to that package, and now everything works as expected.

I did have to explicitly use the mjs extension for the rollup config, but that's a small price to pay for the benefits of the new package.

Issue: XXX-XXXX

Test plan:

yarn build to see that the build works.

I'll also verify the packages in webapp to check everything else is fine, though the storybook should also check out.

@somewhatabstract somewhatabstract self-assigned this Jul 12, 2024
@somewhatabstract somewhatabstract requested a review from a team July 12, 2024 21:01
Copy link

changeset-bot bot commented Jul 12, 2024

🦋 Changeset detected

Latest commit: fd8c85e

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

This PR includes changesets to release 3 packages
Name Type
@khanacademy/wb-dev-build-settings Patch
@khanacademy/wonder-blocks-testing-core Patch
@khanacademy/wonder-blocks-testing 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

@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/wonder-blocks for changes to package.json, yarn.lock, .changeset/gentle-houses-listen.md, build-settings/rollup.config.mjs

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

Copy link
Contributor

github-actions bot commented Jul 12, 2024

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (0ee637b) and published all packages with changesets to npm.

You can install the packages in webapp by running:

./services/static/dev/tools/deploy_wonder_blocks.js --tag="PR2272"

Packages can also be installed manually by running:

yarn add @khanacademy/wonder-blocks-<package-name>@PR2272

Copy link
Contributor

github-actions bot commented Jul 12, 2024

Size Change: -4.21 kB (-4.28%)

Total Size: 94 kB

Filename Size Change
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.57 kB -149 B (-8.65%)
packages/wonder-blocks-breadcrumbs/dist/es/index.js 887 B -238 B (-21.16%) 🎉
packages/wonder-blocks-button/dist/es/index.js 4.03 kB -242 B (-5.66%)
packages/wonder-blocks-cell/dist/es/index.js 2.01 kB -244 B (-10.84%) 👏
packages/wonder-blocks-clickable/dist/es/index.js 3.06 kB -243 B (-7.35%)
packages/wonder-blocks-core/dist/es/index.js 3.45 kB -213 B (-5.81%)
packages/wonder-blocks-data/dist/es/index.js 6.24 kB -96 B (-1.51%)
packages/wonder-blocks-dropdown/dist/es/index.js 14.1 kB -235 B (-1.63%)
packages/wonder-blocks-form/dist/es/index.js 5.1 kB -245 B (-4.58%)
packages/wonder-blocks-i18n/dist/es/index.js 4.51 kB -82 B (-1.78%)
packages/wonder-blocks-icon-button/dist/es/index.js 2.99 kB -239 B (-7.41%)
packages/wonder-blocks-icon/dist/es/index.js 828 B -231 B (-21.81%) 🎉
packages/wonder-blocks-layout/dist/es/index.js 1.82 kB -123 B (-6.33%)
packages/wonder-blocks-link/dist/es/index.js 2.27 kB -265 B (-10.46%) 👏
packages/wonder-blocks-modal/dist/es/index.js 5.36 kB -150 B (-2.72%)
packages/wonder-blocks-popover/dist/es/index.js 4.71 kB -148 B (-3.05%)
packages/wonder-blocks-search-field/dist/es/index.js 1.3 kB -240 B (-15.55%) 👏
packages/wonder-blocks-switch/dist/es/index.js 1.94 kB -150 B (-7.17%)
packages/wonder-blocks-testing-core/dist/es/index.js 3.64 kB -183 B (-4.78%)
packages/wonder-blocks-testing/dist/es/index.js 1.13 kB -104 B (-8.43%)
packages/wonder-blocks-tooltip/dist/es/index.js 6.78 kB -129 B (-1.87%)
packages/wonder-blocks-typography/dist/es/index.js 1.23 kB -256 B (-17.29%) 👏
ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3.78 kB
packages/wonder-blocks-banner/dist/es/index.js 1.53 kB
packages/wonder-blocks-grid/dist/es/index.js 1.36 kB
packages/wonder-blocks-labeled-field/dist/es/index.js 72 B
packages/wonder-blocks-pill/dist/es/index.js 1.64 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.52 kB
packages/wonder-blocks-theming/dist/es/index.js 693 B
packages/wonder-blocks-timing/dist/es/index.js 1.8 kB
packages/wonder-blocks-tokens/dist/es/index.js 1.74 kB
packages/wonder-blocks-toolbar/dist/es/index.js 855 B

compressed-size-action

Copy link
Contributor

A new build was pushed to Chromatic! 🚀

https://5e1bf4b385e3fb0020b7073c-jvwbfjqrsi.chromatic.com/

Chromatic results:

Metric Total
Captured snapshots 340
Tests with visual changes 0
Total stories 428
Inherited (not captured) snapshots [TurboSnap] 0
Tests on the build 340

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.57%. Comparing base (928cb0e) to head (fd8c85e).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2272      +/-   ##
==========================================
+ Coverage   94.21%   95.57%   +1.35%     
==========================================
  Files         251      251              
  Lines       29666    29666              
  Branches     1685     2458     +773     
==========================================
+ Hits        27951    28352     +401     
+ Misses       1710     1309     -401     
  Partials        5        5              

see 42 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Member

@jandrade jandrade left a comment

Choose a reason for hiding this comment

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

Looks great! and the packages got slightly smaller, so that's a win win, thanks! 🚢

@somewhatabstract somewhatabstract merged commit c954464 into main Jul 12, 2024
25 of 27 checks passed
@somewhatabstract somewhatabstract deleted the fixexternals branch July 12, 2024 21:11
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