Upgrade to Babel 7 (#1595)

* Upgrade to Babel 7

* Update dependencies

* Remove `modules` and `useEsModules` as module support is automatically detected

Target browsers supporting ESM in the ESM build.

* Disable corejs aliasing (polyfill)

* Fix package.json and update lockfile

* Bump CircleCI cache version

* Remove `Object.values()` use for Node 6 compatability

* Remove redundant arguments to @babel/register

* Update rollup and rollup-plugin-babel

* Add ignore option to no-transform-runtime-aliasing

Ignore JSON.stringify, parseInt, and ParseFloat

* Upgrade babel-loader to 8.0.1

* Use api.env() in Babel configuration

* Upgrade babel-loader to 8.0.2
This commit is contained in:
ylemkimon
2018-09-04 06:19:12 +09:00
committed by Kevin Barabash
parent 010dc88029
commit 4178639ea5
11 changed files with 1007 additions and 589 deletions

View File

@@ -10,7 +10,6 @@
* - allow users to specify a different string or strings
* - provide a way to test the performance against different branches
*/
require('babel-register');
const Benchmark = require('benchmark');
const yaml = require('js-yaml');
const fs = require('fs');
@@ -20,6 +19,7 @@ const filename = path.resolve(__dirname, 'screenshotter/ss_data.yaml');
const data = yaml.load(fs.readFileSync(filename, 'utf-8'));
console.log('compiling katex...');
require('@babel/register');
const katex = require('../katex').default;
console.log('');

View File

@@ -110,7 +110,7 @@ describe("unicodeScripts", () => {
const scriptNames = Object.keys(scriptRegExps);
const allRegExp = new RegExp(
Object.values(scriptRegExps).map(re => re.source).join('|')
scriptNames.map(script => scriptRegExps[script].source).join('|')
);
it("supportedCodepoint() should return the correct values", () => {