Skip to content

Commit 4bca1e1

Browse files
layershifterlencioni
authored andcommitted
chore(package): update Babel 7 (#155)
* chore(package): update Babel 7 * fix broken tests * fix deps
1 parent 7c17eb2 commit 4bca1e1

File tree

31 files changed

+3076
-3098
lines changed

31 files changed

+3076
-3098
lines changed

.babelrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010
}
1111
],
1212
"@babel/preset-react",
13-
"@babel/preset-flow",
14-
"@babel/preset-stage-1"
13+
"@babel/preset-flow"
14+
],
15+
"plugins": [
16+
"@babel/plugin-proposal-class-properties",
17+
"@babel/plugin-proposal-do-expressions",
18+
"@babel/plugin-proposal-export-default-from",
19+
"@babel/plugin-proposal-logical-assignment-operators",
20+
["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }],
21+
["@babel/plugin-proposal-optional-chaining", { "loose": false }],
22+
["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }]
1523
]
1624
}

package-lock.json

Lines changed: 2994 additions & 2984 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,24 @@
3131
"url": "https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types/issues"
3232
},
3333
"devDependencies": {
34-
"@babel/cli": "7.0.0-beta.42",
35-
"@babel/core": "7.0.0-beta.42",
36-
"@babel/generator": "7.0.0-beta.42",
37-
"@babel/plugin-external-helpers": "7.0.0-beta.42",
38-
"@babel/plugin-proposal-class-properties": "7.0.0-beta.42",
39-
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-rc.1",
40-
"@babel/plugin-transform-flow-strip-types": "7.0.0-beta.42",
41-
"@babel/preset-env": "7.0.0-beta.42",
42-
"@babel/preset-flow": "7.0.0-beta.42",
43-
"@babel/preset-react": "7.0.0-beta.42",
44-
"@babel/preset-stage-1": "7.0.0-beta.42",
45-
"@babel/register": "7.0.0-beta.42",
46-
"babel-eslint": "^8.0.2",
34+
"@babel/cli": "^7.0.0",
35+
"@babel/core": "^7.0.0",
36+
"@babel/generator": "^7.0.0",
37+
"@babel/plugin-external-helpers": "^7.0.0",
38+
"@babel/plugin-proposal-class-properties": "^7.0.0",
39+
"@babel/plugin-proposal-do-expressions": "^7.0.0",
40+
"@babel/plugin-proposal-export-default-from": "^7.0.0",
41+
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
42+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
43+
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
44+
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
45+
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
46+
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
47+
"@babel/preset-env": "^7.0.0",
48+
"@babel/preset-flow": "^7.0.0",
49+
"@babel/preset-react": "^7.0.0",
50+
"@babel/register": "^7.0.0",
51+
"babel-eslint": "^9.0.0",
4752
"babel-plugin-flow-react-proptypes": "^6.1.0",
4853
"chai": "^4.1.2",
4954
"eslint": "^4.11.0",

test/fixtures/additional-libraries/expected-remove-es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function (_Component) {
1616
var _this;
1717

1818
babelHelpers.classCallCheck(this, Greeting);
19-
_this = babelHelpers.possibleConstructorReturn(this, (Greeting.__proto__ || Object.getPrototypeOf(Greeting)).call(this, props, context));
19+
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Greeting).call(this, props, context));
2020
var appName = context.store.getState().appName;
2121
_this.state = {
2222
appName: appName

test/fixtures/class-comment-annotation/expected-remove-es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function (_ParentComponent) {
1818

1919
function Foo() {
2020
babelHelpers.classCallCheck(this, Foo);
21-
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
21+
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).apply(this, arguments));
2222
}
2323

2424
babelHelpers.createClass(Foo, [{

test/fixtures/class-name-matchers-no-match/expected-wrap-es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function (_BaseComponent) {
99

1010
function Foo() {
1111
babelHelpers.classCallCheck(this, Foo);
12-
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
12+
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).apply(this, arguments));
1313
}
1414

1515
babelHelpers.createClass(Foo, [{

test/fixtures/class-name-matchers/expected-wrap-es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function (_BaseComponent) {
99

1010
function Foo() {
1111
babelHelpers.classCallCheck(this, Foo);
12-
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
12+
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).apply(this, arguments));
1313
}
1414

1515
babelHelpers.createClass(Foo, [{

test/fixtures/dont-remove-used-import/expected-remove-es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function (_Component) {
1818
var _this;
1919

2020
babelHelpers.classCallCheck(this, Greeting);
21-
_this = babelHelpers.possibleConstructorReturn(this, (Greeting.__proto__ || Object.getPrototypeOf(Greeting)).call(this, props, context));
21+
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Greeting).call(this, props, context));
2222
var appName = context.store.getState().appName;
2323
_this.state = {
2424
appName: appName

test/fixtures/es-class-assign-property-variable-export/expected-remove-es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function (_React$Component) {
1616

1717
function Foo() {
1818
babelHelpers.classCallCheck(this, Foo);
19-
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
19+
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).apply(this, arguments));
2020
}
2121

2222
babelHelpers.createClass(Foo, [{

test/fixtures/es-class-assign-property-variable-export/expected-wrap-es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function (_React$Component) {
1616

1717
function Foo() {
1818
babelHelpers.classCallCheck(this, Foo);
19-
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
19+
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).apply(this, arguments));
2020
}
2121

2222
babelHelpers.createClass(Foo, [{

0 commit comments

Comments
 (0)