mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-11 19:51:52 -05:00
fix: revert accidentally committed jest related changes
This commit is contained in:
@@ -25,6 +25,8 @@ test('base', async () => {
|
||||
|
||||
// should inject babel-jest
|
||||
expect(pkg.devDependencies).toHaveProperty('babel-jest')
|
||||
// babel-core 6 -> 7 shim
|
||||
expect(pkg.devDependencies).toHaveProperty('babel-core')
|
||||
// eslint
|
||||
expect(files['tests/unit/.eslintrc.js']).toMatch('jest: true')
|
||||
|
||||
|
||||
@@ -54,14 +54,22 @@ module.exports = (api, _, __, invoking) => {
|
||||
if (api.hasPlugin('babel')) {
|
||||
api.extendPackage({
|
||||
devDependencies: {
|
||||
'babel-jest': '^24.7.1'
|
||||
'babel-jest': '^23.6.0',
|
||||
// this is for now necessary to force babel-jest and vue-jest to use babel 7
|
||||
'babel-core': '7.0.0-bridge.0'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
api.extendPackage({
|
||||
babel: {
|
||||
plugins: ['transform-es2015-modules-commonjs']
|
||||
}
|
||||
// Jest's shipped babel-jest still uses babel 6,
|
||||
// so we cannot use extendPackage which renders babel.config.js.
|
||||
api.render(files => {
|
||||
files['.babelrc'] = JSON.stringify(
|
||||
{
|
||||
plugins: ['transform-es2015-modules-commonjs']
|
||||
},
|
||||
null,
|
||||
2
|
||||
)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.4.4",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
|
||||
"@vue/cli-shared-utils": "^3.6.0",
|
||||
"babel-jest": "^24.7.1",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
||||
"jest": "^24.7.1",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"jest-transform-stub": "^2.0.0",
|
||||
|
||||
@@ -3507,7 +3507,7 @@ babel-plugin-syntax-object-rest-spread@^6.8.0:
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
|
||||
integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=
|
||||
|
||||
babel-plugin-transform-es2015-modules-commonjs@^6.26.0:
|
||||
babel-plugin-transform-es2015-modules-commonjs@^6.26.0, babel-plugin-transform-es2015-modules-commonjs@^6.26.2:
|
||||
version "6.26.2"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3"
|
||||
integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==
|
||||
|
||||
Reference in New Issue
Block a user