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

Update rollup and babel to latest versions #8200

Merged
merged 3 commits into from
Jan 30, 2023
Merged

Conversation

alex-page
Copy link
Member

@alex-page alex-page commented Jan 29, 2023

WHY are these changes introduced?

Rollup and Babel are blocking our migration to minimum NodeJS version 16.

This PR updated all Rollup and Babel dependencies. These NPM package upgrades are not compatible with NodeJS 14.17 (main branch version). This change unblocks a larger change to our NodeJS versions.

WHAT is this pull request doing?

  • Moves duplicate dependencies to root
  • Upgrades all rollup and babel dependencies
  • Fixes any required breaking changes or warnings
  • Compared diff of previous packages and new ones and it doesn't have a regression

How to 🎩

  1. Run a build on main save the built files on desktop
  2. Run a build on this bump-build-deps save the built files on desktop
  3. Run a diff over the built files
  4. Make sure no regressions
  5. CI, tests should pass and website should render all pages.

@alex-page's output from Diff: diff.zip

diff -bur polaris-tokens/dist-main polaris-tokens/dist-v11 > icons.diff
diff -bur polaris-tokens/dist-main polaris-tokens/dist-v11 > tokens.diff
diff -bur polaris-migrator/dist-main polaris-migrator/dist-v11 > migrator.diff
diff -bur polaris-react/build-main polaris-react/build-v11 > react.diff

🎩 checklist

Comment on lines -51 to -54
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to root

@alex-page alex-page changed the base branch from main to v11-major January 29, 2023 22:12
@alex-page alex-page added the 🤖Skip Changelog Causes CI to ignore changelog update check. label Jan 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2023

size-limit report 📦

Path Size
polaris-react-cjs 212.06 KB (-1.45% 🔽)
polaris-react-esm 136.31 KB (-0.23% 🔽)
polaris-react-esnext 189.85 KB (-0.18% 🔽)
polaris-react-css 40.63 KB (0%)

@@ -21,14 +21,14 @@ export default {
output: [
{
format: /** @type {const} */ ('cjs'),
entryFileNames: '[name][assetExtname].js',
Copy link
Member Author

Choose a reason for hiding this comment

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

[assetExtname] no longer exists in the latest version of rollup.

Note that in this case, [name] will include the relative path from the output root and possibly the original file extension if it was not one of .js, .jsx, .mjs, .cjs, .ts, .tsx, .mts, or .cts.
https://rollupjs.org/configuration-options/#output-entryfilenames

Comment on lines -234 to -242
manualChunks: (id) => {
// Generate distinct chunks for each icon
// This allows consuming apps to split up the icons into multiple subchunks
// containing a few icons each instead of always having to put every icon
// into a single shared chunk
if (id.startsWith(iconBasePath)) {
return id.replace(iconBasePath, 'icons/');
}
},
Copy link
Member Author

@alex-page alex-page Jan 29, 2023

Choose a reason for hiding this comment

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

manualChunks is going to move to output in the next breaking change. This moves it now so we don't have to fix it later.

@alex-page alex-page requested review from aaronccasanova and sam-b-rose and removed request for aaronccasanova January 29, 2023 22:54
@alex-page alex-page marked this pull request as ready for review January 29, 2023 22:54
@alex-page alex-page changed the title Bump build dependencies 1/x Bump build dependencies Jan 29, 2023
@alex-page
Copy link
Member Author

I am going to merge this into v11. Please still take a look/review I will be happy to iterate in a follow up PR.

@alex-page alex-page merged commit ff6248c into v11-major Jan 30, 2023
@alex-page alex-page deleted the bump-build-deps branch January 30, 2023 00:11
@alex-page alex-page changed the title 1/x Bump build dependencies Upgraded rollup and babel to latest versions Jan 30, 2023
@alex-page alex-page changed the title Upgraded rollup and babel to latest versions Update rollup and babel to latest versions Jan 30, 2023
sam-b-rose added a commit that referenced this pull request May 26, 2023
## @shopify/polaris v11.0.0

### Dependencies

- [x] #8200

### NodeJS

- [x] #8201

### TypeScript

- [x] #8203

### Components

- [x] #7349
- [x] #7397
- [x] #7962
- [x] #8187
- [x] #8184
- [x] #8206
- [x] #7990
- [x] #8468
- [x] #8577
- [x] #8631
- [x] #8962

## @shopify/polaris-tokens v7.0.0

### Tokens
- [x] #6920
- [x] #8245
- [x] #4826
- [x] #8405

## @shopify/stylelint-polaris v7.0.0
- [x] #7622
- [x] #8419

# Post @shopify/polaris v11 shipping
- [ ] #8420

## Low priority or not ready breaking changes
- [x] Remove deprecated layout components
- [x] Release Layout primitive components

---------

Co-authored-by: Tim Layton <tmlayton@users.noreply.github.com>
Co-authored-by: Ryan Musgrave <ryan.musgrave@shopify.com>
Co-authored-by: Ryan Musgrave <ryanm128@gmail.com>
Co-authored-by: aveline <aveline@users.noreply.github.com>
Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
Co-authored-by: Matt Gregg <matt.gregg@shopify.com>
Co-authored-by: Alex Page <hi@alexpage.dev>
Co-authored-by: Lo Kim <lo.kim@shopify.com>
Co-authored-by: Ben Scott <227292+BPScott@users.noreply.github.com>
Co-authored-by: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com>
Co-authored-by: Sam Rose <11774595+samrose3@users.noreply.github.com>
Co-authored-by: Sam Rose <sam.rose@shopify.com>
Co-authored-by: Marc Thomas <marc.thomas@shopify.com>
Co-authored-by: Alex Page <19199063+alex-page@users.noreply.github.com>
Co-authored-by: Chloe Rice <18447883+chloerice@users.noreply.github.com>
Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com>
Co-authored-by: Joe Thomas <joe.thomas@shopify.com>
Co-authored-by: Yuraima Estevez <yuraima.estevez@shopify.com>
Co-authored-by: shopify-github-actions-access[bot] <109624739+shopify-github-actions-access[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
juzser pushed a commit to juzser/polaris that referenced this pull request Jul 27, 2023
## @shopify/polaris v11.0.0

### Dependencies

- [x] Shopify#8200

### NodeJS

- [x] Shopify#8201

### TypeScript

- [x] Shopify#8203

### Components

- [x] Shopify#7349
- [x] Shopify#7397
- [x] Shopify#7962
- [x] Shopify#8187
- [x] Shopify#8184
- [x] Shopify#8206
- [x] Shopify#7990
- [x] Shopify#8468
- [x] Shopify#8577
- [x] Shopify#8631
- [x] Shopify#8962

## @shopify/polaris-tokens v7.0.0

### Tokens
- [x] Shopify#6920
- [x] Shopify#8245
- [x] Shopify#4826
- [x] Shopify#8405

## @shopify/stylelint-polaris v7.0.0
- [x] Shopify#7622
- [x] Shopify#8419

# Post @shopify/polaris v11 shipping
- [ ] Shopify#8420

## Low priority or not ready breaking changes
- [x] Remove deprecated layout components
- [x] Release Layout primitive components

---------

Co-authored-by: Tim Layton <tmlayton@users.noreply.github.com>
Co-authored-by: Ryan Musgrave <ryan.musgrave@shopify.com>
Co-authored-by: Ryan Musgrave <ryanm128@gmail.com>
Co-authored-by: aveline <aveline@users.noreply.github.com>
Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
Co-authored-by: Matt Gregg <matt.gregg@shopify.com>
Co-authored-by: Alex Page <hi@alexpage.dev>
Co-authored-by: Lo Kim <lo.kim@shopify.com>
Co-authored-by: Ben Scott <227292+BPScott@users.noreply.github.com>
Co-authored-by: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com>
Co-authored-by: Sam Rose <11774595+samrose3@users.noreply.github.com>
Co-authored-by: Sam Rose <sam.rose@shopify.com>
Co-authored-by: Marc Thomas <marc.thomas@shopify.com>
Co-authored-by: Alex Page <19199063+alex-page@users.noreply.github.com>
Co-authored-by: Chloe Rice <18447883+chloerice@users.noreply.github.com>
Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com>
Co-authored-by: Joe Thomas <joe.thomas@shopify.com>
Co-authored-by: Yuraima Estevez <yuraima.estevez@shopify.com>
Co-authored-by: shopify-github-actions-access[bot] <109624739+shopify-github-actions-access[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖Skip Changelog Causes CI to ignore changelog update check.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants