From 8ec9de5de7cafb2adb19ea672c6e8211f166a882 Mon Sep 17 00:00:00 2001 From: Markus Blomqvist Date: Tue, 14 Nov 2023 23:27:27 +0200 Subject: [PATCH] Update prettier import syntax (#104) This fix imports all named prettier exports as a single module according to the prettier API documentation: https://prettier.io/docs/en/api.html This is a potential fix for a module resolution issue that causes a crash in some environments where the default import causes "module" not being found. --- packages/next-rest-framework/src/utils/open-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next-rest-framework/src/utils/open-api.ts b/packages/next-rest-framework/src/utils/open-api.ts index 0ca9bc7..03cd34e 100644 --- a/packages/next-rest-framework/src/utils/open-api.ts +++ b/packages/next-rest-framework/src/utils/open-api.ts @@ -15,7 +15,7 @@ import { merge, isEqualWith } from 'lodash'; import { getJsonSchema, getSchemaKeys } from './schemas'; import { existsSync, readdirSync, readFileSync, writeFileSync } from 'fs'; import chalk from 'chalk'; -import prettier from 'prettier'; +import * as prettier from 'prettier'; // Traverse the base path and find all nested files. export const getNestedFiles = (basePath: string, dir: string): string[] => {