From df134d31cb107d0dbcdf036d3502a23a81b2c029 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Thu, 6 Feb 2020 12:46:32 +0000 Subject: [PATCH] Use babel parser rather than Babylon in extract errors (#17988) --- scripts/error-codes/extract-errors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/error-codes/extract-errors.js b/scripts/error-codes/extract-errors.js index d82b4e68db15f..58823cbe16873 100644 --- a/scripts/error-codes/extract-errors.js +++ b/scripts/error-codes/extract-errors.js @@ -6,7 +6,7 @@ */ 'use strict'; -const babylon = require('babylon'); +const parser = require('@babel/parser'); const fs = require('fs'); const path = require('path'); const traverse = require('@babel/traverse').default; @@ -65,7 +65,7 @@ module.exports = function(opts) { existingErrorMap = invertObject(existingErrorMap); function transform(source) { - const ast = babylon.parse(source, babylonOptions); + const ast = parser.parse(source, babylonOptions); traverse(ast, { CallExpression: {