Skip to content

Commit

Permalink
fix(regenerator): Use babel transform-runtime instead manual requiring
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Aug 17, 2017
1 parent a99d10e commit 84b2322
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"plugins": [
"transform-object-rest-spread",
"transform-class-properties",
"transform-flow-strip-types"
"transform-flow-strip-types",
["transform-runtime", {
"helpers": false,
"polyfill": false,
"regenerator": true,
}]
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.5.2",
"cz-conventional-changelog": "^2.0.0",
"eslint": "^4.0.0",
Expand All @@ -46,13 +47,13 @@
"semantic-release": "^7.0.1"
},
"dependencies": {
"babel-runtime": "^6.26.0",
"debug": "^3.0.0",
"get-port": "^3.1.0",
"glob": "^7.1.2",
"lockfile": "^1.0.3",
"mkdirp": "^0.5.1",
"mongodb-download": "^2.2.3",
"regenerator-runtime": "^0.11.0",
"tmp": "^0.0.33",
"uuid": "^3.0.1"
},
Expand Down
1 change: 0 additions & 1 deletion src/MongoMemoryServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import getport from 'get-port';
import Debug from 'debug';
import MongoInstance from './util/MongoInstance';

require('regenerator-runtime/runtime'); // eslint-disable-line
tmp.setGracefulCleanup();

export type MongoMemoryServerOptsT = {
Expand Down
2 changes: 0 additions & 2 deletions src/util/MongoBinary.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import path from 'path';
import LockFile from 'lockfile';
import mkdirp from 'mkdirp';

require('regenerator-runtime/runtime'); // eslint-disable-line

export type MongoBinaryCache = {
[version: string]: string,
};
Expand Down
2 changes: 0 additions & 2 deletions src/util/MongoInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import path from 'path';
import MongoBinary from './MongoBinary';
import type { MongoBinaryOpts } from './MongoBinary';

require('regenerator-runtime/runtime'); // eslint-disable-line

export type MongodOps = {
// instance options
instance: {
Expand Down
13 changes: 13 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,12 @@ babel-plugin-transform-regenerator@^6.22.0:
dependencies:
regenerator-transform "0.9.11"

babel-plugin-transform-runtime@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"
dependencies:
babel-runtime "^6.22.0"

babel-plugin-transform-strict-mode@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
Expand Down Expand Up @@ -800,6 +806,13 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0:
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.11.0"

babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0:
version "6.25.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071"
Expand Down

0 comments on commit 84b2322

Please sign in to comment.