workflow: upgraded to babel 7 (#8948)

This commit is contained in:
Vikram Rangaraj 2018-10-23 15:40:55 -07:00 committed by Evan You
parent 93d1f5f8d6
commit 12e8efc2e7
10 changed files with 2232 additions and 457 deletions

View File

@ -1,8 +0,0 @@
{
"presets": ["es2015", "flow-vue"],
"plugins": ["transform-vue-jsx", "syntax-dynamic-import"],
"ignore": [
"dist/*.js",
"packages/**/*.js"
]
}

23
.babelrc.js Normal file
View File

@ -0,0 +1,23 @@
const babelPresetFlowVue = {
plugins: [
require('@babel/plugin-proposal-class-properties'),
// require('@babel/plugin-syntax-flow'), // not needed, included in transform-flow-strip-types
require('@babel/plugin-transform-flow-strip-types')
]
}
module.exports = {
presets: [
require('@babel/preset-env'),
// require('babel-preset-flow-vue')
babelPresetFlowVue
],
plugins: [
require('babel-plugin-transform-vue-jsx'),
require('@babel/plugin-syntax-dynamic-import')
],
ignore: [
'dist/*.js',
'packages/**/*.js'
]
}

View File

@ -30,8 +30,8 @@
"test:unit": "karma start test/unit/karma.unit.config.js",
"test:cover": "karma start test/unit/karma.cover.config.js",
"test:e2e": "npm run build -- web-full-prod,web-server-basic-renderer && node test/e2e/runner.js",
"test:weex": "npm run build:weex && jasmine JASMINE_CONFIG_PATH=test/weex/jasmine.json",
"test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.json",
"test:weex": "npm run build:weex && jasmine JASMINE_CONFIG_PATH=test/weex/jasmine.js",
"test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.js",
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
"test:types": "tsc -p ./types/test/tsconfig.json",
"lint": "eslint --fix src scripts test",
@ -67,18 +67,21 @@
},
"homepage": "https://github.com/vuejs/vue#readme",
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-jsx": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"@types/node": "^8.0.33",
"@types/webpack": "^3.0.13",
"acorn": "^5.2.1",
"babel-core": "^6.25.0",
"babel-eslint": "^8.0.3",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^7.0.0",
"babel-plugin-istanbul": "^4.1.4",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.4.3",
"babel-preset-es2015": "^6.24.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^8.0.4",
"babel-plugin-istanbul": "^5.1.0",
"babel-plugin-transform-vue-jsx": "^4.0.1",
"babel-preset-flow-vue": "^1.0.0",
"buble": "^0.19.3",
"chalk": "^2.3.0",
@ -125,7 +128,7 @@
"resolve": "^1.3.3",
"rollup": "^0.54.1",
"rollup-plugin-alias": "^1.3.1",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-buble": "^0.19.2",
"rollup-plugin-commonjs": "^8.0.0",
"rollup-plugin-flow-no-whitespace": "^1.0.0",

View File

@ -3,7 +3,7 @@ import './test.css'
import font from './test.woff2'
import image from './test.png'
module.exports = {
export default {
beforeCreate () {
this.$vnode.ssrContext._registeredComponents.add('__MODULE_ID__')
},

View File

@ -19,7 +19,7 @@ export default context => {
// simulate router.onReady
Foo().then(comp => {
// resolve now to make the render sync
Foo.resolved = Vue.extend(comp)
Foo.resolved = Vue.extend(comp.default)
resolve(vm)
})
})

9
test/ssr/jasmine.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
spec_dir: 'test/ssr',
spec_files: [
'*.spec.js'
],
helpers: [
require.resolve('@babel/register')
]
}

View File

@ -1,9 +0,0 @@
{
"spec_dir": "test/ssr",
"spec_files": [
"*.spec.js"
],
"helpers": [
"../../node_modules/babel-register/lib/node.js"
]
}

9
test/weex/jasmine.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
spec_dir: 'test/weex',
spec_files: [
'**/*[sS]pec.js'
],
helpers: [
require.resolve('@babel/register')
]
}

View File

@ -1,9 +0,0 @@
{
"spec_dir": "test/weex",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"../../node_modules/babel-register/lib/node.js"
]
}

2593
yarn.lock

File diff suppressed because it is too large Load Diff