From c786b6d16683c843699aba6c67e15afde94e4a95 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kaiser Date: Wed, 20 Nov 2024 10:00:03 +0100 Subject: [PATCH] source-loader: Fix parser imports from prettier --- .../src/abstract-syntax-tree/parsers/parser-flow.js | 2 +- .../source-loader/src/abstract-syntax-tree/parsers/parser-js.js | 2 +- .../source-loader/src/abstract-syntax-tree/parsers/parser-ts.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-flow.js b/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-flow.js index 76529ba96433..220b09d87fd4 100644 --- a/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-flow.js +++ b/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-flow.js @@ -1,4 +1,4 @@ -import parseFlow from 'prettier/plugins/flow'; +import * as parseFlow from 'prettier/plugins/flow'; function parse(source) { return parseFlow.parsers.flow.parse(source); diff --git a/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-js.js b/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-js.js index 28b34aca1072..325c50d1a188 100644 --- a/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-js.js +++ b/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-js.js @@ -1,4 +1,4 @@ -import parseJs from 'prettier/plugins/babel'; +import * as parseJs from 'prettier/plugins/babel'; function parse(source) { try { diff --git a/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-ts.js b/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-ts.js index 71e2870f59cf..22ff9af14a11 100644 --- a/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-ts.js +++ b/code/lib/source-loader/src/abstract-syntax-tree/parsers/parser-ts.js @@ -1,4 +1,4 @@ -import parseTs from 'prettier/plugins/typescript'; +import * as parseTs from 'prettier/plugins/typescript'; function parse(source) { try {