Skip to content

Commit

Permalink
fix: correctly identify imports with resolution-mode (#582)
Browse files Browse the repository at this point in the history
Used fix provided by @jer-sen
  • Loading branch information
FoxxMD committed Apr 3, 2024
1 parent 264ab45 commit 41dc2ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typescript-json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export { Program, CompilerOptions, Symbol } from "typescript";

const vm = require("vm");

const REGEX_FILE_NAME_OR_SPACE = /(\bimport\(".*?"\)|".*?")\.| /g;
const REGEX_FILE_NAME_OR_SPACE = /(\bimport\(".*?"(, \{ assert: \{ "resolution-mode": "(import|require)" \} \})?\)|".*?")\.| /g;
const REGEX_TSCONFIG_NAME = /^.*\.json$/;
const REGEX_TJS_JSDOC = /^-([\w]+)\s+(\S|\S[\s\S]*\S)\s*$/g;
const REGEX_GROUP_JSDOC = /^[.]?([\w]+)\s+(\S|\S[\s\S]*\S)\s*$/g;
Expand Down

0 comments on commit 41dc2ba

Please sign in to comment.