Skip to content

Commit

Permalink
Adding missing fast-async
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperelman committed May 3, 2017
1 parent c361399 commit ee8f6cb
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 11 deletions.
28 changes: 19 additions & 9 deletions index.js
Expand Up @@ -105,8 +105,8 @@ module.exports = neutrino => {
.use('worker')
.loader(require.resolve('worker-loader'));

neutrino.config.plugins
.when(process.env.NODE_ENV !== 'test', plugins => plugins.delete('chunk'));
neutrino.config
.when(process.env.NODE_ENV !== 'test', config => config.plugins.delete('chunk'));

neutrino.config.node.set('Buffer', false);

Expand All @@ -120,12 +120,22 @@ module.exports = neutrino => {
.end()
.use('babel')
.tap(options => {
const presetEnvOptions = options.presets[0][1];

presetEnvOptions.useBuiltIns = false;
presetEnvOptions.exclude = ['transform-regenerator', 'transform-async-to-generator'];
options.plugins.push([require.resolve('fast-async'), { spec: true }]);

return options;
const { presets } = options;
const [presetEntry, ...remainingPresets] = presets;
const [presetEnv, envOptions] = presetEntry;

return Object.assign({}, options, {
plugins: [[require.resolve('fast-async'), { spec: true }], ...options.plugins],
presets: [
[
presetEnv,
Object.assign({}, envOptions, {
useBuiltIns: false,
exclude: [...(envOptions.exclude || []), 'transform-regenerator', 'transform-async-to-generator']
})
],
...remainingPresets
]
});
});
};
3 changes: 2 additions & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "neutrino-preset-react-components",
"version": "1.2.0",
"version": "1.2.1",
"main": "index.js",
"files": [
"lib",
Expand All @@ -19,6 +19,7 @@
},
"dependencies": {
"@blueprintjs/core": "^1.16.0",
"fast-async": "^6.2.2",
"neutrino-middleware-banner": "^5.6.0",
"neutrino-preset-react": "^5.6.0",
"normalize.css": "^6.0.0",
Expand Down
36 changes: 35 additions & 1 deletion yarn.lock
Expand Up @@ -40,7 +40,11 @@ acorn-dynamic-import@^2.0.0:
dependencies:
acorn "^4.0.3"

acorn@^4.0.3, acorn@^4.0.4:
acorn-es7-plugin@>=1.1.6:
version "1.1.7"
resolved "https://registry.yarnpkg.com/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz#f2ee1f3228a90eead1245f9ab1922eb2e71d336b"

acorn@>=2.5.2, acorn@^4.0.3, acorn@^4.0.4:
version "4.0.11"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0"

Expand Down Expand Up @@ -1875,6 +1879,12 @@ extsprintf@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"

fast-async@^6.2.2:
version "6.2.2"
resolved "https://registry.yarnpkg.com/fast-async/-/fast-async-6.2.2.tgz#dcbbaaacc92209d9179110f1aa5fb72d8174b0b4"
dependencies:
nodent ">=3.0.17"

fastparse@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"
Expand Down Expand Up @@ -3089,6 +3099,20 @@ node-pre-gyp@^0.6.29:
tar "^2.2.1"
tar-pack "^3.4.0"

nodent-runtime@>=3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/nodent-runtime/-/nodent-runtime-3.0.4.tgz#a801ecb7bb0f6c39a69b24cc2fa370cfa8b492da"

nodent@>=3.0.17:
version "3.0.17"
resolved "https://registry.yarnpkg.com/nodent/-/nodent-3.0.17.tgz#22df57d33c5346d6acc3722d9d69fa68bff518e4"
dependencies:
acorn ">=2.5.2"
acorn-es7-plugin ">=1.1.6"
nodent-runtime ">=3.0.4"
resolve "^1.2.0"
source-map "^0.5.6"

nopt@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
Expand Down Expand Up @@ -3312,6 +3336,10 @@ path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"

path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"

path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
Expand Down Expand Up @@ -3955,6 +3983,12 @@ requires-port@1.0.x, requires-port@1.x.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"

resolve@^1.2.0:
version "1.3.3"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
dependencies:
path-parse "^1.0.5"

restore-cursor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
Expand Down

0 comments on commit ee8f6cb

Please sign in to comment.