discourse/vendor/assets/javascripts
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
..
highlightjs FIX: highlightjs 10 requires some languages to be loaded before others (#10584) 2020-09-02 21:32:57 +02:00
moment-locale DEV: updates moment.js and moment-timezone.js 2019-04-26 15:00:57 +02:00
moment-timezone-names-locale FEATURE: Add localized timezone names (#7004) 2019-02-25 14:40:02 -05:00
Markdown.Converter.js Ember Upgrade: 1.0 2013-10-01 11:16:27 -04:00
babel.js DEV: updates js transpiler to use babel 7 (#10627) 2020-09-15 09:26:33 +02:00
bootbox.js Add btn-default class to all default buttons (#6521) 2018-10-24 16:09:36 -04:00
bootstrap-modal.js DEV: upgrades bootstrap-modal (#7235) 2019-03-21 14:18:12 +01:00
break_string.js Extract breaking up a string into a separate file, include it in 2014-03-20 14:34:51 -04:00
browser-update.js.erb Improve support for old browsers (#9515) 2020-04-29 21:40:21 +03:00
buffered-proxy.js DEV: upgrades from Ember 2.13 to Ember 3.5.1 (#6808) 2019-01-10 11:06:01 +01:00
caret_position.js DEV: Bump uglifyjs (#7834) 2019-10-09 10:02:49 -03:00
ember-qunit.js FIX: Silence ember-qunit source map warning 2020-07-15 15:35:32 -04:00
fake_xml_http_request.js TESTS: Use Pretender in test mode for more flexible server responses 2014-07-31 16:49:30 -04:00
favcount.js Use Yarn to manage dependencies, cleanup unused bootstrap libs (#6436) 2018-10-03 10:15:43 -04:00
handlebars.js DEV: upgrades vendored handlebars to 4.7.6 (#9371) 2020-04-07 17:01:02 +02:00
handlebars.runtime.js DEV: upgrades vendored handlebars to 4.7.6 (#9371) 2020-04-07 17:01:02 +02:00
i18n-patches.js FIX: Fallback locale was not available for extra translations 2019-05-24 11:38:26 +02:00
intersection-observer.js FEATURE: polyfill intersection observer for IE11 / iOS Safari 2018-12-12 15:36:08 +11:00
jquery.autoellipsis-1.0.10.js Don't pre-minifiy autoellipsis 2017-05-18 15:16:15 -04:00
jquery.ba-resize.js Use unminified resize to make debugging easier 2017-03-22 16:39:18 -04:00
jquery.color.js DEV: updates jquery-color to prevent it to pull old jquery version (#7857) 2019-07-04 15:03:21 +02:00
jquery.fileupload.js DEV: Update jquery.fileupload and dependencies (#9466) 2020-04-28 10:39:29 -04:00
jquery.iframe-transport.js DEV: Update jquery.fileupload and dependencies (#9466) 2020-04-28 10:39:29 -04:00
jquery.js SECURITY: updates juqery to 3.5.0 (#9708) 2020-05-08 21:12:04 +02:00
jquery.sortable.js work in progress sortable categories 2013-10-21 15:25:20 +11:00
jquery.tagsinput.js Use Yarn to manage dependencies, cleanup unused bootstrap libs (#6436) 2018-10-03 10:15:43 -04:00
jquery.ui.widget.js DEV: Update jquery.fileupload and dependencies (#9466) 2020-04-28 10:39:29 -04:00
lodash.js DEV: lodash is actually on 4.17.15 (#8378) 2019-11-20 11:16:09 +01:00
markdown-it.js DEV: Update markdown-it from 8.4.1 to 10.0.0 (#8164) 2019-10-08 13:00:22 +02:00
moment-timezone-with-data.js DEV: Use moment-timezone with 10-year range data 2019-05-07 23:42:49 -04:00
moment.js DEV: updates moment.js and moment-timezone.js 2019-04-26 15:00:57 +02:00
mousetrap-global-bind.js Update javascripts (#9907) 2020-05-28 12:15:13 -04:00
mousetrap.js Update javascripts (#9907) 2020-05-28 12:15:13 -04:00
popper.js DEV: popperjs 2.0.6 (#9171) 2020-03-11 10:34:58 +01:00
resumable.js Use Yarn to manage dependencies, cleanup unused bootstrap libs (#6436) 2018-10-03 10:15:43 -04:00
route-recognizer.js FIX: Silence route-recognizer source map errors in development mode 2020-07-15 15:42:04 -04:00
rsvp.js Ember Upgrade: 1.0 2013-10-01 11:16:27 -04:00
show-html.js Ember Upgrade: 1.0 2013-10-01 11:16:27 -04:00
sweetalert.js Javascript file was missing 2016-09-22 09:52:19 -04:00
virtual-dom-amd.js FEATURE: Use virtual dom framework for faster post rendering 2016-02-11 11:00:40 -05:00
virtual-dom.js FEATURE: Use virtual dom framework for faster post rendering 2016-02-11 11:00:40 -05:00
xss.min.js REFACTOR: PreloadStore to ES6 2016-07-11 12:57:05 -04:00