@samitouri / QOS-React-2 / commits / df134d31cb

Use babel parser rather than Babylon in extract errors (#17988)

Dominic Gannaway committed Feb 6, 2020 at 12:46 UTC df134d31cb107d0dbcdf036d3502a23a81b2c029
1 file changed +2 -2
scripts/error-codes/extract-errors.js
+2 -2
@@ -6,7 +6,7 @@
6 */
7 'use strict';
8
9 -const babylon = require('babylon');
9 +const parser = require('@babel/parser');
10 const fs = require('fs');
11 const path = require('path');
12 const traverse = require('@babel/traverse').default;
@@ -65,7 +65,7 @@ module.exports = function(opts) {
65 existingErrorMap = invertObject(existingErrorMap);
66
67 function transform(source) {
68 - const ast = babylon.parse(source, babylonOptions);
68 + const ast = parser.parse(source, babylonOptions);
69
70 traverse(ast, {
71 CallExpression: {