From 711dcec3a1f4d6bbc17b27f49022e08b2b640ec0 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Mon, 15 Apr 2024 20:09:42 -0400 Subject: [PATCH 1/6] chore: update to eslint9 --- .editorconfig | 23 -- .eslintignore | 3 - .eslintrc.js | 41 ---- .vscode/settings.json | 8 +- babel.config.js => babel.config.,js | 0 eslint.config.js | 78 ++++++ jest.config.js => jest.config.cjs | 5 +- package.json | 18 +- src/NodeParser/CallExpressionParser.ts | 2 +- src/NodeParser/IntersectionNodeParser.ts | 4 +- src/NodeParser/MappedTypeNodeParser.ts | 1 - src/NodeParser/TypeLiteralNodeParser.ts | 2 +- src/NodeParser/TypeReferenceNodeParser.ts | 2 +- src/Utils/allOfDefinition.ts | 2 +- src/Utils/isAssignableTo.ts | 2 +- test/sourceless-nodes/index.test.ts | 2 +- test/utils.ts | 1 + test/valid-data/annotation-comment/main.ts | 3 +- tsconfig.json | 2 +- yarn.lock | 267 ++++++++++----------- 20 files changed, 236 insertions(+), 230 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js rename babel.config.js => babel.config.,js (100%) create mode 100644 eslint.config.js rename jest.config.js => jest.config.cjs (81%) diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 465b7e221..000000000 --- a/.editorconfig +++ /dev/null @@ -1,23 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.ts] -indent_style = space -indent_size = 4 - -[*.json] -indent_style = space -indent_size = 4 - -[test/**/schema.json] -indent_style = space -indent_size = 2 - -[{package.json,azure-pipelines.yml}] -indent_style = space -indent_size = 2 diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index cf3c9cc23..000000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -test/valid-data -test/invalid-data -test/config diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index bd8502a5f..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - parser: "@typescript-eslint/parser", - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], - env: { - browser: true, - node: true, - }, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - rules: { - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/no-parameter-properties": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { - vars: "all", - args: "none", - ignoreRestSiblings: true, - }, - ], - "@typescript-eslint/no-object-literal-type-assertion": "off", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-assertion": "off", - "max-len": ["error", { code: 120, tabWidth: 4 }], - "no-alert": "error", - "prefer-const": "error", - "no-return-assign": "error", - "no-useless-call": "error", - "no-shadow": "error", - "no-useless-concat": "error", - "no-undef": "off", - "no-prototype-builtins": "off", - "prettier/prettier": "error", - }, -}; diff --git a/.vscode/settings.json b/.vscode/settings.json index b568d7614..48030f7da 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,17 +1,17 @@ // Place your settings in this file to overwrite default and user settings. { "search.exclude": { - "dist": true, - "bin": true + "dist": true }, "files.trimTrailingWhitespace": true, "typescript.tsdk": "node_modules/typescript/lib", "files.insertFinalNewline": true, - "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], + "eslint.validate": ["javascript", "javascriptreact", "typescript"], "editor.tabSize": 4, "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, - "jest.autoRun": "off" + "eslint.experimental.useFlatConfig": true, + "jest.runMode": "on-demand" } diff --git a/babel.config.js b/babel.config.,js similarity index 100% rename from babel.config.js rename to babel.config.,js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..21b6e7ef0 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,78 @@ +import eslint from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; +import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; + +/** @type {import('@types/eslint').Linter.FlatConfig[]} */ +export default tseslint.config( + { + ignores: ["dist"], + }, + eslint.configs.recommended, + { + files: [ + "ts-json-schema-generator.ts", + "index.ts", + "src/**/*.ts", + "factory/**/*.ts", + "bin/**", + "test/**/*.test.ts", + "test/utils.ts", + ], + extends: tseslint.configs.recommendedTypeChecked, + languageOptions: { + sourceType: "module", + parserOptions: { + project: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + rules: { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/no-parameter-properties": "off", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + vars: "all", + args: "none", + ignoreRestSiblings: true, + }, + ], + "@typescript-eslint/no-object-literal-type-assertion": "off", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-unsafe-assignment": "warn", + "@typescript-eslint/no-unsafe-member-access": "warn", + "@typescript-eslint/no-unsafe-return": "warn", + "@typescript-eslint/no-unsafe-argument": "warn", + "@typescript-eslint/no-unsafe-call": "warn", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-unnecessary-type-assertion": "warn", + "no-alert": "error", + "prefer-const": "error", + "no-return-assign": "error", + "no-useless-call": "error", + "no-shadow": "error", + "no-useless-concat": "error", + "no-undef": "off", + "no-prototype-builtins": "off", + }, + }, + { + files: ["*.js"], + ...tseslint.configs.disableTypeChecked, + }, + { + files: ["test/**/*.test.ts"], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + eslintPluginPrettierRecommended +); diff --git a/jest.config.js b/jest.config.cjs similarity index 81% rename from jest.config.js rename to jest.config.cjs index f76fdd99a..353aef359 100644 --- a/jest.config.js +++ b/jest.config.cjs @@ -1,4 +1,5 @@ -module.exports = { +/** @type {import('jest').Config} */ +const config = { testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", moduleFileExtensions: ["js", "ts", "json"], testPathIgnorePatterns: ["/dist/", "/node_modules/", "/build/"], @@ -9,3 +10,5 @@ module.exports = { ".*": "babel-jest", }, }; + +module.exports = config; diff --git a/package.json b/package.json index e524f71f0..f52ecb880 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "ts-json-schema-generator", - "version": "1.0.0", + "version": "2.0.0", "description": "Generate JSON schema from your Typescript sources", "main": "dist/index.js", "types": "dist/index.d.ts", + "type": "module", "bin": { "ts-json-schema-generator": "./bin/ts-json-schema-generator" }, @@ -41,7 +42,7 @@ "jsonschema" ], "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0" }, "dependencies": { "@types/json-schema": "^7.0.15", @@ -50,7 +51,7 @@ "json5": "^2.2.3", "normalize-path": "^3.0.0", "safe-stable-stringify": "^2.4.3", - "typescript": "~5.4.5" + "typescript": "^5.4.5" }, "devDependencies": { "@auto-it/conventional-commits": "^11.1.6", @@ -58,24 +59,25 @@ "@babel/core": "^7.24.4", "@babel/preset-env": "^7.24.4", "@babel/preset-typescript": "^7.24.1", + "@eslint/js": "^9.0.0", + "@types/eslint": "^8.56.9", "@types/glob": "^8.1.0", "@types/jest": "^29.5.12", "@types/node": "^20.12.7", "@types/normalize-path": "^3.0.2", - "@typescript-eslint/eslint-plugin": "^7.6.0", - "@typescript-eslint/parser": "^7.6.0", "ajv": "^8.12.0", "ajv-formats": "^3.0.1", "auto": "^11.1.6", "chai": "^5.1.0", "cross-env": "^7.0.3", - "eslint": "^8.55.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jest-junit": "^16.0.0", "prettier": "^3.2.5", "ts-node": "^10.9.2", + "typescript-eslint": "^7.7.0", "vega": "^5.28.0", "vega-lite": "^5.18.0" }, @@ -83,8 +85,8 @@ "prepublishOnly": "yarn build", "build": "tsc", "watch": "tsc -w", - "lint": "eslint \"{src,test,factory}/**/*.ts\"", - "format": "yarn lint --fix", + "lint": "eslint", + "format": "eslint --fix", "test": "jest test/ --verbose", "test:fast": "cross-env FAST_TEST=1 jest test/ --verbose", "test:coverage": "yarn jest test/ --collectCoverage=true", diff --git a/src/NodeParser/CallExpressionParser.ts b/src/NodeParser/CallExpressionParser.ts index 01d5cd53d..65ee1c070 100644 --- a/src/NodeParser/CallExpressionParser.ts +++ b/src/NodeParser/CallExpressionParser.ts @@ -34,7 +34,7 @@ export class CallExpressionParser implements SubNodeParser { const symbol = type.symbol || type.aliasSymbol; const decl = symbol.valueDeclaration || symbol.declarations![0]; const subContext = this.createSubContext(node, context); - return this.childNodeParser.createType(decl, subContext)!; + return this.childNodeParser.createType(decl, subContext); } protected createSubContext(node: ts.CallExpression, parentContext: Context): Context { diff --git a/src/NodeParser/IntersectionNodeParser.ts b/src/NodeParser/IntersectionNodeParser.ts index 24111bb71..a271665f8 100644 --- a/src/NodeParser/IntersectionNodeParser.ts +++ b/src/NodeParser/IntersectionNodeParser.ts @@ -28,7 +28,7 @@ export class IntersectionNodeParser implements SubNodeParser { return new NeverType(); } - return translate(types as BaseType[]); + return translate(types); } } @@ -47,7 +47,7 @@ function derefAndFlattenUnions(type: BaseType): BaseType[] { * `(A & B) | (A & C)`. If no translation is needed then the original intersection type is returned. */ export function translate(types: BaseType[]): BaseType { - types = uniqueTypeArray(types as BaseType[]); + types = uniqueTypeArray(types); if (types.length == 1) { return types[0]; diff --git a/src/NodeParser/MappedTypeNodeParser.ts b/src/NodeParser/MappedTypeNodeParser.ts index e17543a2a..99026a0aa 100644 --- a/src/NodeParser/MappedTypeNodeParser.ts +++ b/src/NodeParser/MappedTypeNodeParser.ts @@ -83,7 +83,6 @@ export class MappedTypeNodeParser implements SubNodeParser { return new ObjectType(id, [], [], false); } else { throw new LogicError( - // eslint-disable-next-line max-len `Unexpected key type "${ constraintType ? constraintType.getId() : constraintType }" for type "${node.getText()}" (expected "UnionType" or "StringType")` diff --git a/src/NodeParser/TypeLiteralNodeParser.ts b/src/NodeParser/TypeLiteralNodeParser.ts index c43e977db..e6bd13ce9 100644 --- a/src/NodeParser/TypeLiteralNodeParser.ts +++ b/src/NodeParser/TypeLiteralNodeParser.ts @@ -72,7 +72,7 @@ export class TypeLiteralNodeParser implements SubNodeParser { return this.additionalProperties; } - return this.childNodeParser.createType(indexSignature.type!, context) ?? this.additionalProperties; + return this.childNodeParser.createType(indexSignature.type, context) ?? this.additionalProperties; } protected getTypeId(node: ts.Node, context: Context): string { diff --git a/src/NodeParser/TypeReferenceNodeParser.ts b/src/NodeParser/TypeReferenceNodeParser.ts index 51e01b8f0..fbf643c46 100644 --- a/src/NodeParser/TypeReferenceNodeParser.ts +++ b/src/NodeParser/TypeReferenceNodeParser.ts @@ -33,7 +33,7 @@ export class TypeReferenceNodeParser implements SubNodeParser { // Wraps promise type to avoid resolving to a empty Object type. if (typeSymbol.name === "Promise") { - return this.childNodeParser.createType(node.typeArguments![0]!, this.createSubContext(node, context)); + return this.childNodeParser.createType(node.typeArguments![0], this.createSubContext(node, context)); } if (typeSymbol.flags & ts.SymbolFlags.Alias) { diff --git a/src/Utils/allOfDefinition.ts b/src/Utils/allOfDefinition.ts index 03e4ae478..329268bc9 100644 --- a/src/Utils/allOfDefinition.ts +++ b/src/Utils/allOfDefinition.ts @@ -11,7 +11,7 @@ import { derefType } from "./derefType"; export function getAllOfDefinitionReducer(childTypeFormatter: TypeFormatter) { // combine object instead of using allOf because allOf does not work well with additional properties return (definition: Definition, baseType: BaseType): Definition => { - const other = childTypeFormatter.getDefinition(derefType(baseType)!); + const other = childTypeFormatter.getDefinition(derefType(baseType)); definition.properties = deepMerge(other.properties || {}, definition.properties || {}); diff --git a/src/Utils/isAssignableTo.ts b/src/Utils/isAssignableTo.ts index f368a9efb..d1d92782b 100644 --- a/src/Utils/isAssignableTo.ts +++ b/src/Utils/isAssignableTo.ts @@ -221,7 +221,7 @@ export function isAssignableTo( targetMember.getType(), sourceMember.getType(), inferMap, - new Set(insideTypes).add(source!).add(target!) + new Set(insideTypes).add(source).add(target) ); }) ); diff --git a/test/sourceless-nodes/index.test.ts b/test/sourceless-nodes/index.test.ts index 05db63a31..9909180a7 100644 --- a/test/sourceless-nodes/index.test.ts +++ b/test/sourceless-nodes/index.test.ts @@ -7,7 +7,7 @@ import { NumberType } from "../../src/Type/NumberType"; import { ObjectType } from "../../src/Type/ObjectType"; import { DEFAULT_CONFIG } from "../../src/Config"; -const SOURCE = path.resolve(__dirname, "./source.ts"); +const SOURCE = path.resolve(__dirname, "./source/source.ts"); describe("sourceless-nodes", () => { it("tests creating json schemas with ts.Nodes without valid source files", () => { diff --git a/test/utils.ts b/test/utils.ts index cdc662d09..ac9dda0cf 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -77,6 +77,7 @@ export function assertValidSchema( addFormats(localValidator); } + // eslint-disable-next-line @typescript-eslint/no-floating-promises localValidator.validateSchema(actual); expect(localValidator.errors).toBeNull(); diff --git a/test/valid-data/annotation-comment/main.ts b/test/valid-data/annotation-comment/main.ts index 23ac0aeef..eab59bf77 100644 --- a/test/valid-data/annotation-comment/main.ts +++ b/test/valid-data/annotation-comment/main.ts @@ -5,11 +5,10 @@ export interface MyObject { /** * @comment Property comment */ - nested: MyNestedObject + nested: MyNestedObject; } /** * @comment Nested object comment */ export interface MyNestedObject {} - diff --git a/tsconfig.json b/tsconfig.json index 96eff1922..df0517b85 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,6 @@ "incremental": true }, "files": ["ts-json-schema-generator.ts", "index.ts"], - "include": ["./src/**/*.ts", "./factory/**/*.ts", "./test/**.ts"], + "include": ["src/**/*.ts", "factory/**/*.ts", "test/**/*.test.ts", "test/utils.ts"], "exclude": ["node_modules", "dist"] } diff --git a/yarn.lock b/yarn.lock index c24f4852b..d39bad767 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1161,32 +1161,32 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== +"@eslint/eslintrc@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.0.2.tgz#36180f8e85bf34d2fe3ccc2261e8e204a411ab4e" + integrity sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@9.0.0", "@eslint/js@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.0.0.tgz#1a9e4b4c96d8c7886e0110ed310a0135144a1691" + integrity sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@humanwhocodes/config-array@^0.12.3": + version "0.12.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.12.3.tgz#a6216d90f81a30bedd1d4b5d799b47241f318072" + integrity sha512-jsNnTBlMWuTpDkeE3on7+dWJi0D6fdDfeANj/w7MpS8ztROCoLvIO2nG0CcFj+E4k8j4QrSTh4Oryi3i2G669g== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" + "@humanwhocodes/object-schema" "^2.0.3" debug "^4.3.1" minimatch "^3.0.5" @@ -1195,7 +1195,7 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": +"@humanwhocodes/object-schema@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== @@ -1686,7 +1686,15 @@ resolved "https://registry.yarnpkg.com/@types/command-line-usage/-/command-line-usage-5.0.4.tgz#374e4c62d78fbc5a670a0f36da10235af879a0d5" integrity sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg== -"@types/estree@^1.0.0": +"@types/eslint@^8.56.9": + version "8.56.9" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.9.tgz#403e9ced04a34e63f1c383c5b8ee1a94442c8cc4" + integrity sha512-W4W3KcqzjJ0sHg2vAq9vfml6OhsJ53TcUjUqfzzZf/EChUtwspszj/S0pzMxnfRcO55/iGq47dscXw71Fxc4Zg== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.0": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== @@ -1738,7 +1746,7 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/json-schema@^7.0.15": +"@types/json-schema@*", "@types/json-schema@^7.0.15": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -1797,16 +1805,16 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz#1f5df5cda490a0bcb6fbdd3382e19f1241024242" - integrity sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A== +"@typescript-eslint/eslint-plugin@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz#bf34a02f221811505b8bf2f31060c8560c1bb0a3" + integrity sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.6.0" - "@typescript-eslint/type-utils" "7.6.0" - "@typescript-eslint/utils" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/scope-manager" "7.7.0" + "@typescript-eslint/type-utils" "7.7.0" + "@typescript-eslint/utils" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.3.1" @@ -1814,47 +1822,47 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.6.0.tgz#0aca5de3045d68b36e88903d15addaf13d040a95" - integrity sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg== +"@typescript-eslint/parser@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.0.tgz#6b1b3ce76c5de002c43af8ae933613b0f2b4bcc6" + integrity sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg== dependencies: - "@typescript-eslint/scope-manager" "7.6.0" - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/typescript-estree" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/scope-manager" "7.7.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/typescript-estree" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz#1e9972f654210bd7500b31feadb61a233f5b5e9d" - integrity sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w== +"@typescript-eslint/scope-manager@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz#3f0db079b275bb8b0cb5be7613fb3130cfb5de77" + integrity sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw== dependencies: - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" -"@typescript-eslint/type-utils@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz#644f75075f379827d25fe0713e252ccd4e4a428c" - integrity sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw== +"@typescript-eslint/type-utils@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz#36792ff4209a781b058de61631a48df17bdefbc5" + integrity sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg== dependencies: - "@typescript-eslint/typescript-estree" "7.6.0" - "@typescript-eslint/utils" "7.6.0" + "@typescript-eslint/typescript-estree" "7.7.0" + "@typescript-eslint/utils" "7.7.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.6.0.tgz#53dba7c30c87e5f10a731054266dd905f1fbae38" - integrity sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ== +"@typescript-eslint/types@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.0.tgz#23af4d24bf9ce15d8d301236e3e3014143604f27" + integrity sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w== -"@typescript-eslint/typescript-estree@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz#112a3775563799fd3f011890ac8322f80830ac17" - integrity sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw== +"@typescript-eslint/typescript-estree@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz#b5dd6383b4c6a852d7b256a37af971e8982be97f" + integrity sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ== dependencies: - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -1862,32 +1870,27 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.6.0.tgz#e400d782280b6f724c8a1204269d984c79202282" - integrity sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA== +"@typescript-eslint/utils@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.0.tgz#3d2b6606a60ac34f3c625facfb3b3ab7e126f58d" + integrity sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.15" "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.6.0" - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/typescript-estree" "7.6.0" + "@typescript-eslint/scope-manager" "7.7.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/typescript-estree" "7.7.0" semver "^7.6.0" -"@typescript-eslint/visitor-keys@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz#d1ce13145844379021e1f9bd102c1d78946f4e76" - integrity sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw== +"@typescript-eslint/visitor-keys@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz#950148cf1ac11562a2d903fdf7acf76714a2dc9e" + integrity sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA== dependencies: - "@typescript-eslint/types" "7.6.0" + "@typescript-eslint/types" "7.7.0" eslint-visitor-keys "^3.4.3" -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -1906,7 +1909,7 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^8.4.1, acorn@^8.9.0: +acorn@^8.11.3, acorn@^8.4.1: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== @@ -2842,13 +2845,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dotenv@^8.0.0: version "8.6.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" @@ -3031,54 +3027,55 @@ eslint-plugin-prettier@^5.1.3: prettier-linter-helpers "^1.0.0" synckit "^0.8.6" -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== +eslint-scope@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc" + integrity sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.55.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== +eslint-visitor-keys@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" + integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== + +eslint@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.0.0.tgz#6270548758e390343f78c8afd030566d86927d40" + integrity sha512-IMryZ5SudxzQvuod6rUdIUz29qFItWx281VhtFVc2Psy/ZhlCeD/5DT6lBIJ4H3G+iamGJoTln1v+QSuPw0p7Q== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint/eslintrc" "^3.0.2" + "@eslint/js" "9.0.0" + "@humanwhocodes/config-array" "^0.12.3" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" + eslint-scope "^8.0.1" + eslint-visitor-keys "^4.0.0" + espree "^10.0.1" esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" graphemer "^1.4.0" ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" @@ -3088,14 +3085,14 @@ eslint@^8.55.0: strip-ansi "^6.0.1" text-table "^0.2.0" -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== +espree@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f" + integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== dependencies: - acorn "^8.9.0" + acorn "^8.11.3" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" + eslint-visitor-keys "^4.0.0" esprima@^4.0.0: version "4.0.1" @@ -3214,12 +3211,12 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" fill-range@^7.0.1: version "7.0.1" @@ -3258,14 +3255,13 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" + keyv "^4.5.4" flatted@^3.2.9: version "3.3.1" @@ -3466,12 +3462,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== globalthis@^1.0.3: version "1.0.3" @@ -4397,7 +4391,7 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -keyv@^4.5.3: +keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -5254,13 +5248,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - robust-predicates@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" @@ -5789,11 +5776,6 @@ type-fest@^0.18.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - type-fest@^0.21.1, type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -5853,12 +5835,21 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" +typescript-eslint@^7.7.0: + version "7.7.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.7.0.tgz#b755e350dad25bb1e5b3826d11daa973dc0970ac" + integrity sha512-wZZ+7mTQJCn4mGAvzdERtL4vwKGM/mF9cMSMeKUllz3Hgbd1Mdd5L60Q+nJmCio9RB4OyMMr0EX4Ry2Q7jiAyw== + dependencies: + "@typescript-eslint/eslint-plugin" "7.7.0" + "@typescript-eslint/parser" "7.7.0" + "@typescript-eslint/utils" "7.7.0" + typescript-memoize@^1.0.0-alpha.3: version "1.1.1" resolved "https://registry.yarnpkg.com/typescript-memoize/-/typescript-memoize-1.1.1.tgz#02737495d5df6ebf72c07ba0d002e8f4cf5ccfa0" integrity sha512-GQ90TcKpIH4XxYTI2F98yEQYZgjNMOGPpOgdjIBhaLaWji5HPWlRnZ4AeA1hfBxtY7bCGDJsqDDHk/KaHOl5bA== -typescript@~5.4.5: +typescript@^5.4.5: version "5.4.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== From 0f11817196ba590cbc7a1a092e8f9eac3b924417 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Mon, 15 Apr 2024 20:11:16 -0400 Subject: [PATCH 2/6] fix lint issues --- src/NodeParser/InterfaceAndClassNodeParser.ts | 2 +- src/TypeFormatter/ObjectTypeFormatter.ts | 2 +- src/Utils/intersectionOfArrays.ts | 1 + test/utils.ts | 1 - ts-json-schema-generator.ts | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NodeParser/InterfaceAndClassNodeParser.ts b/src/NodeParser/InterfaceAndClassNodeParser.ts index 47894e0da..b5ef4fa83 100644 --- a/src/NodeParser/InterfaceAndClassNodeParser.ts +++ b/src/NodeParser/InterfaceAndClassNodeParser.ts @@ -170,7 +170,7 @@ export class InterfaceAndClassNodeParser implements SubNodeParser { return this.additionalProperties; } - return this.childNodeParser.createType(indexSignature.type!, context) ?? this.additionalProperties; + return this.childNodeParser.createType(indexSignature.type, context) ?? this.additionalProperties; } protected getTypeId(node: ts.Node, context: Context): string { diff --git a/src/TypeFormatter/ObjectTypeFormatter.ts b/src/TypeFormatter/ObjectTypeFormatter.ts index ea6cab155..d0d437d77 100644 --- a/src/TypeFormatter/ObjectTypeFormatter.ts +++ b/src/TypeFormatter/ObjectTypeFormatter.ts @@ -113,6 +113,6 @@ export class ObjectTypeFormatter implements SubTypeFormatter { return property; } - return new ObjectProperty(property.getName(), preserveAnnotation(propertyType!, newPropType), false); + return new ObjectProperty(property.getName(), preserveAnnotation(propertyType, newPropType), false); } } diff --git a/src/Utils/intersectionOfArrays.ts b/src/Utils/intersectionOfArrays.ts index dadeb0730..3e2f98376 100644 --- a/src/Utils/intersectionOfArrays.ts +++ b/src/Utils/intersectionOfArrays.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ import stringify from "safe-stable-stringify"; export function intersectionOfArrays(a: T[], b: T[]): T[] { diff --git a/test/utils.ts b/test/utils.ts index ac9dda0cf..cdc662d09 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -77,7 +77,6 @@ export function assertValidSchema( addFormats(localValidator); } - // eslint-disable-next-line @typescript-eslint/no-floating-promises localValidator.validateSchema(actual); expect(localValidator.errors).toBeNull(); diff --git a/ts-json-schema-generator.ts b/ts-json-schema-generator.ts index afc31143e..d717a53c5 100644 --- a/ts-json-schema-generator.ts +++ b/ts-json-schema-generator.ts @@ -29,7 +29,7 @@ const args = new Command() .addOption( new Option( "--functions ", - // eslint-disable-next-line max-len + "How to handle functions. `fail` will throw an error. `comment` will add a comment. `hide` will treat the function like a NeverType or HiddenType." ) .choices(["fail", "comment", "hide"]) From 09675c62c461dfc2740fd29b7260f09f91ef9efe Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Mon, 15 Apr 2024 20:12:03 -0400 Subject: [PATCH 3/6] Undo code change --- test/sourceless-nodes/index.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sourceless-nodes/index.test.ts b/test/sourceless-nodes/index.test.ts index 9909180a7..05db63a31 100644 --- a/test/sourceless-nodes/index.test.ts +++ b/test/sourceless-nodes/index.test.ts @@ -7,7 +7,7 @@ import { NumberType } from "../../src/Type/NumberType"; import { ObjectType } from "../../src/Type/ObjectType"; import { DEFAULT_CONFIG } from "../../src/Config"; -const SOURCE = path.resolve(__dirname, "./source/source.ts"); +const SOURCE = path.resolve(__dirname, "./source.ts"); describe("sourceless-nodes", () => { it("tests creating json schemas with ts.Nodes without valid source files", () => { From bc0c77a574b8fe21d93184892fa4f012b04914b2 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Tue, 16 Apr 2024 10:37:02 -0400 Subject: [PATCH 4/6] Add js extension to imports --- .vscode/settings.json | 3 +- babel.config.,js => babel.config.cjs | 0 bin/ts-json-schema-generator | 2 +- eslint.config.js | 2 +- factory/formatter.ts | 66 ++-- factory/generator.ts | 10 +- factory/index.ts | 8 +- factory/parser.ts | 118 +++---- factory/program.ts | 10 +- index.ts | 306 +++++++++--------- jest.config.cjs | 3 + package.json | 6 +- src/AnnotationsReader.ts | 2 +- .../BasicAnnotationsReader.ts | 6 +- .../ExtendedAnnotationsReader.ts | 6 +- src/ChainNodeParser.ts | 12 +- src/ChainTypeFormatter.ts | 10 +- src/CircularReferenceNodeParser.ts | 10 +- src/CircularReferenceTypeFormatter.ts | 8 +- src/Error/DiagnosticError.ts | 2 +- src/Error/LogicError.ts | 2 +- src/Error/NoRootNamesError.ts | 2 +- src/Error/NoRootTypeError.ts | 2 +- src/Error/NoTSConfigError.ts | 2 +- src/Error/UnknownNodeError.ts | 2 +- src/Error/UnknownTypeError.ts | 4 +- src/ExposeNodeParser.ts | 14 +- src/Interfaces/AnnotationsReader.ts | 2 +- src/Interfaces/MutableParser.ts | 2 +- src/Interfaces/MutableTypeFormatter.ts | 2 +- src/Interfaces/SubNodeParser.ts | 2 +- src/Interfaces/SubTypeFormatter.ts | 4 +- src/Interfaces/TypeFormatter.ts | 4 +- src/MutableParser.ts | 2 +- src/MutableTypeFormatter.ts | 2 +- src/NodeParser.ts | 6 +- src/NodeParser/AnnotatedNodeParser.ts | 22 +- src/NodeParser/AnyTypeNodeParser.ts | 8 +- .../ArrayLiteralExpressionNodeParser.ts | 8 +- src/NodeParser/ArrayNodeParser.ts | 8 +- src/NodeParser/AsExpressionNodeParser.ts | 8 +- src/NodeParser/BooleanLiteralNodeParser.ts | 8 +- src/NodeParser/BooleanTypeNodeParser.ts | 8 +- src/NodeParser/CallExpressionParser.ts | 14 +- src/NodeParser/ConditionalTypeNodeParser.ts | 14 +- src/NodeParser/ConstructorNodeParser.ts | 16 +- src/NodeParser/EnumNodeParser.ts | 12 +- .../ExpressionWithTypeArgumentsNodeParser.ts | 6 +- src/NodeParser/FunctionNodeParser.ts | 18 +- src/NodeParser/HiddenTypeNodeParser.ts | 10 +- src/NodeParser/IndexedAccessTypeNodeParser.ts | 28 +- src/NodeParser/InferTypeNodeParser.ts | 8 +- src/NodeParser/InterfaceAndClassNodeParser.ts | 20 +- src/NodeParser/IntersectionNodeParser.ts | 20 +- src/NodeParser/IntrinsicNodeParser.ts | 14 +- src/NodeParser/LiteralNodeParser.ts | 6 +- src/NodeParser/MappedTypeNodeParser.ts | 38 +-- src/NodeParser/NamedTupleMemberNodeParser.ts | 14 +- src/NodeParser/NeverTypeNodeParser.ts | 8 +- src/NodeParser/NullLiteralNodeParser.ts | 8 +- src/NodeParser/NumberLiteralNodeParser.ts | 8 +- src/NodeParser/NumberTypeNodeParser.ts | 8 +- .../ObjectLiteralExpressionNodeParser.ts | 12 +- src/NodeParser/ObjectTypeNodeParser.ts | 10 +- src/NodeParser/OptionalTypeNodeParser.ts | 8 +- src/NodeParser/ParameterParser.ts | 8 +- src/NodeParser/ParenthesizedNodeParser.ts | 6 +- .../PrefixUnaryExpressionNodeParser.ts | 8 +- .../PropertyAccessExpressionParser.ts | 6 +- src/NodeParser/RestTypeNodeParser.ts | 14 +- src/NodeParser/SatisfiesNodeParser.ts | 6 +- src/NodeParser/StringLiteralNodeParser.ts | 8 +- .../StringTemplateLiteralNodeParser.ts | 16 +- src/NodeParser/StringTypeNodeParser.ts | 8 +- src/NodeParser/SymbolTypeNodeParser.ts | 8 +- src/NodeParser/TupleNodeParser.ts | 8 +- src/NodeParser/TypeAliasNodeParser.ts | 14 +- src/NodeParser/TypeLiteralNodeParser.ts | 16 +- src/NodeParser/TypeOperatorNodeParser.ts | 20 +- src/NodeParser/TypeReferenceNodeParser.ts | 14 +- src/NodeParser/TypeofNodeParser.ts | 20 +- src/NodeParser/UndefinedLiteralNodeParser.ts | 8 +- src/NodeParser/UndefinedTypeNodeParser.ts | 8 +- src/NodeParser/UnionNodeParser.ts | 12 +- src/NodeParser/UnknownTypeNodeParser.ts | 8 +- src/NodeParser/VoidTypeNodeParser.ts | 8 +- src/SchemaGenerator.ts | 24 +- src/SubNodeParser.ts | 2 +- src/SubTypeFormatter.ts | 4 +- src/TopRefNodeParser.ts | 6 +- src/Type/AliasType.ts | 2 +- src/Type/AnnotatedType.ts | 4 +- src/Type/AnyType.ts | 2 +- src/Type/ArrayType.ts | 2 +- src/Type/BooleanType.ts | 2 +- src/Type/ConstructorType.ts | 4 +- src/Type/DefinitionType.ts | 2 +- src/Type/EnumType.ts | 6 +- src/Type/FunctionType.ts | 4 +- src/Type/HiddenType.ts | 2 +- src/Type/InferType.ts | 2 +- src/Type/IntersectionType.ts | 2 +- src/Type/LiteralType.ts | 2 +- src/Type/NeverType.ts | 2 +- src/Type/NullType.ts | 2 +- src/Type/NumberType.ts | 2 +- src/Type/ObjectType.ts | 4 +- src/Type/OptionalType.ts | 2 +- src/Type/PrimitiveType.ts | 2 +- src/Type/ReferenceType.ts | 2 +- src/Type/RestType.ts | 8 +- src/Type/StringType.ts | 2 +- src/Type/SymbolType.ts | 2 +- src/Type/TupleType.ts | 10 +- src/Type/UndefinedType.ts | 2 +- src/Type/UnionType.ts | 8 +- src/Type/UnknownType.ts | 2 +- src/Type/VoidType.ts | 2 +- src/TypeFormatter.ts | 4 +- src/TypeFormatter/AliasTypeFormatter.ts | 10 +- src/TypeFormatter/AnnotatedTypeFormatter.ts | 14 +- src/TypeFormatter/AnyTypeFormatter.ts | 8 +- src/TypeFormatter/ArrayTypeFormatter.ts | 10 +- src/TypeFormatter/BooleanTypeFormatter.ts | 8 +- src/TypeFormatter/ConstructorTypeFormatter.ts | 6 +- src/TypeFormatter/DefinitionTypeFormatter.ts | 12 +- src/TypeFormatter/EnumTypeFormatter.ts | 12 +- src/TypeFormatter/FunctionTypeFormatter.ts | 12 +- src/TypeFormatter/HiddenTypeFormatter.ts | 8 +- .../IntersectionTypeFormatter.ts | 18 +- src/TypeFormatter/LiteralTypeFormatter.ts | 10 +- .../LiteralUnionTypeFormatter.ts | 18 +- src/TypeFormatter/NeverTypeFormatter.ts | 8 +- src/TypeFormatter/NullTypeFormatter.ts | 8 +- src/TypeFormatter/NumberTypeFormatter.ts | 8 +- src/TypeFormatter/ObjectTypeFormatter.ts | 32 +- src/TypeFormatter/OptionalTypeFormatter.ts | 10 +- .../PrimitiveUnionTypeFormatter.ts | 24 +- src/TypeFormatter/ReferenceTypeFormatter.ts | 12 +- src/TypeFormatter/RestTypeFormatter.ts | 10 +- src/TypeFormatter/StringTypeFormatter.ts | 8 +- src/TypeFormatter/SymbolTypeFormatter.ts | 8 +- src/TypeFormatter/TupleTypeFormatter.ts | 20 +- src/TypeFormatter/UndefinedTypeFormatter.ts | 8 +- src/TypeFormatter/UnionTypeFormatter.ts | 20 +- src/TypeFormatter/UnknownTypeFormatter.ts | 8 +- src/TypeFormatter/VoidTypeFormatter.ts | 8 +- src/Utils/allOfDefinition.ts | 14 +- src/Utils/assert.ts | 2 +- src/Utils/deepMerge.ts | 6 +- src/Utils/derefType.ts | 10 +- src/Utils/extractLiterals.ts | 18 +- src/Utils/formatError.ts | 6 +- src/Utils/hasJsDocTag.ts | 2 +- src/Utils/isAssignableTo.ts | 42 +-- src/Utils/isHidden.ts | 2 +- src/Utils/narrowType.ts | 10 +- src/Utils/nodeKey.ts | 2 +- src/Utils/notNever.ts | 4 +- src/Utils/preserveAnnotation.ts | 4 +- src/Utils/removeUndefined.ts | 10 +- src/Utils/removeUnreachable.ts | 4 +- src/Utils/typeKeys.ts | 32 +- src/Utils/typeName.ts | 2 +- src/Utils/uniqueTypeArray.ts | 2 +- test/config.test.ts | 21 +- test/invalid-data.test.ts | 4 +- test/sourceless-nodes/index.test.ts | 10 +- test/sourceless-nodes/key/index.test.ts | 8 +- test/unit/AnnotatedTypeFormatter.test.ts | 2 +- test/unit/Type/HiddenType.test.ts | 4 +- test/unit/assert.test.ts | 4 +- test/unit/deepMerge.test.ts | 2 +- test/unit/intersectionOfArrays.test.ts | 2 +- test/unit/isAssignableTo.test.ts | 46 +-- test/utils.ts | 4 +- test/vega-lite.test.ts | 2 +- ts-json-schema-generator.ts | 10 +- tsconfig.eslint.json | 4 + tsconfig.json | 8 +- yarn.lock | 168 +++++++++- 181 files changed, 1174 insertions(+), 1001 deletions(-) rename babel.config.,js => babel.config.cjs (100%) create mode 100644 tsconfig.eslint.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 48030f7da..0e20a9a33 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,5 +13,6 @@ "source.fixAll.eslint": "explicit" }, "eslint.experimental.useFlatConfig": true, - "jest.runMode": "on-demand" + "jest.runMode": "on-demand", + "javascript.preferences.importModuleSpecifierEnding": "js" } diff --git a/babel.config.,js b/babel.config.cjs similarity index 100% rename from babel.config.,js rename to babel.config.cjs diff --git a/bin/ts-json-schema-generator b/bin/ts-json-schema-generator index 6b47cd55a..2177a3c7f 100755 --- a/bin/ts-json-schema-generator +++ b/bin/ts-json-schema-generator @@ -1,2 +1,2 @@ #!/usr/bin/env node -require('../dist/ts-json-schema-generator'); +import("../dist/ts-json-schema-generator.js"); diff --git a/eslint.config.js b/eslint.config.js index 21b6e7ef0..b44d0c100 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -23,7 +23,7 @@ export default tseslint.config( languageOptions: { sourceType: "module", parserOptions: { - project: true, + project: "tsconfig.eslint.json", tsconfigRootDir: import.meta.dirname, }, }, diff --git a/factory/formatter.ts b/factory/formatter.ts index f7ba0e831..72bbe052b 100644 --- a/factory/formatter.ts +++ b/factory/formatter.ts @@ -1,36 +1,36 @@ -import { ChainTypeFormatter } from "../src/ChainTypeFormatter"; -import { CircularReferenceTypeFormatter } from "../src/CircularReferenceTypeFormatter"; -import { CompletedConfig } from "../src/Config"; -import { MutableTypeFormatter } from "../src/MutableTypeFormatter"; -import { TypeFormatter } from "../src/TypeFormatter"; -import { AliasTypeFormatter } from "../src/TypeFormatter/AliasTypeFormatter"; -import { AnnotatedTypeFormatter } from "../src/TypeFormatter/AnnotatedTypeFormatter"; -import { AnyTypeFormatter } from "../src/TypeFormatter/AnyTypeFormatter"; -import { ArrayTypeFormatter } from "../src/TypeFormatter/ArrayTypeFormatter"; -import { BooleanTypeFormatter } from "../src/TypeFormatter/BooleanTypeFormatter"; -import { ConstructorTypeFormatter } from "../src/TypeFormatter/ConstructorTypeFormatter"; -import { DefinitionTypeFormatter } from "../src/TypeFormatter/DefinitionTypeFormatter"; -import { EnumTypeFormatter } from "../src/TypeFormatter/EnumTypeFormatter"; -import { FunctionTypeFormatter } from "../src/TypeFormatter/FunctionTypeFormatter"; -import { HiddenTypeFormatter } from "../src/TypeFormatter/HiddenTypeFormatter"; -import { IntersectionTypeFormatter } from "../src/TypeFormatter/IntersectionTypeFormatter"; -import { LiteralTypeFormatter } from "../src/TypeFormatter/LiteralTypeFormatter"; -import { LiteralUnionTypeFormatter } from "../src/TypeFormatter/LiteralUnionTypeFormatter"; -import { NeverTypeFormatter } from "../src/TypeFormatter/NeverTypeFormatter"; -import { NullTypeFormatter } from "../src/TypeFormatter/NullTypeFormatter"; -import { NumberTypeFormatter } from "../src/TypeFormatter/NumberTypeFormatter"; -import { ObjectTypeFormatter } from "../src/TypeFormatter/ObjectTypeFormatter"; -import { OptionalTypeFormatter } from "../src/TypeFormatter/OptionalTypeFormatter"; -import { PrimitiveUnionTypeFormatter } from "../src/TypeFormatter/PrimitiveUnionTypeFormatter"; -import { ReferenceTypeFormatter } from "../src/TypeFormatter/ReferenceTypeFormatter"; -import { RestTypeFormatter } from "../src/TypeFormatter/RestTypeFormatter"; -import { StringTypeFormatter } from "../src/TypeFormatter/StringTypeFormatter"; -import { SymbolTypeFormatter } from "../src/TypeFormatter/SymbolTypeFormatter"; -import { TupleTypeFormatter } from "../src/TypeFormatter/TupleTypeFormatter"; -import { UndefinedTypeFormatter } from "../src/TypeFormatter/UndefinedTypeFormatter"; -import { UnionTypeFormatter } from "../src/TypeFormatter/UnionTypeFormatter"; -import { UnknownTypeFormatter } from "../src/TypeFormatter/UnknownTypeFormatter"; -import { VoidTypeFormatter } from "../src/TypeFormatter/VoidTypeFormatter"; +import { ChainTypeFormatter } from "../src/ChainTypeFormatter.js"; +import { CircularReferenceTypeFormatter } from "../src/CircularReferenceTypeFormatter.js"; +import { CompletedConfig } from "../src/Config.js"; +import { MutableTypeFormatter } from "../src/MutableTypeFormatter.js"; +import { TypeFormatter } from "../src/TypeFormatter.js"; +import { AliasTypeFormatter } from "../src/TypeFormatter/AliasTypeFormatter.js"; +import { AnnotatedTypeFormatter } from "../src/TypeFormatter/AnnotatedTypeFormatter.js"; +import { AnyTypeFormatter } from "../src/TypeFormatter/AnyTypeFormatter.js"; +import { ArrayTypeFormatter } from "../src/TypeFormatter/ArrayTypeFormatter.js"; +import { BooleanTypeFormatter } from "../src/TypeFormatter/BooleanTypeFormatter.js"; +import { ConstructorTypeFormatter } from "../src/TypeFormatter/ConstructorTypeFormatter.js"; +import { DefinitionTypeFormatter } from "../src/TypeFormatter/DefinitionTypeFormatter.js"; +import { EnumTypeFormatter } from "../src/TypeFormatter/EnumTypeFormatter.js"; +import { FunctionTypeFormatter } from "../src/TypeFormatter/FunctionTypeFormatter.js"; +import { HiddenTypeFormatter } from "../src/TypeFormatter/HiddenTypeFormatter.js"; +import { IntersectionTypeFormatter } from "../src/TypeFormatter/IntersectionTypeFormatter.js"; +import { LiteralTypeFormatter } from "../src/TypeFormatter/LiteralTypeFormatter.js"; +import { LiteralUnionTypeFormatter } from "../src/TypeFormatter/LiteralUnionTypeFormatter.js"; +import { NeverTypeFormatter } from "../src/TypeFormatter/NeverTypeFormatter.js"; +import { NullTypeFormatter } from "../src/TypeFormatter/NullTypeFormatter.js"; +import { NumberTypeFormatter } from "../src/TypeFormatter/NumberTypeFormatter.js"; +import { ObjectTypeFormatter } from "../src/TypeFormatter/ObjectTypeFormatter.js"; +import { OptionalTypeFormatter } from "../src/TypeFormatter/OptionalTypeFormatter.js"; +import { PrimitiveUnionTypeFormatter } from "../src/TypeFormatter/PrimitiveUnionTypeFormatter.js"; +import { ReferenceTypeFormatter } from "../src/TypeFormatter/ReferenceTypeFormatter.js"; +import { RestTypeFormatter } from "../src/TypeFormatter/RestTypeFormatter.js"; +import { StringTypeFormatter } from "../src/TypeFormatter/StringTypeFormatter.js"; +import { SymbolTypeFormatter } from "../src/TypeFormatter/SymbolTypeFormatter.js"; +import { TupleTypeFormatter } from "../src/TypeFormatter/TupleTypeFormatter.js"; +import { UndefinedTypeFormatter } from "../src/TypeFormatter/UndefinedTypeFormatter.js"; +import { UnionTypeFormatter } from "../src/TypeFormatter/UnionTypeFormatter.js"; +import { UnknownTypeFormatter } from "../src/TypeFormatter/UnknownTypeFormatter.js"; +import { VoidTypeFormatter } from "../src/TypeFormatter/VoidTypeFormatter.js"; export type FormatterAugmentor = ( formatter: MutableTypeFormatter, diff --git a/factory/generator.ts b/factory/generator.ts index 8c36666f6..bf54919b4 100644 --- a/factory/generator.ts +++ b/factory/generator.ts @@ -1,8 +1,8 @@ -import { Config, DEFAULT_CONFIG } from "../src/Config"; -import { SchemaGenerator } from "../src/SchemaGenerator"; -import { createFormatter } from "./formatter"; -import { createParser } from "./parser"; -import { createProgram } from "./program"; +import { Config, DEFAULT_CONFIG } from "../src/Config.js"; +import { SchemaGenerator } from "../src/SchemaGenerator.js"; +import { createFormatter } from "./formatter.js"; +import { createParser } from "./parser.js"; +import { createProgram } from "./program.js"; export function createGenerator(config: Config): SchemaGenerator { const completedConfig = { ...DEFAULT_CONFIG, ...config }; diff --git a/factory/index.ts b/factory/index.ts index 61a20712d..bd32a44bb 100644 --- a/factory/index.ts +++ b/factory/index.ts @@ -1,4 +1,4 @@ -export * from "./formatter"; -export * from "./generator"; -export * from "./parser"; -export * from "./program"; +export * from "./formatter.js"; +export * from "./generator.js"; +export * from "./parser.js"; +export * from "./program.js"; diff --git a/factory/parser.ts b/factory/parser.ts index 8a8c039ad..ce118f6e9 100644 --- a/factory/parser.ts +++ b/factory/parser.ts @@ -1,63 +1,63 @@ import ts from "typescript"; -import { BasicAnnotationsReader } from "../src/AnnotationsReader/BasicAnnotationsReader"; -import { ExtendedAnnotationsReader } from "../src/AnnotationsReader/ExtendedAnnotationsReader"; -import { ChainNodeParser } from "../src/ChainNodeParser"; -import { CircularReferenceNodeParser } from "../src/CircularReferenceNodeParser"; -import { CompletedConfig } from "../src/Config"; -import { ExposeNodeParser } from "../src/ExposeNodeParser"; -import { MutableParser } from "../src/MutableParser"; -import { NodeParser } from "../src/NodeParser"; -import { AnnotatedNodeParser } from "../src/NodeParser/AnnotatedNodeParser"; -import { AnyTypeNodeParser } from "../src/NodeParser/AnyTypeNodeParser"; -import { ArrayLiteralExpressionNodeParser } from "../src/NodeParser/ArrayLiteralExpressionNodeParser"; -import { ArrayNodeParser } from "../src/NodeParser/ArrayNodeParser"; -import { AsExpressionNodeParser } from "../src/NodeParser/AsExpressionNodeParser"; -import { BooleanLiteralNodeParser } from "../src/NodeParser/BooleanLiteralNodeParser"; -import { BooleanTypeNodeParser } from "../src/NodeParser/BooleanTypeNodeParser"; -import { CallExpressionParser } from "../src/NodeParser/CallExpressionParser"; -import { ConditionalTypeNodeParser } from "../src/NodeParser/ConditionalTypeNodeParser"; -import { ConstructorNodeParser } from "../src/NodeParser/ConstructorNodeParser"; -import { EnumNodeParser } from "../src/NodeParser/EnumNodeParser"; -import { ExpressionWithTypeArgumentsNodeParser } from "../src/NodeParser/ExpressionWithTypeArgumentsNodeParser"; -import { FunctionNodeParser } from "../src/NodeParser/FunctionNodeParser"; -import { HiddenNodeParser } from "../src/NodeParser/HiddenTypeNodeParser"; -import { IndexedAccessTypeNodeParser } from "../src/NodeParser/IndexedAccessTypeNodeParser"; -import { InferTypeNodeParser } from "../src/NodeParser/InferTypeNodeParser"; -import { InterfaceAndClassNodeParser } from "../src/NodeParser/InterfaceAndClassNodeParser"; -import { IntersectionNodeParser } from "../src/NodeParser/IntersectionNodeParser"; -import { IntrinsicNodeParser } from "../src/NodeParser/IntrinsicNodeParser"; -import { LiteralNodeParser } from "../src/NodeParser/LiteralNodeParser"; -import { MappedTypeNodeParser } from "../src/NodeParser/MappedTypeNodeParser"; -import { NamedTupleMemberNodeParser } from "../src/NodeParser/NamedTupleMemberNodeParser"; -import { NeverTypeNodeParser } from "../src/NodeParser/NeverTypeNodeParser"; -import { NullLiteralNodeParser } from "../src/NodeParser/NullLiteralNodeParser"; -import { NumberLiteralNodeParser } from "../src/NodeParser/NumberLiteralNodeParser"; -import { NumberTypeNodeParser } from "../src/NodeParser/NumberTypeNodeParser"; -import { ObjectLiteralExpressionNodeParser } from "../src/NodeParser/ObjectLiteralExpressionNodeParser"; -import { ObjectTypeNodeParser } from "../src/NodeParser/ObjectTypeNodeParser"; -import { OptionalTypeNodeParser } from "../src/NodeParser/OptionalTypeNodeParser"; -import { ParameterParser } from "../src/NodeParser/ParameterParser"; -import { ParenthesizedNodeParser } from "../src/NodeParser/ParenthesizedNodeParser"; -import { PrefixUnaryExpressionNodeParser } from "../src/NodeParser/PrefixUnaryExpressionNodeParser"; -import { PropertyAccessExpressionParser } from "../src/NodeParser/PropertyAccessExpressionParser"; -import { RestTypeNodeParser } from "../src/NodeParser/RestTypeNodeParser"; -import { StringLiteralNodeParser } from "../src/NodeParser/StringLiteralNodeParser"; -import { StringTemplateLiteralNodeParser } from "../src/NodeParser/StringTemplateLiteralNodeParser"; -import { StringTypeNodeParser } from "../src/NodeParser/StringTypeNodeParser"; -import { SymbolTypeNodeParser } from "../src/NodeParser/SymbolTypeNodeParser"; -import { TupleNodeParser } from "../src/NodeParser/TupleNodeParser"; -import { TypeAliasNodeParser } from "../src/NodeParser/TypeAliasNodeParser"; -import { TypeLiteralNodeParser } from "../src/NodeParser/TypeLiteralNodeParser"; -import { TypeofNodeParser } from "../src/NodeParser/TypeofNodeParser"; -import { TypeOperatorNodeParser } from "../src/NodeParser/TypeOperatorNodeParser"; -import { TypeReferenceNodeParser } from "../src/NodeParser/TypeReferenceNodeParser"; -import { UndefinedTypeNodeParser } from "../src/NodeParser/UndefinedTypeNodeParser"; -import { UnionNodeParser } from "../src/NodeParser/UnionNodeParser"; -import { UnknownTypeNodeParser } from "../src/NodeParser/UnknownTypeNodeParser"; -import { VoidTypeNodeParser } from "../src/NodeParser/VoidTypeNodeParser"; -import { SubNodeParser } from "../src/SubNodeParser"; -import { TopRefNodeParser } from "../src/TopRefNodeParser"; -import { SatisfiesNodeParser } from "../src/NodeParser/SatisfiesNodeParser"; +import { BasicAnnotationsReader } from "../src/AnnotationsReader/BasicAnnotationsReader.js"; +import { ExtendedAnnotationsReader } from "../src/AnnotationsReader/ExtendedAnnotationsReader.js"; +import { ChainNodeParser } from "../src/ChainNodeParser.js"; +import { CircularReferenceNodeParser } from "../src/CircularReferenceNodeParser.js"; +import { CompletedConfig } from "../src/Config.js"; +import { ExposeNodeParser } from "../src/ExposeNodeParser.js"; +import { MutableParser } from "../src/MutableParser.js"; +import { NodeParser } from "../src/NodeParser.js"; +import { AnnotatedNodeParser } from "../src/NodeParser/AnnotatedNodeParser.js"; +import { AnyTypeNodeParser } from "../src/NodeParser/AnyTypeNodeParser.js"; +import { ArrayLiteralExpressionNodeParser } from "../src/NodeParser/ArrayLiteralExpressionNodeParser.js"; +import { ArrayNodeParser } from "../src/NodeParser/ArrayNodeParser.js"; +import { AsExpressionNodeParser } from "../src/NodeParser/AsExpressionNodeParser.js"; +import { BooleanLiteralNodeParser } from "../src/NodeParser/BooleanLiteralNodeParser.js"; +import { BooleanTypeNodeParser } from "../src/NodeParser/BooleanTypeNodeParser.js"; +import { CallExpressionParser } from "../src/NodeParser/CallExpressionParser.js"; +import { ConditionalTypeNodeParser } from "../src/NodeParser/ConditionalTypeNodeParser.js"; +import { ConstructorNodeParser } from "../src/NodeParser/ConstructorNodeParser.js"; +import { EnumNodeParser } from "../src/NodeParser/EnumNodeParser.js"; +import { ExpressionWithTypeArgumentsNodeParser } from "../src/NodeParser/ExpressionWithTypeArgumentsNodeParser.js"; +import { FunctionNodeParser } from "../src/NodeParser/FunctionNodeParser.js"; +import { HiddenNodeParser } from "../src/NodeParser/HiddenTypeNodeParser.js"; +import { IndexedAccessTypeNodeParser } from "../src/NodeParser/IndexedAccessTypeNodeParser.js"; +import { InferTypeNodeParser } from "../src/NodeParser/InferTypeNodeParser.js"; +import { InterfaceAndClassNodeParser } from "../src/NodeParser/InterfaceAndClassNodeParser.js"; +import { IntersectionNodeParser } from "../src/NodeParser/IntersectionNodeParser.js"; +import { IntrinsicNodeParser } from "../src/NodeParser/IntrinsicNodeParser.js"; +import { LiteralNodeParser } from "../src/NodeParser/LiteralNodeParser.js"; +import { MappedTypeNodeParser } from "../src/NodeParser/MappedTypeNodeParser.js"; +import { NamedTupleMemberNodeParser } from "../src/NodeParser/NamedTupleMemberNodeParser.js"; +import { NeverTypeNodeParser } from "../src/NodeParser/NeverTypeNodeParser.js"; +import { NullLiteralNodeParser } from "../src/NodeParser/NullLiteralNodeParser.js"; +import { NumberLiteralNodeParser } from "../src/NodeParser/NumberLiteralNodeParser.js"; +import { NumberTypeNodeParser } from "../src/NodeParser/NumberTypeNodeParser.js"; +import { ObjectLiteralExpressionNodeParser } from "../src/NodeParser/ObjectLiteralExpressionNodeParser.js"; +import { ObjectTypeNodeParser } from "../src/NodeParser/ObjectTypeNodeParser.js"; +import { OptionalTypeNodeParser } from "../src/NodeParser/OptionalTypeNodeParser.js"; +import { ParameterParser } from "../src/NodeParser/ParameterParser.js"; +import { ParenthesizedNodeParser } from "../src/NodeParser/ParenthesizedNodeParser.js"; +import { PrefixUnaryExpressionNodeParser } from "../src/NodeParser/PrefixUnaryExpressionNodeParser.js"; +import { PropertyAccessExpressionParser } from "../src/NodeParser/PropertyAccessExpressionParser.js"; +import { RestTypeNodeParser } from "../src/NodeParser/RestTypeNodeParser.js"; +import { StringLiteralNodeParser } from "../src/NodeParser/StringLiteralNodeParser.js"; +import { StringTemplateLiteralNodeParser } from "../src/NodeParser/StringTemplateLiteralNodeParser.js"; +import { StringTypeNodeParser } from "../src/NodeParser/StringTypeNodeParser.js"; +import { SymbolTypeNodeParser } from "../src/NodeParser/SymbolTypeNodeParser.js"; +import { TupleNodeParser } from "../src/NodeParser/TupleNodeParser.js"; +import { TypeAliasNodeParser } from "../src/NodeParser/TypeAliasNodeParser.js"; +import { TypeLiteralNodeParser } from "../src/NodeParser/TypeLiteralNodeParser.js"; +import { TypeofNodeParser } from "../src/NodeParser/TypeofNodeParser.js"; +import { TypeOperatorNodeParser } from "../src/NodeParser/TypeOperatorNodeParser.js"; +import { TypeReferenceNodeParser } from "../src/NodeParser/TypeReferenceNodeParser.js"; +import { UndefinedTypeNodeParser } from "../src/NodeParser/UndefinedTypeNodeParser.js"; +import { UnionNodeParser } from "../src/NodeParser/UnionNodeParser.js"; +import { UnknownTypeNodeParser } from "../src/NodeParser/UnknownTypeNodeParser.js"; +import { VoidTypeNodeParser } from "../src/NodeParser/VoidTypeNodeParser.js"; +import { SubNodeParser } from "../src/SubNodeParser.js"; +import { TopRefNodeParser } from "../src/TopRefNodeParser.js"; +import { SatisfiesNodeParser } from "../src/NodeParser/SatisfiesNodeParser.js"; export type ParserAugmentor = (parser: MutableParser) => void; diff --git a/factory/program.ts b/factory/program.ts index 083a9fbc5..b9aa67df7 100644 --- a/factory/program.ts +++ b/factory/program.ts @@ -3,11 +3,11 @@ import * as path from "path"; import ts from "typescript"; import normalize from "normalize-path"; -import { CompletedConfig, Config } from "../src/Config"; -import { DiagnosticError } from "../src/Error/DiagnosticError"; -import { LogicError } from "../src/Error/LogicError"; -import { NoRootNamesError } from "../src/Error/NoRootNamesError"; -import { NoTSConfigError } from "../src/Error/NoTSConfigError"; +import { CompletedConfig, Config } from "../src/Config.js"; +import { DiagnosticError } from "../src/Error/DiagnosticError.js"; +import { LogicError } from "../src/Error/LogicError.js"; +import { NoRootNamesError } from "../src/Error/NoRootNamesError.js"; +import { NoTSConfigError } from "../src/Error/NoTSConfigError.js"; function loadTsConfigFile(configFile: string) { const raw = ts.sys.readFile(configFile); diff --git a/index.ts b/index.ts index 01c5431ac..0ec7cf8c6 100644 --- a/index.ts +++ b/index.ts @@ -1,166 +1,166 @@ -export * from "./src/Error/BaseError"; -export * from "./src/Error/DiagnosticError"; -export * from "./src/Error/LogicError"; -export * from "./src/Error/NoRootNamesError"; -export * from "./src/Error/NoRootTypeError"; -export * from "./src/Error/NoTSConfigError"; -export * from "./src/Error/UnknownNodeError"; -export * from "./src/Error/UnknownTypeError"; +export * from "./src/Error/BaseError.js"; +export * from "./src/Error/DiagnosticError.js"; +export * from "./src/Error/LogicError.js"; +export * from "./src/Error/NoRootNamesError.js"; +export * from "./src/Error/NoRootTypeError.js"; +export * from "./src/Error/NoTSConfigError.js"; +export * from "./src/Error/UnknownNodeError.js"; +export * from "./src/Error/UnknownTypeError.js"; -export * from "./src/Config"; +export * from "./src/Config.js"; -export * from "./src/Utils/allOfDefinition"; -export * from "./src/Utils/assert"; -export * from "./src/Utils/deepMerge"; -export * from "./src/Utils/derefType"; -export * from "./src/Utils/extractLiterals"; -export * from "./src/Utils/formatError"; -export * from "./src/Utils/hasJsDocTag"; -export * from "./src/Utils/intersectionOfArrays"; -export * from "./src/Utils/isAssignableTo"; -export * from "./src/Utils/isHidden"; -export * from "./src/Utils/modifiers"; -export * from "./src/Utils/narrowType"; -export * from "./src/Utils/nodeKey"; -export * from "./src/Utils/notNever"; -export * from "./src/Utils/preserveAnnotation"; -export * from "./src/Utils/removeUndefined"; -export * from "./src/Utils/removeUnreachable"; -export * from "./src/Utils/StringMap"; -export * from "./src/Utils/String"; -export * from "./src/Utils/symbolAtNode"; -export * from "./src/Utils/typeKeys"; -export * from "./src/Utils/typeName"; -export * from "./src/Utils/uniqueArray"; -export * from "./src/Utils/uniqueTypeArray"; +export * from "./src/Utils/allOfDefinition.js"; +export * from "./src/Utils/assert.js"; +export * from "./src/Utils/deepMerge.js"; +export * from "./src/Utils/derefType.js"; +export * from "./src/Utils/extractLiterals.js"; +export * from "./src/Utils/formatError.js"; +export * from "./src/Utils/hasJsDocTag.js"; +export * from "./src/Utils/intersectionOfArrays.js"; +export * from "./src/Utils/isAssignableTo.js"; +export * from "./src/Utils/isHidden.js"; +export * from "./src/Utils/modifiers.js"; +export * from "./src/Utils/narrowType.js"; +export * from "./src/Utils/nodeKey.js"; +export * from "./src/Utils/notNever.js"; +export * from "./src/Utils/preserveAnnotation.js"; +export * from "./src/Utils/removeUndefined.js"; +export * from "./src/Utils/removeUnreachable.js"; +export * from "./src/Utils/StringMap.js"; +export * from "./src/Utils/String.js"; +export * from "./src/Utils/symbolAtNode.js"; +export * from "./src/Utils/typeKeys.js"; +export * from "./src/Utils/typeName.js"; +export * from "./src/Utils/uniqueArray.js"; +export * from "./src/Utils/uniqueTypeArray.js"; -export * from "./src/Interfaces/AnnotationsReader"; -export * from "./src/Interfaces/MutableParser"; +export * from "./src/Interfaces/AnnotationsReader.js"; +export * from "./src/Interfaces/MutableParser.js"; -export * from "./src/Schema/Definition"; -export * from "./src/Schema/Schema"; +export * from "./src/Schema/Definition.js"; +export * from "./src/Schema/Schema.js"; -export * from "./src/Type/AliasType"; -export * from "./src/Type/AnnotatedType"; -export * from "./src/Type/AnyType"; -export * from "./src/Type/ArrayType"; -export * from "./src/Type/BaseType"; -export * from "./src/Type/BooleanType"; -export * from "./src/Type/DefinitionType"; -export * from "./src/Type/EnumType"; -export * from "./src/Type/FunctionType"; -export * from "./src/Type/HiddenType"; -export * from "./src/Type/IntersectionType"; -export * from "./src/Type/LiteralType"; -export * from "./src/Type/NeverType"; -export * from "./src/Type/NullType"; -export * from "./src/Type/NumberType"; -export * from "./src/Type/ObjectType"; -export * from "./src/Type/OptionalType"; -export * from "./src/Type/PrimitiveType"; -export * from "./src/Type/ReferenceType"; -export * from "./src/Type/RestType"; -export * from "./src/Type/StringType"; -export * from "./src/Type/SymbolType"; -export * from "./src/Type/TupleType"; -export * from "./src/Type/UndefinedType"; -export * from "./src/Type/UnionType"; -export * from "./src/Type/UnknownType"; -export * from "./src/Type/VoidType"; +export * from "./src/Type/AliasType.js"; +export * from "./src/Type/AnnotatedType.js"; +export * from "./src/Type/AnyType.js"; +export * from "./src/Type/ArrayType.js"; +export * from "./src/Type/BaseType.js"; +export * from "./src/Type/BooleanType.js"; +export * from "./src/Type/DefinitionType.js"; +export * from "./src/Type/EnumType.js"; +export * from "./src/Type/FunctionType.js"; +export * from "./src/Type/HiddenType.js"; +export * from "./src/Type/IntersectionType.js"; +export * from "./src/Type/LiteralType.js"; +export * from "./src/Type/NeverType.js"; +export * from "./src/Type/NullType.js"; +export * from "./src/Type/NumberType.js"; +export * from "./src/Type/ObjectType.js"; +export * from "./src/Type/OptionalType.js"; +export * from "./src/Type/PrimitiveType.js"; +export * from "./src/Type/ReferenceType.js"; +export * from "./src/Type/RestType.js"; +export * from "./src/Type/StringType.js"; +export * from "./src/Type/SymbolType.js"; +export * from "./src/Type/TupleType.js"; +export * from "./src/Type/UndefinedType.js"; +export * from "./src/Type/UnionType.js"; +export * from "./src/Type/UnknownType.js"; +export * from "./src/Type/VoidType.js"; -export * from "./src/AnnotationsReader/BasicAnnotationsReader"; -export * from "./src/AnnotationsReader/ExtendedAnnotationsReader"; +export * from "./src/AnnotationsReader/BasicAnnotationsReader.js"; +export * from "./src/AnnotationsReader/ExtendedAnnotationsReader.js"; -export * from "./src/TypeFormatter"; -export * from "./src/SubTypeFormatter"; -export * from "./src/ChainTypeFormatter"; -export * from "./src/MutableTypeFormatter"; -export * from "./src/CircularReferenceTypeFormatter"; -export * from "./src/TypeFormatter/AliasTypeFormatter"; -export * from "./src/TypeFormatter/AnnotatedTypeFormatter"; -export * from "./src/TypeFormatter/AnyTypeFormatter"; -export * from "./src/TypeFormatter/ArrayTypeFormatter"; -export * from "./src/TypeFormatter/BooleanTypeFormatter"; -export * from "./src/TypeFormatter/DefinitionTypeFormatter"; -export * from "./src/TypeFormatter/EnumTypeFormatter"; -export * from "./src/TypeFormatter/HiddenTypeFormatter"; -export * from "./src/TypeFormatter/IntersectionTypeFormatter"; -export * from "./src/TypeFormatter/LiteralTypeFormatter"; -export * from "./src/TypeFormatter/LiteralUnionTypeFormatter"; -export * from "./src/TypeFormatter/NeverTypeFormatter"; -export * from "./src/TypeFormatter/NullTypeFormatter"; -export * from "./src/TypeFormatter/NumberTypeFormatter"; -export * from "./src/TypeFormatter/ObjectTypeFormatter"; -export * from "./src/TypeFormatter/OptionalTypeFormatter"; -export * from "./src/TypeFormatter/PrimitiveUnionTypeFormatter"; -export * from "./src/TypeFormatter/ReferenceTypeFormatter"; -export * from "./src/TypeFormatter/RestTypeFormatter"; -export * from "./src/TypeFormatter/StringTypeFormatter"; -export * from "./src/TypeFormatter/SymbolTypeFormatter"; -export * from "./src/TypeFormatter/TupleTypeFormatter"; -export * from "./src/TypeFormatter/UndefinedTypeFormatter"; -export * from "./src/TypeFormatter/UnionTypeFormatter"; -export * from "./src/TypeFormatter/UnknownTypeFormatter"; -export * from "./src/TypeFormatter/VoidTypeFormatter"; -export * from "./src/TypeFormatter/FunctionTypeFormatter"; +export * from "./src/TypeFormatter.js"; +export * from "./src/SubTypeFormatter.js"; +export * from "./src/ChainTypeFormatter.js"; +export * from "./src/MutableTypeFormatter.js"; +export * from "./src/CircularReferenceTypeFormatter.js"; +export * from "./src/TypeFormatter/AliasTypeFormatter.js"; +export * from "./src/TypeFormatter/AnnotatedTypeFormatter.js"; +export * from "./src/TypeFormatter/AnyTypeFormatter.js"; +export * from "./src/TypeFormatter/ArrayTypeFormatter.js"; +export * from "./src/TypeFormatter/BooleanTypeFormatter.js"; +export * from "./src/TypeFormatter/DefinitionTypeFormatter.js"; +export * from "./src/TypeFormatter/EnumTypeFormatter.js"; +export * from "./src/TypeFormatter/HiddenTypeFormatter.js"; +export * from "./src/TypeFormatter/IntersectionTypeFormatter.js"; +export * from "./src/TypeFormatter/LiteralTypeFormatter.js"; +export * from "./src/TypeFormatter/LiteralUnionTypeFormatter.js"; +export * from "./src/TypeFormatter/NeverTypeFormatter.js"; +export * from "./src/TypeFormatter/NullTypeFormatter.js"; +export * from "./src/TypeFormatter/NumberTypeFormatter.js"; +export * from "./src/TypeFormatter/ObjectTypeFormatter.js"; +export * from "./src/TypeFormatter/OptionalTypeFormatter.js"; +export * from "./src/TypeFormatter/PrimitiveUnionTypeFormatter.js"; +export * from "./src/TypeFormatter/ReferenceTypeFormatter.js"; +export * from "./src/TypeFormatter/RestTypeFormatter.js"; +export * from "./src/TypeFormatter/StringTypeFormatter.js"; +export * from "./src/TypeFormatter/SymbolTypeFormatter.js"; +export * from "./src/TypeFormatter/TupleTypeFormatter.js"; +export * from "./src/TypeFormatter/UndefinedTypeFormatter.js"; +export * from "./src/TypeFormatter/UnionTypeFormatter.js"; +export * from "./src/TypeFormatter/UnknownTypeFormatter.js"; +export * from "./src/TypeFormatter/VoidTypeFormatter.js"; +export * from "./src/TypeFormatter/FunctionTypeFormatter.js"; -export * from "./src/NodeParser"; -export * from "./src/SubNodeParser"; -export * from "./src/ChainNodeParser"; -export * from "./src/ExposeNodeParser"; -export * from "./src/TopRefNodeParser"; -export * from "./src/CircularReferenceNodeParser"; -export * from "./src/NodeParser/AnnotatedNodeParser"; -export * from "./src/NodeParser/AnyTypeNodeParser"; -export * from "./src/NodeParser/ArrayLiteralExpressionNodeParser"; -export * from "./src/NodeParser/ArrayNodeParser"; -export * from "./src/NodeParser/AsExpressionNodeParser"; -export * from "./src/NodeParser/BooleanLiteralNodeParser"; -export * from "./src/NodeParser/BooleanTypeNodeParser"; -export * from "./src/NodeParser/CallExpressionParser"; -export * from "./src/NodeParser/ConditionalTypeNodeParser"; -export * from "./src/NodeParser/EnumNodeParser"; -export * from "./src/NodeParser/ExpressionWithTypeArgumentsNodeParser"; -export * from "./src/NodeParser/FunctionNodeParser"; -export * from "./src/NodeParser/ConstructorNodeParser"; -export * from "./src/NodeParser/HiddenTypeNodeParser"; -export * from "./src/NodeParser/IndexedAccessTypeNodeParser"; -export * from "./src/NodeParser/InterfaceAndClassNodeParser"; -export * from "./src/NodeParser/IntersectionNodeParser"; -export * from "./src/NodeParser/IntrinsicNodeParser"; -export * from "./src/NodeParser/LiteralNodeParser"; -export * from "./src/NodeParser/MappedTypeNodeParser"; -export * from "./src/NodeParser/NeverTypeNodeParser"; -export * from "./src/NodeParser/NullLiteralNodeParser"; -export * from "./src/NodeParser/NumberLiteralNodeParser"; -export * from "./src/NodeParser/NumberTypeNodeParser"; -export * from "./src/NodeParser/ObjectLiteralExpressionNodeParser"; -export * from "./src/NodeParser/ObjectTypeNodeParser"; -export * from "./src/NodeParser/OptionalTypeNodeParser"; -export * from "./src/NodeParser/ParameterParser"; -export * from "./src/NodeParser/ParenthesizedNodeParser"; -export * from "./src/NodeParser/PrefixUnaryExpressionNodeParser"; -export * from "./src/NodeParser/PropertyAccessExpressionParser"; -export * from "./src/NodeParser/RestTypeNodeParser"; -export * from "./src/NodeParser/StringLiteralNodeParser"; -export * from "./src/NodeParser/StringTemplateLiteralNodeParser"; -export * from "./src/NodeParser/StringTypeNodeParser"; -export * from "./src/NodeParser/SymbolTypeNodeParser"; -export * from "./src/NodeParser/TupleNodeParser"; -export * from "./src/NodeParser/TypeAliasNodeParser"; -export * from "./src/NodeParser/TypeLiteralNodeParser"; -export * from "./src/NodeParser/TypeofNodeParser"; -export * from "./src/NodeParser/TypeOperatorNodeParser"; -export * from "./src/NodeParser/TypeReferenceNodeParser"; -export * from "./src/NodeParser/UndefinedLiteralNodeParser"; -export * from "./src/NodeParser/UndefinedTypeNodeParser"; -export * from "./src/NodeParser/UnionNodeParser"; -export * from "./src/NodeParser/UnknownTypeNodeParser"; -export * from "./src/NodeParser/VoidTypeNodeParser"; +export * from "./src/NodeParser.js"; +export * from "./src/SubNodeParser.js"; +export * from "./src/ChainNodeParser.js"; +export * from "./src/ExposeNodeParser.js"; +export * from "./src/TopRefNodeParser.js"; +export * from "./src/CircularReferenceNodeParser.js"; +export * from "./src/NodeParser/AnnotatedNodeParser.js"; +export * from "./src/NodeParser/AnyTypeNodeParser.js"; +export * from "./src/NodeParser/ArrayLiteralExpressionNodeParser.js"; +export * from "./src/NodeParser/ArrayNodeParser.js"; +export * from "./src/NodeParser/AsExpressionNodeParser.js"; +export * from "./src/NodeParser/BooleanLiteralNodeParser.js"; +export * from "./src/NodeParser/BooleanTypeNodeParser.js"; +export * from "./src/NodeParser/CallExpressionParser.js"; +export * from "./src/NodeParser/ConditionalTypeNodeParser.js"; +export * from "./src/NodeParser/EnumNodeParser.js"; +export * from "./src/NodeParser/ExpressionWithTypeArgumentsNodeParser.js"; +export * from "./src/NodeParser/FunctionNodeParser.js"; +export * from "./src/NodeParser/ConstructorNodeParser.js"; +export * from "./src/NodeParser/HiddenTypeNodeParser.js"; +export * from "./src/NodeParser/IndexedAccessTypeNodeParser.js"; +export * from "./src/NodeParser/InterfaceAndClassNodeParser.js"; +export * from "./src/NodeParser/IntersectionNodeParser.js"; +export * from "./src/NodeParser/IntrinsicNodeParser.js"; +export * from "./src/NodeParser/LiteralNodeParser.js"; +export * from "./src/NodeParser/MappedTypeNodeParser.js"; +export * from "./src/NodeParser/NeverTypeNodeParser.js"; +export * from "./src/NodeParser/NullLiteralNodeParser.js"; +export * from "./src/NodeParser/NumberLiteralNodeParser.js"; +export * from "./src/NodeParser/NumberTypeNodeParser.js"; +export * from "./src/NodeParser/ObjectLiteralExpressionNodeParser.js"; +export * from "./src/NodeParser/ObjectTypeNodeParser.js"; +export * from "./src/NodeParser/OptionalTypeNodeParser.js"; +export * from "./src/NodeParser/ParameterParser.js"; +export * from "./src/NodeParser/ParenthesizedNodeParser.js"; +export * from "./src/NodeParser/PrefixUnaryExpressionNodeParser.js"; +export * from "./src/NodeParser/PropertyAccessExpressionParser.js"; +export * from "./src/NodeParser/RestTypeNodeParser.js"; +export * from "./src/NodeParser/StringLiteralNodeParser.js"; +export * from "./src/NodeParser/StringTemplateLiteralNodeParser.js"; +export * from "./src/NodeParser/StringTypeNodeParser.js"; +export * from "./src/NodeParser/SymbolTypeNodeParser.js"; +export * from "./src/NodeParser/TupleNodeParser.js"; +export * from "./src/NodeParser/TypeAliasNodeParser.js"; +export * from "./src/NodeParser/TypeLiteralNodeParser.js"; +export * from "./src/NodeParser/TypeofNodeParser.js"; +export * from "./src/NodeParser/TypeOperatorNodeParser.js"; +export * from "./src/NodeParser/TypeReferenceNodeParser.js"; +export * from "./src/NodeParser/UndefinedLiteralNodeParser.js"; +export * from "./src/NodeParser/UndefinedTypeNodeParser.js"; +export * from "./src/NodeParser/UnionNodeParser.js"; +export * from "./src/NodeParser/UnknownTypeNodeParser.js"; +export * from "./src/NodeParser/VoidTypeNodeParser.js"; -export * from "./src/SchemaGenerator"; +export * from "./src/SchemaGenerator.js"; -export * from "./factory"; +export * from "./factory/index.js"; import ts from "typescript"; export { ts }; diff --git a/jest.config.cjs b/jest.config.cjs index 353aef359..9b551660c 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -9,6 +9,9 @@ const config = { transform: { ".*": "babel-jest", }, + moduleNameMapper: { + "^(\\.{1,2}/.*)\\.js$": "$1", + }, }; module.exports = config; diff --git a/package.json b/package.json index f52ecb880..6e6f0429d 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "jest": "^29.7.0", "jest-junit": "^16.0.0", "prettier": "^3.2.5", - "ts-node": "^10.9.2", + "tsx": "^4.7.2", "typescript-eslint": "^7.7.0", "vega": "^5.28.0", "vega-lite": "^5.18.0" @@ -91,8 +91,8 @@ "test:fast": "cross-env FAST_TEST=1 jest test/ --verbose", "test:coverage": "yarn jest test/ --collectCoverage=true", "test:update": "cross-env UPDATE_SCHEMA=true yarn test:fast", - "debug": "node -r ts-node/register --inspect-brk ts-json-schema-generator.ts", - "run": "ts-node-transpile-only ts-json-schema-generator.ts", + "debug": "tsx --inspect-brk ts-json-schema-generator.ts", + "run": "tsx ts-json-schema-generator.ts", "release": "yarn build && auto shipit" }, "packageManager": "yarn@1.22.19" diff --git a/src/AnnotationsReader.ts b/src/AnnotationsReader.ts index 4f8743377..97235860d 100644 --- a/src/AnnotationsReader.ts +++ b/src/AnnotationsReader.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { Annotations } from "./Type/AnnotatedType"; +import { Annotations } from "./Type/AnnotatedType.js"; export interface AnnotationsReader { getAnnotations(node: ts.Node): Annotations | undefined; diff --git a/src/AnnotationsReader/BasicAnnotationsReader.ts b/src/AnnotationsReader/BasicAnnotationsReader.ts index affbfb027..59ae257df 100644 --- a/src/AnnotationsReader/BasicAnnotationsReader.ts +++ b/src/AnnotationsReader/BasicAnnotationsReader.ts @@ -1,8 +1,8 @@ import json5 from "json5"; import ts from "typescript"; -import { AnnotationsReader } from "../AnnotationsReader"; -import { Annotations } from "../Type/AnnotatedType"; -import { symbolAtNode } from "../Utils/symbolAtNode"; +import { AnnotationsReader } from "../AnnotationsReader.js"; +import { Annotations } from "../Type/AnnotatedType.js"; +import { symbolAtNode } from "../Utils/symbolAtNode.js"; export class BasicAnnotationsReader implements AnnotationsReader { private static requiresDollar = new Set(["id", "comment", "ref"]); diff --git a/src/AnnotationsReader/ExtendedAnnotationsReader.ts b/src/AnnotationsReader/ExtendedAnnotationsReader.ts index 31f25cf5b..4b5de96fa 100644 --- a/src/AnnotationsReader/ExtendedAnnotationsReader.ts +++ b/src/AnnotationsReader/ExtendedAnnotationsReader.ts @@ -1,8 +1,8 @@ import json5 from "json5"; import ts from "typescript"; -import { Annotations } from "../Type/AnnotatedType"; -import { symbolAtNode } from "../Utils/symbolAtNode"; -import { BasicAnnotationsReader } from "./BasicAnnotationsReader"; +import { Annotations } from "../Type/AnnotatedType.js"; +import { symbolAtNode } from "../Utils/symbolAtNode.js"; +import { BasicAnnotationsReader } from "./BasicAnnotationsReader.js"; export class ExtendedAnnotationsReader extends BasicAnnotationsReader { public constructor( diff --git a/src/ChainNodeParser.ts b/src/ChainNodeParser.ts index 3a464beff..0388009e3 100644 --- a/src/ChainNodeParser.ts +++ b/src/ChainNodeParser.ts @@ -1,10 +1,10 @@ import ts from "typescript"; -import { UnknownNodeError } from "./Error/UnknownNodeError"; -import { MutableParser } from "./MutableParser"; -import { Context } from "./NodeParser"; -import { SubNodeParser } from "./SubNodeParser"; -import { BaseType } from "./Type/BaseType"; -import { ReferenceType } from "./Type/ReferenceType"; +import { UnknownNodeError } from "./Error/UnknownNodeError.js"; +import { MutableParser } from "./MutableParser.js"; +import { Context } from "./NodeParser.js"; +import { SubNodeParser } from "./SubNodeParser.js"; +import { BaseType } from "./Type/BaseType.js"; +import { ReferenceType } from "./Type/ReferenceType.js"; export class ChainNodeParser implements SubNodeParser, MutableParser { protected readonly typeCaches = new WeakMap>(); diff --git a/src/ChainTypeFormatter.ts b/src/ChainTypeFormatter.ts index e4ef55102..068e95f98 100644 --- a/src/ChainTypeFormatter.ts +++ b/src/ChainTypeFormatter.ts @@ -1,8 +1,8 @@ -import { UnknownTypeError } from "./Error/UnknownTypeError"; -import { MutableTypeFormatter } from "./MutableTypeFormatter"; -import { Definition } from "./Schema/Definition"; -import { SubTypeFormatter } from "./SubTypeFormatter"; -import { BaseType } from "./Type/BaseType"; +import { UnknownTypeError } from "./Error/UnknownTypeError.js"; +import { MutableTypeFormatter } from "./MutableTypeFormatter.js"; +import { Definition } from "./Schema/Definition.js"; +import { SubTypeFormatter } from "./SubTypeFormatter.js"; +import { BaseType } from "./Type/BaseType.js"; export class ChainTypeFormatter implements SubTypeFormatter, MutableTypeFormatter { public constructor(protected typeFormatters: SubTypeFormatter[]) {} diff --git a/src/CircularReferenceNodeParser.ts b/src/CircularReferenceNodeParser.ts index 28c033568..88244d5f5 100644 --- a/src/CircularReferenceNodeParser.ts +++ b/src/CircularReferenceNodeParser.ts @@ -1,9 +1,9 @@ import ts from "typescript"; -import { Context } from "./NodeParser"; -import { SubNodeParser } from "./SubNodeParser"; -import { BaseType } from "./Type/BaseType"; -import { ReferenceType } from "./Type/ReferenceType"; -import { getKey } from "./Utils/nodeKey"; +import { Context } from "./NodeParser.js"; +import { SubNodeParser } from "./SubNodeParser.js"; +import { BaseType } from "./Type/BaseType.js"; +import { ReferenceType } from "./Type/ReferenceType.js"; +import { getKey } from "./Utils/nodeKey.js"; export class CircularReferenceNodeParser implements SubNodeParser { protected circular: Map = new Map(); diff --git a/src/CircularReferenceTypeFormatter.ts b/src/CircularReferenceTypeFormatter.ts index e7de1c02d..58856377d 100644 --- a/src/CircularReferenceTypeFormatter.ts +++ b/src/CircularReferenceTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "./Schema/Definition"; -import { SubTypeFormatter } from "./SubTypeFormatter"; -import { BaseType } from "./Type/BaseType"; -import { uniqueArray } from "./Utils/uniqueArray"; +import { Definition } from "./Schema/Definition.js"; +import { SubTypeFormatter } from "./SubTypeFormatter.js"; +import { BaseType } from "./Type/BaseType.js"; +import { uniqueArray } from "./Utils/uniqueArray.js"; export class CircularReferenceTypeFormatter implements SubTypeFormatter { protected definition: Map = new Map(); diff --git a/src/Error/DiagnosticError.ts b/src/Error/DiagnosticError.ts index 9f7ae3ff5..5b5d9539c 100644 --- a/src/Error/DiagnosticError.ts +++ b/src/Error/DiagnosticError.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { BaseError } from "./BaseError"; +import { BaseError } from "./BaseError.js"; export class DiagnosticError extends BaseError { public constructor(private diagnostics: readonly ts.Diagnostic[]) { diff --git a/src/Error/LogicError.ts b/src/Error/LogicError.ts index b315bd7e6..6288e444a 100644 --- a/src/Error/LogicError.ts +++ b/src/Error/LogicError.ts @@ -1,4 +1,4 @@ -import { BaseError } from "./BaseError"; +import { BaseError } from "./BaseError.js"; export class LogicError extends BaseError { public constructor(private msg: string) { diff --git a/src/Error/NoRootNamesError.ts b/src/Error/NoRootNamesError.ts index 34fd6173f..12524b987 100644 --- a/src/Error/NoRootNamesError.ts +++ b/src/Error/NoRootNamesError.ts @@ -1,4 +1,4 @@ -import { BaseError } from "./BaseError"; +import { BaseError } from "./BaseError.js"; export class NoRootNamesError extends BaseError { public get name(): string { diff --git a/src/Error/NoRootTypeError.ts b/src/Error/NoRootTypeError.ts index 06977a5d7..60ad8a021 100644 --- a/src/Error/NoRootTypeError.ts +++ b/src/Error/NoRootTypeError.ts @@ -1,4 +1,4 @@ -import { BaseError } from "./BaseError"; +import { BaseError } from "./BaseError.js"; export class NoRootTypeError extends BaseError { public constructor(private type: string) { diff --git a/src/Error/NoTSConfigError.ts b/src/Error/NoTSConfigError.ts index ddcebb26b..fdeaa5724 100644 --- a/src/Error/NoTSConfigError.ts +++ b/src/Error/NoTSConfigError.ts @@ -1,4 +1,4 @@ -import { BaseError } from "./BaseError"; +import { BaseError } from "./BaseError.js"; export class NoTSConfigError extends BaseError { public get name(): string { diff --git a/src/Error/UnknownNodeError.ts b/src/Error/UnknownNodeError.ts index 289fb1b09..29289209f 100644 --- a/src/Error/UnknownNodeError.ts +++ b/src/Error/UnknownNodeError.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { BaseError } from "./BaseError"; +import { BaseError } from "./BaseError.js"; export class UnknownNodeError extends BaseError { public constructor( diff --git a/src/Error/UnknownTypeError.ts b/src/Error/UnknownTypeError.ts index 9c06923e3..fec91fc18 100644 --- a/src/Error/UnknownTypeError.ts +++ b/src/Error/UnknownTypeError.ts @@ -1,5 +1,5 @@ -import { BaseType } from "../Type/BaseType"; -import { BaseError } from "./BaseError"; +import { BaseType } from "../Type/BaseType.js"; +import { BaseError } from "./BaseError.js"; export class UnknownTypeError extends BaseError { public constructor(private type: BaseType) { diff --git a/src/ExposeNodeParser.ts b/src/ExposeNodeParser.ts index 58d341984..2468361fe 100644 --- a/src/ExposeNodeParser.ts +++ b/src/ExposeNodeParser.ts @@ -1,11 +1,11 @@ import ts from "typescript"; -import { Context } from "./NodeParser"; -import { SubNodeParser } from "./SubNodeParser"; -import { BaseType } from "./Type/BaseType"; -import { DefinitionType } from "./Type/DefinitionType"; -import { ReferenceType } from "./Type/ReferenceType"; -import { hasJsDocTag } from "./Utils/hasJsDocTag"; -import { symbolAtNode } from "./Utils/symbolAtNode"; +import { Context } from "./NodeParser.js"; +import { SubNodeParser } from "./SubNodeParser.js"; +import { BaseType } from "./Type/BaseType.js"; +import { DefinitionType } from "./Type/DefinitionType.js"; +import { ReferenceType } from "./Type/ReferenceType.js"; +import { hasJsDocTag } from "./Utils/hasJsDocTag.js"; +import { symbolAtNode } from "./Utils/symbolAtNode.js"; export class ExposeNodeParser implements SubNodeParser { public constructor( diff --git a/src/Interfaces/AnnotationsReader.ts b/src/Interfaces/AnnotationsReader.ts index de36828e9..ec9aa89cb 100755 --- a/src/Interfaces/AnnotationsReader.ts +++ b/src/Interfaces/AnnotationsReader.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { Annotations } from "../Type/AnnotatedType"; +import { Annotations } from "../Type/AnnotatedType.js"; export interface AnnotationsReader { getAnnotations(node: ts.Node): Annotations | undefined; diff --git a/src/Interfaces/MutableParser.ts b/src/Interfaces/MutableParser.ts index 174cf665b..56eed1d34 100755 --- a/src/Interfaces/MutableParser.ts +++ b/src/Interfaces/MutableParser.ts @@ -1,4 +1,4 @@ -import { SubNodeParser } from "./SubNodeParser"; +import { SubNodeParser } from "./SubNodeParser.js"; export interface MutableParser { addNodeParser(parser: SubNodeParser): MutableParser; diff --git a/src/Interfaces/MutableTypeFormatter.ts b/src/Interfaces/MutableTypeFormatter.ts index d04ac5a74..ded6bd583 100755 --- a/src/Interfaces/MutableTypeFormatter.ts +++ b/src/Interfaces/MutableTypeFormatter.ts @@ -1,4 +1,4 @@ -import { SubTypeFormatter } from "./SubTypeFormatter"; +import { SubTypeFormatter } from "./SubTypeFormatter.js"; export interface MutableTypeFormatter { addTypeFormatter(formatter: SubTypeFormatter): MutableTypeFormatter; diff --git a/src/Interfaces/SubNodeParser.ts b/src/Interfaces/SubNodeParser.ts index 86e25a569..df0685150 100755 --- a/src/Interfaces/SubNodeParser.ts +++ b/src/Interfaces/SubNodeParser.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { NodeParser } from "../NodeParser"; +import { NodeParser } from "../NodeParser.js"; export interface SubNodeParser extends NodeParser { supportsNode(node: ts.Node): boolean; diff --git a/src/Interfaces/SubTypeFormatter.ts b/src/Interfaces/SubTypeFormatter.ts index 1faadb544..2134e5aab 100755 --- a/src/Interfaces/SubTypeFormatter.ts +++ b/src/Interfaces/SubTypeFormatter.ts @@ -1,5 +1,5 @@ -import { BaseType } from "../Type/BaseType"; -import { TypeFormatter } from "./TypeFormatter"; +import { BaseType } from "../Type/BaseType.js"; +import { TypeFormatter } from "./TypeFormatter.js"; export interface SubTypeFormatter extends TypeFormatter { supportsType(type: BaseType): boolean; diff --git a/src/Interfaces/TypeFormatter.ts b/src/Interfaces/TypeFormatter.ts index 1cf60f5a3..0eff45122 100755 --- a/src/Interfaces/TypeFormatter.ts +++ b/src/Interfaces/TypeFormatter.ts @@ -1,5 +1,5 @@ -import { Definition } from "../Schema/Definition"; -import { BaseType } from "../Type/BaseType"; +import { Definition } from "../Schema/Definition.js"; +import { BaseType } from "../Type/BaseType.js"; export interface TypeFormatter { getDefinition(type: BaseType): Definition; diff --git a/src/MutableParser.ts b/src/MutableParser.ts index 174cf665b..56eed1d34 100644 --- a/src/MutableParser.ts +++ b/src/MutableParser.ts @@ -1,4 +1,4 @@ -import { SubNodeParser } from "./SubNodeParser"; +import { SubNodeParser } from "./SubNodeParser.js"; export interface MutableParser { addNodeParser(parser: SubNodeParser): MutableParser; diff --git a/src/MutableTypeFormatter.ts b/src/MutableTypeFormatter.ts index d04ac5a74..ded6bd583 100644 --- a/src/MutableTypeFormatter.ts +++ b/src/MutableTypeFormatter.ts @@ -1,4 +1,4 @@ -import { SubTypeFormatter } from "./SubTypeFormatter"; +import { SubTypeFormatter } from "./SubTypeFormatter.js"; export interface MutableTypeFormatter { addTypeFormatter(formatter: SubTypeFormatter): MutableTypeFormatter; diff --git a/src/NodeParser.ts b/src/NodeParser.ts index c649a8706..b9f944dc3 100644 --- a/src/NodeParser.ts +++ b/src/NodeParser.ts @@ -1,8 +1,8 @@ import stringify from "safe-stable-stringify"; import ts from "typescript"; -import { BaseType } from "./Type/BaseType"; -import { ReferenceType } from "./Type/ReferenceType"; -import { getKey } from "./Utils/nodeKey"; +import { BaseType } from "./Type/BaseType.js"; +import { ReferenceType } from "./Type/ReferenceType.js"; +import { getKey } from "./Utils/nodeKey.js"; export class Context { private cacheKey: string | null = null; diff --git a/src/NodeParser/AnnotatedNodeParser.ts b/src/NodeParser/AnnotatedNodeParser.ts index aba9dbe1d..189f9ea20 100644 --- a/src/NodeParser/AnnotatedNodeParser.ts +++ b/src/NodeParser/AnnotatedNodeParser.ts @@ -1,15 +1,15 @@ import ts from "typescript"; -import { AnnotationsReader } from "../AnnotationsReader"; -import { ExtendedAnnotationsReader } from "../AnnotationsReader/ExtendedAnnotationsReader"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { AnnotatedType } from "../Type/AnnotatedType"; -import { BaseType } from "../Type/BaseType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { removeUndefined } from "../Utils/removeUndefined"; -import { DefinitionType } from "../Type/DefinitionType"; -import { UnionType } from "../Type/UnionType"; -import { AnyType } from "../Type/AnyType"; +import { AnnotationsReader } from "../AnnotationsReader.js"; +import { ExtendedAnnotationsReader } from "../AnnotationsReader/ExtendedAnnotationsReader.js"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { AnnotatedType } from "../Type/AnnotatedType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { removeUndefined } from "../Utils/removeUndefined.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { AnyType } from "../Type/AnyType.js"; export class AnnotatedNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/AnyTypeNodeParser.ts b/src/NodeParser/AnyTypeNodeParser.ts index da18ca2d3..0cb881384 100644 --- a/src/NodeParser/AnyTypeNodeParser.ts +++ b/src/NodeParser/AnyTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { AnyType } from "../Type/AnyType"; -import { BaseType } from "../Type/BaseType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { AnyType } from "../Type/AnyType.js"; +import { BaseType } from "../Type/BaseType.js"; export class AnyTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/ArrayLiteralExpressionNodeParser.ts b/src/NodeParser/ArrayLiteralExpressionNodeParser.ts index f114b298c..0b22b7975 100644 --- a/src/NodeParser/ArrayLiteralExpressionNodeParser.ts +++ b/src/NodeParser/ArrayLiteralExpressionNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { TupleType } from "../Type/TupleType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { TupleType } from "../Type/TupleType.js"; export class ArrayLiteralExpressionNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/ArrayNodeParser.ts b/src/NodeParser/ArrayNodeParser.ts index eb9fd357a..467f635d7 100644 --- a/src/NodeParser/ArrayNodeParser.ts +++ b/src/NodeParser/ArrayNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; export class ArrayNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/AsExpressionNodeParser.ts b/src/NodeParser/AsExpressionNodeParser.ts index e6b7929ec..68222bdda 100644 --- a/src/NodeParser/AsExpressionNodeParser.ts +++ b/src/NodeParser/AsExpressionNodeParser.ts @@ -1,8 +1,8 @@ -import { NodeParser } from "../NodeParser"; +import { NodeParser } from "../NodeParser.js"; import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; export class AsExpressionNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/BooleanLiteralNodeParser.ts b/src/NodeParser/BooleanLiteralNodeParser.ts index 81bc91750..ca1c39c30 100644 --- a/src/NodeParser/BooleanLiteralNodeParser.ts +++ b/src/NodeParser/BooleanLiteralNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; export class BooleanLiteralNodeParser implements SubNodeParser { public supportsNode(node: ts.BooleanLiteral): boolean { diff --git a/src/NodeParser/BooleanTypeNodeParser.ts b/src/NodeParser/BooleanTypeNodeParser.ts index 03ba17440..718172d49 100644 --- a/src/NodeParser/BooleanTypeNodeParser.ts +++ b/src/NodeParser/BooleanTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { BooleanType } from "../Type/BooleanType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { BooleanType } from "../Type/BooleanType.js"; export class BooleanTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/CallExpressionParser.ts b/src/NodeParser/CallExpressionParser.ts index 65ee1c070..90505a182 100644 --- a/src/NodeParser/CallExpressionParser.ts +++ b/src/NodeParser/CallExpressionParser.ts @@ -1,11 +1,11 @@ -import { TupleType } from "../Type/TupleType"; +import { TupleType } from "../Type/TupleType.js"; import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { UnionType } from "../Type/UnionType"; -import { LiteralType } from "../Type/LiteralType"; -import { SymbolType } from "../Type/SymbolType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { SymbolType } from "../Type/SymbolType.js"; export class CallExpressionParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/ConditionalTypeNodeParser.ts b/src/NodeParser/ConditionalTypeNodeParser.ts index d462f66a6..180e576a5 100644 --- a/src/NodeParser/ConditionalTypeNodeParser.ts +++ b/src/NodeParser/ConditionalTypeNodeParser.ts @@ -1,11 +1,11 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { isAssignableTo } from "../Utils/isAssignableTo"; -import { narrowType } from "../Utils/narrowType"; -import { UnionType } from "../Type/UnionType"; -import { NeverType } from "../Type/NeverType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { isAssignableTo } from "../Utils/isAssignableTo.js"; +import { narrowType } from "../Utils/narrowType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { NeverType } from "../Type/NeverType.js"; class CheckType { constructor( diff --git a/src/NodeParser/ConstructorNodeParser.ts b/src/NodeParser/ConstructorNodeParser.ts index 3af1748c6..f58025442 100644 --- a/src/NodeParser/ConstructorNodeParser.ts +++ b/src/NodeParser/ConstructorNodeParser.ts @@ -1,12 +1,12 @@ import ts from "typescript"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { ConstructorType } from "../Type/ConstructorType"; -import { FunctionOptions } from "../Config"; -import { NeverType } from "../Type/NeverType"; -import { Context, NodeParser } from "../NodeParser"; -import { DefinitionType } from "../Type/DefinitionType"; -import { getNamedArguments, getTypeName } from "./FunctionNodeParser"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { ConstructorType } from "../Type/ConstructorType.js"; +import { FunctionOptions } from "../Config.js"; +import { NeverType } from "../Type/NeverType.js"; +import { Context, NodeParser } from "../NodeParser.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { getNamedArguments, getTypeName } from "./FunctionNodeParser.js"; export class ConstructorNodeParser implements SubNodeParser { constructor( diff --git a/src/NodeParser/EnumNodeParser.ts b/src/NodeParser/EnumNodeParser.ts index 0064f6fd0..54d33b925 100644 --- a/src/NodeParser/EnumNodeParser.ts +++ b/src/NodeParser/EnumNodeParser.ts @@ -1,10 +1,10 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { EnumType, EnumValue } from "../Type/EnumType"; -import { isNodeHidden } from "../Utils/isHidden"; -import { getKey } from "../Utils/nodeKey"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { EnumType, EnumValue } from "../Type/EnumType.js"; +import { isNodeHidden } from "../Utils/isHidden.js"; +import { getKey } from "../Utils/nodeKey.js"; export class EnumNodeParser implements SubNodeParser { public constructor(protected typeChecker: ts.TypeChecker) {} diff --git a/src/NodeParser/ExpressionWithTypeArgumentsNodeParser.ts b/src/NodeParser/ExpressionWithTypeArgumentsNodeParser.ts index 07ce2c157..810056e4b 100644 --- a/src/NodeParser/ExpressionWithTypeArgumentsNodeParser.ts +++ b/src/NodeParser/ExpressionWithTypeArgumentsNodeParser.ts @@ -1,7 +1,7 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; export class ExpressionWithTypeArgumentsNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/FunctionNodeParser.ts b/src/NodeParser/FunctionNodeParser.ts index 89aea7c8e..55e05858c 100644 --- a/src/NodeParser/FunctionNodeParser.ts +++ b/src/NodeParser/FunctionNodeParser.ts @@ -1,13 +1,13 @@ import ts from "typescript"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { FunctionType } from "../Type/FunctionType"; -import { FunctionOptions } from "../Config"; -import { NeverType } from "../Type/NeverType"; -import { DefinitionType } from "../Type/DefinitionType"; -import { Context, NodeParser } from "../NodeParser"; -import { ObjectProperty, ObjectType } from "../Type/ObjectType"; -import { getKey } from "../Utils/nodeKey"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { FunctionType } from "../Type/FunctionType.js"; +import { FunctionOptions } from "../Config.js"; +import { NeverType } from "../Type/NeverType.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { Context, NodeParser } from "../NodeParser.js"; +import { ObjectProperty, ObjectType } from "../Type/ObjectType.js"; +import { getKey } from "../Utils/nodeKey.js"; export class FunctionNodeParser implements SubNodeParser { constructor( diff --git a/src/NodeParser/HiddenTypeNodeParser.ts b/src/NodeParser/HiddenTypeNodeParser.ts index 42a514278..681cb35bf 100644 --- a/src/NodeParser/HiddenTypeNodeParser.ts +++ b/src/NodeParser/HiddenTypeNodeParser.ts @@ -1,9 +1,9 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { HiddenType } from "../Type/HiddenType"; -import { isNodeHidden } from "../Utils/isHidden"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { HiddenType } from "../Type/HiddenType.js"; +import { isNodeHidden } from "../Utils/isHidden.js"; export class HiddenNodeParser implements SubNodeParser { public constructor(protected typeChecker: ts.TypeChecker) {} diff --git a/src/NodeParser/IndexedAccessTypeNodeParser.ts b/src/NodeParser/IndexedAccessTypeNodeParser.ts index 694e546cc..e6e2a7745 100644 --- a/src/NodeParser/IndexedAccessTypeNodeParser.ts +++ b/src/NodeParser/IndexedAccessTypeNodeParser.ts @@ -1,17 +1,17 @@ import ts from "typescript"; -import { LogicError } from "../Error/LogicError"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; -import { NeverType } from "../Type/NeverType"; -import { NumberType } from "../Type/NumberType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { StringType } from "../Type/StringType"; -import { TupleType } from "../Type/TupleType"; -import { UnionType } from "../Type/UnionType"; -import { derefType } from "../Utils/derefType"; -import { getTypeByKey } from "../Utils/typeKeys"; +import { LogicError } from "../Error/LogicError.js"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { NumberType } from "../Type/NumberType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { StringType } from "../Type/StringType.js"; +import { TupleType } from "../Type/TupleType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefType } from "../Utils/derefType.js"; +import { getTypeByKey } from "../Utils/typeKeys.js"; export class IndexedAccessTypeNodeParser implements SubNodeParser { public constructor( @@ -62,7 +62,7 @@ export class IndexedAccessTypeNodeParser implements SubNodeParser { const propertyTypes = indexTypes.map((type) => { if (!(type instanceof LiteralType || type instanceof StringType || type instanceof NumberType)) { throw new LogicError( - `Unexpected type "${type.getId()}" (expected "LiteralType" or "StringType" or "NumberType")` + `Unexpected type "${type.getId()}" (expected "LiteralType.js" or "StringType.js" or "NumberType.js")` ); } diff --git a/src/NodeParser/InferTypeNodeParser.ts b/src/NodeParser/InferTypeNodeParser.ts index 5ce69bc69..cde18a3d8 100644 --- a/src/NodeParser/InferTypeNodeParser.ts +++ b/src/NodeParser/InferTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { InferType } from "../Type/InferType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { InferType } from "../Type/InferType.js"; export class InferTypeNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/InterfaceAndClassNodeParser.ts b/src/NodeParser/InterfaceAndClassNodeParser.ts index b5ef4fa83..35f885588 100644 --- a/src/NodeParser/InterfaceAndClassNodeParser.ts +++ b/src/NodeParser/InterfaceAndClassNodeParser.ts @@ -1,14 +1,14 @@ import ts, { PropertyName } from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { NeverType } from "../Type/NeverType"; -import { ObjectProperty, ObjectType } from "../Type/ObjectType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { isNodeHidden } from "../Utils/isHidden"; -import { isPublic, isStatic } from "../Utils/modifiers"; -import { getKey } from "../Utils/nodeKey"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { ObjectProperty, ObjectType } from "../Type/ObjectType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { isNodeHidden } from "../Utils/isHidden.js"; +import { isPublic, isStatic } from "../Utils/modifiers.js"; +import { getKey } from "../Utils/nodeKey.js"; export class InterfaceAndClassNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/IntersectionNodeParser.ts b/src/NodeParser/IntersectionNodeParser.ts index a271665f8..0fb67b110 100644 --- a/src/NodeParser/IntersectionNodeParser.ts +++ b/src/NodeParser/IntersectionNodeParser.ts @@ -1,14 +1,14 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { IntersectionType } from "../Type/IntersectionType"; -import { PrimitiveType } from "../Type/PrimitiveType"; -import { UnionType } from "../Type/UnionType"; -import { derefType } from "../Utils/derefType"; -import { uniqueTypeArray } from "../Utils/uniqueTypeArray"; -import { UndefinedType } from "../Type/UndefinedType"; -import { NeverType } from "../Type/NeverType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { IntersectionType } from "../Type/IntersectionType.js"; +import { PrimitiveType } from "../Type/PrimitiveType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefType } from "../Utils/derefType.js"; +import { uniqueTypeArray } from "../Utils/uniqueTypeArray.js"; +import { UndefinedType } from "../Type/UndefinedType.js"; +import { NeverType } from "../Type/NeverType.js"; export class IntersectionNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/IntrinsicNodeParser.ts b/src/NodeParser/IntrinsicNodeParser.ts index 3d8f76ac6..9377dcfdd 100644 --- a/src/NodeParser/IntrinsicNodeParser.ts +++ b/src/NodeParser/IntrinsicNodeParser.ts @@ -1,11 +1,11 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; -import { UnionType } from "../Type/UnionType"; -import assert from "../Utils/assert"; -import { extractLiterals } from "../Utils/extractLiterals"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { UnionType } from "../Type/UnionType.js"; +import assert from "../Utils/assert.js"; +import { extractLiterals } from "../Utils/extractLiterals.js"; export const intrinsicMethods: Record string) | undefined> = { Uppercase: (v) => v.toUpperCase(), diff --git a/src/NodeParser/LiteralNodeParser.ts b/src/NodeParser/LiteralNodeParser.ts index bf81a977f..31ea08dea 100644 --- a/src/NodeParser/LiteralNodeParser.ts +++ b/src/NodeParser/LiteralNodeParser.ts @@ -1,7 +1,7 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; export class LiteralNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/MappedTypeNodeParser.ts b/src/NodeParser/MappedTypeNodeParser.ts index 99026a0aa..eab836e3f 100644 --- a/src/NodeParser/MappedTypeNodeParser.ts +++ b/src/NodeParser/MappedTypeNodeParser.ts @@ -1,23 +1,23 @@ import ts from "typescript"; -import { LogicError } from "../Error/LogicError"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { AnnotatedType } from "../Type/AnnotatedType"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { DefinitionType } from "../Type/DefinitionType"; -import { EnumType, EnumValue } from "../Type/EnumType"; -import { LiteralType } from "../Type/LiteralType"; -import { NeverType } from "../Type/NeverType"; -import { NumberType } from "../Type/NumberType"; -import { ObjectProperty, ObjectType } from "../Type/ObjectType"; -import { StringType } from "../Type/StringType"; -import { SymbolType } from "../Type/SymbolType"; -import { UnionType } from "../Type/UnionType"; -import { derefAnnotatedType, derefType } from "../Utils/derefType"; -import { getKey } from "../Utils/nodeKey"; -import { preserveAnnotation } from "../Utils/preserveAnnotation"; -import { removeUndefined } from "../Utils/removeUndefined"; +import { LogicError } from "../Error/LogicError.js"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { AnnotatedType } from "../Type/AnnotatedType.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { EnumType, EnumValue } from "../Type/EnumType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { NumberType } from "../Type/NumberType.js"; +import { ObjectProperty, ObjectType } from "../Type/ObjectType.js"; +import { StringType } from "../Type/StringType.js"; +import { SymbolType } from "../Type/SymbolType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefAnnotatedType, derefType } from "../Utils/derefType.js"; +import { getKey } from "../Utils/nodeKey.js"; +import { preserveAnnotation } from "../Utils/preserveAnnotation.js"; +import { removeUndefined } from "../Utils/removeUndefined.js"; export class MappedTypeNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/NamedTupleMemberNodeParser.ts b/src/NodeParser/NamedTupleMemberNodeParser.ts index 5f33c2216..168226196 100644 --- a/src/NodeParser/NamedTupleMemberNodeParser.ts +++ b/src/NodeParser/NamedTupleMemberNodeParser.ts @@ -1,11 +1,11 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { AnnotatedType } from "../Type/AnnotatedType"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { RestType } from "../Type/RestType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { AnnotatedType } from "../Type/AnnotatedType.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { RestType } from "../Type/RestType.js"; export class NamedTupleMemberNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/NeverTypeNodeParser.ts b/src/NodeParser/NeverTypeNodeParser.ts index 46d4c4fb6..5c1f950a6 100644 --- a/src/NodeParser/NeverTypeNodeParser.ts +++ b/src/NodeParser/NeverTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { NeverType } from "../Type/NeverType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NeverType } from "../Type/NeverType.js"; export class NeverTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/NullLiteralNodeParser.ts b/src/NodeParser/NullLiteralNodeParser.ts index a1dd7bc1f..9aa9f7d9d 100644 --- a/src/NodeParser/NullLiteralNodeParser.ts +++ b/src/NodeParser/NullLiteralNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { NullType } from "../Type/NullType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NullType } from "../Type/NullType.js"; export class NullLiteralNodeParser implements SubNodeParser { public supportsNode(node: ts.NullLiteral): boolean { diff --git a/src/NodeParser/NumberLiteralNodeParser.ts b/src/NodeParser/NumberLiteralNodeParser.ts index 38fd32fdb..5d0214aa6 100644 --- a/src/NodeParser/NumberLiteralNodeParser.ts +++ b/src/NodeParser/NumberLiteralNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; export class NumberLiteralNodeParser implements SubNodeParser { public supportsNode(node: ts.NumericLiteral): boolean { diff --git a/src/NodeParser/NumberTypeNodeParser.ts b/src/NodeParser/NumberTypeNodeParser.ts index 68ed1e21a..8ff6e201b 100644 --- a/src/NodeParser/NumberTypeNodeParser.ts +++ b/src/NodeParser/NumberTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { NumberType } from "../Type/NumberType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NumberType } from "../Type/NumberType.js"; export class NumberTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/ObjectLiteralExpressionNodeParser.ts b/src/NodeParser/ObjectLiteralExpressionNodeParser.ts index e741e43ac..409ef001d 100644 --- a/src/NodeParser/ObjectLiteralExpressionNodeParser.ts +++ b/src/NodeParser/ObjectLiteralExpressionNodeParser.ts @@ -1,10 +1,10 @@ -import { NodeParser } from "../NodeParser"; +import { NodeParser } from "../NodeParser.js"; import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { getKey } from "../Utils/nodeKey"; -import { ObjectProperty, ObjectType } from "../Type/ObjectType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { getKey } from "../Utils/nodeKey.js"; +import { ObjectProperty, ObjectType } from "../Type/ObjectType.js"; export class ObjectLiteralExpressionNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/ObjectTypeNodeParser.ts b/src/NodeParser/ObjectTypeNodeParser.ts index fe6e63023..b2e796e71 100644 --- a/src/NodeParser/ObjectTypeNodeParser.ts +++ b/src/NodeParser/ObjectTypeNodeParser.ts @@ -1,9 +1,9 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { ObjectType } from "../Type/ObjectType"; -import { getKey } from "../Utils/nodeKey"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { ObjectType } from "../Type/ObjectType.js"; +import { getKey } from "../Utils/nodeKey.js"; export class ObjectTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/OptionalTypeNodeParser.ts b/src/NodeParser/OptionalTypeNodeParser.ts index ed0ab2ea5..4eeab8c64 100644 --- a/src/NodeParser/OptionalTypeNodeParser.ts +++ b/src/NodeParser/OptionalTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { OptionalType } from "../Type/OptionalType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { OptionalType } from "../Type/OptionalType.js"; export class OptionalTypeNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/ParameterParser.ts b/src/NodeParser/ParameterParser.ts index b98776406..bfb190727 100644 --- a/src/NodeParser/ParameterParser.ts +++ b/src/NodeParser/ParameterParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { NodeParser } from "../NodeParser"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; +import { NodeParser } from "../NodeParser.js"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; export class ParameterParser implements SubNodeParser { constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/ParenthesizedNodeParser.ts b/src/NodeParser/ParenthesizedNodeParser.ts index 4957f965b..5b83e965a 100644 --- a/src/NodeParser/ParenthesizedNodeParser.ts +++ b/src/NodeParser/ParenthesizedNodeParser.ts @@ -1,7 +1,7 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; export class ParenthesizedNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/PrefixUnaryExpressionNodeParser.ts b/src/NodeParser/PrefixUnaryExpressionNodeParser.ts index 8ff866bb9..ec11bb1bd 100644 --- a/src/NodeParser/PrefixUnaryExpressionNodeParser.ts +++ b/src/NodeParser/PrefixUnaryExpressionNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; export class PrefixUnaryExpressionNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/PropertyAccessExpressionParser.ts b/src/NodeParser/PropertyAccessExpressionParser.ts index bf6bee69f..ce13e8cb8 100644 --- a/src/NodeParser/PropertyAccessExpressionParser.ts +++ b/src/NodeParser/PropertyAccessExpressionParser.ts @@ -1,7 +1,7 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; export class PropertyAccessExpressionParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/RestTypeNodeParser.ts b/src/NodeParser/RestTypeNodeParser.ts index 357b7ed3a..0652f49b7 100644 --- a/src/NodeParser/RestTypeNodeParser.ts +++ b/src/NodeParser/RestTypeNodeParser.ts @@ -1,11 +1,11 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { InferType } from "../Type/InferType"; -import { RestType } from "../Type/RestType"; -import { TupleType } from "../Type/TupleType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { InferType } from "../Type/InferType.js"; +import { RestType } from "../Type/RestType.js"; +import { TupleType } from "../Type/TupleType.js"; export class RestTypeNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/SatisfiesNodeParser.ts b/src/NodeParser/SatisfiesNodeParser.ts index effcef473..1553b0ec0 100644 --- a/src/NodeParser/SatisfiesNodeParser.ts +++ b/src/NodeParser/SatisfiesNodeParser.ts @@ -1,7 +1,7 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; export class SatisfiesNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/StringLiteralNodeParser.ts b/src/NodeParser/StringLiteralNodeParser.ts index ae24a6f62..45063fe0f 100644 --- a/src/NodeParser/StringLiteralNodeParser.ts +++ b/src/NodeParser/StringLiteralNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; export class StringLiteralNodeParser implements SubNodeParser { public supportsNode(node: ts.StringLiteral): boolean { diff --git a/src/NodeParser/StringTemplateLiteralNodeParser.ts b/src/NodeParser/StringTemplateLiteralNodeParser.ts index 945212b67..e0273ee70 100644 --- a/src/NodeParser/StringTemplateLiteralNodeParser.ts +++ b/src/NodeParser/StringTemplateLiteralNodeParser.ts @@ -1,12 +1,12 @@ import ts from "typescript"; -import { UnknownTypeError } from "../Error/UnknownTypeError"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; -import { StringType } from "../Type/StringType"; -import { UnionType } from "../Type/UnionType"; -import { extractLiterals } from "../Utils/extractLiterals"; +import { UnknownTypeError } from "../Error/UnknownTypeError.js"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { StringType } from "../Type/StringType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { extractLiterals } from "../Utils/extractLiterals.js"; export class StringTemplateLiteralNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/StringTypeNodeParser.ts b/src/NodeParser/StringTypeNodeParser.ts index d784f2ae5..104c9ed7d 100644 --- a/src/NodeParser/StringTypeNodeParser.ts +++ b/src/NodeParser/StringTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { StringType } from "../Type/StringType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { StringType } from "../Type/StringType.js"; export class StringTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/SymbolTypeNodeParser.ts b/src/NodeParser/SymbolTypeNodeParser.ts index 2f6c60670..2dd70eefe 100644 --- a/src/NodeParser/SymbolTypeNodeParser.ts +++ b/src/NodeParser/SymbolTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { SymbolType } from "../Type/SymbolType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { SymbolType } from "../Type/SymbolType.js"; export class SymbolTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/TupleNodeParser.ts b/src/NodeParser/TupleNodeParser.ts index 7be39ca76..cd07bf2b7 100644 --- a/src/NodeParser/TupleNodeParser.ts +++ b/src/NodeParser/TupleNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { TupleType } from "../Type/TupleType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { TupleType } from "../Type/TupleType.js"; export class TupleNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/TypeAliasNodeParser.ts b/src/NodeParser/TypeAliasNodeParser.ts index 2425b19e5..4a23c6008 100644 --- a/src/NodeParser/TypeAliasNodeParser.ts +++ b/src/NodeParser/TypeAliasNodeParser.ts @@ -1,11 +1,11 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { AliasType } from "../Type/AliasType"; -import { BaseType } from "../Type/BaseType"; -import { NeverType } from "../Type/NeverType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { getKey } from "../Utils/nodeKey"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { AliasType } from "../Type/AliasType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { getKey } from "../Utils/nodeKey.js"; export class TypeAliasNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/TypeLiteralNodeParser.ts b/src/NodeParser/TypeLiteralNodeParser.ts index e6bd13ce9..fb6c52a46 100644 --- a/src/NodeParser/TypeLiteralNodeParser.ts +++ b/src/NodeParser/TypeLiteralNodeParser.ts @@ -1,12 +1,12 @@ import ts, { MethodSignature, PropertySignature } from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { NeverType } from "../Type/NeverType"; -import { ObjectProperty, ObjectType } from "../Type/ObjectType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { isNodeHidden } from "../Utils/isHidden"; -import { getKey } from "../Utils/nodeKey"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { ObjectProperty, ObjectType } from "../Type/ObjectType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { isNodeHidden } from "../Utils/isHidden.js"; +import { getKey } from "../Utils/nodeKey.js"; export class TypeLiteralNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/TypeOperatorNodeParser.ts b/src/NodeParser/TypeOperatorNodeParser.ts index 8e7e06555..78a9c16c2 100644 --- a/src/NodeParser/TypeOperatorNodeParser.ts +++ b/src/NodeParser/TypeOperatorNodeParser.ts @@ -1,14 +1,14 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { NumberType } from "../Type/NumberType"; -import { ObjectType } from "../Type/ObjectType"; -import { StringType } from "../Type/StringType"; -import { UnionType } from "../Type/UnionType"; -import { derefType } from "../Utils/derefType"; -import { getTypeKeys } from "../Utils/typeKeys"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NumberType } from "../Type/NumberType.js"; +import { ObjectType } from "../Type/ObjectType.js"; +import { StringType } from "../Type/StringType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefType } from "../Utils/derefType.js"; +import { getTypeKeys } from "../Utils/typeKeys.js"; export class TypeOperatorNodeParser implements SubNodeParser { public constructor(protected childNodeParser: NodeParser) {} diff --git a/src/NodeParser/TypeReferenceNodeParser.ts b/src/NodeParser/TypeReferenceNodeParser.ts index fbf643c46..3cd57a0dd 100644 --- a/src/NodeParser/TypeReferenceNodeParser.ts +++ b/src/NodeParser/TypeReferenceNodeParser.ts @@ -1,12 +1,12 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import type { SubNodeParser } from "../SubNodeParser"; -import { AnnotatedType } from "../Type/AnnotatedType"; -import { AnyType } from "../Type/AnyType"; -import { ArrayType } from "../Type/ArrayType"; -import type { BaseType } from "../Type/BaseType"; -import { StringType } from "../Type/StringType"; +import { Context, NodeParser } from "../NodeParser.js"; +import type { SubNodeParser } from "../SubNodeParser.js"; +import { AnnotatedType } from "../Type/AnnotatedType.js"; +import { AnyType } from "../Type/AnyType.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import type { BaseType } from "../Type/BaseType.js"; +import { StringType } from "../Type/StringType.js"; const invalidTypes: Record = { [ts.SyntaxKind.ModuleDeclaration]: true, diff --git a/src/NodeParser/TypeofNodeParser.ts b/src/NodeParser/TypeofNodeParser.ts index c70e361a2..f1a55422d 100644 --- a/src/NodeParser/TypeofNodeParser.ts +++ b/src/NodeParser/TypeofNodeParser.ts @@ -1,14 +1,14 @@ import ts from "typescript"; -import { LogicError } from "../Error/LogicError"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { ObjectType, ObjectProperty } from "../Type/ObjectType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { getKey } from "../Utils/nodeKey"; -import { LiteralType } from "../Type/LiteralType"; -import { NeverType } from "../Type/NeverType"; -import { FunctionType } from "../Type/FunctionType"; +import { LogicError } from "../Error/LogicError.js"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { ObjectType, ObjectProperty } from "../Type/ObjectType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { getKey } from "../Utils/nodeKey.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { FunctionType } from "../Type/FunctionType.js"; export class TypeofNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/UndefinedLiteralNodeParser.ts b/src/NodeParser/UndefinedLiteralNodeParser.ts index 019ccda8f..a821c0966 100644 --- a/src/NodeParser/UndefinedLiteralNodeParser.ts +++ b/src/NodeParser/UndefinedLiteralNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { NullType } from "../Type/NullType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NullType } from "../Type/NullType.js"; export class UndefinedLiteralNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/UndefinedTypeNodeParser.ts b/src/NodeParser/UndefinedTypeNodeParser.ts index 046cbbfd9..de05142ec 100644 --- a/src/NodeParser/UndefinedTypeNodeParser.ts +++ b/src/NodeParser/UndefinedTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { UndefinedType } from "../Type/UndefinedType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { UndefinedType } from "../Type/UndefinedType.js"; export class UndefinedTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/UnionNodeParser.ts b/src/NodeParser/UnionNodeParser.ts index fe3cc58e6..d2bf44775 100644 --- a/src/NodeParser/UnionNodeParser.ts +++ b/src/NodeParser/UnionNodeParser.ts @@ -1,10 +1,10 @@ import ts from "typescript"; -import { Context, NodeParser } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { UnionType } from "../Type/UnionType"; -import { BaseType } from "../Type/BaseType"; -import { notNever } from "../Utils/notNever"; -import { NeverType } from "../Type/NeverType"; +import { Context, NodeParser } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { UnionType } from "../Type/UnionType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { notNever } from "../Utils/notNever.js"; +import { NeverType } from "../Type/NeverType.js"; export class UnionNodeParser implements SubNodeParser { public constructor( diff --git a/src/NodeParser/UnknownTypeNodeParser.ts b/src/NodeParser/UnknownTypeNodeParser.ts index 5e794fcf1..fcb5b8cfd 100644 --- a/src/NodeParser/UnknownTypeNodeParser.ts +++ b/src/NodeParser/UnknownTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { UnknownType } from "../Type/UnknownType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { UnknownType } from "../Type/UnknownType.js"; export class UnknownTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/NodeParser/VoidTypeNodeParser.ts b/src/NodeParser/VoidTypeNodeParser.ts index b4a10ff71..c2f89c15e 100644 --- a/src/NodeParser/VoidTypeNodeParser.ts +++ b/src/NodeParser/VoidTypeNodeParser.ts @@ -1,8 +1,8 @@ import ts from "typescript"; -import { Context } from "../NodeParser"; -import { SubNodeParser } from "../SubNodeParser"; -import { BaseType } from "../Type/BaseType"; -import { VoidType } from "../Type/VoidType"; +import { Context } from "../NodeParser.js"; +import { SubNodeParser } from "../SubNodeParser.js"; +import { BaseType } from "../Type/BaseType.js"; +import { VoidType } from "../Type/VoidType.js"; export class VoidTypeNodeParser implements SubNodeParser { public supportsNode(node: ts.KeywordTypeNode): boolean { diff --git a/src/SchemaGenerator.ts b/src/SchemaGenerator.ts index 479649bbb..b452a89b3 100644 --- a/src/SchemaGenerator.ts +++ b/src/SchemaGenerator.ts @@ -1,16 +1,16 @@ import ts from "typescript"; -import { NoRootTypeError } from "./Error/NoRootTypeError"; -import { Context, NodeParser } from "./NodeParser"; -import { Definition } from "./Schema/Definition"; -import { Schema } from "./Schema/Schema"; -import { BaseType } from "./Type/BaseType"; -import { DefinitionType } from "./Type/DefinitionType"; -import { TypeFormatter } from "./TypeFormatter"; -import { StringMap } from "./Utils/StringMap"; -import { localSymbolAtNode, symbolAtNode } from "./Utils/symbolAtNode"; -import { removeUnreachable } from "./Utils/removeUnreachable"; -import { Config } from "./Config"; -import { hasJsDocTag } from "./Utils/hasJsDocTag"; +import { NoRootTypeError } from "./Error/NoRootTypeError.js"; +import { Context, NodeParser } from "./NodeParser.js"; +import { Definition } from "./Schema/Definition.js"; +import { Schema } from "./Schema/Schema.js"; +import { BaseType } from "./Type/BaseType.js"; +import { DefinitionType } from "./Type/DefinitionType.js"; +import { TypeFormatter } from "./TypeFormatter.js"; +import { StringMap } from "./Utils/StringMap.js"; +import { localSymbolAtNode, symbolAtNode } from "./Utils/symbolAtNode.js"; +import { removeUnreachable } from "./Utils/removeUnreachable.js"; +import { Config } from "./Config.js"; +import { hasJsDocTag } from "./Utils/hasJsDocTag.js"; export class SchemaGenerator { public constructor( diff --git a/src/SubNodeParser.ts b/src/SubNodeParser.ts index 92b2cd200..2109d4a40 100644 --- a/src/SubNodeParser.ts +++ b/src/SubNodeParser.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { NodeParser } from "./NodeParser"; +import { NodeParser } from "./NodeParser.js"; export interface SubNodeParser extends NodeParser { supportsNode(node: ts.Node): boolean; diff --git a/src/SubTypeFormatter.ts b/src/SubTypeFormatter.ts index a1b8a5e85..1e5dc717e 100644 --- a/src/SubTypeFormatter.ts +++ b/src/SubTypeFormatter.ts @@ -1,5 +1,5 @@ -import { BaseType } from "./Type/BaseType"; -import { TypeFormatter } from "./TypeFormatter"; +import { BaseType } from "./Type/BaseType.js"; +import { TypeFormatter } from "./TypeFormatter.js"; export interface SubTypeFormatter extends TypeFormatter { supportsType(type: BaseType): boolean; diff --git a/src/TopRefNodeParser.ts b/src/TopRefNodeParser.ts index 1a6b9a4a9..1ed4d2b7d 100644 --- a/src/TopRefNodeParser.ts +++ b/src/TopRefNodeParser.ts @@ -1,7 +1,7 @@ import ts from "typescript"; -import { Context, NodeParser } from "./NodeParser"; -import { BaseType } from "./Type/BaseType"; -import { DefinitionType } from "./Type/DefinitionType"; +import { Context, NodeParser } from "./NodeParser.js"; +import { BaseType } from "./Type/BaseType.js"; +import { DefinitionType } from "./Type/DefinitionType.js"; export class TopRefNodeParser implements NodeParser { public constructor( diff --git a/src/Type/AliasType.ts b/src/Type/AliasType.ts index e8d2e6887..8d6d84765 100644 --- a/src/Type/AliasType.ts +++ b/src/Type/AliasType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class AliasType extends BaseType { public constructor( diff --git a/src/Type/AnnotatedType.ts b/src/Type/AnnotatedType.ts index da55f5558..a3cfa3828 100644 --- a/src/Type/AnnotatedType.ts +++ b/src/Type/AnnotatedType.ts @@ -1,5 +1,5 @@ -import { BaseType } from "./BaseType"; -import { hash } from "../Utils/nodeKey"; +import { BaseType } from "./BaseType.js"; +import { hash } from "../Utils/nodeKey.js"; export interface Annotations { [name: string]: any; diff --git a/src/Type/AnyType.ts b/src/Type/AnyType.ts index 8bb64930b..c4390c672 100644 --- a/src/Type/AnyType.ts +++ b/src/Type/AnyType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class AnyType extends BaseType { public getId(): string { diff --git a/src/Type/ArrayType.ts b/src/Type/ArrayType.ts index 915fa3ce1..82057cb6a 100644 --- a/src/Type/ArrayType.ts +++ b/src/Type/ArrayType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class ArrayType extends BaseType { public constructor(private item: BaseType) { diff --git a/src/Type/BooleanType.ts b/src/Type/BooleanType.ts index 843dc888f..87169bdae 100644 --- a/src/Type/BooleanType.ts +++ b/src/Type/BooleanType.ts @@ -1,4 +1,4 @@ -import { PrimitiveType } from "./PrimitiveType"; +import { PrimitiveType } from "./PrimitiveType.js"; export class BooleanType extends PrimitiveType { public getId(): string { diff --git a/src/Type/ConstructorType.ts b/src/Type/ConstructorType.ts index 562b29c97..4220ca3c0 100644 --- a/src/Type/ConstructorType.ts +++ b/src/Type/ConstructorType.ts @@ -1,6 +1,6 @@ import ts from "typescript"; -import { BaseType } from "./BaseType"; -import { ObjectType } from "./ObjectType"; +import { BaseType } from "./BaseType.js"; +import { ObjectType } from "./ObjectType.js"; export class ConstructorType extends BaseType { private comment: string; diff --git a/src/Type/DefinitionType.ts b/src/Type/DefinitionType.ts index e7f8f71d8..b1478a76f 100644 --- a/src/Type/DefinitionType.ts +++ b/src/Type/DefinitionType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class DefinitionType extends BaseType { public constructor( diff --git a/src/Type/EnumType.ts b/src/Type/EnumType.ts index 0a252ae45..dde8dff3e 100644 --- a/src/Type/EnumType.ts +++ b/src/Type/EnumType.ts @@ -1,6 +1,6 @@ -import { BaseType } from "./BaseType"; -import { LiteralType } from "./LiteralType"; -import { NullType } from "./NullType"; +import { BaseType } from "./BaseType.js"; +import { LiteralType } from "./LiteralType.js"; +import { NullType } from "./NullType.js"; export type EnumValue = string | boolean | number | null; diff --git a/src/Type/FunctionType.ts b/src/Type/FunctionType.ts index af064bc60..6db156033 100644 --- a/src/Type/FunctionType.ts +++ b/src/Type/FunctionType.ts @@ -1,6 +1,6 @@ import ts from "typescript"; -import { BaseType } from "./BaseType"; -import { ObjectType } from "./ObjectType"; +import { BaseType } from "./BaseType.js"; +import { ObjectType } from "./ObjectType.js"; export class FunctionType extends BaseType { private comment: string; diff --git a/src/Type/HiddenType.ts b/src/Type/HiddenType.ts index 07fa68034..ac919856e 100644 --- a/src/Type/HiddenType.ts +++ b/src/Type/HiddenType.ts @@ -1,4 +1,4 @@ -import { NeverType } from "./NeverType"; +import { NeverType } from "./NeverType.js"; export class HiddenType extends NeverType { public getId(): string { diff --git a/src/Type/InferType.ts b/src/Type/InferType.ts index 6a2ed2be0..42809f6d0 100644 --- a/src/Type/InferType.ts +++ b/src/Type/InferType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class InferType extends BaseType { constructor(private id: string) { diff --git a/src/Type/IntersectionType.ts b/src/Type/IntersectionType.ts index ea410d383..1b75f8961 100644 --- a/src/Type/IntersectionType.ts +++ b/src/Type/IntersectionType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class IntersectionType extends BaseType { public constructor(private types: BaseType[]) { diff --git a/src/Type/LiteralType.ts b/src/Type/LiteralType.ts index 4a37d20fa..e520d3c38 100644 --- a/src/Type/LiteralType.ts +++ b/src/Type/LiteralType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export type LiteralValue = string | number | boolean; diff --git a/src/Type/NeverType.ts b/src/Type/NeverType.ts index f2f8c7e78..15804d760 100644 --- a/src/Type/NeverType.ts +++ b/src/Type/NeverType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class NeverType extends BaseType { public getId(): string { diff --git a/src/Type/NullType.ts b/src/Type/NullType.ts index 57fd7ffb7..22499fdb3 100644 --- a/src/Type/NullType.ts +++ b/src/Type/NullType.ts @@ -1,4 +1,4 @@ -import { PrimitiveType } from "./PrimitiveType"; +import { PrimitiveType } from "./PrimitiveType.js"; export class NullType extends PrimitiveType { public getId(): string { diff --git a/src/Type/NumberType.ts b/src/Type/NumberType.ts index 7d5dc7cba..6f3b9edec 100644 --- a/src/Type/NumberType.ts +++ b/src/Type/NumberType.ts @@ -1,4 +1,4 @@ -import { PrimitiveType } from "./PrimitiveType"; +import { PrimitiveType } from "./PrimitiveType.js"; export class NumberType extends PrimitiveType { public getId(): string { diff --git a/src/Type/ObjectType.ts b/src/Type/ObjectType.ts index 6828df694..b39e1c71d 100644 --- a/src/Type/ObjectType.ts +++ b/src/Type/ObjectType.ts @@ -1,5 +1,5 @@ -import { BaseType } from "./BaseType"; -import { strip } from "../Utils/String"; +import { BaseType } from "./BaseType.js"; +import { strip } from "../Utils/String.js"; export class ObjectProperty { public constructor( diff --git a/src/Type/OptionalType.ts b/src/Type/OptionalType.ts index b1faf6fb8..761540644 100644 --- a/src/Type/OptionalType.ts +++ b/src/Type/OptionalType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class OptionalType extends BaseType { public constructor(private item: BaseType) { diff --git a/src/Type/PrimitiveType.ts b/src/Type/PrimitiveType.ts index 91f62e1f0..799aa01b7 100644 --- a/src/Type/PrimitiveType.ts +++ b/src/Type/PrimitiveType.ts @@ -1,3 +1,3 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export abstract class PrimitiveType extends BaseType {} diff --git a/src/Type/ReferenceType.ts b/src/Type/ReferenceType.ts index 925ca72a1..74bd9946e 100644 --- a/src/Type/ReferenceType.ts +++ b/src/Type/ReferenceType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class ReferenceType extends BaseType { private type: BaseType | null = null; diff --git a/src/Type/RestType.ts b/src/Type/RestType.ts index 5d4b9190f..c558966f9 100644 --- a/src/Type/RestType.ts +++ b/src/Type/RestType.ts @@ -1,7 +1,7 @@ -import { ArrayType } from "./ArrayType"; -import { BaseType } from "./BaseType"; -import { InferType } from "./InferType"; -import { TupleType } from "./TupleType"; +import { ArrayType } from "./ArrayType.js"; +import { BaseType } from "./BaseType.js"; +import { InferType } from "./InferType.js"; +import { TupleType } from "./TupleType.js"; export class RestType extends BaseType { public constructor( diff --git a/src/Type/StringType.ts b/src/Type/StringType.ts index faf7dda91..6ff9a5d2b 100644 --- a/src/Type/StringType.ts +++ b/src/Type/StringType.ts @@ -1,4 +1,4 @@ -import { PrimitiveType } from "./PrimitiveType"; +import { PrimitiveType } from "./PrimitiveType.js"; export class StringType extends PrimitiveType { public getId(): string { diff --git a/src/Type/SymbolType.ts b/src/Type/SymbolType.ts index 4ef61c652..a70db3888 100644 --- a/src/Type/SymbolType.ts +++ b/src/Type/SymbolType.ts @@ -1,4 +1,4 @@ -import { PrimitiveType } from "./PrimitiveType"; +import { PrimitiveType } from "./PrimitiveType.js"; export class SymbolType extends PrimitiveType { public getId(): string { diff --git a/src/Type/TupleType.ts b/src/Type/TupleType.ts index 31b8e5f7a..bacdd06b5 100644 --- a/src/Type/TupleType.ts +++ b/src/Type/TupleType.ts @@ -1,8 +1,8 @@ -import { derefType } from "../Utils/derefType"; -import { ArrayType } from "./ArrayType"; -import { BaseType } from "./BaseType"; -import { InferType } from "./InferType"; -import { RestType } from "./RestType"; +import { derefType } from "../Utils/derefType.js"; +import { ArrayType } from "./ArrayType.js"; +import { BaseType } from "./BaseType.js"; +import { InferType } from "./InferType.js"; +import { RestType } from "./RestType.js"; function normalize(types: Readonly>): Array { let normalized: Array = []; diff --git a/src/Type/UndefinedType.ts b/src/Type/UndefinedType.ts index 64c684e8d..263359dbb 100644 --- a/src/Type/UndefinedType.ts +++ b/src/Type/UndefinedType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class UndefinedType extends BaseType { public getId(): string { diff --git a/src/Type/UnionType.ts b/src/Type/UnionType.ts index 444482975..9544152e7 100644 --- a/src/Type/UnionType.ts +++ b/src/Type/UnionType.ts @@ -1,7 +1,7 @@ -import { BaseType } from "./BaseType"; -import { uniqueTypeArray } from "../Utils/uniqueTypeArray"; -import { NeverType } from "./NeverType"; -import { derefType } from "../Utils/derefType"; +import { BaseType } from "./BaseType.js"; +import { uniqueTypeArray } from "../Utils/uniqueTypeArray.js"; +import { NeverType } from "./NeverType.js"; +import { derefType } from "../Utils/derefType.js"; export class UnionType extends BaseType { private readonly types: BaseType[]; diff --git a/src/Type/UnknownType.ts b/src/Type/UnknownType.ts index 5f624a29d..6cce276ff 100644 --- a/src/Type/UnknownType.ts +++ b/src/Type/UnknownType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class UnknownType extends BaseType { constructor() { diff --git a/src/Type/VoidType.ts b/src/Type/VoidType.ts index 32232c1ef..426529663 100644 --- a/src/Type/VoidType.ts +++ b/src/Type/VoidType.ts @@ -1,4 +1,4 @@ -import { BaseType } from "./BaseType"; +import { BaseType } from "./BaseType.js"; export class VoidType extends BaseType { public getId(): string { diff --git a/src/TypeFormatter.ts b/src/TypeFormatter.ts index d1108f9bf..edbb9bb03 100644 --- a/src/TypeFormatter.ts +++ b/src/TypeFormatter.ts @@ -1,5 +1,5 @@ -import { Definition } from "./Schema/Definition"; -import { BaseType } from "./Type/BaseType"; +import { Definition } from "./Schema/Definition.js"; +import { BaseType } from "./Type/BaseType.js"; export interface TypeFormatter { getDefinition(type: BaseType): Definition; diff --git a/src/TypeFormatter/AliasTypeFormatter.ts b/src/TypeFormatter/AliasTypeFormatter.ts index f9d5887df..18ea3b29d 100644 --- a/src/TypeFormatter/AliasTypeFormatter.ts +++ b/src/TypeFormatter/AliasTypeFormatter.ts @@ -1,8 +1,8 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { AliasType } from "../Type/AliasType"; -import { BaseType } from "../Type/BaseType"; -import { TypeFormatter } from "../TypeFormatter"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { AliasType } from "../Type/AliasType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; export class AliasTypeFormatter implements SubTypeFormatter { public constructor(protected childTypeFormatter: TypeFormatter) {} diff --git a/src/TypeFormatter/AnnotatedTypeFormatter.ts b/src/TypeFormatter/AnnotatedTypeFormatter.ts index a035cf7d9..4b0c62c92 100644 --- a/src/TypeFormatter/AnnotatedTypeFormatter.ts +++ b/src/TypeFormatter/AnnotatedTypeFormatter.ts @@ -1,10 +1,10 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { AnnotatedType } from "../Type/AnnotatedType"; -import { BaseType } from "../Type/BaseType"; -import { UnionType } from "../Type/UnionType"; -import { TypeFormatter } from "../TypeFormatter"; -import { derefType } from "../Utils/derefType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { AnnotatedType } from "../Type/AnnotatedType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; +import { derefType } from "../Utils/derefType.js"; export function makeNullable(def: Definition): Definition { const union: Definition[] | undefined = (def.oneOf as Definition[]) || def.anyOf; diff --git a/src/TypeFormatter/AnyTypeFormatter.ts b/src/TypeFormatter/AnyTypeFormatter.ts index 11e279757..aa0d05cf9 100644 --- a/src/TypeFormatter/AnyTypeFormatter.ts +++ b/src/TypeFormatter/AnyTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { AnyType } from "../Type/AnyType"; -import { BaseType } from "../Type/BaseType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { AnyType } from "../Type/AnyType.js"; +import { BaseType } from "../Type/BaseType.js"; export class AnyTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/ArrayTypeFormatter.ts b/src/TypeFormatter/ArrayTypeFormatter.ts index 7939d4f13..699f4a560 100644 --- a/src/TypeFormatter/ArrayTypeFormatter.ts +++ b/src/TypeFormatter/ArrayTypeFormatter.ts @@ -1,8 +1,8 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { TypeFormatter } from "../TypeFormatter"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; export class ArrayTypeFormatter implements SubTypeFormatter { public constructor(private childTypeFormatter: TypeFormatter) {} diff --git a/src/TypeFormatter/BooleanTypeFormatter.ts b/src/TypeFormatter/BooleanTypeFormatter.ts index df8a8b60f..5a022188a 100644 --- a/src/TypeFormatter/BooleanTypeFormatter.ts +++ b/src/TypeFormatter/BooleanTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { BooleanType } from "../Type/BooleanType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { BooleanType } from "../Type/BooleanType.js"; export class BooleanTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/ConstructorTypeFormatter.ts b/src/TypeFormatter/ConstructorTypeFormatter.ts index 19169c778..e6ed6b003 100644 --- a/src/TypeFormatter/ConstructorTypeFormatter.ts +++ b/src/TypeFormatter/ConstructorTypeFormatter.ts @@ -1,6 +1,6 @@ -import { BaseType } from "../Type/BaseType"; -import { ConstructorType } from "../Type/ConstructorType"; -import { FunctionTypeFormatter } from "./FunctionTypeFormatter"; +import { BaseType } from "../Type/BaseType.js"; +import { ConstructorType } from "../Type/ConstructorType.js"; +import { FunctionTypeFormatter } from "./FunctionTypeFormatter.js"; export class ConstructorTypeFormatter extends FunctionTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/DefinitionTypeFormatter.ts b/src/TypeFormatter/DefinitionTypeFormatter.ts index 4b768afa5..456a3c70e 100644 --- a/src/TypeFormatter/DefinitionTypeFormatter.ts +++ b/src/TypeFormatter/DefinitionTypeFormatter.ts @@ -1,9 +1,9 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { DefinitionType } from "../Type/DefinitionType"; -import { TypeFormatter } from "../TypeFormatter"; -import { uniqueArray } from "../Utils/uniqueArray"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; export class DefinitionTypeFormatter implements SubTypeFormatter { public constructor( diff --git a/src/TypeFormatter/EnumTypeFormatter.ts b/src/TypeFormatter/EnumTypeFormatter.ts index fdb6b4097..39a2799c0 100644 --- a/src/TypeFormatter/EnumTypeFormatter.ts +++ b/src/TypeFormatter/EnumTypeFormatter.ts @@ -1,9 +1,9 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { EnumType } from "../Type/EnumType"; -import { typeName } from "../Utils/typeName"; -import { uniqueArray } from "../Utils/uniqueArray"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { EnumType } from "../Type/EnumType.js"; +import { typeName } from "../Utils/typeName.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; export class EnumTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/FunctionTypeFormatter.ts b/src/TypeFormatter/FunctionTypeFormatter.ts index fb2233991..cc31b35c9 100644 --- a/src/TypeFormatter/FunctionTypeFormatter.ts +++ b/src/TypeFormatter/FunctionTypeFormatter.ts @@ -1,9 +1,9 @@ -import { FunctionOptions } from "../Config"; -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { FunctionType } from "../Type/FunctionType"; -import { TypeFormatter } from "../TypeFormatter"; +import { FunctionOptions } from "../Config.js"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { FunctionType } from "../Type/FunctionType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; export class FunctionTypeFormatter implements SubTypeFormatter { constructor( diff --git a/src/TypeFormatter/HiddenTypeFormatter.ts b/src/TypeFormatter/HiddenTypeFormatter.ts index feecbc361..30cd6dc97 100644 --- a/src/TypeFormatter/HiddenTypeFormatter.ts +++ b/src/TypeFormatter/HiddenTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { HiddenType } from "../Type/HiddenType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { HiddenType } from "../Type/HiddenType.js"; export class HiddenTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/IntersectionTypeFormatter.ts b/src/TypeFormatter/IntersectionTypeFormatter.ts index f9a7d4af1..751cae76d 100644 --- a/src/TypeFormatter/IntersectionTypeFormatter.ts +++ b/src/TypeFormatter/IntersectionTypeFormatter.ts @@ -1,12 +1,12 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { IntersectionType } from "../Type/IntersectionType"; -import { TupleType } from "../Type/TupleType"; -import { TypeFormatter } from "../TypeFormatter"; -import { getAllOfDefinitionReducer } from "../Utils/allOfDefinition"; -import { uniqueArray } from "../Utils/uniqueArray"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { IntersectionType } from "../Type/IntersectionType.js"; +import { TupleType } from "../Type/TupleType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; +import { getAllOfDefinitionReducer } from "../Utils/allOfDefinition.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; export class IntersectionTypeFormatter implements SubTypeFormatter { public constructor(protected childTypeFormatter: TypeFormatter) {} diff --git a/src/TypeFormatter/LiteralTypeFormatter.ts b/src/TypeFormatter/LiteralTypeFormatter.ts index 8f510b3b8..32e3a1bb9 100644 --- a/src/TypeFormatter/LiteralTypeFormatter.ts +++ b/src/TypeFormatter/LiteralTypeFormatter.ts @@ -1,8 +1,8 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; -import { typeName } from "../Utils/typeName"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { typeName } from "../Utils/typeName.js"; export class LiteralTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/LiteralUnionTypeFormatter.ts b/src/TypeFormatter/LiteralUnionTypeFormatter.ts index 272c817f3..58d90453f 100644 --- a/src/TypeFormatter/LiteralUnionTypeFormatter.ts +++ b/src/TypeFormatter/LiteralUnionTypeFormatter.ts @@ -1,12 +1,12 @@ -import { Definition } from "../Schema/Definition"; -import { RawTypeName } from "../Schema/RawType"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; -import { NullType } from "../Type/NullType"; -import { UnionType } from "../Type/UnionType"; -import { typeName } from "../Utils/typeName"; -import { uniqueArray } from "../Utils/uniqueArray"; +import { Definition } from "../Schema/Definition.js"; +import { RawTypeName } from "../Schema/RawType.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { NullType } from "../Type/NullType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { typeName } from "../Utils/typeName.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; export class LiteralUnionTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/NeverTypeFormatter.ts b/src/TypeFormatter/NeverTypeFormatter.ts index 19b07439c..f9f43f0cb 100644 --- a/src/TypeFormatter/NeverTypeFormatter.ts +++ b/src/TypeFormatter/NeverTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { NeverType } from "../Type/NeverType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NeverType } from "../Type/NeverType.js"; export class NeverTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/NullTypeFormatter.ts b/src/TypeFormatter/NullTypeFormatter.ts index 0f8bab55b..547ce8df9 100644 --- a/src/TypeFormatter/NullTypeFormatter.ts +++ b/src/TypeFormatter/NullTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { NullType } from "../Type/NullType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NullType } from "../Type/NullType.js"; export class NullTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/NumberTypeFormatter.ts b/src/TypeFormatter/NumberTypeFormatter.ts index c1f6376a2..f8f3c35be 100644 --- a/src/TypeFormatter/NumberTypeFormatter.ts +++ b/src/TypeFormatter/NumberTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { NumberType } from "../Type/NumberType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { NumberType } from "../Type/NumberType.js"; export class NumberTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/ObjectTypeFormatter.ts b/src/TypeFormatter/ObjectTypeFormatter.ts index d0d437d77..6a6044d08 100644 --- a/src/TypeFormatter/ObjectTypeFormatter.ts +++ b/src/TypeFormatter/ObjectTypeFormatter.ts @@ -1,19 +1,19 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { AnyType } from "../Type/AnyType"; -import { SymbolType } from "../Type/SymbolType"; -import { BaseType } from "../Type/BaseType"; -import { ObjectProperty, ObjectType } from "../Type/ObjectType"; -import { UndefinedType } from "../Type/UndefinedType"; -import { UnionType } from "../Type/UnionType"; -import { TypeFormatter } from "../TypeFormatter"; -import { getAllOfDefinitionReducer } from "../Utils/allOfDefinition"; -import { derefType } from "../Utils/derefType"; -import { preserveAnnotation } from "../Utils/preserveAnnotation"; -import { removeUndefined } from "../Utils/removeUndefined"; -import { StringMap } from "../Utils/StringMap"; -import { uniqueArray } from "../Utils/uniqueArray"; -import { NeverType } from "../Type/NeverType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { AnyType } from "../Type/AnyType.js"; +import { SymbolType } from "../Type/SymbolType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { ObjectProperty, ObjectType } from "../Type/ObjectType.js"; +import { UndefinedType } from "../Type/UndefinedType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; +import { getAllOfDefinitionReducer } from "../Utils/allOfDefinition.js"; +import { derefType } from "../Utils/derefType.js"; +import { preserveAnnotation } from "../Utils/preserveAnnotation.js"; +import { removeUndefined } from "../Utils/removeUndefined.js"; +import { StringMap } from "../Utils/StringMap.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; +import { NeverType } from "../Type/NeverType.js"; export class ObjectTypeFormatter implements SubTypeFormatter { public constructor(protected childTypeFormatter: TypeFormatter) {} diff --git a/src/TypeFormatter/OptionalTypeFormatter.ts b/src/TypeFormatter/OptionalTypeFormatter.ts index 59b255a8b..14644384e 100644 --- a/src/TypeFormatter/OptionalTypeFormatter.ts +++ b/src/TypeFormatter/OptionalTypeFormatter.ts @@ -1,8 +1,8 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { OptionalType } from "../Type/OptionalType"; -import { TypeFormatter } from "../TypeFormatter"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { OptionalType } from "../Type/OptionalType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; export class OptionalTypeFormatter implements SubTypeFormatter { public constructor(protected childTypeFormatter: TypeFormatter) {} diff --git a/src/TypeFormatter/PrimitiveUnionTypeFormatter.ts b/src/TypeFormatter/PrimitiveUnionTypeFormatter.ts index e8f704474..92b2cc65f 100644 --- a/src/TypeFormatter/PrimitiveUnionTypeFormatter.ts +++ b/src/TypeFormatter/PrimitiveUnionTypeFormatter.ts @@ -1,15 +1,15 @@ -import { LogicError } from "../Error/LogicError"; -import { Definition } from "../Schema/Definition"; -import { RawTypeName } from "../Schema/RawType"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { BooleanType } from "../Type/BooleanType"; -import { NullType } from "../Type/NullType"; -import { NumberType } from "../Type/NumberType"; -import { PrimitiveType } from "../Type/PrimitiveType"; -import { StringType } from "../Type/StringType"; -import { UnionType } from "../Type/UnionType"; -import { uniqueArray } from "../Utils/uniqueArray"; +import { LogicError } from "../Error/LogicError.js"; +import { Definition } from "../Schema/Definition.js"; +import { RawTypeName } from "../Schema/RawType.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { BooleanType } from "../Type/BooleanType.js"; +import { NullType } from "../Type/NullType.js"; +import { NumberType } from "../Type/NumberType.js"; +import { PrimitiveType } from "../Type/PrimitiveType.js"; +import { StringType } from "../Type/StringType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; export class PrimitiveUnionTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/ReferenceTypeFormatter.ts b/src/TypeFormatter/ReferenceTypeFormatter.ts index b650caf2d..16c4d0876 100644 --- a/src/TypeFormatter/ReferenceTypeFormatter.ts +++ b/src/TypeFormatter/ReferenceTypeFormatter.ts @@ -1,9 +1,9 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { DefinitionType } from "../Type/DefinitionType"; -import { ReferenceType } from "../Type/ReferenceType"; -import { TypeFormatter } from "../TypeFormatter"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; export class ReferenceTypeFormatter implements SubTypeFormatter { public constructor( diff --git a/src/TypeFormatter/RestTypeFormatter.ts b/src/TypeFormatter/RestTypeFormatter.ts index cc22d674e..a2f7ccd6f 100644 --- a/src/TypeFormatter/RestTypeFormatter.ts +++ b/src/TypeFormatter/RestTypeFormatter.ts @@ -1,8 +1,8 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { RestType } from "../Type/RestType"; -import { TypeFormatter } from "../TypeFormatter"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { RestType } from "../Type/RestType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; export class RestTypeFormatter implements SubTypeFormatter { public constructor(protected childTypeFormatter: TypeFormatter) {} diff --git a/src/TypeFormatter/StringTypeFormatter.ts b/src/TypeFormatter/StringTypeFormatter.ts index 09a9dd916..a8d3e7327 100644 --- a/src/TypeFormatter/StringTypeFormatter.ts +++ b/src/TypeFormatter/StringTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { StringType } from "../Type/StringType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { StringType } from "../Type/StringType.js"; export class StringTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/SymbolTypeFormatter.ts b/src/TypeFormatter/SymbolTypeFormatter.ts index 5f64c6962..e011a427d 100644 --- a/src/TypeFormatter/SymbolTypeFormatter.ts +++ b/src/TypeFormatter/SymbolTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { SymbolType } from "../Type/SymbolType"; -import { BaseType } from "../Type/BaseType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { SymbolType } from "../Type/SymbolType.js"; +import { BaseType } from "../Type/BaseType.js"; export class SymbolTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/TupleTypeFormatter.ts b/src/TypeFormatter/TupleTypeFormatter.ts index b0a459615..a27020a95 100644 --- a/src/TypeFormatter/TupleTypeFormatter.ts +++ b/src/TypeFormatter/TupleTypeFormatter.ts @@ -1,13 +1,13 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { OptionalType } from "../Type/OptionalType"; -import { RestType } from "../Type/RestType"; -import { TupleType } from "../Type/TupleType"; -import { TypeFormatter } from "../TypeFormatter"; -import { notNever } from "../Utils/notNever"; -import { uniqueArray } from "../Utils/uniqueArray"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { OptionalType } from "../Type/OptionalType.js"; +import { RestType } from "../Type/RestType.js"; +import { TupleType } from "../Type/TupleType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; +import { notNever } from "../Utils/notNever.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; function uniformRestType(type: RestType, check_type: BaseType): boolean { const inner = type.getType(); diff --git a/src/TypeFormatter/UndefinedTypeFormatter.ts b/src/TypeFormatter/UndefinedTypeFormatter.ts index ea18f642f..df2e2a128 100644 --- a/src/TypeFormatter/UndefinedTypeFormatter.ts +++ b/src/TypeFormatter/UndefinedTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { UndefinedType } from "../Type/UndefinedType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { UndefinedType } from "../Type/UndefinedType.js"; export class UndefinedTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/UnionTypeFormatter.ts b/src/TypeFormatter/UnionTypeFormatter.ts index 0c67ad573..7f0dfea9c 100644 --- a/src/TypeFormatter/UnionTypeFormatter.ts +++ b/src/TypeFormatter/UnionTypeFormatter.ts @@ -1,14 +1,14 @@ import { JSONSchema7 } from "json-schema"; -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { LiteralType } from "../Type/LiteralType"; -import { NeverType } from "../Type/NeverType"; -import { UnionType } from "../Type/UnionType"; -import { TypeFormatter } from "../TypeFormatter"; -import { derefType } from "../Utils/derefType"; -import { getTypeByKey } from "../Utils/typeKeys"; -import { uniqueArray } from "../Utils/uniqueArray"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; +import { derefType } from "../Utils/derefType.js"; +import { getTypeByKey } from "../Utils/typeKeys.js"; +import { uniqueArray } from "../Utils/uniqueArray.js"; type DiscriminatorType = "json-schema" | "open-api"; diff --git a/src/TypeFormatter/UnknownTypeFormatter.ts b/src/TypeFormatter/UnknownTypeFormatter.ts index 561b9b34f..bf5aa3b3f 100644 --- a/src/TypeFormatter/UnknownTypeFormatter.ts +++ b/src/TypeFormatter/UnknownTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { UnknownType } from "../Type/UnknownType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { UnknownType } from "../Type/UnknownType.js"; export class UnknownTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/TypeFormatter/VoidTypeFormatter.ts b/src/TypeFormatter/VoidTypeFormatter.ts index b4aba648a..83ce50df5 100644 --- a/src/TypeFormatter/VoidTypeFormatter.ts +++ b/src/TypeFormatter/VoidTypeFormatter.ts @@ -1,7 +1,7 @@ -import { Definition } from "../Schema/Definition"; -import { SubTypeFormatter } from "../SubTypeFormatter"; -import { BaseType } from "../Type/BaseType"; -import { VoidType } from "../Type/VoidType"; +import { Definition } from "../Schema/Definition.js"; +import { SubTypeFormatter } from "../SubTypeFormatter.js"; +import { BaseType } from "../Type/BaseType.js"; +import { VoidType } from "../Type/VoidType.js"; export class VoidTypeFormatter implements SubTypeFormatter { public supportsType(type: BaseType): boolean { diff --git a/src/Utils/allOfDefinition.ts b/src/Utils/allOfDefinition.ts index 329268bc9..e10388670 100644 --- a/src/Utils/allOfDefinition.ts +++ b/src/Utils/allOfDefinition.ts @@ -1,10 +1,10 @@ -import { Definition } from "../Schema/Definition"; -import { RawTypeName } from "../Schema/RawType"; -import { BaseType } from "../Type/BaseType"; -import { TypeFormatter } from "../TypeFormatter"; -import { uniqueArray } from "./uniqueArray"; -import { deepMerge } from "./deepMerge"; -import { derefType } from "./derefType"; +import { Definition } from "../Schema/Definition.js"; +import { RawTypeName } from "../Schema/RawType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { TypeFormatter } from "../TypeFormatter.js"; +import { uniqueArray } from "./uniqueArray.js"; +import { deepMerge } from "./deepMerge.js"; +import { derefType } from "./derefType.js"; // TODO: Can we do this at parse time? See heritage clause in interfaces. // TODO: We really only need this if the children use additionalProperties: false. diff --git a/src/Utils/assert.ts b/src/Utils/assert.ts index 0b06c55f8..771380f5f 100644 --- a/src/Utils/assert.ts +++ b/src/Utils/assert.ts @@ -1,4 +1,4 @@ -import { LogicError } from "../Error/LogicError"; +import { LogicError } from "../Error/LogicError.js"; export default function assert(value: unknown, message: string): asserts value { if (!value) { diff --git a/src/Utils/deepMerge.ts b/src/Utils/deepMerge.ts index 1dadef268..e16b4fd9c 100644 --- a/src/Utils/deepMerge.ts +++ b/src/Utils/deepMerge.ts @@ -1,7 +1,7 @@ import { JSONSchema7Definition } from "json-schema"; -import { Definition } from "../Schema/Definition"; -import { RawType } from "../Schema/RawType"; -import { intersectionOfArrays } from "./intersectionOfArrays"; +import { Definition } from "../Schema/Definition.js"; +import { RawType } from "../Schema/RawType.js"; +import { intersectionOfArrays } from "./intersectionOfArrays.js"; /** * Merges nested objects and arrays. diff --git a/src/Utils/derefType.ts b/src/Utils/derefType.ts index e7b407c2c..c73a7699e 100644 --- a/src/Utils/derefType.ts +++ b/src/Utils/derefType.ts @@ -1,8 +1,8 @@ -import { AliasType } from "../Type/AliasType"; -import { AnnotatedType } from "../Type/AnnotatedType"; -import { BaseType } from "../Type/BaseType"; -import { DefinitionType } from "../Type/DefinitionType"; -import { ReferenceType } from "../Type/ReferenceType"; +import { AliasType } from "../Type/AliasType.js"; +import { AnnotatedType } from "../Type/AnnotatedType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { ReferenceType } from "../Type/ReferenceType.js"; /** * Dereference the type as far as possible. diff --git a/src/Utils/extractLiterals.ts b/src/Utils/extractLiterals.ts index aa10421f6..20f9d283f 100644 --- a/src/Utils/extractLiterals.ts +++ b/src/Utils/extractLiterals.ts @@ -1,12 +1,12 @@ -import { UnknownTypeError } from "../Error/UnknownTypeError"; -import { AliasType } from "../Type/AliasType"; -import { BaseType } from "../Type/BaseType"; -import { BooleanType } from "../Type/BooleanType"; -import { DefinitionType } from "../Type/DefinitionType"; -import { EnumType } from "../Type/EnumType"; -import { LiteralType } from "../Type/LiteralType"; -import { UnionType } from "../Type/UnionType"; -import { derefAnnotatedType } from "./derefType"; +import { UnknownTypeError } from "../Error/UnknownTypeError.js"; +import { AliasType } from "../Type/AliasType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { BooleanType } from "../Type/BooleanType.js"; +import { DefinitionType } from "../Type/DefinitionType.js"; +import { EnumType } from "../Type/EnumType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefAnnotatedType } from "./derefType.js"; function* _extractLiterals(type: BaseType): Iterable { if (!type) { diff --git a/src/Utils/formatError.ts b/src/Utils/formatError.ts index 6d397c4d7..9c7d369d4 100644 --- a/src/Utils/formatError.ts +++ b/src/Utils/formatError.ts @@ -1,9 +1,9 @@ import * as path from "path"; import ts from "typescript"; -import { BaseError } from "../Error/BaseError"; -import { DiagnosticError } from "../Error/DiagnosticError"; -import { UnknownNodeError } from "../Error/UnknownNodeError"; +import { BaseError } from "../Error/BaseError.js"; +import { DiagnosticError } from "../Error/DiagnosticError.js"; +import { UnknownNodeError } from "../Error/UnknownNodeError.js"; function getNodeLocation(node: ts.Node): [string, number, number] { const sourceFile = node.getSourceFile(); diff --git a/src/Utils/hasJsDocTag.ts b/src/Utils/hasJsDocTag.ts index 8e47b0136..df879ebac 100644 --- a/src/Utils/hasJsDocTag.ts +++ b/src/Utils/hasJsDocTag.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { symbolAtNode } from "./symbolAtNode"; +import { symbolAtNode } from "./symbolAtNode.js"; export function hasJsDocTag(node: ts.Node, tagName: string): boolean { const symbol = symbolAtNode(node); diff --git a/src/Utils/isAssignableTo.ts b/src/Utils/isAssignableTo.ts index d1d92782b..223e2b6e6 100644 --- a/src/Utils/isAssignableTo.ts +++ b/src/Utils/isAssignableTo.ts @@ -1,24 +1,24 @@ -import { AnyType } from "../Type/AnyType"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { EnumType } from "../Type/EnumType"; -import { IntersectionType } from "../Type/IntersectionType"; -import { NullType } from "../Type/NullType"; -import { ObjectProperty, ObjectType } from "../Type/ObjectType"; -import { OptionalType } from "../Type/OptionalType"; -import { TupleType } from "../Type/TupleType"; -import { UndefinedType } from "../Type/UndefinedType"; -import { UnionType } from "../Type/UnionType"; -import { UnknownType } from "../Type/UnknownType"; -import { VoidType } from "../Type/VoidType"; -import { derefType } from "./derefType"; -import { LiteralType, LiteralValue } from "../Type/LiteralType"; -import { StringType } from "../Type/StringType"; -import { NumberType } from "../Type/NumberType"; -import { BooleanType } from "../Type/BooleanType"; -import { InferType } from "../Type/InferType"; -import { RestType } from "../Type/RestType"; -import { NeverType } from "../Type/NeverType"; +import { AnyType } from "../Type/AnyType.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { EnumType } from "../Type/EnumType.js"; +import { IntersectionType } from "../Type/IntersectionType.js"; +import { NullType } from "../Type/NullType.js"; +import { ObjectProperty, ObjectType } from "../Type/ObjectType.js"; +import { OptionalType } from "../Type/OptionalType.js"; +import { TupleType } from "../Type/TupleType.js"; +import { UndefinedType } from "../Type/UndefinedType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { UnknownType } from "../Type/UnknownType.js"; +import { VoidType } from "../Type/VoidType.js"; +import { derefType } from "./derefType.js"; +import { LiteralType, LiteralValue } from "../Type/LiteralType.js"; +import { StringType } from "../Type/StringType.js"; +import { NumberType } from "../Type/NumberType.js"; +import { BooleanType } from "../Type/BooleanType.js"; +import { InferType } from "../Type/InferType.js"; +import { RestType } from "../Type/RestType.js"; +import { NeverType } from "../Type/NeverType.js"; /** * Returns the combined types from the given intersection. Currently only object types are combined. Maybe more diff --git a/src/Utils/isHidden.ts b/src/Utils/isHidden.ts index e259b43df..adb3c880a 100644 --- a/src/Utils/isHidden.ts +++ b/src/Utils/isHidden.ts @@ -1,5 +1,5 @@ import ts from "typescript"; -import { hasJsDocTag } from "./hasJsDocTag"; +import { hasJsDocTag } from "./hasJsDocTag.js"; export function isNodeHidden(node: ts.Node): boolean { return hasJsDocTag(node, "hidden"); diff --git a/src/Utils/narrowType.ts b/src/Utils/narrowType.ts index 52d67e9fe..83215972f 100644 --- a/src/Utils/narrowType.ts +++ b/src/Utils/narrowType.ts @@ -1,8 +1,8 @@ -import { BaseType } from "../Type/BaseType"; -import { EnumType } from "../Type/EnumType"; -import { NeverType } from "../Type/NeverType"; -import { UnionType } from "../Type/UnionType"; -import { derefType } from "./derefType"; +import { BaseType } from "../Type/BaseType.js"; +import { EnumType } from "../Type/EnumType.js"; +import { NeverType } from "../Type/NeverType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefType } from "./derefType.js"; /** * Narrows the given type by passing all variants to the given predicate function. So when type is a union type then diff --git a/src/Utils/nodeKey.ts b/src/Utils/nodeKey.ts index 55ef4a923..0c460d55b 100644 --- a/src/Utils/nodeKey.ts +++ b/src/Utils/nodeKey.ts @@ -1,6 +1,6 @@ import stringify from "safe-stable-stringify"; import { Node } from "typescript"; -import { Context } from "../NodeParser"; +import { Context } from "../NodeParser.js"; export function hash(a: string | boolean | number | (string | boolean | number)[] | object): string | number { if (typeof a === "number") { diff --git a/src/Utils/notNever.ts b/src/Utils/notNever.ts index acb70baee..8fabcda56 100644 --- a/src/Utils/notNever.ts +++ b/src/Utils/notNever.ts @@ -1,5 +1,5 @@ -import { BaseType } from "../Type/BaseType"; -import { NeverType } from "../Type/NeverType"; +import { BaseType } from "../Type/BaseType.js"; +import { NeverType } from "../Type/NeverType.js"; export function notNever(x: BaseType): boolean { return !(x instanceof NeverType); diff --git a/src/Utils/preserveAnnotation.ts b/src/Utils/preserveAnnotation.ts index 944579397..789f7437b 100644 --- a/src/Utils/preserveAnnotation.ts +++ b/src/Utils/preserveAnnotation.ts @@ -1,5 +1,5 @@ -import { BaseType } from "../Type/BaseType"; -import { AnnotatedType } from "../Type/AnnotatedType"; +import { BaseType } from "../Type/BaseType.js"; +import { AnnotatedType } from "../Type/AnnotatedType.js"; /** * Return the new type wrapped in an annotated type with the same annotations as the original type. diff --git a/src/Utils/removeUndefined.ts b/src/Utils/removeUndefined.ts index d760a5d3e..2b072e807 100644 --- a/src/Utils/removeUndefined.ts +++ b/src/Utils/removeUndefined.ts @@ -1,8 +1,8 @@ -import { BaseType } from "../Type/BaseType"; -import { UndefinedType } from "../Type/UndefinedType"; -import { UnionType } from "../Type/UnionType"; -import { derefAnnotatedType } from "./derefType"; -import { preserveAnnotation } from "./preserveAnnotation"; +import { BaseType } from "../Type/BaseType.js"; +import { UndefinedType } from "../Type/UndefinedType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefAnnotatedType } from "./derefType.js"; +import { preserveAnnotation } from "./preserveAnnotation.js"; /** * Remove undefined types from union type. Returns the number of non-undefined properties. diff --git a/src/Utils/removeUnreachable.ts b/src/Utils/removeUnreachable.ts index 479c99d89..7caa67eb7 100644 --- a/src/Utils/removeUnreachable.ts +++ b/src/Utils/removeUnreachable.ts @@ -1,6 +1,6 @@ import { JSONSchema7Definition } from "json-schema"; -import { Definition } from "../Schema/Definition"; -import { StringMap } from "./StringMap"; +import { Definition } from "../Schema/Definition.js"; +import { StringMap } from "./StringMap.js"; const DEFINITION_OFFSET = "#/definitions/".length; diff --git a/src/Utils/typeKeys.ts b/src/Utils/typeKeys.ts index 328dc277f..5ade6ee97 100644 --- a/src/Utils/typeKeys.ts +++ b/src/Utils/typeKeys.ts @@ -1,19 +1,19 @@ -import { translate } from "../NodeParser/IntersectionNodeParser"; -import { AnyType } from "../Type/AnyType"; -import { ArrayType } from "../Type/ArrayType"; -import { BaseType } from "../Type/BaseType"; -import { IntersectionType } from "../Type/IntersectionType"; -import { LiteralType } from "../Type/LiteralType"; -import { NumberType } from "../Type/NumberType"; -import { ObjectType } from "../Type/ObjectType"; -import { StringType } from "../Type/StringType"; -import { TupleType } from "../Type/TupleType"; -import { UndefinedType } from "../Type/UndefinedType"; -import { UnionType } from "../Type/UnionType"; -import { derefAnnotatedType, derefType } from "./derefType"; -import { preserveAnnotation } from "./preserveAnnotation"; -import { uniqueArray } from "./uniqueArray"; -import { uniqueTypeArray } from "./uniqueTypeArray"; +import { translate } from "../NodeParser/IntersectionNodeParser.js"; +import { AnyType } from "../Type/AnyType.js"; +import { ArrayType } from "../Type/ArrayType.js"; +import { BaseType } from "../Type/BaseType.js"; +import { IntersectionType } from "../Type/IntersectionType.js"; +import { LiteralType } from "../Type/LiteralType.js"; +import { NumberType } from "../Type/NumberType.js"; +import { ObjectType } from "../Type/ObjectType.js"; +import { StringType } from "../Type/StringType.js"; +import { TupleType } from "../Type/TupleType.js"; +import { UndefinedType } from "../Type/UndefinedType.js"; +import { UnionType } from "../Type/UnionType.js"; +import { derefAnnotatedType, derefType } from "./derefType.js"; +import { preserveAnnotation } from "./preserveAnnotation.js"; +import { uniqueArray } from "./uniqueArray.js"; +import { uniqueTypeArray } from "./uniqueTypeArray.js"; function uniqueLiterals(types: LiteralType[]): LiteralType[] { const values = types.map((type) => type.getValue()); diff --git a/src/Utils/typeName.ts b/src/Utils/typeName.ts index 5aa3357b2..f522b03e9 100644 --- a/src/Utils/typeName.ts +++ b/src/Utils/typeName.ts @@ -1,4 +1,4 @@ -import { RawType, RawTypeName } from "../Schema/RawType"; +import { RawType, RawTypeName } from "../Schema/RawType.js"; export function typeName(value: RawType): RawTypeName { if (value === null) { diff --git a/src/Utils/uniqueTypeArray.ts b/src/Utils/uniqueTypeArray.ts index 902e1a529..ccef94560 100644 --- a/src/Utils/uniqueTypeArray.ts +++ b/src/Utils/uniqueTypeArray.ts @@ -1,4 +1,4 @@ -import { BaseType } from "../Type/BaseType"; +import { BaseType } from "../Type/BaseType.js"; export function uniqueTypeArray(types: T[]): T[] { const uniqueTypes = new Map(); diff --git a/test/config.test.ts b/test/config.test.ts index a59f9842b..6cbe407ef 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -8,17 +8,16 @@ import { FormatterAugmentor, createFormatter } from "../factory/formatter"; import { ParserAugmentor, createParser } from "../factory/parser"; import { createProgram } from "../factory/program"; import { BaseType, Context, DefinitionType, ReferenceType, SubNodeParser } from "../index"; -import { CompletedConfig, Config, DEFAULT_CONFIG } from "../src/Config"; -import { Definition } from "../src/Schema/Definition"; -import { SchemaGenerator } from "../src/SchemaGenerator"; -import { SubTypeFormatter } from "../src/SubTypeFormatter"; -import { EnumType } from "../src/Type/EnumType"; -import { FunctionType } from "../src/Type/FunctionType"; -import { StringType } from "../src/Type/StringType"; -import { TypeFormatter } from "../src/TypeFormatter"; -import { uniqueArray } from "../src/Utils/uniqueArray"; - -const basePath = "test/config"; +import { CompletedConfig, Config, DEFAULT_CONFIG } from "../src/Config.js"; +import { Definition } from "../src/Schema/Definition.js"; +import { SchemaGenerator } from "../src/SchemaGenerator.js"; +import { SubTypeFormatter } from "../src/SubTypeFormatter.js"; +import { EnumType } from "../src/Type/EnumType.js"; +import { FunctionType } from "../src/Type/FunctionType.js"; +import { StringType } from "../src/Type/StringType.js"; +import { TypeFormatter } from "../src/TypeFormatter.js"; +import { uniqueArray } from "../src/Utils/uniqueArray.js"; + function assertSchema( name: string, diff --git a/test/invalid-data.test.ts b/test/invalid-data.test.ts index 9598be24e..16bd1b68c 100644 --- a/test/invalid-data.test.ts +++ b/test/invalid-data.test.ts @@ -3,8 +3,8 @@ import ts from "typescript"; import { createFormatter } from "../factory/formatter"; import { createParser } from "../factory/parser"; import { createProgram } from "../factory/program"; -import { CompletedConfig, DEFAULT_CONFIG } from "../src/Config"; -import { SchemaGenerator } from "../src/SchemaGenerator"; +import { CompletedConfig, DEFAULT_CONFIG } from "../src/Config.js"; +import { SchemaGenerator } from "../src/SchemaGenerator.js"; function assertSchema(name: string, type: string, message: string) { return () => { diff --git a/test/sourceless-nodes/index.test.ts b/test/sourceless-nodes/index.test.ts index 05db63a31..cb73297f5 100644 --- a/test/sourceless-nodes/index.test.ts +++ b/test/sourceless-nodes/index.test.ts @@ -1,11 +1,11 @@ import path from "path"; import ts from "typescript"; import { createParser } from "../../factory"; -import { Context } from "../../src/NodeParser"; -import { LiteralType } from "../../src/Type/LiteralType"; -import { NumberType } from "../../src/Type/NumberType"; -import { ObjectType } from "../../src/Type/ObjectType"; -import { DEFAULT_CONFIG } from "../../src/Config"; +import { Context } from "../../src/NodeParser.js"; +import { LiteralType } from "../../src/Type/LiteralType.js"; +import { NumberType } from "../../src/Type/NumberType.js"; +import { ObjectType } from "../../src/Type/ObjectType.js"; +import { DEFAULT_CONFIG } from "../../src/Config.js"; const SOURCE = path.resolve(__dirname, "./source.ts"); diff --git a/test/sourceless-nodes/key/index.test.ts b/test/sourceless-nodes/key/index.test.ts index 0a705aaa6..55d53b245 100644 --- a/test/sourceless-nodes/key/index.test.ts +++ b/test/sourceless-nodes/key/index.test.ts @@ -1,10 +1,10 @@ import path from "path"; import ts from "typescript"; import { createParser } from "../../../factory"; -import { Context } from "../../../src/NodeParser"; -import { DefinitionType } from "../../../src/Type/DefinitionType"; -import { ObjectType } from "../../../src/Type/ObjectType"; -import { DEFAULT_CONFIG } from "../../../src/Config"; +import { Context } from "../../../src/NodeParser.js"; +import { DefinitionType } from "../../../src/Type/DefinitionType.js"; +import { ObjectType } from "../../../src/Type/ObjectType.js"; +import { DEFAULT_CONFIG } from "../../../src/Config.js"; const SOURCE = path.resolve(__dirname, "./source.ts"); diff --git a/test/unit/AnnotatedTypeFormatter.test.ts b/test/unit/AnnotatedTypeFormatter.test.ts index 6d362c855..f11dc0c31 100644 --- a/test/unit/AnnotatedTypeFormatter.test.ts +++ b/test/unit/AnnotatedTypeFormatter.test.ts @@ -1,4 +1,4 @@ -import { makeNullable } from "../../src/TypeFormatter/AnnotatedTypeFormatter"; +import { makeNullable } from "../../src/TypeFormatter/AnnotatedTypeFormatter.js"; describe("makeNullable", () => { it("makes number nullable", () => { diff --git a/test/unit/Type/HiddenType.test.ts b/test/unit/Type/HiddenType.test.ts index 271d97d5e..6324b9ce5 100644 --- a/test/unit/Type/HiddenType.test.ts +++ b/test/unit/Type/HiddenType.test.ts @@ -1,5 +1,5 @@ -import { HiddenType } from "../../../src/Type/HiddenType"; -import { NeverType } from "../../../src/Type/NeverType"; +import { HiddenType } from "../../../src/Type/HiddenType.js"; +import { NeverType } from "../../../src/Type/NeverType.js"; describe("HiddenType", () => { it("creates a HiddenType", () => { diff --git a/test/unit/assert.test.ts b/test/unit/assert.test.ts index 115f5085d..91e5c7566 100644 --- a/test/unit/assert.test.ts +++ b/test/unit/assert.test.ts @@ -1,5 +1,5 @@ -import { LogicError } from "../../src/Error/LogicError"; -import assert from "../../src/Utils/assert"; +import { LogicError } from "../../src/Error/LogicError.js"; +import assert from "../../src/Utils/assert.js"; describe("validate assert", () => { it.each` diff --git a/test/unit/deepMerge.test.ts b/test/unit/deepMerge.test.ts index dff14d379..e78c2289f 100644 --- a/test/unit/deepMerge.test.ts +++ b/test/unit/deepMerge.test.ts @@ -1,4 +1,4 @@ -import { deepMerge } from "../../src/Utils/deepMerge"; +import { deepMerge } from "../../src/Utils/deepMerge.js"; describe("deepMerge", () => { it("merges booleans with enums", () => { diff --git a/test/unit/intersectionOfArrays.test.ts b/test/unit/intersectionOfArrays.test.ts index 0a40d5027..6ea8970d5 100644 --- a/test/unit/intersectionOfArrays.test.ts +++ b/test/unit/intersectionOfArrays.test.ts @@ -1,4 +1,4 @@ -import { intersectionOfArrays } from "../../src/Utils/intersectionOfArrays"; +import { intersectionOfArrays } from "../../src/Utils/intersectionOfArrays.js"; describe("intersectionOfArrays", () => { it("returns members of a in b", () => { diff --git a/test/unit/isAssignableTo.test.ts b/test/unit/isAssignableTo.test.ts index c7e75e9f5..27dab7f28 100644 --- a/test/unit/isAssignableTo.test.ts +++ b/test/unit/isAssignableTo.test.ts @@ -1,26 +1,26 @@ -import { AliasType } from "../../src/Type/AliasType"; -import { AnnotatedType } from "../../src/Type/AnnotatedType"; -import { AnyType } from "../../src/Type/AnyType"; -import { ArrayType } from "../../src/Type/ArrayType"; -import { BooleanType } from "../../src/Type/BooleanType"; -import { DefinitionType } from "../../src/Type/DefinitionType"; -import { InferType } from "../../src/Type/InferType"; -import { IntersectionType } from "../../src/Type/IntersectionType"; -import { LiteralType } from "../../src/Type/LiteralType"; -import { NeverType } from "../../src/Type/NeverType"; -import { NullType } from "../../src/Type/NullType"; -import { NumberType } from "../../src/Type/NumberType"; -import { ObjectProperty, ObjectType } from "../../src/Type/ObjectType"; -import { OptionalType } from "../../src/Type/OptionalType"; -import { ReferenceType } from "../../src/Type/ReferenceType"; -import { RestType } from "../../src/Type/RestType"; -import { StringType } from "../../src/Type/StringType"; -import { TupleType } from "../../src/Type/TupleType"; -import { UndefinedType } from "../../src/Type/UndefinedType"; -import { UnionType } from "../../src/Type/UnionType"; -import { UnknownType } from "../../src/Type/UnknownType"; -import { VoidType } from "../../src/Type/VoidType"; -import { isAssignableTo } from "../../src/Utils/isAssignableTo"; +import { AliasType } from "../../src/Type/AliasType.js"; +import { AnnotatedType } from "../../src/Type/AnnotatedType.js"; +import { AnyType } from "../../src/Type/AnyType.js"; +import { ArrayType } from "../../src/Type/ArrayType.js"; +import { BooleanType } from "../../src/Type/BooleanType.js"; +import { DefinitionType } from "../../src/Type/DefinitionType.js"; +import { InferType } from "../../src/Type/InferType.js"; +import { IntersectionType } from "../../src/Type/IntersectionType.js"; +import { LiteralType } from "../../src/Type/LiteralType.js"; +import { NeverType } from "../../src/Type/NeverType.js"; +import { NullType } from "../../src/Type/NullType.js"; +import { NumberType } from "../../src/Type/NumberType.js"; +import { ObjectProperty, ObjectType } from "../../src/Type/ObjectType.js"; +import { OptionalType } from "../../src/Type/OptionalType.js"; +import { ReferenceType } from "../../src/Type/ReferenceType.js"; +import { RestType } from "../../src/Type/RestType.js"; +import { StringType } from "../../src/Type/StringType.js"; +import { TupleType } from "../../src/Type/TupleType.js"; +import { UndefinedType } from "../../src/Type/UndefinedType.js"; +import { UnionType } from "../../src/Type/UnionType.js"; +import { UnknownType } from "../../src/Type/UnknownType.js"; +import { VoidType } from "../../src/Type/VoidType.js"; +import { isAssignableTo } from "../../src/Utils/isAssignableTo.js"; describe("isAssignableTo", () => { it("returns true for same types", () => { diff --git a/test/utils.ts b/test/utils.ts index cdc662d09..b3454e270 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -7,8 +7,8 @@ import ts from "typescript"; import { createFormatter } from "../factory/formatter"; import { createParser } from "../factory/parser"; import { createProgram } from "../factory/program"; -import { CompletedConfig, Config, DEFAULT_CONFIG } from "../src/Config"; -import { SchemaGenerator } from "../src/SchemaGenerator"; +import { CompletedConfig, Config, DEFAULT_CONFIG } from "../src/Config.js"; +import { SchemaGenerator } from "../src/SchemaGenerator.js"; const validator = new Ajv({ discriminator: true }); addFormats(validator); diff --git a/test/vega-lite.test.ts b/test/vega-lite.test.ts index e3f6173b2..e6ea64947 100644 --- a/test/vega-lite.test.ts +++ b/test/vega-lite.test.ts @@ -1,6 +1,6 @@ import { readFileSync, writeFileSync } from "fs"; import { resolve } from "path"; -import { CompletedConfig, DEFAULT_CONFIG } from "../src/Config"; +import { CompletedConfig, DEFAULT_CONFIG } from "../src/Config.js"; import { createGenerator } from "./utils"; import stringify from "safe-stable-stringify"; diff --git a/ts-json-schema-generator.ts b/ts-json-schema-generator.ts index d717a53c5..14048e832 100644 --- a/ts-json-schema-generator.ts +++ b/ts-json-schema-generator.ts @@ -1,10 +1,10 @@ import { Command, Option } from "commander"; import stableStringify from "safe-stable-stringify"; -import { createGenerator } from "./factory/generator"; -import { Config } from "./src/Config"; -import { BaseError } from "./src/Error/BaseError"; -import { formatError } from "./src/Utils/formatError"; -import * as pkg from "./package.json"; +import { createGenerator } from "./factory/generator.js"; +import { Config } from "./src/Config.js"; +import { BaseError } from "./src/Error/BaseError.js"; +import { formatError } from "./src/Utils/formatError.js"; +import pkg from "./package.json" assert { type: "json" }; import { dirname } from "path"; import { mkdirSync, writeFileSync } from "fs"; diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 000000000..5298e95c5 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["src/**/*.ts", "factory/**/*.ts", "test/**/*.test.ts", "test/utils.ts"] +} diff --git a/tsconfig.json b/tsconfig.json index df0517b85..6d82b123a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "target": "es2019", - "module": "commonjs", - "moduleResolution": "node", + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "Node16", "esModuleInterop": true, "isolatedModules": false, "experimentalDecorators": true, @@ -25,6 +25,6 @@ "incremental": true }, "files": ["ts-json-schema-generator.ts", "index.ts"], - "include": ["src/**/*.ts", "factory/**/*.ts", "test/**/*.test.ts", "test/utils.ts"], + "include": ["src/**/*.ts", "factory/**/*.ts"], "exclude": ["node_modules", "dist"] } diff --git a/yarn.lock b/yarn.lock index d39bad767..884c9a5fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1149,6 +1149,121 @@ ts-node "^9" tslib "^2" +"@esbuild/aix-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz#d1bc06aedb6936b3b6d313bf809a5a40387d2b7f" + integrity sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA== + +"@esbuild/android-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz#7ad65a36cfdb7e0d429c353e00f680d737c2aed4" + integrity sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA== + +"@esbuild/android-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.12.tgz#b0c26536f37776162ca8bde25e42040c203f2824" + integrity sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w== + +"@esbuild/android-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.12.tgz#cb13e2211282012194d89bf3bfe7721273473b3d" + integrity sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew== + +"@esbuild/darwin-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz#cbee41e988020d4b516e9d9e44dd29200996275e" + integrity sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g== + +"@esbuild/darwin-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz#e37d9633246d52aecf491ee916ece709f9d5f4cd" + integrity sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A== + +"@esbuild/freebsd-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz#1ee4d8b682ed363b08af74d1ea2b2b4dbba76487" + integrity sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA== + +"@esbuild/freebsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz#37a693553d42ff77cd7126764b535fb6cc28a11c" + integrity sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg== + +"@esbuild/linux-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz#be9b145985ec6c57470e0e051d887b09dddb2d4b" + integrity sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA== + +"@esbuild/linux-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz#207ecd982a8db95f7b5279207d0ff2331acf5eef" + integrity sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w== + +"@esbuild/linux-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz#d0d86b5ca1562523dc284a6723293a52d5860601" + integrity sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA== + +"@esbuild/linux-loong64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz#9a37f87fec4b8408e682b528391fa22afd952299" + integrity sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA== + +"@esbuild/linux-mips64el@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz#4ddebd4e6eeba20b509d8e74c8e30d8ace0b89ec" + integrity sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w== + +"@esbuild/linux-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz#adb67dadb73656849f63cd522f5ecb351dd8dee8" + integrity sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg== + +"@esbuild/linux-riscv64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz#11bc0698bf0a2abf8727f1c7ace2112612c15adf" + integrity sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg== + +"@esbuild/linux-s390x@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz#e86fb8ffba7c5c92ba91fc3b27ed5a70196c3cc8" + integrity sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg== + +"@esbuild/linux-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz#5f37cfdc705aea687dfe5dfbec086a05acfe9c78" + integrity sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg== + +"@esbuild/netbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz#29da566a75324e0d0dd7e47519ba2f7ef168657b" + integrity sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA== + +"@esbuild/openbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz#306c0acbdb5a99c95be98bdd1d47c916e7dc3ff0" + integrity sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw== + +"@esbuild/sunos-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz#0933eaab9af8b9b2c930236f62aae3fc593faf30" + integrity sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA== + +"@esbuild/win32-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz#773bdbaa1971b36db2f6560088639ccd1e6773ae" + integrity sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A== + +"@esbuild/win32-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz#000516cad06354cc84a73f0943a4aa690ef6fd67" + integrity sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ== + +"@esbuild/win32-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz#c57c8afbb4054a3ab8317591a0b7320360b444ae" + integrity sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -2994,6 +3109,35 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +esbuild@~0.19.10: + version "0.19.12" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.12.tgz#dc82ee5dc79e82f5a5c3b4323a2a641827db3e04" + integrity sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.19.12" + "@esbuild/android-arm" "0.19.12" + "@esbuild/android-arm64" "0.19.12" + "@esbuild/android-x64" "0.19.12" + "@esbuild/darwin-arm64" "0.19.12" + "@esbuild/darwin-x64" "0.19.12" + "@esbuild/freebsd-arm64" "0.19.12" + "@esbuild/freebsd-x64" "0.19.12" + "@esbuild/linux-arm" "0.19.12" + "@esbuild/linux-arm64" "0.19.12" + "@esbuild/linux-ia32" "0.19.12" + "@esbuild/linux-loong64" "0.19.12" + "@esbuild/linux-mips64el" "0.19.12" + "@esbuild/linux-ppc64" "0.19.12" + "@esbuild/linux-riscv64" "0.19.12" + "@esbuild/linux-s390x" "0.19.12" + "@esbuild/linux-x64" "0.19.12" + "@esbuild/netbsd-x64" "0.19.12" + "@esbuild/openbsd-x64" "0.19.12" + "@esbuild/sunos-x64" "0.19.12" + "@esbuild/win32-arm64" "0.19.12" + "@esbuild/win32-ia32" "0.19.12" + "@esbuild/win32-x64" "0.19.12" + escalade@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" @@ -3290,7 +3434,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2: +fsevents@^2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -3378,6 +3522,13 @@ get-symbol-description@^1.0.2: es-errors "^1.3.0" get-intrinsic "^1.2.4" +get-tsconfig@^4.7.2: + version "4.7.3" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.3.tgz#0498163d98f7b58484dd4906999c0c9d5f103f83" + integrity sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg== + dependencies: + resolve-pkg-maps "^1.0.0" + git-raw-commits@^2.0.8: version "2.0.11" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" @@ -5222,6 +5373,11 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve.exports@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" @@ -5759,6 +5915,16 @@ tslib@^2, tslib@^2.5.0, tslib@^2.6.2, tslib@~2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== +tsx@^4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.7.2.tgz#a108b1a6e16876cd4c9a4b4ba263f2a07f9cf562" + integrity sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw== + dependencies: + esbuild "~0.19.10" + get-tsconfig "^4.7.2" + optionalDependencies: + fsevents "~2.3.3" + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" From fd730b2fd8cbf554d1001cc869c410d180af1860 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Tue, 16 Apr 2024 10:38:15 -0400 Subject: [PATCH 5/6] chore: update glob --- package.json | 2 +- yarn.lock | 162 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 142 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 6e6f0429d..6925aa8b9 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dependencies": { "@types/json-schema": "^7.0.15", "commander": "^12.0.0", - "glob": "^8.0.3", + "glob": "^10.3.12", "json5": "^2.2.3", "normalize-path": "^3.0.0", "safe-stable-stringify": "^2.4.3", diff --git a/yarn.lock b/yarn.lock index 884c9a5fc..8e97a05af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1320,6 +1320,18 @@ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1714,6 +1726,11 @@ dependencies: "@octokit/openapi-types" "^12.11.0" +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + "@pkgr/core@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" @@ -2085,6 +2102,11 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -2104,6 +2126,11 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + anymatch@^3.0.3: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" @@ -2683,7 +2710,7 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2965,6 +2992,11 @@ dotenv@^8.0.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + electron-to-chromium@^1.4.668: version "1.4.736" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.736.tgz#ecb4348f4d5c70fb1e31c347e5bad6b751066416" @@ -2980,6 +3012,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + endent@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/endent/-/endent-2.1.0.tgz#5aaba698fb569e5e18e69e1ff7a28ff35373cd88" @@ -3419,6 +3456,14 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +foreground-child@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + fp-ts@^2.5.3: version "2.16.5" resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.16.5.tgz#d79b97168aeafcf9612f18bbc017f513ecb20ac9" @@ -3585,6 +3630,17 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob@^10.3.12: + version "10.3.12" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" + integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^2.3.6" + minimatch "^9.0.1" + minipass "^7.0.4" + path-scurry "^1.10.2" + glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -3597,17 +3653,6 @@ glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -4089,6 +4134,15 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" +jackspeak@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" + integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + java-properties@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/java-properties/-/java-properties-1.0.2.tgz#ccd1fa73907438a5b5c38982269d0e771fe78211" @@ -4659,6 +4713,11 @@ loupe@^3.1.0: dependencies: get-func-name "^2.0.1" +lru-cache@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" + integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -4759,14 +4818,7 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^9.0.4: +minimatch@^9.0.1, minimatch@^9.0.4: version "9.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== @@ -4787,6 +4839,11 @@ minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" + integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== + mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -5053,6 +5110,14 @@ path-parse@^1.0.5, path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-scurry@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" + integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -5526,6 +5591,11 @@ signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + signale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/signale/-/signale-1.4.0.tgz#c4be58302fb0262ac00fc3d886a7c113759042f1" @@ -5631,6 +5701,15 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -5640,6 +5719,15 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string.prototype.trim@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" @@ -5682,6 +5770,13 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -5689,6 +5784,13 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -5869,7 +5971,7 @@ ts-api-utils@^1.3.0: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== -ts-node@^10.9.1, ts-node@^10.9.2: +ts-node@^10.9.1: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -6527,6 +6629,15 @@ wordwrapjs@^4.0.0: reduce-flatten "^2.0.0" typical "^5.2.0" +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -6536,6 +6647,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" From 52add01ff6df2954a2edfdfad0aa2494ac19f32d Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Tue, 16 Apr 2024 10:43:23 -0400 Subject: [PATCH 6/6] fix updates --- test/config.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/config.test.ts b/test/config.test.ts index 6cbe407ef..fe91bbcb3 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -18,6 +18,7 @@ import { StringType } from "../src/Type/StringType.js"; import { TypeFormatter } from "../src/TypeFormatter.js"; import { uniqueArray } from "../src/Utils/uniqueArray.js"; +const basePath = "test/config"; function assertSchema( name: string,