Joffrey JAFFEUX
bbddce4d3a
DEV: updates js transpiler to use babel 7 (#10627)
Updates our js transpiler code to use Babel 7.11.6
List of changes in this commit:
- Updates plugins, babel plugins all have a new version which doesn't contain -es2015- anymore
- Drops [transform-es2015-classes](https://babeljs.io/docs/en/babel-plugin-transform-classes) this plugin shouldn't be needed now that we don't support IE
- Drops check-es2015-constants, checking constants is now part of babel and the check-constants plugin is deprecated. As a result the behavior slightly changed, and is now wrapping every const call in a readOnlyError function which would throw if assigned a new value. This explains the modified spec.
- Adds [proposal-optional-chaining](https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining)
```javascript
const obj = {
foo: {
bar: {
baz: 42,
},
},
};
const baz = obj?.foo?.bar?.baz; // 42
```
- Adds [proposal-json-strings](https://babeljs.io/docs/en/babel-plugin-proposal-json-strings)
```javascript
// IN
const ex = "before
after";
// ^ There's a U+2028 char between 'before' and 'after'
// OUT
const ex = "before\u2028after";
// ^ There's a U+2028 char between 'before' and 'after'
```
- Adds [proposal-nullish-coalescing-operator](https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator)
```javascript
var object = {};
var foo = object.foo ?? "default"; // default
```
- Adds [proposal-logical-assignment-operators](https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators)
```javascript
let a;
let b = 2;
a ||= b; // 2
```
- Adds [proposal-numeric-separator](https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator)
```javascript
let budget = 1_000_000_000_000;
console.log(budget === 10 ** 12); // true
```
- Adds proposal-object-rest-spread https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread
```javascript
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
console.log(x); // 1
console.log(y); // 2
console.log(z); // { a: 3, b: 4 }
```
- Adds proposal-optional-catch-binding https://babeljs.io/docs/en/babel-plugin-proposal-optional-catch-binding
```javascript
try {
} catch {
} finally {
// ensures finally is available in every browsers
}
```
- Adds improved regex support for firefox through (transform-dotall-regex](https://babeljs.io/docs/en/next/babel-plugin-transform-dotall-regex.html) and (proposal-unicode-property-regex](https://babeljs.io/docs/en/babel-plugin-proposal-unicode-property-regex)
- Drops async/generator stuff, the browser we target should allow to use this (excepts iterable async)
2020-09-15 09:26:33 +02:00
..
2019-10-03 21:48:56 +03:00
2020-03-06 09:35:55 -05:00
2020-07-16 15:51:24 -03:00
2020-05-18 17:27:37 +08:00
2020-04-28 14:34:41 -04:00
2019-10-02 14:01:53 +10:00
2019-11-18 12:28:35 +05:30
2019-04-30 10:27:42 +10:00
2020-07-24 10:11:30 +08:00
2020-07-14 12:36:19 -04:00
2019-10-02 14:01:53 +10:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2020-08-28 10:36:52 -04:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2019-10-04 11:11:03 +10:00
2020-04-28 16:06:35 +10:00
2020-05-15 10:40:36 +08:00
2020-05-26 10:07:09 +10:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2020-06-09 20:49:32 +05:30
2020-07-27 10:23:54 +10:00
2019-08-07 11:38:58 +02:00
2019-05-07 13:12:20 +10:00
2020-06-15 15:47:07 +08:00
2019-05-07 13:12:20 +10:00
2020-09-11 08:20:13 +05:30
2020-09-10 11:34:48 +02:00
2019-05-07 13:12:20 +10:00
2019-05-07 13:12:20 +10:00
2020-06-15 14:44:35 +05:30
2020-07-27 10:23:54 +10:00
2019-05-07 13:12:20 +10:00
2019-06-03 12:42:29 +10:00
2019-04-30 10:27:42 +10:00
2020-08-19 12:07:51 +02:00
2020-08-04 16:29:41 +10:00
2020-06-18 11:32:14 +03:00
2019-10-02 14:01:53 +10:00
2020-07-24 17:19:21 +08:00
2019-04-30 10:27:42 +10:00
2020-08-07 12:08:59 -04:00
2019-04-30 10:27:42 +10:00
2020-03-31 16:19:47 +11:00
2019-04-30 10:27:42 +10:00
2019-12-06 13:00:28 +11:00
2020-09-10 12:59:51 -03:00
2020-09-09 14:05:41 +08:00
2019-04-30 10:27:42 +10:00
2020-04-08 12:52:36 -04:00
2020-03-10 22:13:17 +01:00
2020-08-18 13:02:13 -04:00
2020-06-10 18:57:39 +03:00
2020-01-09 12:32:05 -05:00
2020-03-24 14:57:44 -07:00
2019-05-07 13:12:20 +10:00
2020-08-10 16:14:15 -06:00
2020-01-02 13:24:24 -03:00
2020-07-14 12:36:19 -04:00
2020-07-24 17:19:21 +08:00
2019-04-30 10:27:42 +10:00
2020-04-24 14:09:51 +10:00
2020-07-27 10:23:54 +10:00
2019-04-30 10:27:42 +10:00
2019-12-03 10:05:53 +01:00
2020-07-27 10:23:54 +10:00
2020-08-28 10:36:52 -04:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2020-03-13 12:25:58 -04:00
2020-08-19 12:17:49 -04:00
2019-12-04 13:33:51 -05:00
2020-09-15 09:26:33 +02:00
2020-03-12 16:35:28 +00:00
2020-09-15 09:26:33 +02:00
2019-04-30 10:27:42 +10:00
2019-11-26 16:39:14 +11:00
2019-04-30 10:27:42 +10:00
2020-04-03 16:42:01 +01:00
2020-07-27 10:23:54 +10:00
2019-04-30 10:27:42 +10:00
2019-12-12 13:10:46 -05:00
2019-04-30 10:27:42 +10:00
2020-07-27 10:23:54 +10:00
2020-05-13 16:05:57 +10:00
2020-09-11 16:26:38 +08:00
2019-11-18 09:43:14 -05:00
2019-05-07 13:12:20 +10:00
2020-09-14 12:07:35 +01:00
2019-05-07 13:12:20 +10:00
2020-08-13 17:08:32 -06:00
2020-09-14 11:11:55 +10:00
2020-08-12 15:56:06 +10:00
2020-01-23 16:37:48 +01:00
2019-04-30 10:27:42 +10:00
2020-05-18 18:51:51 +02:00
2020-04-17 17:24:14 +01:00
2019-10-02 14:01:53 +10:00
2020-09-15 13:29:35 +08:00
2020-03-10 22:13:17 +01:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2020-03-10 22:13:17 +01:00
2020-04-08 07:35:42 +10:00
2020-01-14 14:26:49 +00:00
2020-07-16 18:21:30 +05:30
2019-07-25 19:41:25 +05:30
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2020-08-14 19:10:56 +05:30
2020-09-10 12:59:51 -03:00
2019-05-07 13:12:20 +10:00
2019-10-28 11:01:47 +00:00
2019-04-30 10:27:42 +10:00
2020-08-20 00:35:04 +05:30
2020-09-09 14:05:41 +08:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2020-07-27 10:23:54 +10:00
2020-03-10 22:13:17 +01:00
2019-12-03 10:05:53 +01:00
2019-04-30 10:27:42 +10:00
2020-04-08 14:38:30 -07:00