Skip to content

Commit fd12b1a

Browse files
committedJan 31, 2019
fix: actually support node 6
1 parent 582c0aa commit fd12b1a

File tree

6 files changed

+32
-18
lines changed

6 files changed

+32
-18
lines changed
 

‎package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"rollup-plugin-babel": "^4.3.2",
4545
"rollup-plugin-buble": "^0.19.6",
4646
"rollup-plugin-commonjs": "^9.2.0",
47-
"rollup-plugin-hashbang": "^2.2.1",
47+
"rollup-plugin-hashbang": "^2.2.2",
4848
"rollup-plugin-json": "^3.1.0",
49-
"rollup-plugin-postcss": "^2.0.1",
49+
"rollup-plugin-postcss": "^2.0.3",
5050
"rollup-plugin-replace": "^2.1.0",
5151
"rollup-plugin-terser": "^4.0.2"
5252
},
@@ -66,6 +66,7 @@
6666
"@types/node": "^10.12.18",
6767
"@types/ora": "^3.0.0",
6868
"@types/p-waterfall": "^1.0.0",
69+
"@types/pify": "^3.0.2",
6970
"@types/pretty-bytes": "^5.1.0",
7071
"@types/pretty-ms": "^4.0.0",
7172
"@types/require-from-string": "^1.2.0",
@@ -82,11 +83,12 @@
8283
"gzip-size": "^5.0.0",
8384
"husky": "^1.0.0-rc.13",
8485
"jest": "^23.0.0",
85-
"joycon": "^2.2.3",
86+
"joycon": "^2.2.4",
8687
"lint-staged": "^7.2.0",
8788
"lodash": "^4.17.11",
8889
"nswatch": "^0.2.0",
8990
"p-waterfall": "^1.0.0",
91+
"pify": "^4.0.1",
9092
"prettier": "^1.15.2",
9193
"pretty-bytes": "^5.1.0",
9294
"pretty-ms": "^4.0.0",

‎src/babel/preset.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import alterObjectAssign from 'babel-plugin-alter-object-assign'
22

3+
const ENV = process.env.BABEL_ENV || process.env.NODE_ENV
4+
35
export default (
46
context: any,
57
{
@@ -17,7 +19,7 @@ export default (
1719
!minimal && [
1820
require('@babel/preset-env').default,
1921
{
20-
modules: false,
22+
modules: ENV === 'test' ? 'auto' : false,
2123
exclude: ['transform-regenerator', 'transform-async-to-generator']
2224
}
2325
],

‎src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import './polyfills'
12
import path from 'path'
23
import colors from 'chalk'
34
import prettyBytes from 'pretty-bytes'

‎src/polyfills.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Used by ./index.ts#L488 and rollup-plugin-commonjs
2+
Object.values =
3+
Object.values ||
4+
((obj: { [k: string]: any }) => Object.keys(obj).map(i => obj[i]))

‎src/resolve.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { promisify } from 'util'
21
import nodeResolve from 'resolve'
2+
import pify from 'pify'
33

44
interface Options {
55
cwd: string
66
}
77

8-
const resolve = promisify(nodeResolve)
8+
const resolve = pify(nodeResolve)
99

1010
const cache = new Map()
1111

‎yarn.lock

+17-12
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,11 @@
917917
resolved "https://registry.npmjs.org/@types/p-waterfall/-/p-waterfall-1.0.0.tgz#c34269404677ac15d6964978a06388ba82c8639a"
918918
integrity sha512-o0nNGt0QnLt78u4IAQGZjsatQZa8xWB5sq4QIbjGcz7sgZx4MNFhqDPrknoqnRocJQodAoKXSN2Zt5auXMkgRg==
919919

920+
"@types/pify@^3.0.2":
921+
version "3.0.2"
922+
resolved "https://registry.npmjs.org/@types/pify/-/pify-3.0.2.tgz#1bc75dac43e31dba981c37e0a08edddc1b49cd39"
923+
integrity sha512-a5AKF1/9pCU3HGMkesgY6LsBdXHUY3WU+I2qgpU0J+I8XuJA1aFr59eS84/HP0+dxsyBSNbt+4yGI2adUpHwSg==
924+
920925
"@types/pretty-bytes@^5.1.0":
921926
version "5.1.0"
922927
resolved "https://registry.npmjs.org/@types/pretty-bytes/-/pretty-bytes-5.1.0.tgz#1df59db5c7def05dbbb0df2ad80b46863d9fafda"
@@ -4843,10 +4848,10 @@ jest@^23.0.0:
48434848
import-local "^1.0.0"
48444849
jest-cli "^23.6.0"
48454850

4846-
joycon@^2.2.3:
4847-
version "2.2.3"
4848-
resolved "https://registry.npmjs.org/joycon/-/joycon-2.2.3.tgz#eeb1169850710c39ab60d8d4a00e50b0b61be581"
4849-
integrity sha512-4gHuFIQJPickKKT4sQ0B3IyQJ1uwIATwMPXWXiq/+NAUWSzhRotwV3bNocahOsqpzI6cTZErLtCvKzZFthZ6eQ==
4851+
joycon@^2.2.4:
4852+
version "2.2.4"
4853+
resolved "https://registry.npmjs.org/joycon/-/joycon-2.2.4.tgz#ac4119d2673dfaa89b41efe5d6d670208e348bc6"
4854+
integrity sha512-Z4G7ZPovoSfAHCSEKznWV4IjyyUxzTY78Sgtr8inbnRxaZMAQGwqNJ46BDwcH3WgIwk0Xt1kpCsC/DFAioRtBA==
48504855

48514856
js-levenshtein@^1.1.3:
48524857
version "1.1.6"
@@ -7795,10 +7800,10 @@ rollup-plugin-commonjs@^9.2.0:
77957800
resolve "^1.8.1"
77967801
rollup-pluginutils "^2.3.3"
77977802

7798-
rollup-plugin-hashbang@^2.2.1:
7799-
version "2.2.1"
7800-
resolved "https://registry.npmjs.org/rollup-plugin-hashbang/-/rollup-plugin-hashbang-2.2.1.tgz#e4a5ceaa864c65f7f4f1f6e90b909d41456a7294"
7801-
integrity sha512-xKOlwhPRsau7cBEf0Qq1f26DxcFUUUcHPBytfd+F3EvbbAFmyu40XCq3rozgH/Z0QN2BOE2DEGJp3QxLS+x8Xw==
7803+
rollup-plugin-hashbang@^2.2.2:
7804+
version "2.2.2"
7805+
resolved "https://registry.npmjs.org/rollup-plugin-hashbang/-/rollup-plugin-hashbang-2.2.2.tgz#971fc49b452e63f9dfdc75f79ae7256b3485e750"
7806+
integrity sha512-Yxw9ogeK3KncG1e4CvK0I0IKVBNeJP+DTZS3bExGTfGjw0WP1C7xxbY7LtRd8IKx4fFf53hz7XR1XG7UV6xqCw==
78027807
dependencies:
78037808
magic-string "^0.22.4"
78047809

@@ -7809,10 +7814,10 @@ rollup-plugin-json@^3.1.0:
78097814
dependencies:
78107815
rollup-pluginutils "^2.3.1"
78117816

7812-
rollup-plugin-postcss@^2.0.1:
7813-
version "2.0.1"
7814-
resolved "https://registry.npmjs.org/rollup-plugin-postcss/-/rollup-plugin-postcss-2.0.1.tgz#d3867b973a6810164730553eb6d9d06375ea4454"
7815-
integrity sha512-23SufVXOceUu0xiVB5CF1CIRkBbRVYVmTWViBsTNpBi/F5KhXY0Fc8W5GZViNzUI2e14Fhdlb3UmIQtCs3iUKg==
7817+
rollup-plugin-postcss@^2.0.3:
7818+
version "2.0.3"
7819+
resolved "https://registry.npmjs.org/rollup-plugin-postcss/-/rollup-plugin-postcss-2.0.3.tgz#1fd5b7e1fc7545cb0084d9c99d11b259e41a05e6"
7820+
integrity sha512-d12oKl6za/GGXmlytzVPzzTdPCKgti/Kq2kNhtfm5vv9hkNbyrTvizMBm6zZ5rRWX/sIWl3znjIJ8xy6Hofoeg==
78167821
dependencies:
78177822
chalk "^2.4.2"
78187823
concat-with-sourcemaps "^1.0.5"

0 commit comments

Comments
 (0)
Please sign in to comment.