Merge pull request #267 from vatesfr/back-to-babel-6

Back to babel 6
This commit is contained in:
Julien Fontanet 2016-03-25 17:37:52 +01:00
commit 8dbf334208
4 changed files with 19 additions and 20 deletions

View File

@ -1,15 +1,12 @@
{
"comments": false,
"compact": true,
"optional": [
// Experimental features.
// "minification.constantFolding",
// "minification.deadCodeElimination",
"es7.asyncFunctions",
"es7.decorators",
"es7.exportExtensions",
"es7.functionBind",
"runtime"
"plugins": [
"transform-decorators-legacy",
"transform-runtime"
],
"presets": [
"stage-0",
"es2015"
]
}

View File

@ -8,4 +8,4 @@ if (process.env.DEBUG === undefined) {
}
// Import the real main module.
module.exports = require('./dist')
module.exports = require('./dist').default

View File

@ -36,7 +36,7 @@
"dependencies": {
"@marsaud/smb2-promise": "^0.2.0",
"app-conf": "^0.4.0",
"babel-runtime": "^5",
"babel-runtime": "^6.5.0",
"base64url": "^1.0.5",
"blocked": "^1.1.0",
"bluebird": "^3.1.1",
@ -131,12 +131,16 @@
"xo-remote-parser": "^0.1.0"
},
"devDependencies": {
"babel-eslint": "^4.0.10",
"babel-eslint": "^5.0.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-runtime": "^6.5.2",
"babel-preset-es2015": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"chai": "^3.0.0",
"dependency-check": "^2.4.0",
"ghooks": "^1.0.3",
"gulp": "git://github.com/gulpjs/gulp#4.0",
"gulp-babel": "^5",
"gulp-babel": "^6",
"gulp-coffee": "^2.3.1",
"gulp-plumber": "^1.0.0",
"gulp-sourcemaps": "^1.5.1",

View File

@ -1122,25 +1122,24 @@ export default class Xapi extends XapiBase {
}
// Modify existing (previous template) disks if necessary
const this_ = this // Work around http://phabricator.babeljs.io/T7172
existingVdis && await Promise.all(mapToArray(existingVdis, async ({ size, $SR: srId, ...properties }, userdevice) => {
const vbd = find(vm.$VBDs, { userdevice })
if (!vbd) {
return
}
const vdi = vbd.$VDI
await this_._setObjectProperties(vdi, properties)
await this._setObjectProperties(vdi, properties)
// if the disk is bigger
if (
size != null &&
size > vdi.virtual_size
) {
await this_.resizeVdi(vdi.$id, size)
await this.resizeVdi(vdi.$id, size)
}
// if another SR is set, move it there
if (srId) {
await this_.moveVdi(vdi.$id, srId)
await this.moveVdi(vdi.$id, srId)
}
}))
@ -1569,8 +1568,7 @@ export default class Xapi extends XapiBase {
{}
)
const this_ = this
const loop = () => this_.call(
const loop = () => this.call(
'VM.migrate_send',
vm.$ref,
token,