remove es20xx prefixes from plugins and rename folders (#6575)

This commit is contained in:
Henry Zhu
2017-10-28 20:43:15 -04:00
committed by GitHub
parent 92a3caeb9c
commit 9ac326b075
1672 changed files with 1200 additions and 1203 deletions

View File

@@ -0,0 +1,23 @@
var foo = function () {};
assert.equal(foo.name, "foo");
var obj = { foo: function () {} };
assert.equal(obj.foo.name, "foo");
var obj = { "foo": function () {} };
assert.equal(obj.foo.name, "foo");
var obj = { foo() {} };
assert.equal(obj.foo.name, "foo");
var obj = { "foo"() {} };
assert.equal(obj.foo.name, "foo");
function noop() {}
var obj = { @noop foo() {} };
assert.equal(obj.foo.name, "foo");
var obj = { @noop foo: function () { return "foo"; } };
assert.equal(obj.foo.name, "foo");

View File

@@ -0,0 +1,3 @@
{
"plugins": ["proposal-decorators"]
}

View File

@@ -0,0 +1,9 @@
var i = function () {
i = 5;
};
var j = function () {
({ j } = 5);
({ y: j } = 5);
;
};

View File

@@ -0,0 +1,13 @@
var _i = function i() {
_i = 5;
};
var _j = function j() {
({
j: _j
} = 5);
({
y: _j
} = 5);
;
};

View File

@@ -0,0 +1,3 @@
export {};
var obj = { await: function () {} };

View File

@@ -0,0 +1,4 @@
export {};
var obj = {
await: function _await() {}
};

View File

@@ -0,0 +1,3 @@
var g = function () {
doSmth();
};

View File

@@ -0,0 +1,3 @@
var g = function g() {
doSmth();
};

View File

@@ -0,0 +1,5 @@
class Foo {
t(t) {
return t;
}
}

View File

@@ -0,0 +1,15 @@
let Foo =
/*#__PURE__*/
function () {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
}
babelHelpers.createClass(Foo, [{
key: "t",
value: function t(_t) {
return _t;
}
}]);
return Foo;
}();

View File

@@ -0,0 +1,9 @@
var obj = {
search: function({search}) {
console.log(search);
}
};
function search({search}) {
console.log(search);
}

View File

@@ -0,0 +1,13 @@
var obj = {
search: function search({
search: _search
}) {
console.log(_search);
}
};
function search({
search
}) {
console.log(search);
}

View File

@@ -0,0 +1,5 @@
var a = {
eval: function () {
return eval;
}
};

View File

@@ -0,0 +1,5 @@
var a = {
eval: function _eval() {
return eval;
}
};

View File

@@ -0,0 +1,3 @@
export default () => ({
x: ({x}) => {}
})

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = function _default() {
return {
x: function x(_ref) {
var _x = _ref.x;
}
};
};
exports.default = _default;

View File

@@ -0,0 +1,4 @@
export default ({ onClick }) => (
<div onClick={() => onClick()} />
)

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = function _default(_ref) {
var _onClick = _ref.onClick;
return React.createElement("div", {
onClick: function onClick() {
return _onClick();
}
});
};
exports.default = _default;

View File

@@ -0,0 +1,3 @@
{
"presets": ["es2015", "react"]
}

View File

@@ -0,0 +1,3 @@
export default (a) => {
return { a() { return a } };
}

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _default = function _default(_a) {
return {
a: function a() {
return _a;
}
};
};
exports["default"] = _default;

View File

@@ -0,0 +1,7 @@
{
"presets": ["es2015"],
"plugins": [
"transform-member-expression-literals",
"transform-property-literals"
]
}

View File

@@ -0,0 +1,3 @@
export default (a) => {
return { a() { return a } };
}

View File

@@ -0,0 +1,18 @@
define(["exports"], function (_exports) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
var _default = function _default(_a) {
return {
a: function a() {
return _a;
}
};
};
_exports.default = _default;
});

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-function-name", "transform-shorthand-properties", "transform-arrow-functions", "transform-modules-amd"]
}

View File

@@ -0,0 +1,3 @@
export default (a) => {
return { a() { return a } };
}

View File

@@ -0,0 +1,7 @@
export default (function (_a) {
return {
a: function a() {
return _a;
}
};
});

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-function-name", "transform-shorthand-properties", "transform-arrow-functions"]
}

View File

@@ -0,0 +1,3 @@
export default (a) => {
return { a() { return a } };
}

View File

@@ -0,0 +1,16 @@
System.register([], function (_export, _context) {
"use strict";
return {
setters: [],
execute: function () {
_export("default", function (_a) {
return {
a: function a() {
return _a;
}
};
});
}
};
});

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-function-name", "transform-shorthand-properties", "transform-arrow-functions", "transform-modules-systemjs"]
}

View File

@@ -0,0 +1,3 @@
export default (a) => {
return { a() { return a } };
}

View File

@@ -0,0 +1,30 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.actual = mod.exports;
}
})(this, function (_exports) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
var _default = function _default(_a) {
return {
a: function a() {
return _a;
}
};
};
_exports.default = _default;
});

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-function-name", "transform-shorthand-properties", "transform-arrow-functions", "transform-modules-umd"]
}

View File

@@ -0,0 +1,3 @@
export default (a) => {
return { a() { return a } };
}

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = function _default(_a) {
return {
a: function a() {
return _a;
}
};
};
exports.default = _default;

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-function-name", "transform-shorthand-properties", "transform-arrow-functions", "transform-modules-commonjs"]
}

View File

@@ -0,0 +1,19 @@
export var foo = "yes", foob = "no";
export function whatever() {}
export default function wowzers() {}
var bar = {
foo: function () {
foo;
},
whatever: function () {
whatever;
},
wowzers: function () {
wowzers;
}
};

View File

@@ -0,0 +1,21 @@
export { _whatever as whatever };
export { _wowzers as default };
var _foo = "yes",
foob = "no";
export { _foo as foo, foob };
function _whatever() {}
function _wowzers() {}
var bar = {
foo: function foo() {
_foo;
},
whatever: function whatever() {
_whatever;
},
wowzers: function wowzers() {
_wowzers;
}
};

View File

@@ -0,0 +1,13 @@
var foo;
foo = function() {
};
var baz;
baz = function() {
baz();
};
baz = 12;
bar = function() {
bar();
};

View File

@@ -0,0 +1,25 @@
var foo;
foo = function foo() {};
var _baz;
_baz = function baz() {
_baz();
};
_baz = 12;
bar = function (_bar) {
function bar() {
return _bar.apply(this, arguments);
}
bar.toString = function () {
return _bar.toString();
};
return bar;
}(function () {
bar();
});

View File

@@ -0,0 +1,23 @@
function f() {
f;
}
{
let obj = {
f: function () {
f;
}
};
}
(function b() {
var obj = {
b: function () {
b;
}
};
function commit(b) {
b();
}
});

View File

@@ -0,0 +1,23 @@
function _f() {
_f;
}
{
let obj = {
f: function f() {
_f;
}
};
}
(function _b() {
var obj = {
b: function b() {
_b;
}
};
function commit(b) {
b();
}
});

View File

@@ -0,0 +1,5 @@
var test = {
setInterval: function(fn, ms) {
setInterval(fn, ms);
}
};

View File

@@ -0,0 +1,15 @@
var test = {
setInterval: function (_setInterval) {
function setInterval(_x, _x2) {
return _setInterval.apply(this, arguments);
}
setInterval.toString = function () {
return _setInterval.toString();
};
return setInterval;
}(function (fn, ms) {
setInterval(fn, ms);
})
};

View File

@@ -0,0 +1,11 @@
import last from "lodash/last"
export default class Container {
last(key) {
if (!this.has(key)) {
return;
}
return last(this.tokens.get(key))
}
}

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _last2 = babelHelpers.interopRequireDefault(require("lodash/last"));
let Container =
/*#__PURE__*/
function () {
function Container() {
babelHelpers.classCallCheck(this, Container);
}
babelHelpers.createClass(Container, [{
key: "last",
value: function last(key) {
if (!this.has(key)) {
return;
}
return (0, _last2.default)(this.tokens.get(key));
}
}]);
return Container;
}();
exports.default = Container;

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-function-name", "transform-classes", "proposal-decorators", "transform-modules-commonjs"]
}

View File

@@ -0,0 +1,7 @@
import {getForm} from "./store"
export default class Login extends React.Component {
getForm() {
return getForm().toJS()
}
}

View File

@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _store = require("./store");
let Login =
/*#__PURE__*/
function (_React$Component) {
babelHelpers.inherits(Login, _React$Component);
function Login() {
babelHelpers.classCallCheck(this, Login);
return babelHelpers.possibleConstructorReturn(this, (Login.__proto__ || Object.getPrototypeOf(Login)).apply(this, arguments));
}
babelHelpers.createClass(Login, [{
key: "getForm",
value: function getForm() {
return (0, _store.getForm)().toJS();
}
}]);
return Login;
}(React.Component);
exports.default = Login;

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-function-name", "transform-modules-commonjs", "transform-classes", "proposal-decorators"]
}

View File

@@ -0,0 +1,9 @@
export function foo(bar) {
}
var bar = {
foo: function () {
foo;
}
};

View File

@@ -0,0 +1,9 @@
export { _foo as foo };
function _foo(bar) {}
var bar = {
foo: function foo() {
_foo;
}
};

View File

@@ -0,0 +1,9 @@
import events from "events";
class Template {
events() {
return events;
}
}
console.log(new Template().events());

View File

@@ -0,0 +1,21 @@
"use strict";
var _events2 = babelHelpers.interopRequireDefault(require("events"));
let Template =
/*#__PURE__*/
function () {
function Template() {
babelHelpers.classCallCheck(this, Template);
}
babelHelpers.createClass(Template, [{
key: "events",
value: function events() {
return _events2.default;
}
}]);
return Template;
}();
console.log(new Template().events());

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-function-name", "transform-modules-commonjs", "transform-classes", "proposal-decorators"]
}

View File

@@ -0,0 +1,15 @@
var obj = {
f: function () {
(function f() {
console.log(f);
})();
},
h: function () {
console.log(h);
},
m: function () {
doSmth();
}
};

View File

@@ -0,0 +1,23 @@
var obj = {
f: function f() {
(function f() {
console.log(f);
})();
},
h: function (_h) {
function h() {
return _h.apply(this, arguments);
}
h.toString = function () {
return _h.toString();
};
return h;
}(function () {
console.log(h);
}),
m: function m() {
doSmth();
}
};

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-function-name", "transform-classes", "proposal-decorators"]
}

View File

@@ -0,0 +1,13 @@
var f = function () {
var f = 2;
};
var g = function (g) {
g;
};
var obj = {
f: function (f) {
f;
}
};

View File

@@ -0,0 +1,13 @@
var f = function f() {
var f = 2;
};
var g = function g(_g) {
_g;
};
var obj = {
f: function f(_f) {
_f;
}
};

View File

@@ -0,0 +1,5 @@
var f = function () {
console.log(f, g);
};
f = null;

View File

@@ -0,0 +1,5 @@
var _f = function f() {
console.log(_f, g);
};
_f = null;

View File

@@ -0,0 +1,20 @@
var Utils = {
get: function() {}
};
var { get } = Utils;
var bar = {
get: function(arg) {
get(arg, "baz");
}
};
var f = function ({ foo = "bar" }) {
var obj = {
// same name as parameter
foo: function () {
foo;
}
};
};

View File

@@ -0,0 +1,22 @@
var Utils = {
get: function get() {}
};
var {
get: _get
} = Utils;
var bar = {
get: function get(arg) {
_get(arg, "baz");
}
};
var f = function f({
foo: _foo = "bar"
}) {
var obj = {
// same name as parameter
foo: function foo() {
_foo;
}
};
};

View File

@@ -0,0 +1,4 @@
// These are actually handled by transform-arrow-functions
const x = () => x;
const y = x => x();
const z = { z: () => y(x) }.z;

View File

@@ -0,0 +1,19 @@
var _this = this;
// These are actually handled by transform-arrow-functions
const x = function x() {
babelHelpers.newArrowCheck(this, _this);
return x;
}.bind(this);
const y = function y(x) {
babelHelpers.newArrowCheck(this, _this);
return x();
}.bind(this);
const z = {
z: function z() {
babelHelpers.newArrowCheck(this, _this);
return y(x);
}.bind(this)
}.z;

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-function-name", [ "transform-arrow-functions", { "spec": true } ]]
}

View File

@@ -0,0 +1,3 @@
const x = () => x;
const y = x => x();
const z = { z: () => y(x) }.z;

View File

@@ -0,0 +1,13 @@
const x = function x() {
return x;
};
const y = function y(x) {
return x();
};
const z = {
z: function z() {
return y(x);
}
}.z;

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-function-name", "transform-arrow-functions"]
}