Browse Source

workflow: upgraded to babel 7 (#8948)

dev
Vikram Rangaraj 6 years ago
committed by Evan You
parent
commit
12e8efc2e7
  1. 8
      .babelrc
  2. 23
      .babelrc.js
  3. 25
      package.json
  4. 2
      test/ssr/fixtures/async-foo.js
  5. 2
      test/ssr/fixtures/split.js
  6. 9
      test/ssr/jasmine.js
  7. 9
      test/ssr/jasmine.json
  8. 9
      test/weex/jasmine.js
  9. 9
      test/weex/jasmine.json
  10. 2723
      yarn.lock

8
.babelrc

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

23
.babelrc.js

@ -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'
]
}

25
package.json

@ -30,8 +30,8 @@
"test:unit": "karma start test/unit/karma.unit.config.js", "test:unit": "karma start test/unit/karma.unit.config.js",
"test:cover": "karma start test/unit/karma.cover.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: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: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.json", "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:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
"test:types": "tsc -p ./types/test/tsconfig.json", "test:types": "tsc -p ./types/test/tsconfig.json",
"lint": "eslint --fix src scripts test", "lint": "eslint --fix src scripts test",
@ -67,18 +67,21 @@
}, },
"homepage": "https://github.com/vuejs/vue#readme", "homepage": "https://github.com/vuejs/vue#readme",
"devDependencies": { "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/node": "^8.0.33",
"@types/webpack": "^3.0.13", "@types/webpack": "^3.0.13",
"acorn": "^5.2.1", "acorn": "^5.2.1",
"babel-core": "^6.25.0",
"babel-eslint": "^8.0.3", "babel-eslint": "^8.0.3",
"babel-helper-vue-jsx-merge-props": "^2.0.2", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.0.0", "babel-loader": "^8.0.4",
"babel-plugin-istanbul": "^4.1.4", "babel-plugin-istanbul": "^5.1.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0", "babel-plugin-transform-vue-jsx": "^4.0.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.4.3",
"babel-preset-es2015": "^6.24.1",
"babel-preset-flow-vue": "^1.0.0", "babel-preset-flow-vue": "^1.0.0",
"buble": "^0.19.3", "buble": "^0.19.3",
"chalk": "^2.3.0", "chalk": "^2.3.0",
@ -125,7 +128,7 @@
"resolve": "^1.3.3", "resolve": "^1.3.3",
"rollup": "^0.54.1", "rollup": "^0.54.1",
"rollup-plugin-alias": "^1.3.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-buble": "^0.19.2",
"rollup-plugin-commonjs": "^8.0.0", "rollup-plugin-commonjs": "^8.0.0",
"rollup-plugin-flow-no-whitespace": "^1.0.0", "rollup-plugin-flow-no-whitespace": "^1.0.0",

2
test/ssr/fixtures/async-foo.js

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

2
test/ssr/fixtures/split.js

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

9
test/ssr/jasmine.js

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

9
test/ssr/jasmine.json

@ -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

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

9
test/weex/jasmine.json

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

2723
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save