Skip to content

Commit e9fab28

Browse files
committed
Replace bluebird with p-each-series
1 parent ddd16f0 commit e9fab28

File tree

8 files changed

+24
-25
lines changed

8 files changed

+24
-25
lines changed

.babelrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
}]
1616
],
1717
"plugins": [
18-
["transform-async-to-module-method", {
19-
"module": "bluebird",
20-
"method": "coroutine"
21-
}],
2218
"add-module-exports",
2319
"transform-inline-imports-commonjs"
2420
],

.eslintrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
22
"root": true,
3-
"extends": "simenb-base"
3+
"extends": "simenb-base",
4+
"overrides": [{
5+
"files": "test.js",
6+
"env": {
7+
"jest": true
8+
}
9+
}]
410
}

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55
Latest version of this document will always be available on https://github.com/SimenB/add-asset-html-webpack-plugin/releases
66

77
## [Unreleased]
8-
Nothing
8+
### Changed
9+
- Replace Bluebird with `p-each-series`
910

1011
## [2.1.2] - 2017-09-15
1112
### Fixes

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@
3838
},
3939
"homepage": "https://github.com/SimenB/add-asset-html-webpack-plugin#readme",
4040
"dependencies": {
41-
"bluebird": "^3.5.0",
4241
"globby": "^6.1.0",
43-
"minimatch": "^3.0.4"
42+
"minimatch": "^3.0.4",
43+
"p-each-series": "^1.0.0"
4444
},
4545
"devDependencies": {
4646
"babel-cli": "^6.26.0",
4747
"babel-plugin-add-module-exports": "^0.2.1",
48-
"babel-plugin-transform-async-to-module-method": "^6.24.1",
4948
"babel-plugin-transform-inline-imports-commonjs": "^1.2.0",
5049
"babel-preset-env": "^1.6.0",
5150
"classnames": "^2.2.5",

src/addAllAssetsToCompilation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'path';
22
import crypto from 'crypto';
3-
import Promise from 'bluebird';
3+
import pEachSeries from 'p-each-series';
44
import minimatch from 'minimatch';
55
import handleUrl from './handleUrl';
66

@@ -101,7 +101,7 @@ async function addFileToAssets(
101101
export default async function(assets, compilation, htmlPluginData, callback) {
102102
try {
103103
const handledAssets = await handleUrl(assets);
104-
await Promise.mapSeries(handledAssets, asset =>
104+
await pEachSeries(handledAssets, asset =>
105105
addFileToAssets(compilation, htmlPluginData, asset)
106106
);
107107

test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
/* eslint-env jest */
2-
31
import path from 'path';
4-
import Promise from 'bluebird';
52
import AddAssetHtmlPlugin from './src/index';
63
import addAllAssetsToCompilation from './src/addAllAssetsToCompilation';
74
import handleUrl from './src/handleUrl';

typings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"node": "registry:env/node#6.0.0+20161223222858"
66
},
77
"dependencies": {
8-
"bluebird": "registry:npm/bluebird#3.4.1+20160909132857",
98
"webpack": "registry:dt/webpack#1.12.9+20161119044246"
109
}
1110
}

yarn.lock

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -468,15 +468,6 @@ babel-plugin-transform-async-to-generator@^6.22.0:
468468
babel-plugin-syntax-async-functions "^6.8.0"
469469
babel-runtime "^6.22.0"
470470

471-
babel-plugin-transform-async-to-module-method@^6.24.1:
472-
version "6.24.1"
473-
resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-module-method/-/babel-plugin-transform-async-to-module-method-6.24.1.tgz#9109a08987794b411cb213850ce935ec2f029cdb"
474-
dependencies:
475-
babel-helper-remap-async-to-generator "^6.24.1"
476-
babel-plugin-syntax-async-functions "^6.8.0"
477-
babel-runtime "^6.22.0"
478-
babel-types "^6.24.1"
479-
480471
babel-plugin-transform-es2015-arrow-functions@^6.22.0:
481472
version "6.22.0"
482473
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
@@ -807,7 +798,7 @@ block-stream@*:
807798
dependencies:
808799
inherits "~2.0.0"
809800

810-
bluebird@^3.4.7, bluebird@^3.5.0:
801+
bluebird@^3.4.7:
811802
version "3.5.1"
812803
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
813804

@@ -3654,6 +3645,12 @@ p-cancelable@^0.3.0:
36543645
version "0.3.0"
36553646
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa"
36563647

3648+
p-each-series@^1.0.0:
3649+
version "1.0.0"
3650+
resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71"
3651+
dependencies:
3652+
p-reduce "^1.0.0"
3653+
36573654
p-finally@^1.0.0:
36583655
version "1.0.0"
36593656
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
@@ -3672,6 +3669,10 @@ p-map@^1.1.1:
36723669
version "1.2.0"
36733670
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
36743671

3672+
p-reduce@^1.0.0:
3673+
version "1.0.0"
3674+
resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
3675+
36753676
package-json@^4.0.0:
36763677
version "4.0.1"
36773678
resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed"

0 commit comments

Comments
 (0)