DEV: updates js transpiler to use babel 7 (PR #10627)

This commit does the following:

  • updates our vendored standalone babel to 7.11.6
  • updates various transforms/proposals/plugins (we were using the -es2015- versions, babel 7 bring new ones
  • drops transform-es2015-classes (and does not use transform-classes), this shouldn’t be needed since we dropped IE11
  • drops check-es2015-constants ((and does not use check-constants), this shouldn’t be needed since we dropped IE11
  • adds proposal-optional-chaining to allow for let foo = {}; console.log(foo?.bar); syntax

GitHub

The backend error seems legit and related: https://github.com/discourse/discourse/pull/10627/checks?check_run_id=1085914427

Will investigate.

The title of this pull request changed from “DEV: updates js transpiler” to "DEV: updates js transpiler to use babel 7