Merge pull request #28308 from backstage/rugvip/modules

cli: add support for native ESM in Node.js packages
This commit is contained in:
Patrik Oldsberg
2025-01-16 14:07:54 +01:00
committed by GitHub
96 changed files with 1810 additions and 216 deletions
+2 -3
View File
@@ -183,9 +183,8 @@ async function compileTsSchemas(
// Lazy loaded, because this brings up all of TypeScript and we don't
// want that eagerly loaded in tests
const { getProgramFromFiles, buildGenerator } = await import(
'typescript-json-schema'
);
const { getProgramFromFiles, buildGenerator } =
require('typescript-json-schema') as typeof import('typescript-json-schema');
const program = getProgramFromFiles(
entries.map(({ path }) => path),