From 0ddbccf7e6303f3b524628e210bdba5654d5c421 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 15 Sep 2018 00:59:48 +0900 Subject: [PATCH] Upgrade Babel to version 7.0.0 (#5925) --- .babelrc | 66 - Gemfile | 2 +- Gemfile.lock | 4 +- .../__snapshots__/button-test.js.snap | 6 - app/javascript/mastodon/components/account.js | 4 +- .../mastodon/components/column_header.js | 4 +- app/javascript/mastodon/components/domain.js | 4 +- .../mastodon/components/load_gap.js | 4 +- .../mastodon/components/media_gallery.js | 4 +- .../mastodon/components/relative_timestamp.js | 4 +- app/javascript/mastodon/components/status.js | 4 +- .../mastodon/components/status_action_bar.js | 4 +- .../features/account/components/action_bar.js | 4 +- .../features/account/components/header.js | 4 +- .../features/account_gallery/index.js | 4 +- .../features/account_timeline/index.js | 4 +- .../mastodon/features/blocks/index.js | 4 +- .../components/column_settings.js | 4 +- .../features/community_timeline/index.js | 4 +- .../features/compose/components/action_bar.js | 4 +- .../compose/components/compose_form.js | 4 +- .../components/emoji_picker_dropdown.js | 4 +- .../compose/components/privacy_dropdown.js | 4 +- .../compose/components/reply_indicator.js | 4 +- .../features/compose/components/search.js | 4 +- .../features/compose/components/upload.js | 4 +- .../compose/components/upload_button.js | 4 +- .../mastodon/features/compose/index.js | 4 +- .../components/column_settings.js | 4 +- .../features/direct_timeline/index.js | 4 +- .../mastodon/features/domain_blocks/index.js | 4 +- .../features/favourited_statuses/index.js | 4 +- .../mastodon/features/favourites/index.js | 4 +- .../components/account_authorize.js | 4 +- .../features/follow_requests/index.js | 4 +- .../mastodon/features/followers/index.js | 4 +- .../mastodon/features/following/index.js | 4 +- .../features/getting_started/index.js | 4 +- .../features/hashtag_timeline/index.js | 4 +- .../components/column_settings.js | 4 +- .../mastodon/features/home_timeline/index.js | 4 +- .../features/keyboard_shortcuts/index.js | 4 +- .../list_editor/components/account.js | 4 +- .../features/list_editor/components/search.js | 4 +- .../mastodon/features/list_editor/index.js | 4 +- .../mastodon/features/list_timeline/index.js | 4 +- .../lists/components/new_list_form.js | 4 +- .../mastodon/features/lists/index.js | 4 +- .../mastodon/features/mutes/index.js | 4 +- .../notifications/components/notification.js | 4 +- .../mastodon/features/notifications/index.js | 4 +- .../features/pinned_statuses/index.js | 4 +- .../features/public_timeline/index.js | 4 +- .../mastodon/features/reblogs/index.js | 4 +- .../standalone/community_timeline/index.js | 4 +- .../standalone/hashtag_timeline/index.js | 4 +- .../standalone/public_timeline/index.js | 4 +- .../features/status/components/action_bar.js | 4 +- .../mastodon/features/status/index.js | 4 +- .../features/ui/components/boost_modal.js | 4 +- .../features/ui/components/columns_area.js | 4 +- .../ui/components/confirmation_modal.js | 4 +- .../features/ui/components/embed_modal.js | 4 +- .../ui/components/focal_point_modal.js | 4 +- .../features/ui/components/media_modal.js | 4 +- .../features/ui/components/mute_modal.js | 4 +- .../ui/components/onboarding_modal.js | 4 +- .../features/ui/components/report_modal.js | 4 +- .../features/ui/components/tabs_bar.js | 4 +- app/javascript/mastodon/features/ui/index.js | 4 +- .../mastodon/features/video/index.js | 4 +- babel.config.js | 65 + bin/webpack | 2 +- bin/webpack-dev-server | 2 +- config/webpack/loaders/babel.js | 1 - config/webpack/production.js | 1 - package.json | 80 +- yarn.lock | 4212 +++++++++-------- 78 files changed, 2387 insertions(+), 2322 deletions(-) delete mode 100644 .babelrc create mode 100644 babel.config.js diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 190b5038c..000000000 --- a/.babelrc +++ /dev/null @@ -1,66 +0,0 @@ -{ - "presets": [ - "react", - [ - "env", - { - "exclude": ["transform-async-to-generator", "transform-regenerator"], - "loose": true, - "modules": false, - "targets": { - "browsers": ["last 2 versions", "IE >= 11", "iOS >= 9"] - } - } - ] - ], - "plugins": [ - "syntax-dynamic-import", - ["transform-object-rest-spread", { "useBuiltIns": true }], - "transform-decorators-legacy", - "transform-class-properties", - [ - "react-intl", - { - "messagesDir": "./build/messages" - } - ], - "preval" - ], - "env": { - "development": { - "plugins": [ - "transform-react-jsx-source", - "transform-react-jsx-self" - ] - }, - "production": { - "plugins": [ - "lodash", - [ - "transform-react-remove-prop-types", - { - "mode": "remove", - "removeImport": true, - "additionalLibraries": [ - "react-immutable-proptypes" - ] - } - ], - "transform-react-inline-elements", - [ - "transform-runtime", - { - "helpers": true, - "polyfill": false, - "regenerator": false - } - ] - ] - }, - "test": { - "plugins": [ - "transform-es2015-modules-commonjs" - ] - } - } -} diff --git a/Gemfile b/Gemfile index 09e18669d..0c2cf5490 100644 --- a/Gemfile +++ b/Gemfile @@ -87,7 +87,7 @@ gem 'tty-command', '~> 0.8', require: false gem 'tty-prompt', '~> 0.16', require: false gem 'twitter-text', '~> 1.14' gem 'tzinfo-data', '~> 1.2018' -gem 'webpacker', '~> 3.4' +gem 'webpacker', '~> 3.5' gem 'webpush' gem 'json-ld', '~> 2.2' diff --git a/Gemfile.lock b/Gemfile.lock index 8fc58395c..ccdb3e146 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -627,7 +627,7 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff - webpacker (3.4.3) + webpacker (3.5.5) activesupport (>= 4.2) rack-proxy (>= 0.6.1) railties (>= 4.2) @@ -758,7 +758,7 @@ DEPENDENCIES twitter-text (~> 1.14) tzinfo-data (~> 1.2018) webmock (~> 3.3) - webpacker (~> 3.4) + webpacker (~> 3.5) webpush RUBY VERSION diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap index c3f018d90..5c04e0979 100644 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap @@ -3,7 +3,6 @@ exports[`