mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix nyc coverage
using babel-plugin-istanbul
This commit is contained in:
parent
e52d414447
commit
e0ea1dd1ee
@ -44,12 +44,11 @@
|
||||
},
|
||||
"nyc": {
|
||||
"include": [
|
||||
"lib/",
|
||||
"dist/"
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run lint && nyc ava --verbose --serial test/",
|
||||
"test": "npm run lint && cross-env NODE_ENV=test npm run build && nyc ava --verbose --serial test/ -- && nyc report --reporter=html",
|
||||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
||||
"lint": "eslint --ext .js,.vue bin lib pages test/*.js --ignore-pattern app",
|
||||
"build": "npm run build:core && npm run build:builder",
|
||||
@ -121,12 +120,14 @@
|
||||
"ava": "^0.19.1",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-plugin-array-includes": "^2.0.3",
|
||||
"babel-plugin-istanbul": "^4.1.4",
|
||||
"babel-plugin-transform-async-to-generator": "^6.24.1",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015-rollup": "^3.0.0",
|
||||
"babel-preset-stage-2": "^6.24.1",
|
||||
"codecov": "^2.2.0",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
"cross-env": "^5.0.1",
|
||||
"eslint": "^4.0.0",
|
||||
"eslint-config-standard": "^10.2.1",
|
||||
"eslint-plugin-html": "^3.0.0",
|
||||
|
@ -65,6 +65,10 @@ function genConfig (opts) {
|
||||
resolve: ['.js', '.json', '.jsx', '.ts']
|
||||
}, aliases, opts.alias)),
|
||||
|
||||
rollupNodeResolve({ main: true, jsnext: true }),
|
||||
|
||||
rollupCommonJS(),
|
||||
|
||||
rollupBabel(Object.assign({
|
||||
exclude: 'node_modules/**',
|
||||
plugins: [
|
||||
@ -74,13 +78,14 @@ function genConfig (opts) {
|
||||
],
|
||||
presets: [
|
||||
'babel-preset-es2015-rollup'
|
||||
]
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": [ "istanbul" ]
|
||||
}
|
||||
}
|
||||
}, opts.babel)),
|
||||
|
||||
rollupNodeResolve({ main: true, jsnext: true }),
|
||||
|
||||
rollupCommonJS(),
|
||||
|
||||
rollupReplace({
|
||||
__VERSION__: version
|
||||
})
|
||||
|
99
yarn.lock
99
yarn.lock
@ -56,6 +56,10 @@ abbrev@1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f"
|
||||
|
||||
abbrev@1.0.x:
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
|
||||
|
||||
accepts@~1.3.3:
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca"
|
||||
@ -289,7 +293,7 @@ async-each@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
|
||||
|
||||
async@^1.4.0, async@^1.5.0:
|
||||
async@1.x, async@^1.4.0, async@^1.5.0:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
|
||||
|
||||
@ -648,6 +652,14 @@ babel-plugin-external-helpers@^6.18.0:
|
||||
dependencies:
|
||||
babel-runtime "^6.22.0"
|
||||
|
||||
babel-plugin-istanbul@^4.1.4:
|
||||
version "4.1.4"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587"
|
||||
dependencies:
|
||||
find-up "^2.1.0"
|
||||
istanbul-lib-instrument "^1.7.2"
|
||||
test-exclude "^4.1.1"
|
||||
|
||||
babel-plugin-syntax-async-functions@^6.8.0:
|
||||
version "6.13.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
|
||||
@ -1940,6 +1952,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
|
||||
safe-buffer "^5.0.1"
|
||||
sha.js "^2.4.8"
|
||||
|
||||
cross-env@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.1.tgz#ff4e72ea43b47da2486b43a7f2043b2609e44913"
|
||||
dependencies:
|
||||
cross-spawn "^5.1.0"
|
||||
is-windows "^1.0.0"
|
||||
|
||||
cross-spawn-async@^2.1.1:
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc"
|
||||
@ -1954,7 +1973,7 @@ cross-spawn@^4, cross-spawn@^4.0.0:
|
||||
lru-cache "^4.0.1"
|
||||
which "^1.2.9"
|
||||
|
||||
cross-spawn@^5.0.1:
|
||||
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
|
||||
dependencies:
|
||||
@ -2512,7 +2531,7 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.4, escape-string-regexp@^
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
|
||||
escodegen@^1.6.1:
|
||||
escodegen@1.8.x, escodegen@^1.6.1:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018"
|
||||
dependencies:
|
||||
@ -2649,7 +2668,7 @@ espree@^3.4.3:
|
||||
acorn "^5.0.1"
|
||||
acorn-jsx "^3.0.0"
|
||||
|
||||
esprima@^2.6.0, esprima@^2.7.1:
|
||||
esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1:
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
|
||||
|
||||
@ -3139,6 +3158,16 @@ glob-parent@^2.0.0:
|
||||
dependencies:
|
||||
is-glob "^2.0.0"
|
||||
|
||||
glob@^5.0.15:
|
||||
version "5.0.15"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
|
||||
dependencies:
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "2 || 3"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
glob@^6.0.4:
|
||||
version "6.0.4"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
|
||||
@ -3215,7 +3244,7 @@ gzip-size@^3.0.0:
|
||||
dependencies:
|
||||
duplexer "^0.1.1"
|
||||
|
||||
handlebars@^4.0.2, handlebars@^4.0.3:
|
||||
handlebars@^4.0.1, handlebars@^4.0.2, handlebars@^4.0.3:
|
||||
version "4.0.10"
|
||||
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f"
|
||||
dependencies:
|
||||
@ -3427,11 +3456,11 @@ hullabaloo-config-manager@^1.0.0:
|
||||
resolve-from "^3.0.0"
|
||||
safe-buffer "^5.0.1"
|
||||
|
||||
iconv-lite@0.4.13, iconv-lite@~0.4.13:
|
||||
iconv-lite@0.4.13:
|
||||
version "0.4.13"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
|
||||
|
||||
iconv-lite@^0.4.17:
|
||||
iconv-lite@^0.4.17, iconv-lite@~0.4.13:
|
||||
version "0.4.18"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2"
|
||||
|
||||
@ -3755,6 +3784,10 @@ is-utf8@^0.2.0, is-utf8@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
|
||||
|
||||
is-windows@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9"
|
||||
|
||||
isarray@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
|
||||
@ -3824,6 +3857,25 @@ istanbul-reports@^1.1.1:
|
||||
dependencies:
|
||||
handlebars "^4.0.3"
|
||||
|
||||
istanbul@^0.4.2:
|
||||
version "0.4.5"
|
||||
resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"
|
||||
dependencies:
|
||||
abbrev "1.0.x"
|
||||
async "1.x"
|
||||
escodegen "1.8.x"
|
||||
esprima "2.7.x"
|
||||
glob "^5.0.15"
|
||||
handlebars "^4.0.1"
|
||||
js-yaml "3.x"
|
||||
mkdirp "0.5.x"
|
||||
nopt "3.x"
|
||||
once "1.x"
|
||||
resolve "1.1.x"
|
||||
supports-color "^3.1.0"
|
||||
which "^1.1.1"
|
||||
wordwrap "^1.0.0"
|
||||
|
||||
jest-diff@19.0.0, jest-diff@^19.0.0:
|
||||
version "19.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-19.0.0.tgz#d1563cfc56c8b60232988fbc05d4d16ed90f063c"
|
||||
@ -3906,7 +3958,7 @@ js-tokens@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
|
||||
|
||||
js-yaml@^3.4.3, js-yaml@^3.8.2, js-yaml@^3.8.4:
|
||||
js-yaml@3.x, js-yaml@^3.4.3, js-yaml@^3.8.2, js-yaml@^3.8.4:
|
||||
version "3.8.4"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6"
|
||||
dependencies:
|
||||
@ -4445,7 +4497,7 @@ minimist@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"
|
||||
|
||||
"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
|
||||
mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
dependencies:
|
||||
@ -4559,6 +4611,12 @@ node-pre-gyp@^0.6.36:
|
||||
tar "^2.2.1"
|
||||
tar-pack "^3.4.0"
|
||||
|
||||
nopt@3.x, nopt@~3.0.1:
|
||||
version "3.0.6"
|
||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
|
||||
dependencies:
|
||||
abbrev "1"
|
||||
|
||||
nopt@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
|
||||
@ -4566,12 +4624,6 @@ nopt@^4.0.1:
|
||||
abbrev "1"
|
||||
osenv "^0.1.4"
|
||||
|
||||
nopt@~3.0.1:
|
||||
version "3.0.6"
|
||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
|
||||
dependencies:
|
||||
abbrev "1"
|
||||
|
||||
normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5:
|
||||
version "2.3.8"
|
||||
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb"
|
||||
@ -4725,7 +4777,7 @@ on-headers@~1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7"
|
||||
|
||||
once@^1.3.0, once@^1.3.3:
|
||||
once@1.x, once@^1.3.0, once@^1.3.3:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
dependencies:
|
||||
@ -5772,7 +5824,7 @@ resolve-from@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
|
||||
|
||||
resolve@1.1.7:
|
||||
resolve@1.1.7, resolve@1.1.x:
|
||||
version "1.1.7"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
|
||||
|
||||
@ -5833,6 +5885,13 @@ rollup-plugin-commonjs@^8.0.2:
|
||||
resolve "^1.1.7"
|
||||
rollup-pluginutils "^2.0.1"
|
||||
|
||||
rollup-plugin-istanbul@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-istanbul/-/rollup-plugin-istanbul-1.1.0.tgz#581cf52e47e54a0bbaf782d4f4cde9594d1f01f9"
|
||||
dependencies:
|
||||
istanbul "^0.4.2"
|
||||
rollup-pluginutils "^1.3.1"
|
||||
|
||||
rollup-plugin-node-resolve@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.0.tgz#8b897c4c3030d5001277b0514b25d2ca09683ee0"
|
||||
@ -5850,7 +5909,7 @@ rollup-plugin-replace@^1.1.1:
|
||||
minimatch "^3.0.2"
|
||||
rollup-pluginutils "^1.5.0"
|
||||
|
||||
rollup-pluginutils@^1.5.0:
|
||||
rollup-pluginutils@^1.3.1, rollup-pluginutils@^1.5.0:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
|
||||
dependencies:
|
||||
@ -6833,7 +6892,7 @@ which-module@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
|
||||
|
||||
which@^1.2.4, which@^1.2.8, which@^1.2.9:
|
||||
which@^1.1.1, which@^1.2.4, which@^1.2.8, which@^1.2.9:
|
||||
version "1.2.14"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
||||
dependencies:
|
||||
@ -6859,7 +6918,7 @@ wordwrap@0.0.2, wordwrap@~0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
|
||||
|
||||
wordwrap@~1.0.0:
|
||||
wordwrap@^1.0.0, wordwrap@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user