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

Set babel dependencies to fixed version and added core-js2 support #8586

Merged
merged 2 commits into from
Aug 8, 2018

Conversation

abotteram
Copy link
Contributor

@abotteram abotteram commented Aug 6, 2018

Description

Set babel beta dependencies to a fixed version.

Adds core-js2 support for @babel/plugin-transform-runtime in babel-preset-default package.

Fixes #8580

How has this been tested?

Screenshots

Types of changes

Fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@abotteram abotteram added [Type] Build Tooling Issues or PRs related to build tooling [Type] Bug An existing feature does not function as intended labels Aug 6, 2018
@gziolo
Copy link
Member

gziolo commented Aug 7, 2018

It turns out that to make it work with Babel beta 7.56 and core-js-2 flag you need to use also @babel/runtime-corejs2 instead of @babel/runtime.

I also regenerated package-json.lock with all the Babel packages updated to the correct version.

@gziolo gziolo requested review from tofumatt, ntwb and gwwar August 7, 2018 08:48
@gziolo gziolo added this to the 3.5 milestone Aug 7, 2018
@gziolo gziolo added npm Packages Related to npm packages and removed [Type] Build Tooling Issues or PRs related to build tooling labels Aug 7, 2018
@gziolo
Copy link
Member

gziolo commented Aug 7, 2018

Before change:

                                       Asset       Size  Chunks                    Chunk Names
                       ./build/blob/index.js  909 bytes      22  [emitted]         blob
                  ./build/wordcount/index.js     10 KiB       0  [emitted]         wordcount
                        ./build/url/index.js   20.5 KiB       2  [emitted]         url
                  ./build/shortcode/index.js   16.2 KiB       3  [emitted]         shortcode
                    ./build/plugins/index.js   24.5 KiB       4  [emitted]         plugins
                        ./build/nux/index.js   23.6 KiB       5  [emitted]         nux
                   ./build/keycodes/index.js   17.9 KiB       6  [emitted]         keycodes
           ./build/is-shallow-equal/index.js   1.15 KiB       7  [emitted]         isShallowEqual
                       ./build/i18n/index.js   27.4 KiB       8  [emitted]         i18n
              ./build/html-entities/index.js  986 bytes       9  [emitted]         htmlEntities
                      ./build/hooks/index.js   19.3 KiB      10  [emitted]         hooks
                    ./build/element/index.js   42.4 KiB      11  [emitted]         element
                     ./build/editor/index.js    348 KiB      12  [emitted]  [big]  editor
                  ./build/dom-ready/index.js  778 bytes      13  [emitted]         domReady
                        ./build/dom/index.js   22.6 KiB      14  [emitted]         dom
                 ./build/deprecated/index.js   10.8 KiB      15  [emitted]         deprecated
                       ./build/date/index.js    192 KiB      16  [emitted]         date
                       ./build/data/index.js   66.6 KiB      17  [emitted]         data
                  ./build/core-data/index.js   73.2 KiB      18  [emitted]         coreData
                    ./build/compose/index.js   32.4 KiB      19  [emitted]         compose
                     ./build/blocks/index.js    228 KiB      21  [emitted]         blocks
                   ./build/viewport/index.js   24.2 KiB       1  [emitted]         viewport
                      ./build/autop/index.js   29.3 KiB      23  [emitted]         autop
                  ./build/api-fetch/index.js   33.4 KiB      24  [emitted]         apiFetch
                       ./build/a11y/index.js   5.32 KiB      25  [emitted]         a11y
                ./build/core-blocks/index.js    188 KiB      26  [emitted]         coreBlocks
                  ./build/edit-post/index.js   78.1 KiB      27  [emitted]         editPost
                      ./build/utils/index.js   40.6 KiB      28  [emitted]         utils
                 ./build/components/index.js    499 KiB      29  [emitted]  [big]  components

./build/block-serialization-spec-parser/index.js 9.48 KiB 20 [emitted] blockSerializationSpecParser

After change:

                                       Asset       Size  Chunks                    Chunk Names
                       ./build/blob/index.js  909 bytes      22  [emitted]         blob
                  ./build/wordcount/index.js     10 KiB       0  [emitted]         wordcount
                        ./build/url/index.js   20.5 KiB       2  [emitted]         url
                  ./build/shortcode/index.js   16.2 KiB       3  [emitted]         shortcode
                    ./build/plugins/index.js   24.5 KiB       4  [emitted]         plugins
                        ./build/nux/index.js   23.6 KiB       5  [emitted]         nux
                   ./build/keycodes/index.js   17.9 KiB       6  [emitted]         keycodes
           ./build/is-shallow-equal/index.js   1.15 KiB       7  [emitted]         isShallowEqual
                       ./build/i18n/index.js   27.4 KiB       8  [emitted]         i18n
              ./build/html-entities/index.js  986 bytes       9  [emitted]         htmlEntities
                      ./build/hooks/index.js   19.3 KiB      10  [emitted]         hooks
                    ./build/element/index.js   42.4 KiB      11  [emitted]         element
                     ./build/editor/index.js    348 KiB      12  [emitted]  [big]  editor
                  ./build/dom-ready/index.js  778 bytes      13  [emitted]         domReady
                        ./build/dom/index.js   23.1 KiB      14  [emitted]         dom
                 ./build/deprecated/index.js   10.8 KiB      15  [emitted]         deprecated
                       ./build/date/index.js    192 KiB      16  [emitted]         date
                       ./build/data/index.js   66.6 KiB      17  [emitted]         data
                  ./build/core-data/index.js   72.7 KiB      18  [emitted]         coreData
                    ./build/compose/index.js   32.4 KiB      19  [emitted]         compose
                     ./build/blocks/index.js    228 KiB      21  [emitted]         blocks
                   ./build/viewport/index.js   24.2 KiB       1  [emitted]         viewport
                      ./build/autop/index.js   29.3 KiB      23  [emitted]         autop
                  ./build/api-fetch/index.js   33.4 KiB      24  [emitted]         apiFetch
                       ./build/a11y/index.js   5.32 KiB      25  [emitted]         a11y
                ./build/core-blocks/index.js    188 KiB      26  [emitted]         coreBlocks
                  ./build/edit-post/index.js   78.1 KiB      27  [emitted]         editPost
                      ./build/utils/index.js   40.6 KiB      28  [emitted]         utils
                 ./build/components/index.js    499 KiB      29  [emitted]  [big]  components

./build/block-serialization-spec-parser/index.js 9.48 KiB 20 [emitted] blockSerializationSpecParser

I noticed only difference in ./build/dom/index.js - which is super tiny. It should be good to go. I would appreciate another look from someone else.

@gziolo
Copy link
Member

gziolo commented Aug 7, 2018

@gwwar - did you have similar issues when integrating with Calypso with the version of Babel?

@gziolo gziolo merged commit d5c9b4b into master Aug 8, 2018
@gziolo gziolo deleted the fix/set-fixed-babel-versions branch August 8, 2018 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Packages Related to npm packages [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@babel/runtime 7.0.0-beta.56 Causes build errors when using various packages.
3 participants