babel-loader 8.0.2 → 8.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2016 Luís Couto <hello@luiscouto.pt>
1
+ Copyright (c) 2014-2019 Luís Couto <hello@luiscouto.pt>
2
2
 
3
3
  MIT License
4
4
 
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  [![NPM Status](https://img.shields.io/npm/v/babel-loader.svg?style=flat)](https://www.npmjs.com/package/babel-loader)
5
5
  [![Build Status](https://travis-ci.org/babel/babel-loader.svg?branch=master)](https://travis-ci.org/babel/babel-loader)
6
- [![Build Status](https://ci.appveyor.com/api/projects/status/vgtpr2i5bykgyuqo/branch/master?svg=true)](https://ci.appveyor.com/project/danez/babel-loader/branch/master)
6
+ [![Build Status](https://ci.appveyor.com/api/projects/status/77y5mk6amwqt0q88/branch/master?svg=true)](https://ci.appveyor.com/project/babel/babel-loader/branch/master)
7
7
  [![codecov](https://codecov.io/gh/babel/babel-loader/branch/master/graph/badge.svg)](https://codecov.io/gh/babel/babel-loader)
8
8
 
9
9
  <div align="center">
@@ -29,12 +29,6 @@ This package allows transpiling JavaScript files using [Babel](https://github.co
29
29
  npm install -D babel-loader @babel/core @babel/preset-env webpack
30
30
  ```
31
31
 
32
- > webpack 4.x | babel-loader 7.x | babel 6.x
33
-
34
- ```bash
35
- npm install -D babel-loader@7 babel-core babel-preset-env webpack
36
- ```
37
-
38
32
  <h2 align="center">Usage</h2>
39
33
 
40
34
  webpack documentation: [Loaders](https://webpack.js.org/loaders/)
@@ -45,7 +39,7 @@ Within your webpack configuration object, you'll need to add the babel-loader to
45
39
  module: {
46
40
  rules: [
47
41
  {
48
- test: /\.js$/,
42
+ test: /\.m?js$/,
49
43
  exclude: /(node_modules|bower_components)/,
50
44
  use: {
51
45
  loader: 'babel-loader',
@@ -60,7 +54,7 @@ module: {
60
54
 
61
55
  ### Options
62
56
 
63
- See the `babel` [options](https://babeljs.io/docs/usage/api/#options).
57
+ See the `babel` [options](https://babeljs.io/docs/en/options).
64
58
 
65
59
  You can pass options to the loader by using the [`options`](https://webpack.js.org/configuration/module/#rule-options-rule-query) property:
66
60
 
@@ -68,13 +62,13 @@ You can pass options to the loader by using the [`options`](https://webpack.js.o
68
62
  module: {
69
63
  rules: [
70
64
  {
71
- test: /\.js$/,
65
+ test: /\.m?js$/,
72
66
  exclude: /(node_modules|bower_components)/,
73
67
  use: {
74
68
  loader: 'babel-loader',
75
69
  options: {
76
70
  presets: ['@babel/preset-env'],
77
- plugins: [require('@babel/plugin-proposal-object-rest-spread')]
71
+ plugins: ['@babel/plugin-proposal-object-rest-spread']
78
72
  }
79
73
  }
80
74
  }
@@ -84,19 +78,19 @@ module: {
84
78
 
85
79
  This loader also supports the following loader-specific option:
86
80
 
87
- * `cacheDirectory`: Default `false`. When set, the given directory will be used to cache the results of the loader. Future webpack builds will attempt to read from the cache to avoid needing to run the potentially expensive Babel recompilation process on each run. If the value is blank (`loader: 'babel-loader?cacheDirectory'`) or `true` (`loader: 'babel-loader?cacheDirectory=true'`), the loader will use the default cache directory in `node_modules/.cache/babel-loader` or fallback to the default OS temporary file directory if no `node_modules` folder could be found in any root directory.
81
+ * `cacheDirectory`: Default `false`. When set, the given directory will be used to cache the results of the loader. Future webpack builds will attempt to read from the cache to avoid needing to run the potentially expensive Babel recompilation process on each run. If the value is set to `true` in options (`{cacheDirectory: true}`), the loader will use the default cache directory in `node_modules/.cache/babel-loader` or fallback to the default OS temporary file directory if no `node_modules` folder could be found in any root directory.
88
82
 
89
- * `cacheIdentifier`: Default is a string composed by the `babel-core`'s version, the `babel-loader`'s version, the contents of `.babelrc` file if it exists, and the value of the environment variable `BABEL_ENV` with a fallback to the `NODE_ENV` environment variable. This can be set to a custom value to force cache busting if the identifier changes.
83
+ * `cacheIdentifier`: Default is a string composed by the `@babel/core`'s version, the `babel-loader`'s version, the contents of `.babelrc` file if it exists, and the value of the environment variable `BABEL_ENV` with a fallback to the `NODE_ENV` environment variable. This can be set to a custom value to force cache busting if the identifier changes.
90
84
 
91
85
  * `cacheCompression`: Default `true`. When set, each Babel transform output will be compressed with Gzip. If you want to opt-out of cache compression, set it to `false` -- your project may benefit from this if it transpiles thousands of files.
92
86
 
93
- **Note**: The `sourceMap` option is ignored. Instead, source maps are automatically enabled when webpack is configured to use them (via the [`devtool`](https://webpack.js.org/configuration/devtool/#devtool) config option).
87
+ * `customize`: Default `null`. The path of a module that exports a `custom` callback [like the one that you'd pass to `.custom()`](#customized-loader). Since you already have to make a new file to use this, it is recommended that you instead use `.custom` to create a wrapper loader. Only use this is you _must_ continue using `babel-loader` directly, but still want to customize.
94
88
 
95
89
  ## Troubleshooting
96
90
 
97
91
  ### babel-loader is slow!
98
92
 
99
- Make sure you are transforming as few files as possible. Because you are probably matching `/\.js$/`, you might be transforming the `node_modules` folder or other unwanted source.
93
+ Make sure you are transforming as few files as possible. Because you are probably matching `/\.m?js$/`, you might be transforming the `node_modules` folder or other unwanted source.
100
94
 
101
95
  To exclude `node_modules`, see the `exclude` option in the `loaders` config as documented above.
102
96
 
@@ -108,18 +102,18 @@ Babel uses very small helpers for common functions such as `_extend`. By default
108
102
 
109
103
  You can instead require the Babel runtime as a separate module to avoid the duplication.
110
104
 
111
- The following configuration disables automatic per-file runtime injection in Babel, requiring `babel-plugin-transform-runtime` instead and making all helper references use it.
105
+ The following configuration disables automatic per-file runtime injection in Babel, requiring `@babel/plugin-transform-runtime` instead and making all helper references use it.
112
106
 
113
107
  See the [docs](https://babeljs.io/docs/plugins/transform-runtime/) for more information.
114
108
 
115
- **NOTE**: You must run `npm install -D @babel/plugin-transform-runtime` to include this in your project and `babel-runtime` itself as a dependency with `npm install @babel/runtime`.
109
+ **NOTE**: You must run `npm install -D @babel/plugin-transform-runtime` to include this in your project and `@babel/runtime` itself as a dependency with `npm install @babel/runtime`.
116
110
 
117
111
  ```javascript
118
112
  rules: [
119
113
  // the 'transform-runtime' plugin tells Babel to
120
114
  // require the runtime instead of inlining it.
121
115
  {
122
- test: /\.js$/,
116
+ test: /\.m?js$/,
123
117
  exclude: /(node_modules|bower_components)/,
124
118
  use: {
125
119
  loader: 'babel-loader',
@@ -134,7 +128,7 @@ rules: [
134
128
 
135
129
  #### **NOTE**: transform-runtime & custom polyfills (e.g. Promise library)
136
130
 
137
- Since [babel-plugin-transform-runtime](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime) includes a polyfill that includes a custom [regenerator-runtime](https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js) and [core-js](https://github.com/zloirock/core-js), the following usual shimming method using `webpack.ProvidePlugin` will not work:
131
+ Since [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime) includes a polyfill that includes a custom [regenerator-runtime](https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js) and [core-js](https://github.com/zloirock/core-js), the following usual shimming method using `webpack.ProvidePlugin` will not work:
138
132
 
139
133
  ```javascript
140
134
  // ...
@@ -183,18 +177,18 @@ require('./app');
183
177
  If you receive this message, it means that you have the npm package `babel` installed and are using the short notation of the loader in the webpack config (which is not valid anymore as of webpack 2.x):
184
178
  ```javascript
185
179
  {
186
- test: /\.js$/,
180
+ test: /\.m?js$/,
187
181
  loader: 'babel',
188
182
  }
189
183
  ```
190
184
 
191
185
  webpack then tries to load the `babel` package instead of the `babel-loader`.
192
186
 
193
- To fix this, you should uninstall the npm package `babel`, as it is deprecated in Babel v6. (Instead, install `babel-cli` or `babel-core`.)
187
+ To fix this, you should uninstall the npm package `babel`, as it is deprecated in Babel v6. (Instead, install `@babel/cli` or `@babel/core`.)
194
188
  In the case one of your dependencies is installing `babel` and you cannot uninstall it yourself, use the complete name of the loader in the webpack config:
195
189
  ```javascript
196
190
  {
197
- test: /\.js$/,
191
+ test: /\.m?js$/,
198
192
  loader: 'babel-loader',
199
193
  }
200
194
  ```
@@ -208,9 +202,14 @@ of Babel's configuration for each file that it processes.
208
202
  `babel` so that tooling can ensure that it using exactly the same `@babel/core`
209
203
  instance as the loader itself.
210
204
 
205
+ In cases where you want to customize without actually having a file to call `.custom`, you
206
+ may also pass the `customize` option with a string pointing at a file that exports
207
+ your `custom` callback function.
208
+
211
209
  ### Example
212
210
 
213
211
  ```js
212
+ // Export from "./my-custom-loader.js" or whatever you want.
214
213
  module.exports = require("babel-loader").custom(babel => {
215
214
  function myPlugin() {
216
215
  return {
@@ -230,7 +229,7 @@ module.exports = require("babel-loader").custom(babel => {
230
229
  };
231
230
  },
232
231
 
233
- // Passed Babel's 'PartialConfig' object.
232
+ // Passed Babel's 'PartialConfig' object.
234
233
  config(cfg) {
235
234
  if (cfg.hasFilesystemConfig()) {
236
235
  // Use the normal config
@@ -258,6 +257,20 @@ module.exports = require("babel-loader").custom(babel => {
258
257
  });
259
258
  ```
260
259
 
260
+ ```js
261
+ // And in your Webpack config
262
+ module.exports = {
263
+ // ..
264
+ module: {
265
+ rules: [{
266
+ // ...
267
+ loader: path.join(__dirname, 'my-custom-loader.js'),
268
+ // ...
269
+ }]
270
+ }
271
+ };
272
+ ```
273
+
261
274
  ### `customOptions(options: Object): { custom: Object, loader: Object }`
262
275
 
263
276
  Given the loader's options, split custom options out of `babel-loader`'s
@@ -275,4 +288,5 @@ be passed to `babel.transform`.
275
288
  Given Babel's result object, allow loaders to make additional tweaks to it.
276
289
 
277
290
 
278
- ## [License](https://couto.mit-license.org/)
291
+ ## License
292
+ [MIT](https://couto.mit-license.org/)
package/lib/cache.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _next(value) { step("next", value); } function _throw(err) { step("throw", err); } _next(); }); }; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
6
 
5
7
  /**
6
8
  * Filesystem Cache
@@ -25,7 +27,7 @@ const mkdirpOrig = require("mkdirp");
25
27
 
26
28
  const findCacheDir = require("find-cache-dir");
27
29
 
28
- const promisify = require("util.promisify");
30
+ const promisify = require("pify");
29
31
 
30
32
  const transform = require("./transform"); // Lazily instantiated when needed
31
33
 
package/lib/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _next(value) { step("next", value); } function _throw(err) { step("throw", err); } _next(); }); }; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
6
 
5
7
  let babel;
6
8
 
@@ -20,12 +22,20 @@ if (/^6\./.test(babel.version)) {
20
22
  throw new Error("\n babel-loader@8 will not work with the '@babel/core@6' bridge package. " + "If you want to use Babel 6.x, install 'babel-loader@7'.");
21
23
  }
22
24
 
23
- const pkg = require("../package.json");
25
+ const {
26
+ version
27
+ } = require("../package.json");
24
28
 
25
29
  const cache = require("./cache");
26
30
 
27
31
  const transform = require("./transform");
28
32
 
33
+ const injectCaller = require("./injectCaller");
34
+
35
+ const {
36
+ isAbsolute
37
+ } = require("path");
38
+
29
39
  const loaderUtils = require("loader-utils");
30
40
 
31
41
  function subscribe(subscriber, metadata, context) {
@@ -54,10 +64,38 @@ function _loader() {
54
64
  _loader = _asyncToGenerator(function* (source, inputSourceMap, overrides) {
55
65
  const filename = this.resourcePath;
56
66
  let loaderOptions = loaderUtils.getOptions(this) || {};
67
+
68
+ if (loaderOptions.customize != null) {
69
+ if (typeof loaderOptions.customize !== "string") {
70
+ throw new Error("Customized loaders must be implemented as standalone modules.");
71
+ }
72
+
73
+ if (!isAbsolute(loaderOptions.customize)) {
74
+ throw new Error("Customized loaders must be passed as absolute paths, since " + "babel-loader has no way to know what they would be relative to.");
75
+ }
76
+
77
+ if (overrides) {
78
+ throw new Error("babel-loader's 'customize' option is not available when already " + "using a customized babel-loader wrapper.");
79
+ }
80
+
81
+ let override = require(loaderOptions.customize);
82
+
83
+ if (override.__esModule) override = override.default;
84
+
85
+ if (typeof override !== "function") {
86
+ throw new Error("Custom overrides must be functions.");
87
+ }
88
+
89
+ overrides = override(babel);
90
+ }
91
+
57
92
  let customOptions;
58
93
 
59
94
  if (overrides && overrides.customOptions) {
60
- const result = yield overrides.customOptions.call(this, loaderOptions);
95
+ const result = yield overrides.customOptions.call(this, loaderOptions, {
96
+ source,
97
+ map: inputSourceMap
98
+ });
61
99
  customOptions = result.custom;
62
100
  loaderOptions = result.loader;
63
101
  } // Deprecation handling
@@ -93,6 +131,7 @@ function _loader() {
93
131
  sourceFileName: filename
94
132
  }); // Remove loader related options
95
133
 
134
+ delete programmaticOptions.customize;
96
135
  delete programmaticOptions.cacheDirectory;
97
136
  delete programmaticOptions.cacheIdentifier;
98
137
  delete programmaticOptions.cacheCompression;
@@ -102,7 +141,7 @@ function _loader() {
102
141
  throw new Error(`babel-loader ^8.0.0-beta.3 requires @babel/core@7.0.0-beta.41, but ` + `you appear to be using "${babel.version}". Either update your ` + `@babel/core version, or pin you babel-loader version to 8.0.0-beta.2`);
103
142
  }
104
143
 
105
- const config = babel.loadPartialConfig(programmaticOptions);
144
+ const config = babel.loadPartialConfig(injectCaller(programmaticOptions));
106
145
 
107
146
  if (config) {
108
147
  let options = config.options;
@@ -110,6 +149,7 @@ function _loader() {
110
149
  if (overrides && overrides.config) {
111
150
  options = yield overrides.config.call(this, config, {
112
151
  source,
152
+ map: inputSourceMap,
113
153
  customOptions
114
154
  });
115
155
  }
@@ -129,7 +169,7 @@ function _loader() {
129
169
  cacheIdentifier = JSON.stringify({
130
170
  options,
131
171
  "@babel/core": transform.version,
132
- "@babel/loader": pkg.version
172
+ "@babel/loader": version
133
173
  }),
134
174
  cacheCompression = true,
135
175
  metadataSubscribers = []
@@ -159,6 +199,7 @@ function _loader() {
159
199
  if (overrides && overrides.result) {
160
200
  result = yield overrides.result.call(this, result, {
161
201
  source,
202
+ map: inputSourceMap,
162
203
  customOptions,
163
204
  config,
164
205
  options
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ const babel = require("@babel/core");
4
+
5
+ module.exports = function injectCaller(opts) {
6
+ if (!supportsCallerOption()) return opts;
7
+ return Object.assign({}, opts, {
8
+ caller: Object.assign({
9
+ name: "babel-loader",
10
+ // Webpack >= 2 supports ESM and dynamic import.
11
+ supportsStaticESM: true,
12
+ supportsDynamicImport: true
13
+ }, opts.caller)
14
+ });
15
+ }; // TODO: We can remove this eventually, I'm just adding it so that people have
16
+ // a little time to migrate to the newer RCs of @babel/core without getting
17
+ // hard-to-diagnose errors about unknown 'caller' options.
18
+
19
+
20
+ let supportsCallerOptionFlag = undefined;
21
+
22
+ function supportsCallerOption() {
23
+ if (supportsCallerOptionFlag === undefined) {
24
+ try {
25
+ // Rather than try to match the Babel version, we just see if it throws
26
+ // when passed a 'caller' flag, and use that to decide if it is supported.
27
+ babel.loadPartialConfig({
28
+ caller: undefined,
29
+ babelrc: false,
30
+ configFile: false
31
+ });
32
+ supportsCallerOptionFlag = true;
33
+ } catch (err) {
34
+ supportsCallerOptionFlag = false;
35
+ }
36
+ }
37
+
38
+ return supportsCallerOptionFlag;
39
+ }
package/lib/transform.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
 
3
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _next(value) { step("next", value); } function _throw(err) { step("throw", err); } _next(); }); }; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
6
 
5
7
  const babel = require("@babel/core");
6
8
 
7
- const promisify = require("util.promisify");
9
+ const promisify = require("pify");
8
10
 
9
11
  const LoaderError = require("./Error");
10
12
 
@@ -17,7 +19,7 @@ function () {
17
19
  let result;
18
20
 
19
21
  try {
20
- result = yield transform(source, injectCaller(options));
22
+ result = yield transform(source, options);
21
23
  } catch (err) {
22
24
  throw err.message && err.codeFrame ? new LoaderError(err) : err;
23
25
  }
@@ -54,40 +56,4 @@ function () {
54
56
  };
55
57
  }();
56
58
 
57
- module.exports.version = babel.version;
58
-
59
- function injectCaller(opts) {
60
- if (!supportsCallerOption()) return opts;
61
- return Object.assign({}, opts, {
62
- caller: Object.assign({
63
- name: "babel-loader",
64
- // Webpack >= 2 supports ESM and dynamic import.
65
- supportsStaticESM: true,
66
- supportsDynamicImport: true
67
- }, opts.caller)
68
- });
69
- } // TODO: We can remove this eventually, I'm just adding it so that people have
70
- // a little time to migrate to the newer RCs of @babel/core without getting
71
- // hard-to-diagnose errors about unknown 'caller' options.
72
-
73
-
74
- let supportsCallerOptionFlag = undefined;
75
-
76
- function supportsCallerOption() {
77
- if (supportsCallerOptionFlag === undefined) {
78
- try {
79
- // Rather than try to match the Babel version, we just see if it throws
80
- // when passed a 'caller' flag, and use that to decide if it is supported.
81
- babel.loadPartialConfig({
82
- caller: undefined,
83
- babelrc: false,
84
- configFile: false
85
- });
86
- supportsCallerOptionFlag = true;
87
- } catch (err) {
88
- supportsCallerOptionFlag = false;
89
- }
90
- }
91
-
92
- return supportsCallerOptionFlag;
93
- }
59
+ module.exports.version = babel.version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-loader",
3
- "version": "8.0.2",
3
+ "version": "8.0.6",
4
4
  "description": "babel module loader for webpack",
5
5
  "files": [
6
6
  "lib"
@@ -10,35 +10,36 @@
10
10
  "node": ">= 6.9"
11
11
  },
12
12
  "dependencies": {
13
- "find-cache-dir": "^1.0.0",
13
+ "find-cache-dir": "^2.0.0",
14
14
  "loader-utils": "^1.0.2",
15
15
  "mkdirp": "^0.5.1",
16
- "util.promisify": "^1.0.0"
16
+ "pify": "^4.0.1"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@babel/core": "^7.0.0",
20
20
  "webpack": ">=2"
21
21
  },
22
22
  "devDependencies": {
23
- "@babel/cli": "^7.0.0-beta.41",
24
- "@babel/core": "^7.0.0-beta.41",
25
- "@babel/preset-env": "^7.0.0-beta.41",
26
- "ava": "0.25.0",
27
- "babel-eslint": "^8.0.0",
28
- "babel-plugin-istanbul": "^4.0.0",
29
- "babel-plugin-react-intl": "^2.1.3",
30
- "cross-env": "^5.0.0",
31
- "eslint": "^4.1.0",
32
- "eslint-config-babel": "^7.0.0",
33
- "eslint-plugin-flowtype": "^2.25.0",
34
- "eslint-plugin-prettier": "^2.1.2",
35
- "husky": "^0.14.0",
36
- "lint-staged": "^7.1.0",
37
- "nyc": "^11.0.1",
38
- "prettier": "^1.2.2",
23
+ "@babel/cli": "^7.2.0",
24
+ "@babel/core": "^7.2.0",
25
+ "@babel/preset-env": "^7.2.0",
26
+ "ava": "^1.1.0",
27
+ "babel-eslint": "^10.0.1",
28
+ "babel-plugin-istanbul": "^5.1.0",
29
+ "babel-plugin-react-intl": "^3.0.1",
30
+ "cross-env": "^5.2.0",
31
+ "eslint": "^5.9.0",
32
+ "eslint-config-babel": "^9.0.0",
33
+ "eslint-config-prettier": "^4.1.0",
34
+ "eslint-plugin-flowtype": "^3.2.0",
35
+ "eslint-plugin-prettier": "^3.0.0",
36
+ "husky": "^1.2.0",
37
+ "lint-staged": "^8.1.0",
38
+ "nyc": "^14.1.1",
39
+ "prettier": "^1.15.3",
39
40
  "react": "^16.0.0",
40
41
  "react-intl": "^2.1.2",
41
- "react-intl-webpack-plugin": "^0.0.3",
42
+ "react-intl-webpack-plugin": "^0.3.0",
42
43
  "rimraf": "^2.4.3",
43
44
  "webpack": "^4.0.0"
44
45
  },
@@ -89,7 +90,7 @@
89
90
  "!test/fixtures/**/*",
90
91
  "!test/helpers/**/*"
91
92
  ],
92
- "source": [
93
+ "sources": [
93
94
  "src/**/*.js"
94
95
  ]
95
96
  },