Upgrade selfhosted compilation to beta.2 (Take 2) (#6382)
* Avoid bug in current version of typeof-symbol transform. * Selfhost Babel on most recent beta release.
This commit is contained in:
parent
5ea54f6cac
commit
93c3c147d6
32
.babelrc.js
32
.babelrc.js
@ -1,5 +1,35 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
// Blame Logan for this.
|
||||||
|
// This works around https://github.com/istanbuljs/istanbuljs/issues/92 until
|
||||||
|
// we have a version of Istanbul that actually works with 7.x.
|
||||||
|
function istanbulHacks() {
|
||||||
|
return {
|
||||||
|
inherits: require("babel-plugin-istanbul").default,
|
||||||
|
visitor: {
|
||||||
|
Program: {
|
||||||
|
exit: function(path) {
|
||||||
|
if (!this.__dv__) return
|
||||||
|
|
||||||
|
const node = path.node.body[0];
|
||||||
|
if (
|
||||||
|
node.type !== "VariableDeclaration" ||
|
||||||
|
node.declarations[0].id.type !== "Identifier" ||
|
||||||
|
!node.declarations[0].id.name.match(/cov_/) ||
|
||||||
|
node._blockHoist !== 3
|
||||||
|
) {
|
||||||
|
throw new Error("Something has gone wrong in Logan's hacks.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gross hacks to put the code coverage block above all compiled
|
||||||
|
// import statement output.
|
||||||
|
node._blockHoist = 5;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
let envOpts = {
|
let envOpts = {
|
||||||
loose: true
|
loose: true
|
||||||
};
|
};
|
||||||
@ -14,7 +44,7 @@ module.exports = {
|
|||||||
env: {
|
env: {
|
||||||
cov: {
|
cov: {
|
||||||
auxiliaryCommentBefore: "istanbul ignore next",
|
auxiliaryCommentBefore: "istanbul ignore next",
|
||||||
plugins: ["istanbul"]
|
plugins: [istanbulHacks]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
12
package.json
12
package.json
@ -11,14 +11,14 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"async": "^1.5.0",
|
"async": "^1.5.0",
|
||||||
"babel-cli": "7.0.0-alpha.18",
|
"babel-cli": "7.0.0-beta.2",
|
||||||
"babel-core": "7.0.0-alpha.18",
|
"babel-core": "7.0.0-beta.2",
|
||||||
"babel-eslint": "8.0.0-alpha.15",
|
"babel-eslint": "8.0.0-alpha.15",
|
||||||
"babel-plugin-istanbul": "^4.1.4",
|
"babel-plugin-istanbul": "^4.1.4",
|
||||||
"babel-preset-env": "2.0.0-alpha.18",
|
"babel-preset-env": "2.0.0-beta.2",
|
||||||
"babel-preset-flow": "7.0.0-alpha.18",
|
"babel-preset-flow": "7.0.0-beta.2",
|
||||||
"babel-preset-stage-0": "7.0.0-alpha.18",
|
"babel-preset-stage-0": "7.0.0-beta.2",
|
||||||
"babel-register": "7.0.0-alpha.18",
|
"babel-register": "7.0.0-beta.2",
|
||||||
"babylon": "7.0.0-beta.27",
|
"babylon": "7.0.0-beta.27",
|
||||||
"browserify": "^13.1.1",
|
"browserify": "^13.1.1",
|
||||||
"bundle-collapser": "^1.2.1",
|
"bundle-collapser": "^1.2.1",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
export default function({ types: t }) {
|
export default function transformReactConstantElement({ types: t }) {
|
||||||
const HOISTED = new WeakSet();
|
const HOISTED = new WeakSet();
|
||||||
|
|
||||||
const immutabilityVisitor = {
|
const immutabilityVisitor = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user