Skip to content

Commit

Permalink
core-js 3 errors fix (#7051)
Browse files Browse the repository at this point in the history
core-js 3 errors fix
  • Loading branch information
shilman committed Jun 13, 2019
1 parent 248667e commit d860e51
Show file tree
Hide file tree
Showing 25 changed files with 41 additions and 166 deletions.
2 changes: 1 addition & 1 deletion app/angular/package.json
Expand Up @@ -36,7 +36,7 @@
"sass-loader": "^7.1.0",
"ts-loader": "^6.0.1",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"webpack": "^4.32.2"
"webpack": "^4.33.0"
},
"peerDependencies": {
"@angular-devkit/core": "^0.6.1 || >=7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion app/polymer/package.json
Expand Up @@ -31,7 +31,7 @@
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.12.1",
"webpack": "^4.32.2"
"webpack": "^4.33.0"
},
"devDependencies": {
"lit-html": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion app/react-native-server/package.json
Expand Up @@ -35,7 +35,7 @@
"react": "^16.6.0",
"react-dom": "^16.8.3",
"uuid": "^3.3.2",
"webpack": "^4.23.1",
"webpack": "^4.33.0",
"ws": "^6.1.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion app/react/package.json
Expand Up @@ -44,7 +44,7 @@
"react-dev-utils": "^9.0.0",
"regenerator-runtime": "^0.12.1",
"semver": "^6.0.0",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
},
"peerDependencies": {
"babel-loader": "^7.0.0 || ^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/ember-cli/package.json
Expand Up @@ -45,7 +45,7 @@
"ember-resolver": "^5.1.3",
"ember-source": "~3.9.1",
"loader.js": "^4.2.3",
"webpack": "^4.28.0",
"webpack": "^4.33.0",
"webpack-cli": "^3.3.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion examples/marko-cli/package.json
Expand Up @@ -32,6 +32,6 @@
"@storybook/addons": "5.1.3",
"@storybook/marko": "5.1.3",
"prettier": "^1.16.4",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
}
}
2 changes: 1 addition & 1 deletion examples/mithril-kitchen-sink/package.json
Expand Up @@ -24,6 +24,6 @@
"@storybook/addon-viewport": "5.1.3",
"@storybook/addons": "5.1.3",
"@storybook/mithril": "5.1.3",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
}
}
2 changes: 1 addition & 1 deletion examples/official-storybook/package.json
Expand Up @@ -54,6 +54,6 @@
"storybook-chromatic": "^1.3.3",
"ts-loader": "^6.0.0",
"uuid": "^3.3.2",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
}
}
2 changes: 1 addition & 1 deletion examples/polymer-cli/package.json
Expand Up @@ -24,7 +24,7 @@
"global": "^4.3.2",
"lit-html": "^1.0.0",
"polymer-webpack-loader": "^2.0.3",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
},
"devDependencies": {
"copy-webpack-plugin": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact-kitchen-sink/package.json
Expand Up @@ -36,7 +36,7 @@
"preact-render-to-json": "^3.6.6",
"raw-loader": "^2.0.0",
"svg-url-loader": "^2.3.2",
"webpack": "^4.28.0",
"webpack": "^4.33.0",
"webpack-dev-server": "^3.4.1"
}
}
2 changes: 1 addition & 1 deletion examples/riot-kitchen-sink/package.json
Expand Up @@ -35,7 +35,7 @@
"raw-loader": "^2.0.0",
"riot-tag-loader": "^2.1.0",
"svg-url-loader": "^2.3.2",
"webpack": "^4.28.0",
"webpack": "^4.33.0",
"webpack-dev-server": "^3.4.1"
}
}
2 changes: 1 addition & 1 deletion examples/vue-kitchen-sink/package.json
Expand Up @@ -35,7 +35,7 @@
"file-loader": "^3.0.1",
"svg-url-loader": "^2.3.2",
"vue-loader": "^15.7.0",
"webpack": "^4.28.0",
"webpack": "^4.33.0",
"webpack-dev-server": "^3.4.1"
}
}
2 changes: 1 addition & 1 deletion lib/cli/test/fixtures/riot/package.json
Expand Up @@ -20,7 +20,7 @@
"riot-compiler": "^3.6.0",
"riot-hot-reload": "^1.0.0",
"style-loader": "^0.23.1",
"webpack": "^4.28.0",
"webpack": "^4.33.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.2.3"
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/test/fixtures/sfc_vue/package.json
Expand Up @@ -48,7 +48,7 @@
"vue-loader": "15.7.0",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.8",
"webpack": "^4.28.0",
"webpack": "^4.33.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-middleware": "^3.6.0",
"webpack-hot-middleware": "^2.24.3",
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/test/fixtures/webpack_react/package.json
Expand Up @@ -16,6 +16,6 @@
"@babel/preset-react": "7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-loader": "^8.0.5",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
}
}
Expand Up @@ -16,6 +16,6 @@
"@babel/preset-react": "7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-loader": "^8.0.5",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
}
}
3 changes: 2 additions & 1 deletion lib/core/package.json
Expand Up @@ -47,6 +47,7 @@
"commander": "^2.19.0",
"common-tags": "^1.8.0",
"core-js": "^3.0.1",
"corejs-upgrade-webpack-plugin": "^1.0.1",
"css-loader": "^2.1.1",
"detect-port": "^1.3.0",
"dotenv-webpack": "^1.7.0",
Expand Down Expand Up @@ -81,7 +82,7 @@
"terser-webpack-plugin": "^1.2.4",
"url-loader": "^1.1.2",
"util-deprecate": "^1.0.2",
"webpack": "^4.32.0",
"webpack": "^4.33.0",
"webpack-dev-middleware": "^3.7.0",
"webpack-hot-middleware": "^2.25.0"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/core/src/server/manager/manager-webpack.config.js
Expand Up @@ -3,6 +3,8 @@ import webpack, { DefinePlugin, ContextReplacementPlugin } from 'webpack';
import Dotenv from 'dotenv-webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import CoreJSUpgradeWebpackPlugin from 'corejs-upgrade-webpack-plugin';

import themingPaths from '@storybook/theming/paths';
import uiPaths from '@storybook/ui/paths';

Expand Down Expand Up @@ -64,6 +66,7 @@ export default ({ configDir, configType, entries, dll, outputDir, cache, babelOp
}),
// See https://github.com/graphql/graphql-language-service/issues/111#issuecomment-306723400
new ContextReplacementPlugin(/graphql-language-service-interface[/\\]dist/, /\.js$/),
new CoreJSUpgradeWebpackPlugin({ resolveFrom: __dirname }),
].filter(Boolean),
module: {
rules: [
Expand Down
3 changes: 3 additions & 0 deletions lib/core/src/server/preview/iframe-webpack.config.js
Expand Up @@ -5,6 +5,8 @@ import HtmlWebpackPlugin from 'html-webpack-plugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
import TerserWebpackPlugin from 'terser-webpack-plugin';
import CoreJSUpgradeWebpackPlugin from 'corejs-upgrade-webpack-plugin';

import resolveFrom from 'resolve-from';

import babelLoader from '../common/babel-loader';
Expand Down Expand Up @@ -67,6 +69,7 @@ export default ({
new CaseSensitivePathsPlugin(),
quiet ? null : new ProgressPlugin(),
new Dotenv({ silent: true }),
new CoreJSUpgradeWebpackPlugin({ resolveFrom: __dirname }),
].filter(Boolean),
module: {
rules: [
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/package.json
Expand Up @@ -55,9 +55,10 @@
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"corejs-upgrade-webpack-plugin": "^1.0.1",
"flush-promises": "^1.0.2",
"terser-webpack-plugin": "^1.2.4",
"webpack": "^4.28.0"
"webpack": "^4.33.0"
},
"publishConfig": {
"access": "public"
Expand Down
61 changes: 0 additions & 61 deletions lib/ui/scripts/__tests__/coreJsAutoUpgradePlugin.js

This file was deleted.

81 changes: 0 additions & 81 deletions lib/ui/scripts/coreJsAutoUpgradePlugin.js

This file was deleted.

4 changes: 2 additions & 2 deletions lib/ui/scripts/webpackDllsConfig.js
@@ -1,7 +1,7 @@
import path from 'path';
import { ProgressPlugin, DllPlugin } from 'webpack';
import TerserPlugin from 'terser-webpack-plugin';
import coreJsAutoUpgradePlugin from './coreJsAutoUpgradePlugin';
import CoreJSUpgradeWebpackPlugin from 'corejs-upgrade-webpack-plugin';

const resolveLocal = dir => path.join(__dirname, dir);

Expand Down Expand Up @@ -32,7 +32,7 @@ export default ({ entry, provided = [] }) => ({
path: `${out}/[name]-manifest.json`,
name: '[name]_dll',
}),
coreJsAutoUpgradePlugin(require),
new CoreJSUpgradeWebpackPlugin(),
],
optimization: {
concatenateModules: true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -167,6 +167,7 @@
"commander": "^2.19.0",
"concurrently": "^4.0.1",
"core-js": "^3.0.1",
"corejs-upgrade-webpack-plugin": "^1.0.1",
"cross-env": "^5.2.0",
"danger": "^7.0.15",
"enzyme": "^3.9.0",
Expand Down

0 comments on commit d860e51

Please sign in to comment.