From 0b727a0cb5234730784ef18940af44a0597e9c29 Mon Sep 17 00:00:00 2001 From: Frederik Wessberg Date: Mon, 23 Jan 2023 14:56:27 +0100 Subject: [PATCH] feat: add .js extensions to code splitted declaration chunks to support Node16 and NodeNext ModuleResolution --- package.json | 37 +- pnpm-lock.yaml | 575 +++++++++--------- src/constant/constant.ts | 11 +- src/diagnostic/extended-diagnostic.ts | 2 +- src/index.ts | 7 +- src/plugin/typescript-plugin-options.ts | 16 +- src/plugin/typescript-plugin.ts | 21 +- src/service/cache/cached-fs.ts | 7 +- .../resolve-cache/extended-resolved-module.ts | 2 +- .../get-resolved-id-with-caching-options.ts | 2 +- .../cache/resolve-cache/resolve-cache.ts | 6 +- .../compiler-host/compiler-host-options.ts | 8 +- src/service/compiler-host/compiler-host.ts | 22 +- .../bundle-declarations-for-chunk.ts | 4 +- .../emit/declaration/emit-declarations.ts | 16 +- .../emit/diagnostics/emit-diagnostics.ts | 10 +- .../emit/tsbuildinfo/emit-build-info.ts | 6 +- .../module-resolution-host-options.ts | 8 +- .../module-resolution-host.ts | 16 +- .../declaration-bundler-options.ts | 24 +- .../declaration-bundler.ts | 4 +- .../deconflicter-visitor-options.ts | 6 +- .../transformers/deconflicter/deconflicter.ts | 8 +- .../visitor/deconflict-binding-element.ts | 4 +- .../deconflict-call-signature-declaration.ts | 6 +- .../visitor/deconflict-class-declaration.ts | 14 +- .../visitor/deconflict-class-expression.ts | 14 +- .../deconflict-constructor-declaration.ts | 6 +- .../visitor/deconflict-enum-declaration.ts | 4 +- .../visitor/deconflict-enum-member.ts | 4 +- .../visitor/deconflict-export-specifier.ts | 4 +- .../deconflict-function-declaration.ts | 19 +- .../visitor/deconflict-function-expression.ts | 6 +- .../visitor/deconflict-function-type.ts | 6 +- .../deconflict-get-accessor-declaration.ts | 14 +- .../visitor/deconflict-identifier.ts | 4 +- .../visitor/deconflict-import-clause.ts | 4 +- .../deconflict-import-equals-declaration.ts | 4 +- .../visitor/deconflict-import-specifier.ts | 4 +- .../visitor/deconflict-import-type-node.ts | 4 +- .../deconflict-index-signature-declaration.ts | 6 +- .../deconflict-interface-declaration.ts | 6 +- .../visitor/deconflict-mapped-type-node.ts | 6 +- .../visitor/deconflict-method-declaration.ts | 8 +- .../visitor/deconflict-method-signature.ts | 6 +- .../visitor/deconflict-module-declaration.ts | 6 +- .../visitor/deconflict-namespace-import.ts | 4 +- .../deconflict-parameter-declaration.ts | 6 +- .../visitor/deconflict-property-assignment.ts | 4 +- .../deconflict-property-declaration.ts | 6 +- .../visitor/deconflict-property-signature.ts | 6 +- .../visitor/deconflict-qualified-name.ts | 4 +- .../deconflict-set-accessor-declaration.ts | 8 +- .../deconflict-type-alias-declaration.ts | 6 +- .../deconflict-type-parameter-declaration.ts | 4 +- .../deconflict-variable-declaration.ts | 4 +- ...re-modifier-transformer-visitor-options.ts | 4 +- .../ensure-declare-modifier-transformer.ts | 4 +- .../visitor/visit-class-declaration.ts | 19 +- .../visitor/visit-class-expression.ts | 19 +- .../visitor/visit-enum-declaration.ts | 4 +- .../visitor/visit-function-declaration.ts | 17 +- .../visitor/visit-function-expression.ts | 4 +- .../visitor/visit-interface-declaration.ts | 13 +- .../visitor/visit-module-declaration.ts | 6 +- .../visitor/visit-node.ts | 4 +- .../visitor/visit-type-alias-declaration.ts | 10 +- .../visitor/visit-variable-statement.ts | 4 +- ...re-modifier-transformer-visitor-options.ts | 4 +- .../ensure-no-declare-modifier-transformer.ts | 4 +- .../visitor/visit-class-declaration.ts | 13 +- .../visitor/visit-class-expression.ts | 12 +- .../visitor/visit-enum-declaration.ts | 4 +- .../visitor/visit-function-declaration.ts | 17 +- .../visitor/visit-function-expression.ts | 4 +- .../visitor/visit-interface-declaration.ts | 13 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../visitor/visit-type-alias-declaration.ts | 10 +- .../visitor/visit-variable-statement.ts | 4 +- ...rt-modifier-transformer-visitor-options.ts | 4 +- .../ensure-no-export-modifier-transformer.ts | 4 +- .../visitor/visit-class-declaration.ts | 12 +- .../visitor/visit-class-expression.ts | 12 +- .../visitor/visit-enum-declaration.ts | 4 +- .../visitor/visit-function-declaration.ts | 17 +- .../visitor/visit-function-expression.ts | 4 +- .../visitor/visit-interface-declaration.ts | 4 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../visitor/visit-type-alias-declaration.ts | 10 +- .../visitor/visit-variable-statement.ts | 4 +- .../inline-namespace-module-block-options.ts | 2 +- ...line-namespace-module-block-transformer.ts | 6 +- ...-namespace-module-block-visitor-options.ts | 6 +- .../visitor/visit-export-declaration.ts | 4 +- .../visitor/visit-import-declaration.ts | 4 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../module-block-extractor-options.ts | 6 +- .../module-block-extractor-visitor-options.ts | 4 +- .../module-block-extractor.ts | 6 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../module-merger-visitor-options.ts | 12 +- .../module-merger/module-merger.ts | 8 +- .../module-merger/util/is-root-level-node.ts | 4 +- .../visitor/visit-export-declaration.ts | 8 +- .../visitor/visit-export-specifier.ts | 4 +- .../visitor/visit-import-clause.ts | 4 +- .../visitor/visit-import-declaration.ts | 12 +- .../visitor/visit-import-specifier.ts | 4 +- .../visitor/visit-import-type-node.ts | 4 +- .../visitor/visit-namespace-import.ts | 13 +- .../module-merger/visitor/visit-node.ts | 4 +- .../visitor/visit-source-file.ts | 4 +- ...declaration-transformer-visitor-options.ts | 8 +- .../no-export-declaration-transformer.ts | 8 +- .../visitor/visit-export-assignment.ts | 4 +- .../visitor/visit-export-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../reference/cache/reference-cache.ts | 2 +- .../is-referenced/is-referenced-options.ts | 6 +- .../reference/is-referenced/is-referenced.ts | 8 +- .../reference-visitor-options.ts | 4 +- .../is-referenced/visitor-options.ts | 4 +- .../visitor/check-array-binding-pattern.ts | 4 +- .../visitor/check-binding-element.ts | 4 +- .../visitor/check-class-declaration.ts | 4 +- .../visitor/check-class-expression.ts | 4 +- .../visitor/check-enum-declaration.ts | 4 +- .../visitor/check-export-assignment.ts | 4 +- .../visitor/check-export-declaration.ts | 4 +- .../visitor/check-export-specifier.ts | 4 +- .../visitor/check-function-declaration.ts | 4 +- .../visitor/check-function-expression.ts | 4 +- .../visitor/check-get-accessor-declaration.ts | 4 +- .../is-referenced/visitor/check-identifier.ts | 4 +- .../check-import-equals-declaration.ts | 4 +- .../visitor/check-indexed-access-type-node.ts | 4 +- .../visitor/check-interface-declaration.ts | 4 +- .../visitor/check-method-declaration.ts | 4 +- .../visitor/check-method-signature.ts | 4 +- .../visitor/check-module-declaration.ts | 4 +- .../visitor/check-object-binding-pattern.ts | 4 +- .../visitor/check-parameter-declaration.ts | 4 +- .../check-property-access-expression.ts | 4 +- .../visitor/check-property-declaration.ts | 4 +- .../visitor/check-property-signature.ts | 4 +- .../visitor/check-qualified-name.ts | 4 +- .../visitor/check-set-accessor-declaration.ts | 4 +- .../check-template-literal-type-node.ts | 4 +- .../check-template-literal-type-span.ts | 4 +- .../visitor/check-type-alias-declaration.ts | 4 +- .../visitor/check-type-reference-node.ts | 4 +- .../check-variable-declaration-list.ts | 4 +- .../visitor/check-variable-declaration.ts | 4 +- .../visitor/check-variable-statement.ts | 4 +- .../source-file-bundler-visitor-options.ts | 10 +- .../source-file-bundler.ts | 10 +- .../statement-merger-visitor-options.ts | 4 +- .../statement-merger/statement-merger.ts | 8 +- .../visitor/visit-export-assignment.ts | 4 +- .../visitor/visit-export-declaration.ts | 9 +- .../visitor/visit-import-declaration.ts | 4 +- .../statement-merger/visitor/visit-node.ts | 4 +- .../stats-collector-options.ts | 8 +- .../stats-collector-visitor-options.ts | 4 +- .../stats-collector/stats-collector.ts | 6 +- ...declaration-transformer-visitor-options.ts | 6 +- .../to-export-declaration-transformer.ts | 6 +- .../visitor/visit-class-declaration.ts | 6 +- .../visitor/visit-class-expression.ts | 6 +- .../visitor/visit-enum-declaration.ts | 4 +- .../visitor/visit-function-declaration.ts | 17 +- .../visitor/visit-function-expression.ts | 4 +- .../visitor/visit-interface-declaration.ts | 6 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../visitor/visit-type-alias-declaration.ts | 4 +- .../visitor/visit-variable-statement.ts | 4 +- .../trace-identifiers-visitor-options.ts | 2 +- .../trace-identifiers/trace-identifiers.ts | 2 +- .../trace-identifiers-for-binding-element.ts | 4 +- .../trace-identifiers-for-call-expression.ts | 4 +- ...trace-identifiers-for-class-declaration.ts | 4 +- .../trace-identifiers-for-enum-declaration.ts | 4 +- ...trace-identifiers-for-export-assignment.ts | 4 +- .../trace-identifiers-for-export-specifier.ts | 4 +- ...ce-identifiers-for-function-declaration.ts | 4 +- .../trace-identifiers-for-identifier.ts | 4 +- .../trace-identifiers-for-import-clause.ts | 4 +- ...entifiers-for-import-equals-declaration.ts | 4 +- .../trace-identifiers-for-import-specifier.ts | 4 +- ...e-identifiers-for-interface-declaration.ts | 4 +- .../trace-identifiers-for-namespace-import.ts | 4 +- .../trace-identifiers-for-new-expression.ts | 4 +- .../visitor/trace-identifiers-for-node.ts | 2 +- ...-identifiers-for-type-alias-declaration.ts | 4 +- ...ce-identifiers-for-variable-declaration.ts | 4 +- ...ependencies-transformer-visitor-options.ts | 6 +- .../track-dependencies-transformer.ts | 6 +- .../visitor/visit-export-declaration.ts | 4 +- .../visitor/visit-import-declaration.ts | 4 +- .../visitor/visit-import-type-node.ts | 4 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- ...ack-exports-transformer-visitor-options.ts | 2 +- .../track-exports-transformer.ts | 4 +- .../visitor/visit-class-declaration.ts | 6 +- .../visitor/visit-class-expression.ts | 6 +- .../visitor/visit-enum-declaration.ts | 4 +- .../visitor/visit-export-assignment.ts | 4 +- .../visitor/visit-export-declaration.ts | 4 +- .../visitor/visit-function-declaration.ts | 4 +- .../visitor/visit-function-expression.ts | 4 +- .../visitor/visit-interface-declaration.ts | 4 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../visitor/visit-type-alias-declaration.ts | 4 +- .../visitor/visit-variable-statement.ts | 4 +- ...ack-imports-transformer-visitor-options.ts | 2 +- .../track-imports-transformer.ts | 4 +- .../visitor/visit-import-declaration.ts | 4 +- .../visitor/visit-import-type-node.ts | 4 +- .../visitor/visit-module-declaration.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../transformers/transformer-base-options.ts | 4 +- .../tree-shaker-visitor-options.ts | 4 +- .../transformers/tree-shaker/tree-shaker.ts | 4 +- .../visitor/visit-array-binding-pattern.ts | 4 +- .../visitor/visit-binding-element.ts | 4 +- .../visitor/visit-class-declaration.ts | 6 +- .../visitor/visit-class-expression.ts | 6 +- .../visitor/visit-enum-declaration.ts | 4 +- .../visitor/visit-export-assignment.ts | 4 +- .../visitor/visit-export-declaration.ts | 4 +- .../visitor/visit-function-declaration.ts | 17 +- .../visitor/visit-function-expression.ts | 4 +- .../tree-shaker/visitor/visit-identifier.ts | 4 +- .../visitor/visit-import-clause.ts | 4 +- .../visitor/visit-import-declaration.ts | 4 +- .../visit-import-equals-declaration.ts | 4 +- .../visitor/visit-import-specifier.ts | 4 +- .../visitor/visit-interface-declaration.ts | 10 +- .../visitor/visit-module-declaration.ts | 8 +- .../visitor/visit-named-imports.ts | 4 +- .../visitor/visit-namespace-import.ts | 4 +- .../tree-shaker/visitor/visit-node.ts | 4 +- .../visitor/visit-object-binding-pattern.ts | 4 +- .../visitor/visit-type-alias-declaration.ts | 8 +- .../visit-variable-declaration-list.ts | 4 +- .../visitor/visit-variable-declaration.ts | 4 +- .../visitor/visit-variable-statement.ts | 4 +- ...ype-reference-collector-visitor-options.ts | 6 +- .../type-reference-collector.ts | 8 +- .../visitor/visit-identifier.ts | 4 +- .../visitor/visit-node.ts | 4 +- .../add-binding-to-lexical-environment.ts | 2 +- .../util/apply-transformers.ts | 6 +- .../util/clone-lexical-environment.ts | 2 +- .../util/clone-node-with-meta.ts | 6 +- .../util/create-aliased-binding.ts | 12 +- ...xport-specifier-from-name-and-modifiers.ts | 6 +- .../util/find-matching-imported-symbol.ts | 2 +- .../util/generate-module-specifier.ts | 8 +- .../util/generate-unique-binding.ts | 2 +- .../util/get-aliased-declaration.ts | 7 +- .../get-binding-from-lexical-environment.ts | 2 +- .../util/get-chunk-filename.ts | 2 +- .../util/get-id-for-node.ts | 7 +- ...-merged-export-declarations-for-modules.ts | 4 +- ...-merged-import-declarations-for-modules.ts | 4 +- .../util/get-node-placement-queue.ts | 2 +- .../util/get-original-node.ts | 4 +- .../util/get-original-source-file.ts | 4 +- .../util/get-parent-node.ts | 2 +- .../util/get-symbol-at-location.ts | 4 +- .../util/get-symbol-flags-for-node.ts | 2 +- ...et-type-reference-module-from-file-name.ts | 2 +- .../get-type-reference-module-from-node.ts | 8 +- .../util/is-identifier-free.ts | 2 +- .../declaration-bundler/util/is-statement.ts | 2 +- .../util/is-symbol-identifier.ts | 2 +- .../util/locate-exported-symbol.ts | 6 +- .../declaration-bundler/util/modifier-util.ts | 4 +- .../util/node-arrays-are-equal.ts | 2 +- .../util/node-contains-child.ts | 2 +- .../util/node-has-supported-extension.ts | 7 +- .../declaration-bundler/util/node-util.ts | 63 +- .../util/type-module-reference-is-allowed.ts | 2 +- .../ensure-module-transformer.ts | 6 +- src/transpiler/babel.ts | 10 +- src/transpiler/swc.ts | 10 +- src/type/safe-node.ts | 2 +- .../merge-chunks-with-ambient-dependencies.ts | 8 +- src/util/chunk/normalize-chunk.ts | 9 +- src/util/file-system/file-system.ts | 2 +- .../finalize-parsed-command-line.ts | 4 +- .../get-browserslist-options.ts | 4 +- src/util/get-browserslist/get-browserslist.ts | 4 +- .../get-declaration-out-dir.ts | 11 +- .../get-forced-compiler-options-options.ts | 4 +- .../get-forced-compiler-options.ts | 8 +- .../get-module-dependencies.ts | 4 +- .../get-module-kind-from-rollup-format.ts | 4 +- .../get-new-line-character.ts | 2 +- src/util/get-out-dir/get-out-dir.ts | 2 +- .../get-parsed-command-line.ts | 6 +- .../parsed-command-line-result.ts | 2 +- .../get-script-kind-from-path.ts | 2 +- .../get-script-target-from-browserslist.ts | 2 +- ...get-source-description-from-emit-output.ts | 4 +- .../get-supported-extensions.ts | 19 +- .../is-build-info-output-file.ts | 2 +- .../is-code-output-file.ts | 2 +- src/util/is-debug/should-debug.ts | 4 +- .../is-map-output-file/is-map-output-file.ts | 2 +- src/util/is-output-chunk/is-output-chunk.ts | 4 +- src/util/logging/log-transformer.ts | 2 +- src/util/logging/log-tsconfig.ts | 2 +- .../custom-transformer-options.ts | 4 +- .../merge-transformers/merge-transformers.ts | 4 +- src/util/object/object-util.ts | 14 +- src/util/os/os.ts | 2 +- src/util/path/path-util.ts | 8 +- src/util/pick-resolved-module.ts | 2 +- src/util/plugin-options/get-plugin-options.ts | 8 +- src/util/predicates/predicates.ts | 2 +- src/util/resolve-id/resolve-id.ts | 4 +- src/util/resolve-id/resolve-module-options.ts | 4 +- src/util/rollup/rollup-util.ts | 2 +- ...st-or-compute-based-on-compiler-options.ts | 2 +- .../take-bundled-filenames.ts | 2 +- src/util/transpiler-loader.ts | 4 +- test/babel.test.ts | 5 +- test/cjs.test.ts | 56 +- test/code-splitting.test.ts | 16 +- test/custom-transformers.test.ts | 2 +- test/deconflict.test.ts | 2 +- test/external.test.ts | 1 + test/hook.test.ts | 2 +- test/mjs.test.ts | 56 +- test/namespace-export.test.ts | 2 +- test/path-mapping.test.ts | 1 + test/setup/create-virtual-file-system.ts | 4 +- test/setup/setup-rollup.ts | 21 +- test/setup/test-context.ts | 6 +- test/setup/test-file.ts | 4 +- test/setup/test-setup.ts | 10 +- test/statement-merge.test.ts | 14 +- test/util/create-typescript-system.ts | 8 +- tsconfig.json | 8 +- 353 files changed, 1293 insertions(+), 1439 deletions(-) diff --git a/package.json b/package.json index 5fa8f25e..f00bcc38 100644 --- a/package.json +++ b/package.json @@ -47,42 +47,42 @@ ], "license": "MIT", "devDependencies": { - "@rollup/plugin-alias": "^4.0.2", - "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-alias": "^4.0.3", + "@rollup/plugin-commonjs": "^24.0.1", "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", - "@types/babel__core": "^7.1.20", + "@types/babel__core": "^7.20.0", "@types/node": "^18.11.18", "@types/prettier": "^2.7.2", "@types/semver": "^7.3.13", - "@typescript-eslint/eslint-plugin": "^5.48.1", - "@typescript-eslint/parser": "^5.48.1", + "@typescript-eslint/eslint-plugin": "^5.48.2", + "@typescript-eslint/parser": "^5.48.2", "eslint-plugin-deprecation": "1.3.3", - "@wessberg/ts-config": "^2.0.4", + "@wessberg/ts-config": "^3.1.0", "@wessberg/prettier-config": "^1.0.0", "@babel/core": "7.20.12", - "@babel/runtime": "7.20.7", + "@babel/runtime": "7.20.13", "@babel/preset-env": "7.20.2", "@babel/preset-typescript": "7.18.6", "@babel/plugin-transform-runtime": "7.19.6", - "@swc/core": "1.3.25", + "@swc/core": "1.3.27", "@swc/helpers": "0.4.14", "ava": "3.15.0", "babel-preset-minify": "^0.5.2", - "eslint": "^8.31.0", + "eslint": "^8.32.0", "eslint-config-prettier": "^8.6.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsdoc": "^39.6.4", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jsdoc": "^39.6.7", "helpertypes": "^0.0.19", "husky": "^8.0.3", "memfs": "^3.4.13", "np": "7.6.3", "npm-check-updates": "16.6.2", - "pnpm": "^7.23.0", - "prettier": "^2.8.2", + "pnpm": "^7.25.1", + "prettier": "^2.8.3", "pretty-quick": "^3.1.3", - "rimraf": "^3.0.2", - "rollup": "^3.9.1", + "rimraf": "^4.1.1", + "rollup": "^3.10.1", "sandhog": "^2.0.2", "semver": "7.3.8", "standard-changelog": "^2.0.27", @@ -108,7 +108,7 @@ "@rollup/pluginutils": "^5.0.2", "@wessberg/stringutil": "^1.0.19", "browserslist": "^4.21.4", - "browserslist-generator": "^1.0.66", + "browserslist-generator": "^2.0.1", "ansi-colors": "^4.1.3", "compatfactory": "^2.0.9", "crosspath": "^2.0.0", @@ -152,7 +152,8 @@ }, "exports": { "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.cjs" + "require": "./dist/cjs/index.cjs", + "types": "./dist/esm/index.d.ts" }, "type": "module", "types": "./dist/esm/index.d.ts", @@ -178,7 +179,7 @@ "prettier": "@wessberg/prettier-config", "ava": { "files": [ - "test/**.test.ts" + "test/**/*.test.ts" ], "verbose": true, "timeout": "400s", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e59dfc7..ee9138a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,46 +5,46 @@ specifiers: '@babel/plugin-transform-runtime': 7.19.6 '@babel/preset-env': 7.20.2 '@babel/preset-typescript': 7.18.6 - '@babel/runtime': 7.20.7 - '@rollup/plugin-alias': ^4.0.2 - '@rollup/plugin-commonjs': ^24.0.0 + '@babel/runtime': 7.20.13 + '@rollup/plugin-alias': ^4.0.3 + '@rollup/plugin-commonjs': ^24.0.1 '@rollup/plugin-json': ^6.0.0 '@rollup/plugin-multi-entry': ^6.0.0 '@rollup/pluginutils': ^5.0.2 - '@swc/core': 1.3.25 + '@swc/core': 1.3.27 '@swc/helpers': 0.4.14 - '@types/babel__core': ^7.1.20 + '@types/babel__core': ^7.20.0 '@types/node': ^18.11.18 '@types/prettier': ^2.7.2 '@types/semver': ^7.3.13 - '@typescript-eslint/eslint-plugin': ^5.48.1 - '@typescript-eslint/parser': ^5.48.1 + '@typescript-eslint/eslint-plugin': ^5.48.2 + '@typescript-eslint/parser': ^5.48.2 '@wessberg/prettier-config': ^1.0.0 '@wessberg/stringutil': ^1.0.19 - '@wessberg/ts-config': ^2.0.4 + '@wessberg/ts-config': ^3.1.0 ansi-colors: ^4.1.3 ava: 3.15.0 babel-preset-minify: ^0.5.2 browserslist: ^4.21.4 - browserslist-generator: ^1.0.66 + browserslist-generator: ^2.0.1 compatfactory: ^2.0.9 crosspath: ^2.0.0 - eslint: ^8.31.0 + eslint: ^8.32.0 eslint-config-prettier: ^8.6.0 eslint-plugin-deprecation: 1.3.3 - eslint-plugin-import: ^2.26.0 - eslint-plugin-jsdoc: ^39.6.4 + eslint-plugin-import: ^2.27.5 + eslint-plugin-jsdoc: ^39.6.7 helpertypes: ^0.0.19 husky: ^8.0.3 magic-string: ^0.27.0 memfs: ^3.4.13 np: 7.6.3 npm-check-updates: 16.6.2 - pnpm: ^7.23.0 - prettier: ^2.8.2 + pnpm: ^7.25.1 + prettier: ^2.8.3 pretty-quick: ^3.1.3 - rimraf: ^3.0.2 - rollup: ^3.9.1 + rimraf: ^4.1.1 + rollup: ^3.10.1 sandhog: ^2.0.2 semver: 7.3.8 standard-changelog: ^2.0.27 @@ -69,11 +69,11 @@ specifiers: typescript-4-8-2: npm:typescript@4.8.2 dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.9.1 + '@rollup/pluginutils': 5.0.2_rollup@3.10.1 '@wessberg/stringutil': 1.0.19 ansi-colors: 4.1.3 browserslist: 4.21.4 - browserslist-generator: 1.0.66 + browserslist-generator: 2.0.1 compatfactory: 2.0.9_typescript@4.9.4 crosspath: 2.0.0 magic-string: 0.27.0 @@ -85,42 +85,42 @@ devDependencies: '@babel/plugin-transform-runtime': 7.19.6_@babel+core@7.20.12 '@babel/preset-env': 7.20.2_@babel+core@7.20.12 '@babel/preset-typescript': 7.18.6_@babel+core@7.20.12 - '@babel/runtime': 7.20.7 - '@rollup/plugin-alias': 4.0.2_rollup@3.9.1 - '@rollup/plugin-commonjs': 24.0.0_rollup@3.9.1 - '@rollup/plugin-json': 6.0.0_rollup@3.9.1 - '@rollup/plugin-multi-entry': 6.0.0_rollup@3.9.1 - '@swc/core': 1.3.25 + '@babel/runtime': 7.20.13 + '@rollup/plugin-alias': 4.0.3_rollup@3.10.1 + '@rollup/plugin-commonjs': 24.0.1_rollup@3.10.1 + '@rollup/plugin-json': 6.0.0_rollup@3.10.1 + '@rollup/plugin-multi-entry': 6.0.0_rollup@3.10.1 + '@swc/core': 1.3.27 '@swc/helpers': 0.4.14 - '@types/babel__core': 7.1.20 + '@types/babel__core': 7.20.0 '@types/node': 18.11.18 '@types/prettier': 2.7.2 '@types/semver': 7.3.13 - '@typescript-eslint/eslint-plugin': 5.48.1_3jon24igvnqaqexgwtxk6nkpse - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/eslint-plugin': 5.48.2_caon6io6stgpr7lz2rtbhekxqy + '@typescript-eslint/parser': 5.48.2_7uibuqfxkfaozanbtbziikiqje '@wessberg/prettier-config': 1.0.0 - '@wessberg/ts-config': 2.0.4 + '@wessberg/ts-config': 3.1.0 ava: 3.15.0 babel-preset-minify: 0.5.2 - eslint: 8.31.0 - eslint-config-prettier: 8.6.0_eslint@8.31.0 - eslint-plugin-deprecation: 1.3.3_iukboom6ndih5an6iafl45j2fe - eslint-plugin-import: 2.26.0_qdjeohovcytra7xto5vgmxssaq - eslint-plugin-jsdoc: 39.6.4_eslint@8.31.0 + eslint: 8.32.0 + eslint-config-prettier: 8.6.0_eslint@8.32.0 + eslint-plugin-deprecation: 1.3.3_7uibuqfxkfaozanbtbziikiqje + eslint-plugin-import: 2.27.5_2l6piu6guil2f63lj3qmhzbnn4 + eslint-plugin-jsdoc: 39.6.7_eslint@8.32.0 helpertypes: 0.0.19 husky: 8.0.3 memfs: 3.4.13 np: 7.6.3 npm-check-updates: 16.6.2 - pnpm: 7.23.0 - prettier: 2.8.2 - pretty-quick: 3.1.3_prettier@2.8.2 - rimraf: 3.0.2 - rollup: 3.9.1 + pnpm: 7.25.1 + prettier: 2.8.3 + pretty-quick: 3.1.3_prettier@2.8.3 + rimraf: 4.1.1 + rollup: 3.10.1 sandhog: 2.0.2 semver: 7.3.8 standard-changelog: 2.0.27 - ts-node: 10.9.1_h4s5tc4wq4kcse7jq5bao6xoy4 + ts-node: 10.9.1_tuaaix3o4wua7jksxyu5belrtq typescript: 4.9.4 typescript-3-4-1: /typescript/3.4.1 typescript-3-5-1: /typescript/3.5.1 @@ -169,10 +169,10 @@ packages: '@babel/generator': 7.20.7 '@babel/helper-compilation-targets': 7.20.7_@babel+core@7.20.12 '@babel/helper-module-transforms': 7.20.11 - '@babel/helpers': 7.20.7 - '@babel/parser': 7.20.7 + '@babel/helpers': 7.20.13 + '@babel/parser': 7.20.13 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.12 + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 convert-source-map: 1.9.0 debug: 4.3.4 @@ -318,7 +318,7 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.12 + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -359,7 +359,7 @@ packages: '@babel/helper-member-expression-to-functions': 7.20.7 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.12 + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -407,18 +407,18 @@ packages: dependencies: '@babel/helper-function-name': 7.19.0 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.12 + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color dev: true - /@babel/helpers/7.20.7: - resolution: {integrity: sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==} + /@babel/helpers/7.20.13: + resolution: {integrity: sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.20.7 - '@babel/traverse': 7.20.12 + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -433,8 +433,8 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser/7.20.7: - resolution: {integrity: sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==} + /@babel/parser/7.20.13: + resolution: {integrity: sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==} engines: {node: '>=6.0.0'} hasBin: true dependencies: @@ -1153,8 +1153,8 @@ packages: '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-transform-typescript/7.20.7_@babel+core@7.20.12: - resolution: {integrity: sha512-m3wVKEvf6SoszD8pu4NZz3PvfKRCMgk6D6d0Qi9hNnlM5M6CFS92EgF4EiHVLKbU0r/r7ty1hg7NPZwE7WRbYw==} + /@babel/plugin-transform-typescript/7.20.13_@babel+core@7.20.12: + resolution: {integrity: sha512-O7I/THxarGcDZxkgWKMUrk7NK1/WbHAg3Xx86gqS6x9MTrNL6AwIluuZ96ms4xeDe6AVx6rjHbWHP7x26EPQBA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1268,7 +1268,7 @@ packages: babel-plugin-polyfill-corejs2: 0.3.3_@babel+core@7.20.12 babel-plugin-polyfill-corejs3: 0.6.0_@babel+core@7.20.12 babel-plugin-polyfill-regenerator: 0.4.1_@babel+core@7.20.12 - core-js-compat: 3.27.1 + core-js-compat: 3.27.2 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -1296,13 +1296,13 @@ packages: '@babel/core': 7.20.12 '@babel/helper-plugin-utils': 7.20.2 '@babel/helper-validator-option': 7.18.6 - '@babel/plugin-transform-typescript': 7.20.7_@babel+core@7.20.12 + '@babel/plugin-transform-typescript': 7.20.13_@babel+core@7.20.12 transitivePeerDependencies: - supports-color dev: true - /@babel/runtime/7.20.7: - resolution: {integrity: sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==} + /@babel/runtime/7.20.13: + resolution: {integrity: sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.11 @@ -1313,12 +1313,12 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/parser': 7.20.7 + '@babel/parser': 7.20.13 '@babel/types': 7.20.7 dev: true - /@babel/traverse/7.20.12: - resolution: {integrity: sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==} + /@babel/traverse/7.20.13: + resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 @@ -1327,7 +1327,7 @@ packages: '@babel/helper-function-name': 7.19.0 '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.20.7 + '@babel/parser': 7.20.13 '@babel/types': 7.20.7 debug: 4.3.4 globals: 11.12.0 @@ -1457,8 +1457,8 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /@mdn/browser-compat-data/4.2.1: - resolution: {integrity: sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==} + /@mdn/browser-compat-data/5.2.30: + resolution: {integrity: sha512-j48TKjgXHuUXzdk5MuPI7BBjryHQeI2TFWhcULBjiCkqXmW2hBoKGwQNEXTSzCVQmYvEat15cDDPU3NIQmY50w==} dev: false /@nodelib/fs.scandir/2.1.5: @@ -1573,8 +1573,8 @@ packages: config-chain: 1.1.13 dev: true - /@rollup/plugin-alias/4.0.2_rollup@3.9.1: - resolution: {integrity: sha512-1hv7dBOZZwo3SEupxn4UA2N0EDThqSSS+wI1St1TNTBtOZvUchyIClyHcnDcjjrReTPZ47Faedrhblv4n+T5UQ==} + /@rollup/plugin-alias/4.0.3_rollup@3.10.1: + resolution: {integrity: sha512-ZuDWE1q4PQDhvm/zc5Prun8sBpLJy41DMptYrS6MhAy9s9kL/doN1613BWfEchGVfKxzliJ3BjbOPizXX38DbQ==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0 @@ -1582,12 +1582,12 @@ packages: rollup: optional: true dependencies: - rollup: 3.9.1 + rollup: 3.10.1 slash: 4.0.0 dev: true - /@rollup/plugin-commonjs/24.0.0_rollup@3.9.1: - resolution: {integrity: sha512-0w0wyykzdyRRPHOb0cQt14mIBLujfAv6GgP6g8nvg/iBxEm112t3YPPq+Buqe2+imvElTka+bjNlJ/gB56TD8g==} + /@rollup/plugin-commonjs/24.0.1_rollup@3.10.1: + resolution: {integrity: sha512-15LsiWRZk4eOGqvrJyu3z3DaBu5BhXIMeWnijSRvd8irrrg9SHpQ1pH+BUK4H6Z9wL9yOxZJMTLU+Au86XHxow==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.68.0||^3.0.0 @@ -1595,16 +1595,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.9.1 + '@rollup/pluginutils': 5.0.2_rollup@3.10.1 commondir: 1.0.1 estree-walker: 2.0.2 - glob: 8.0.3 + glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.27.0 - rollup: 3.9.1 + rollup: 3.10.1 dev: true - /@rollup/plugin-json/6.0.0_rollup@3.9.1: + /@rollup/plugin-json/6.0.0_rollup@3.10.1: resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1613,11 +1613,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.9.1 - rollup: 3.9.1 + '@rollup/pluginutils': 5.0.2_rollup@3.10.1 + rollup: 3.10.1 dev: true - /@rollup/plugin-multi-entry/6.0.0_rollup@3.9.1: + /@rollup/plugin-multi-entry/6.0.0_rollup@3.10.1: resolution: {integrity: sha512-msBgVncGQwh/ahxeP/rc8MXVZNBOjoVCsBuDk6uqyFzDv/SZN7jksfAsu6DJ2w4r5PaBX3/OXOjVPeCxya2waA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1626,12 +1626,12 @@ packages: rollup: optional: true dependencies: - '@rollup/plugin-virtual': 3.0.1_rollup@3.9.1 + '@rollup/plugin-virtual': 3.0.1_rollup@3.10.1 matched: 5.0.1 - rollup: 3.9.1 + rollup: 3.10.1 dev: true - /@rollup/plugin-virtual/3.0.1_rollup@3.9.1: + /@rollup/plugin-virtual/3.0.1_rollup@3.10.1: resolution: {integrity: sha512-fK8O0IL5+q+GrsMLuACVNk2x21g3yaw+sG2qn16SnUd3IlBsQyvWxLMGHmCmXRMecPjGRSZ/1LmZB4rjQm68og==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1640,10 +1640,10 @@ packages: rollup: optional: true dependencies: - rollup: 3.9.1 + rollup: 3.10.1 dev: true - /@rollup/pluginutils/5.0.2_rollup@3.9.1: + /@rollup/pluginutils/5.0.2_rollup@3.10.1: resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1655,7 +1655,7 @@ packages: '@types/estree': 1.0.0 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.9.1 + rollup: 3.10.1 /@samverschueren/stream-to-observable/0.3.1_rxjs@6.6.7: resolution: {integrity: sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ==} @@ -1695,8 +1695,8 @@ packages: engines: {node: '>=14.16'} dev: true - /@swc/core-darwin-arm64/1.3.25: - resolution: {integrity: sha512-8PWAVcjTJyj2VrqPBFOIi2w2P0Z8kOCbzHW3+pe+bSXxfGMG0MKPl5U2IXhsEL0ovm4xSFlqW0yygpoP3MmRPw==} + /@swc/core-darwin-arm64/1.3.27: + resolution: {integrity: sha512-IKlxkhEy99CnP9nduaf5IJWIFcr6D5cZCjYmCs7nWkjMV+aAieyDO9AX4LT8AcHy6CF7ByOX7SKoqk+gVMAaKw==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -1704,8 +1704,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64/1.3.25: - resolution: {integrity: sha512-5DHGiMYFEj5aa208tCjo7Sn5tiG4xPz+4gUiWVlglxqXFptkNim5xu/1G6VYm5Zk7dI5jJkjTU76GQG7IRvPug==} + /@swc/core-darwin-x64/1.3.27: + resolution: {integrity: sha512-MtabZIhFf/dL3vs6UMbd+vJsjIkm2NaFqulGV0Jofy2bfVZPTj/b5pXeOlUsTWy7JcH1uixjdx4RvJRyvqJxQA==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -1713,8 +1713,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf/1.3.25: - resolution: {integrity: sha512-YNfLxv9PhZk+jrJbpR1mMrYBUkufo0hiFv3S1OrX3l8edsIP4wPND5w9ZH0Oi898f6Jg9DBrY2zXJMQ+gWkbvA==} + /@swc/core-linux-arm-gnueabihf/1.3.27: + resolution: {integrity: sha512-XELMoGcUTAkk+G4buwIIhu6AIr1U418Odt22HUW8+ZvV+Wty2ICgR/myOIhM3xMb6U2L8ay+evMqoVNMQ0RRTg==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -1722,8 +1722,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu/1.3.25: - resolution: {integrity: sha512-kS+spM5/xQ6QvWF1ms3byfjnhUlpjTfFwgCyHnIKgjvsYkDa+vkAIhKq6HuEdaTPaCRCjts0Zarhub1nClUU0g==} + /@swc/core-linux-arm64-gnu/1.3.27: + resolution: {integrity: sha512-O6vtT6bnrVR9PzEIuA5U7tIfYo7bv97H9K9Vqy2oyHNeGN0H36DKwS4UqPreHtziXNF5+7ubdUYUkrG/j8UnUQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1731,8 +1731,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl/1.3.25: - resolution: {integrity: sha512-vM3D7LWmjotUAJ2D4F+L+dspFeWrcPNVh0o8TCoTOYCt8DPD5YsUKTpIgOsZ+gReeWUAnNTh0Btx5pGGVfajGA==} + /@swc/core-linux-arm64-musl/1.3.27: + resolution: {integrity: sha512-Oa0E1i7dOTWpaEZumKoNbTE/Ap+da6nlhqKVUdYrFDrOBi25tz76SdxZIyvAszzmgY89b5yd1naourKmkPXpww==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1740,8 +1740,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu/1.3.25: - resolution: {integrity: sha512-xUCLLMDlYa/zB8BftVa4SrxuVpcDxkltCfmBg5r2pZPVskhC5ZJsQZ/AvWNChoAB11shRhjTaWDlmxJEsa7TIg==} + /@swc/core-linux-x64-gnu/1.3.27: + resolution: {integrity: sha512-S3v9H8oL2a8Ur6AjQyhkC6HfBVPOxKMdBhcZmdNuVgEUHbHdbf/Lka85F9IOYXEarMn0FtQw3ywowS22O9L5Uw==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -1749,8 +1749,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl/1.3.25: - resolution: {integrity: sha512-QzHU3BIaUVRSFNsUn3Qxx1vgtF/f5NqsFMAAPSq9Y8Yq5nrlc2t7cNuOROxHLbUqE+NPUp6+RglleJMoeWz5mA==} + /@swc/core-linux-x64-musl/1.3.27: + resolution: {integrity: sha512-6DDkdXlOADpwICFZTRphCR+cIeS8aEYh4NlyzBito0mOWwIIdfCgALzhkTQOzTOkcD42bP97CIoZ97hqV/puOg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -1758,8 +1758,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc/1.3.25: - resolution: {integrity: sha512-77VSVtneVOAUL4zkRyQZ6pWVpTsVVdqwly/DKnRnloglGKxYuk5DG5MUBsL72Nnfv4OCHjZ27eI3NUrpLsUb2Q==} + /@swc/core-win32-arm64-msvc/1.3.27: + resolution: {integrity: sha512-baxfH4AbEcaTNo08wxV0W6hiMXwVCxPS4qc0amHpXPti92unvSqeDR1W3C9GjHqzXlWtmCRsq8Ww1pal6ZVLrw==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -1767,8 +1767,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc/1.3.25: - resolution: {integrity: sha512-kz0v3K3H6OPEZR3ry72Ad/6C5GrZBRRUk69K58LORQ8tZXQD3UGl85pUbQqyHl8fR5NU76Muxgovj9CI9iTHGA==} + /@swc/core-win32-ia32-msvc/1.3.27: + resolution: {integrity: sha512-7iLJnH71k5qCwxv9NcM/P7nIEzTsC7r1sIiQW6bu+CpC8qZvwl0PS+XvQRlLly2gCZM+Le98tksYG14MEh+Hrw==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -1776,8 +1776,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc/1.3.25: - resolution: {integrity: sha512-nmQOAzIpNRRnupWzkenJmW4i+h1M76cVNUqEU2MjmtesEkRZEGqv//jefXiyCP2zcbeLNLKiB2ptVJhpd1BvRA==} + /@swc/core-win32-x64-msvc/1.3.27: + resolution: {integrity: sha512-mFM907PDw/jrQ44+TRjIVGEOy2Mu06mMMz0HPMFuRsBzl5t0Kajp3vmn8FkkpS9wH5982VPi6hPYVTb7QJo5Qg==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -1785,21 +1785,21 @@ packages: dev: true optional: true - /@swc/core/1.3.25: - resolution: {integrity: sha512-wqzvM/wu6OsTVYPMStOpm7kIQcPX3GoZ0sC85qzDdsCxmJ1rmItLAD91sXPUmmdk0XqPYjLgT9MRDEIP5woz4g==} + /@swc/core/1.3.27: + resolution: {integrity: sha512-praRNgpeYGvwDIm/Cl6JU+yHMvwVraL0U6ejMgGyzvpcm1FVsZd1/EYXGqzbBJ0ALv7Gx4eK56h4GnwV6d4L0w==} engines: {node: '>=10'} requiresBuild: true optionalDependencies: - '@swc/core-darwin-arm64': 1.3.25 - '@swc/core-darwin-x64': 1.3.25 - '@swc/core-linux-arm-gnueabihf': 1.3.25 - '@swc/core-linux-arm64-gnu': 1.3.25 - '@swc/core-linux-arm64-musl': 1.3.25 - '@swc/core-linux-x64-gnu': 1.3.25 - '@swc/core-linux-x64-musl': 1.3.25 - '@swc/core-win32-arm64-msvc': 1.3.25 - '@swc/core-win32-ia32-msvc': 1.3.25 - '@swc/core-win32-x64-msvc': 1.3.25 + '@swc/core-darwin-arm64': 1.3.27 + '@swc/core-darwin-x64': 1.3.27 + '@swc/core-linux-arm-gnueabihf': 1.3.27 + '@swc/core-linux-arm64-gnu': 1.3.27 + '@swc/core-linux-arm64-musl': 1.3.27 + '@swc/core-linux-x64-gnu': 1.3.27 + '@swc/core-linux-x64-musl': 1.3.27 + '@swc/core-win32-arm64-msvc': 1.3.27 + '@swc/core-win32-ia32-msvc': 1.3.27 + '@swc/core-win32-x64-msvc': 1.3.27 dev: true /@swc/helpers/0.4.14: @@ -1850,10 +1850,10 @@ packages: resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} dev: true - /@types/babel__core/7.1.20: - resolution: {integrity: sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==} + /@types/babel__core/7.20.0: + resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} dependencies: - '@babel/parser': 7.20.7 + '@babel/parser': 7.20.13 '@babel/types': 7.20.7 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 @@ -1869,7 +1869,7 @@ packages: /@types/babel__template/7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.20.7 + '@babel/parser': 7.20.13 '@babel/types': 7.20.7 dev: true @@ -1953,8 +1953,8 @@ packages: resolution: {integrity: sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ==} dev: false - /@typescript-eslint/eslint-plugin/5.48.1_3jon24igvnqaqexgwtxk6nkpse: - resolution: {integrity: sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ==} + /@typescript-eslint/eslint-plugin/5.48.2_caon6io6stgpr7lz2rtbhekxqy: + resolution: {integrity: sha512-sR0Gja9Ky1teIq4qJOl0nC+Tk64/uYdX+mi+5iB//MH8gwyx8e3SOyhEzeLZEFEEfCaLf8KJq+Bd/6je1t+CAg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1964,12 +1964,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe - '@typescript-eslint/scope-manager': 5.48.1 - '@typescript-eslint/type-utils': 5.48.1_iukboom6ndih5an6iafl45j2fe - '@typescript-eslint/utils': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.48.2_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/scope-manager': 5.48.2 + '@typescript-eslint/type-utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje debug: 4.3.4 - eslint: 8.31.0 + eslint: 8.32.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 regexpp: 3.2.0 @@ -1980,21 +1980,21 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.48.1_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-8OoIZZuOeqsm5cxn2f01qHWtVC3M4iixSsfZXPiQUg4Sl4LiU+b5epcJFwxNfqeoLl+SGncELyi3x99zI6C0ng==} + /@typescript-eslint/experimental-utils/5.48.2_7uibuqfxkfaozanbtbziikiqje: + resolution: {integrity: sha512-Iwx8De8dwl6qPaPZWIaEfP1feN/YFlA5FlCxF3zUIm+2AG92C5Tefkugj2L9ytOFrmTYkTE/CqvJFZbYoVZQMg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.48.1_iukboom6ndih5an6iafl45j2fe - eslint: 8.31.0 + '@typescript-eslint/utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje + eslint: 8.32.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser/5.48.1_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA==} + /@typescript-eslint/parser/5.48.2_7uibuqfxkfaozanbtbziikiqje: + resolution: {integrity: sha512-38zMsKsG2sIuM5Oi/olurGwYJXzmtdsHhn5mI/pQogP+BjYVkK5iRazCQ8RGS0V+YLk282uWElN70zAAUmaYHw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2003,26 +2003,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.48.1 - '@typescript-eslint/types': 5.48.1 - '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4 + '@typescript-eslint/scope-manager': 5.48.2 + '@typescript-eslint/types': 5.48.2 + '@typescript-eslint/typescript-estree': 5.48.2_typescript@4.9.4 debug: 4.3.4 - eslint: 8.31.0 + eslint: 8.32.0 typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.48.1: - resolution: {integrity: sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ==} + /@typescript-eslint/scope-manager/5.48.2: + resolution: {integrity: sha512-zEUFfonQid5KRDKoI3O+uP1GnrFd4tIHlvs+sTJXiWuypUWMuDaottkJuR612wQfOkjYbsaskSIURV9xo4f+Fw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.48.1 - '@typescript-eslint/visitor-keys': 5.48.1 + '@typescript-eslint/types': 5.48.2 + '@typescript-eslint/visitor-keys': 5.48.2 dev: true - /@typescript-eslint/type-utils/5.48.1_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ==} + /@typescript-eslint/type-utils/5.48.2_7uibuqfxkfaozanbtbziikiqje: + resolution: {integrity: sha512-QVWx7J5sPMRiOMJp5dYshPxABRoZV1xbRirqSk8yuIIsu0nvMTZesKErEA3Oix1k+uvsk8Cs8TGJ6kQ0ndAcew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -2031,23 +2031,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4 - '@typescript-eslint/utils': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/typescript-estree': 5.48.2_typescript@4.9.4 + '@typescript-eslint/utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje debug: 4.3.4 - eslint: 8.31.0 + eslint: 8.32.0 tsutils: 3.21.0_typescript@4.9.4 typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.48.1: - resolution: {integrity: sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg==} + /@typescript-eslint/types/5.48.2: + resolution: {integrity: sha512-hE7dA77xxu7ByBc6KCzikgfRyBCTst6dZQpwaTy25iMYOnbNljDT4hjhrGEJJ0QoMjrfqrx+j1l1B9/LtKeuqA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.48.1_typescript@4.9.4: - resolution: {integrity: sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA==} + /@typescript-eslint/typescript-estree/5.48.2_typescript@4.9.4: + resolution: {integrity: sha512-bibvD3z6ilnoVxUBFEgkO0k0aFvUc4Cttt0dAreEr+nrAHhWzkO83PEVVuieK3DqcgL6VAK5dkzK8XUVja5Zcg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2055,8 +2055,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.48.1 - '@typescript-eslint/visitor-keys': 5.48.1 + '@typescript-eslint/types': 5.48.2 + '@typescript-eslint/visitor-keys': 5.48.2 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -2067,31 +2067,31 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.48.1_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA==} + /@typescript-eslint/utils/5.48.2_7uibuqfxkfaozanbtbziikiqje: + resolution: {integrity: sha512-2h18c0d7jgkw6tdKTlNaM7wyopbLRBiit8oAxoP89YnuBOzCZ8g8aBCaCqq7h208qUTroL7Whgzam7UY3HVLow==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.48.1 - '@typescript-eslint/types': 5.48.1 - '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4 - eslint: 8.31.0 + '@typescript-eslint/scope-manager': 5.48.2 + '@typescript-eslint/types': 5.48.2 + '@typescript-eslint/typescript-estree': 5.48.2_typescript@4.9.4 + eslint: 8.32.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint-utils: 3.0.0_eslint@8.32.0 semver: 7.3.8 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.48.1: - resolution: {integrity: sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA==} + /@typescript-eslint/visitor-keys/5.48.2: + resolution: {integrity: sha512-z9njZLSkwmjFWUelGEwEbdf4NwKvfHxvGC0OcGN1Hp/XNDIcJ7D5DpPNPv6x6/mFvc1tQHsaWmpD/a4gOvvCJQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.48.1 + '@typescript-eslint/types': 5.48.2 eslint-visitor-keys: 3.3.0 dev: true @@ -2104,8 +2104,8 @@ packages: engines: {node: '>=8.0.0'} dev: false - /@wessberg/ts-config/2.0.4: - resolution: {integrity: sha512-Zi1mE/S9F1dJB1VX0o7YIt3TecM5j88vV+0AUlyGv6eWiqM+hSjHC5CbFMQ//aftIve6LJkMkqliii+3FlT94Q==} + /@wessberg/ts-config/3.1.0: + resolution: {integrity: sha512-/TqKHx3zgdDQKoqAemh4tBYQE873aN37BuaTeE5AFC3ZG/9oSVgkbuu32WErFsSHAnpdblpBuYJwhugUm0r7Xg==} dev: true /JSONStream/1.3.5: @@ -2352,8 +2352,8 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.21.0 - get-intrinsic: 1.1.3 + es-abstract: 1.21.1 + get-intrinsic: 1.2.0 is-string: 1.0.7 dev: true @@ -2368,7 +2368,17 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.21.0 + es-abstract: 1.21.1 + es-shim-unscopables: 1.0.0 + dev: true + + /array.prototype.flatmap/1.3.1: + resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.21.1 es-shim-unscopables: 1.0.0 dev: true @@ -2586,7 +2596,7 @@ packages: dependencies: '@babel/core': 7.20.12 '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.20.12 - core-js-compat: 3.27.1 + core-js-compat: 3.27.2 transitivePeerDependencies: - supports-color dev: true @@ -2728,7 +2738,7 @@ packages: string-width: 5.1.2 type-fest: 2.19.0 widest-line: 4.0.1 - wrap-ansi: 8.0.1 + wrap-ansi: 8.1.0 dev: true /brace-expansion/1.1.11: @@ -2751,32 +2761,20 @@ packages: fill-range: 7.0.1 dev: true - /browserslist-generator/1.0.66: - resolution: {integrity: sha512-aFDax4Qzh29DdyhHQBD2Yu2L5OvaDnvYFMbmpLrLwwaNK4H6dHEhC/Nxv93/+mfAA+a/t94ln0P2JZvHO6LZDA==} - engines: {node: '>=8.0.0'} + /browserslist-generator/2.0.1: + resolution: {integrity: sha512-j1qOeu8E8BDdsuzQ3XEdncgLUEke+m4XaT5DHdJ1lG9+ZBaVHYOzja3kTTHv29xeg9vX1y8e2fMrUcglInMCaw==} + engines: {node: '>=14.9.0', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} dependencies: - '@mdn/browser-compat-data': 4.2.1 + '@mdn/browser-compat-data': 5.2.30 '@types/object-path': 0.11.1 '@types/semver': 7.3.13 '@types/ua-parser-js': 0.7.36 - browserslist: 4.20.2 - caniuse-lite: 1.0.30001442 - isbot: 3.4.5 + browserslist: 4.21.4 + caniuse-lite: 1.0.30001447 + isbot: 3.6.5 object-path: 0.11.8 semver: 7.3.8 - ua-parser-js: 1.0.32 - dev: false - - /browserslist/4.20.2: - resolution: {integrity: sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001442 - electron-to-chromium: 1.4.284 - escalade: 3.1.1 - node-releases: 2.0.8 - picocolors: 1.0.0 + ua-parser-js: 1.0.33 dev: false /browserslist/4.21.4: @@ -2784,7 +2782,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001442 + caniuse-lite: 1.0.30001447 electron-to-chromium: 1.4.284 node-releases: 2.0.8 update-browserslist-db: 1.0.10_browserslist@4.21.4 @@ -2818,7 +2816,7 @@ packages: '@npmcli/move-file': 2.0.1 chownr: 2.0.0 fs-minipass: 2.1.0 - glob: 8.0.3 + glob: 8.1.0 infer-owner: 1.0.4 lru-cache: 7.14.1 minipass: 3.3.6 @@ -2842,7 +2840,7 @@ packages: dependencies: '@npmcli/fs': 3.1.0 fs-minipass: 3.0.0 - glob: 8.0.3 + glob: 8.1.0 lru-cache: 7.14.1 minipass: 4.0.0 minipass-collect: 1.0.2 @@ -2913,7 +2911,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /callsites/3.1.0: @@ -2945,8 +2943,8 @@ packages: engines: {node: '>=14.16'} dev: true - /caniuse-lite/1.0.30001442: - resolution: {integrity: sha512-239m03Pqy0hwxYPYR5JwOIxRJfLTWtle9FV8zosfV5pHg+/51uD4nxcUlM8+mWWGfwKtt8lJNHnD3cWw9VZ6ow==} + /caniuse-lite/1.0.30001447: + resolution: {integrity: sha512-bdKU1BQDPeEXe9A39xJnGtY0uRq/z5osrnXUw0TcK+EYno45Y+U7QU9HhHEyzvMDffpYadFXi3idnSNkcwLkTw==} /chalk/1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} @@ -3347,8 +3345,8 @@ packages: engines: {node: '>= 4'} dev: true - /core-js-compat/3.27.1: - resolution: {integrity: sha512-Dg91JFeCDA17FKnneN7oCMz4BkQ4TcffkgHP4OWwp9yx3pi7ubqMDXXSacfNak1PQqjc95skyt+YBLHQJnkJwA==} + /core-js-compat/3.27.2: + resolution: {integrity: sha512-welaYuF7ZtbYKGrIy7y3eb40d37rG1FvzEOfe7hSLd2iD6duMDqUhRfSvCGyC46HhR6Y8JXXdZ2lnRUMkPBpvg==} dependencies: browserslist: 4.21.4 dev: true @@ -3426,17 +3424,6 @@ packages: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} dev: true - /debug/2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.0.0 - dev: true - /debug/3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -3657,16 +3644,17 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract/1.21.0: - resolution: {integrity: sha512-GUGtW7eXQay0c+PRq0sGIKSdaBorfVqsCMhGHo4elP7YVqZu9nCZS4UkK4gv71gOWNMra/PaSKD3ao1oWExO0g==} + /es-abstract/1.21.1: + resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} engines: {node: '>= 0.4'} dependencies: + available-typed-arrays: 1.0.5 call-bind: 1.0.2 es-set-tostringtag: 2.0.1 es-to-primitive: 1.2.1 function-bind: 1.1.1 function.prototype.name: 1.1.5 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 @@ -3683,7 +3671,7 @@ packages: is-string: 1.0.7 is-typed-array: 1.1.10 is-weakref: 1.0.2 - object-inspect: 1.12.2 + object-inspect: 1.12.3 object-keys: 1.1.1 object.assign: 4.1.4 regexp.prototype.flags: 1.4.3 @@ -3699,7 +3687,7 @@ packages: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 has: 1.0.3 has-tostringtag: 1.0.0 dev: true @@ -3753,25 +3741,26 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier/8.6.0_eslint@8.31.0: + /eslint-config-prettier/8.6.0_eslint@8.32.0: resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.31.0 + eslint: 8.32.0 dev: true - /eslint-import-resolver-node/0.3.6: - resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==} + /eslint-import-resolver-node/0.3.7: + resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 + is-core-module: 2.11.0 resolve: 1.22.1 transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils/2.7.4_wwvwfwokyq5c63apkeumvsvvgq: + /eslint-module-utils/2.7.4_kvyj4idustix6trhy5lyssy2sq: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -3792,22 +3781,22 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.48.2_7uibuqfxkfaozanbtbziikiqje debug: 3.2.7 - eslint: 8.31.0 - eslint-import-resolver-node: 0.3.6 + eslint: 8.32.0 + eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-deprecation/1.3.3_iukboom6ndih5an6iafl45j2fe: + /eslint-plugin-deprecation/1.3.3_7uibuqfxkfaozanbtbziikiqje: resolution: {integrity: sha512-Bbkv6ZN2cCthVXz/oZKPwsSY5S/CbgTLRG4Q2s2gpPpgNsT0uJ0dB5oLNiWzFYY8AgKX4ULxXFG1l/rDav9QFA==} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 typescript: ^3.7.5 || ^4.0.0 dependencies: - '@typescript-eslint/experimental-utils': 5.48.1_iukboom6ndih5an6iafl45j2fe - eslint: 8.31.0 + '@typescript-eslint/experimental-utils': 5.48.2_7uibuqfxkfaozanbtbziikiqje + eslint: 8.32.0 tslib: 2.4.1 tsutils: 3.21.0_typescript@4.9.4 typescript: 4.9.4 @@ -3815,8 +3804,8 @@ packages: - supports-color dev: true - /eslint-plugin-import/2.26.0_qdjeohovcytra7xto5vgmxssaq: - resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} + /eslint-plugin-import/2.27.5_2l6piu6guil2f63lj3qmhzbnn4: + resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3825,20 +3814,22 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.48.2_7uibuqfxkfaozanbtbziikiqje array-includes: 3.1.6 array.prototype.flat: 1.3.1 - debug: 2.6.9 + array.prototype.flatmap: 1.3.1 + debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.31.0 - eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_wwvwfwokyq5c63apkeumvsvvgq + eslint: 8.32.0 + eslint-import-resolver-node: 0.3.7 + eslint-module-utils: 2.7.4_kvyj4idustix6trhy5lyssy2sq has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 minimatch: 3.1.2 object.values: 1.1.6 resolve: 1.22.1 + semver: 6.3.0 tsconfig-paths: 3.14.1 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -3846,8 +3837,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/39.6.4_eslint@8.31.0: - resolution: {integrity: sha512-fskvdLCfwmPjHb6e+xNGDtGgbF8X7cDwMtVLAP2WwSf9Htrx68OAx31BESBM1FAwsN2HTQyYQq7m4aW4Q4Nlag==} + /eslint-plugin-jsdoc/39.6.7_eslint@8.32.0: + resolution: {integrity: sha512-0mrzXrHvL2ZLe3QK9X0OEDy7Fs2cFQ/f1d1G5KHEGD+13D1qg56Iovq0uOkYf5bJlHiKPytWVgOOO9y7kLW3VA==} engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -3856,7 +3847,7 @@ packages: comment-parser: 1.3.1 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.31.0 + eslint: 8.32.0 esquery: 1.4.0 semver: 7.3.8 spdx-expression-parse: 3.0.1 @@ -3880,13 +3871,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.31.0: + /eslint-utils/3.0.0_eslint@8.32.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.31.0 + eslint: 8.32.0 eslint-visitor-keys: 2.1.0 dev: true @@ -3900,8 +3891,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.31.0: - resolution: {integrity: sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==} + /eslint/8.32.0: + resolution: {integrity: sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: @@ -3916,7 +3907,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.31.0 + eslint-utils: 3.0.0_eslint@8.32.0 eslint-visitor-keys: 3.3.0 espree: 9.4.1 esquery: 1.4.0 @@ -3932,7 +3923,7 @@ packages: imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.2.0 + js-sdsl: 4.3.0 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 @@ -4241,7 +4232,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.21.0 + es-abstract: 1.21.1 functions-have-names: 1.2.3 dev: true @@ -4273,8 +4264,8 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-intrinsic/1.1.3: - resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} + /get-intrinsic/1.2.0: + resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} dependencies: function-bind: 1.1.1 has: 1.0.3 @@ -4321,7 +4312,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /git-raw-commits/2.0.11: @@ -4388,14 +4379,14 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob/8.0.3: - resolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==} + /glob/8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 5.1.2 + minimatch: 5.1.6 once: 1.4.0 dev: true @@ -4447,7 +4438,7 @@ packages: /gopd/1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /got/10.7.0: @@ -4579,7 +4570,7 @@ packages: /has-property-descriptors/1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /has-proto/1.0.1: @@ -4750,7 +4741,7 @@ packages: resolution: {integrity: sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - minimatch: 5.1.2 + minimatch: 5.1.6 dev: true /ignore/5.2.4: @@ -4904,7 +4895,7 @@ packages: resolution: {integrity: sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 has: 1.0.3 side-channel: 1.0.4 dev: true @@ -4913,8 +4904,8 @@ packages: resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} dev: true - /irregular-plurals/3.3.0: - resolution: {integrity: sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g==} + /irregular-plurals/3.4.0: + resolution: {integrity: sha512-YXxECO/W6N9aMBVKMKKZ8TXESgq7EFrp3emCGGUcrYY1cgJIeZjoB75MTu8qi+NAKntS9NwPU8VdcQ3r6E6aWQ==} engines: {node: '>=8'} dev: true @@ -4922,7 +4913,7 @@ packages: resolution: {integrity: sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 is-typed-array: 1.1.10 dev: true @@ -5258,8 +5249,8 @@ packages: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: true - /isbot/3.4.5: - resolution: {integrity: sha512-+KD6q1BBtw0iK9aGBGSfxJ31/ZgizKRjhm8ebgJUBMx0aeeQuIJ1I72beCoIrltIZGrSm4vmrxRxrG5n1aUTtw==} + /isbot/3.6.5: + resolution: {integrity: sha512-BchONELXt6yMad++BwGpa0oQxo/uD0keL7N15cYVf0A1oMIoNQ79OqeYdPMFWDrNhCqCbRuw9Y9F3QBjvAxZ5g==} engines: {node: '>=12'} dev: false @@ -5288,8 +5279,8 @@ packages: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} dev: true - /js-sdsl/4.2.0: - resolution: {integrity: sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==} + /js-sdsl/4.3.0: + resolution: {integrity: sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==} dev: true /js-string-escape/1.0.1: @@ -5902,8 +5893,8 @@ packages: brace-expansion: 1.1.11 dev: true - /minimatch/5.1.2: - resolution: {integrity: sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==} + /minimatch/5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 @@ -6025,10 +6016,6 @@ packages: engines: {node: '>=4'} dev: true - /ms/2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - dev: true - /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true @@ -6234,7 +6221,7 @@ packages: json-parse-helpfulerror: 1.0.3 jsonlines: 0.1.1 lodash: 4.17.21 - minimatch: 5.1.2 + minimatch: 5.1.6 p-map: 4.0.0 pacote: 15.0.8 parse-github-url: 1.0.2 @@ -6357,8 +6344,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /object-inspect/1.12.2: - resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} + /object-inspect/1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} dev: true /object-keys/1.1.1: @@ -6394,7 +6381,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.21.0 + es-abstract: 1.21.1 dev: true /once/1.4.0: @@ -6785,11 +6772,11 @@ packages: resolution: {integrity: sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==} engines: {node: '>=10'} dependencies: - irregular-plurals: 3.3.0 + irregular-plurals: 3.4.0 dev: true - /pnpm/7.23.0: - resolution: {integrity: sha512-0dJQXA+1+mo//tBvSpjb6dmLxx/UmLoeEOk/0FmOZ73GRZRNhMdarnwEenhKHNpiVXGCcvfWXJnvUMB7lp+tRQ==} + /pnpm/7.25.1: + resolution: {integrity: sha512-y/jlADVxyk+scBwI0ALRf8QoUMgrWyONnD1voZaPTBI+D+aIXXiFG9pMk3eLhvEfc0nK8KUnnbDDBTywd7WsMw==} engines: {node: '>=14.6'} hasBin: true dev: true @@ -6804,8 +6791,8 @@ packages: engines: {node: '>=4'} dev: true - /prettier/2.8.2: - resolution: {integrity: sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==} + /prettier/2.8.3: + resolution: {integrity: sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==} engines: {node: '>=10.13.0'} hasBin: true dev: true @@ -6817,7 +6804,7 @@ packages: parse-ms: 2.1.0 dev: true - /pretty-quick/3.1.3_prettier@2.8.2: + /pretty-quick/3.1.3_prettier@2.8.3: resolution: {integrity: sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA==} engines: {node: '>=10.13'} hasBin: true @@ -6830,7 +6817,7 @@ packages: ignore: 5.2.4 mri: 1.2.0 multimatch: 4.0.0 - prettier: 2.8.2 + prettier: 2.8.3 dev: true /proc-log/3.0.0: @@ -6883,8 +6870,8 @@ packages: once: 1.4.0 dev: true - /punycode/2.1.1: - resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} + /punycode/2.3.0: + resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} dev: true @@ -6963,7 +6950,7 @@ packages: resolution: {integrity: sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - glob: 8.0.3 + glob: 8.1.0 json-parse-even-better-errors: 3.0.0 normalize-package-data: 5.0.0 npm-normalize-package-bin: 3.0.0 @@ -7059,7 +7046,7 @@ packages: /regenerator-transform/0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} dependencies: - '@babel/runtime': 7.20.7 + '@babel/runtime': 7.20.13 dev: true /regexp.prototype.flags/1.4.3: @@ -7243,8 +7230,14 @@ packages: glob: 7.2.3 dev: true - /rollup/3.9.1: - resolution: {integrity: sha512-GswCYHXftN8ZKGVgQhTFUJB/NBXxrRGgO2NCy6E8s1rwEJ4Q9/VttNqcYfEvx4dTo4j58YqdC3OVztPzlKSX8w==} + /rimraf/4.1.1: + resolution: {integrity: sha512-Z4Y81w8atcvaJuJuBB88VpADRH66okZAuEm+Jtaufa+s7rZmIz+Hik2G53kGaNytE7lsfXyWktTmfVz0H9xuDg==} + engines: {node: '>=14'} + hasBin: true + dev: true + + /rollup/3.10.1: + resolution: {integrity: sha512-3Er+yel3bZbZX1g2kjVM+FW+RUWDxbG87fcqFM5/9HbPCTpbVp6JOLn7jlxnNlbu7s/N/uDA4EV/91E2gWnxzw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -7286,7 +7279,7 @@ packages: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 is-regex: 1.1.4 dev: true @@ -7303,12 +7296,12 @@ packages: ansi-colors: 4.1.3 commander: 9.5.0 crosspath: 2.0.0 - eslint: 8.31.0 + eslint: 8.32.0 helpertypes: 0.0.18 inquirer: 8.2.5 json5: 2.2.3 markdown-toc: 1.2.0 - prettier: 2.8.2 + prettier: 2.8.3 yaml: 2.2.1 transitivePeerDependencies: - supports-color @@ -7388,8 +7381,8 @@ packages: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 - object-inspect: 1.12.2 + get-intrinsic: 1.2.0 + object-inspect: 1.12.3 dev: true /signal-exit/3.0.7: @@ -7588,7 +7581,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.21.0 + es-abstract: 1.21.1 dev: true /string.prototype.trimstart/1.0.6: @@ -7596,7 +7589,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.21.0 + es-abstract: 1.21.1 dev: true /string_decoder/1.1.1: @@ -7855,7 +7848,7 @@ packages: typescript: 4.9.4 dev: false - /ts-node/10.9.1_h4s5tc4wq4kcse7jq5bao6xoy4: + /ts-node/10.9.1_tuaaix3o4wua7jksxyu5belrtq: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -7870,7 +7863,7 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.3.25 + '@swc/core': 1.3.27 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 @@ -8088,8 +8081,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /ua-parser-js/1.0.32: - resolution: {integrity: sha512-dXVsz3M4j+5tTiovFVyVqssXBu5HM47//YSOeZ9fQkdDKkfzv2v3PP1jmH6FUyPW+yCSn7aBVK1fGGKNhowdDA==} + /ua-parser-js/1.0.33: + resolution: {integrity: sha512-RqshF7TPTE0XLYAqmjlu5cLLuGdKrNu9O1KLA/qp39QtbZwuzwv1dT46DZSopoUMsYgXpB3Cv8a03FI8b74oFQ==} dev: false /uglify-js/3.17.4: @@ -8232,7 +8225,7 @@ packages: /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: - punycode: 2.1.1 + punycode: 2.3.0 dev: true /url-parse-lax/3.0.0: @@ -8376,8 +8369,8 @@ packages: strip-ansi: 6.0.1 dev: true - /wrap-ansi/8.0.1: - resolution: {integrity: sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==} + /wrap-ansi/8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} dependencies: ansi-styles: 6.2.1 diff --git a/src/constant/constant.ts b/src/constant/constant.ts index 1dc56742..df5156d1 100644 --- a/src/constant/constant.ts +++ b/src/constant/constant.ts @@ -1,4 +1,4 @@ -import { ElementOf } from "helpertypes"; +import type {ElementOf} from "helpertypes"; export const SOURCE_MAP_EXTENSION = ".map"; export const TS_EXTENSION = ".ts"; @@ -36,14 +36,7 @@ export const TSBUILDINFO_EXTENSION = `.tsbuildinfo`; export const ROLLUP_PLUGIN_MULTI_ENTRY_LEGACY = "\0rollup-plugin-multi-entry:entry-point"; export const ROLLUP_PLUGIN_VIRTUAL_PREFIX = `\0virtual:`; -export const AMBIENT_EXTENSIONS = new Set([ - D_TS_EXTENSION, - D_TS_MAP_EXTENSION, - D_MTS_EXTENSION, - D_MTS_MAP_EXTENSION, - D_CTS_EXTENSION, - D_CTS_MAP_EXTENSION -] as const); +export const AMBIENT_EXTENSIONS = new Set([D_TS_EXTENSION, D_TS_MAP_EXTENSION, D_MTS_EXTENSION, D_MTS_MAP_EXTENSION, D_CTS_EXTENSION, D_CTS_MAP_EXTENSION] as const); export type AmbientExtension = ElementOf; diff --git a/src/diagnostic/extended-diagnostic.ts b/src/diagnostic/extended-diagnostic.ts index cc7c8e4f..7bad01de 100644 --- a/src/diagnostic/extended-diagnostic.ts +++ b/src/diagnostic/extended-diagnostic.ts @@ -1,4 +1,4 @@ -import {TS} from "../type/ts.js"; +import type {TS} from "../type/ts.js"; export interface ExtendedDiagnostic extends TS.Diagnostic { scope?: string; diff --git a/src/index.ts b/src/index.ts index fa20baf8..fa3dc9da 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,6 @@ export * from "./util/merge-transformers/custom-transformer-options.js"; export * from "./type/declaration-stats.js"; -export { - TypescriptPluginOptions, - BrowserslistConfig, - BrowserslistPathConfig, - BrowserslistQueryConfig -} from "./plugin/typescript-plugin-options.js"; +export {TypescriptPluginOptions, BrowserslistConfig, BrowserslistPathConfig, BrowserslistQueryConfig} from "./plugin/typescript-plugin-options.js"; export {default} from "./plugin/typescript-plugin.js"; diff --git a/src/plugin/typescript-plugin-options.ts b/src/plugin/typescript-plugin-options.ts index 865de428..4439e037 100644 --- a/src/plugin/typescript-plugin-options.ts +++ b/src/plugin/typescript-plugin-options.ts @@ -1,9 +1,9 @@ -import {CustomTransformersFunction} from "../util/merge-transformers/custom-transformer-options.js"; -import {TS} from "../type/ts.js"; -import {DeclarationStats} from "../type/declaration-stats.js"; -import {BabelConfig} from "../type/babel.js"; -import {SwcConfig} from "../type/swc.js"; -import { MaybeArray } from "helpertypes"; +import type {CustomTransformersFunction} from "../util/merge-transformers/custom-transformer-options.js"; +import type {TS} from "../type/ts.js"; +import type {DeclarationStats} from "../type/declaration-stats.js"; +import type {BabelConfig} from "../type/babel.js"; +import type {SwcConfig} from "../type/swc.js"; +import type {MaybeArray} from "helpertypes"; export type Transpiler = "typescript" | "babel" | "swc"; @@ -81,7 +81,7 @@ export interface InputCompilerOptions extends Omit | Partial | TS.ParsedCommandLine | TsConfigResolver | TsConfigResolverWithFileName; babelConfig?: string | Partial; swcConfig?: string | MaybeArray>; @@ -95,4 +95,4 @@ export interface TypescriptPluginOptions { hook: Partial; debug: boolean | DebugOptionCallback; typescript: typeof TS; -} \ No newline at end of file +} diff --git a/src/plugin/typescript-plugin.ts b/src/plugin/typescript-plugin.ts index 82bc5c96..6efedf64 100644 --- a/src/plugin/typescript-plugin.ts +++ b/src/plugin/typescript-plugin.ts @@ -1,12 +1,13 @@ -import {ExistingRawSourceMap, InputOptions, InputPluginOption, OutputBundle, OutputOptions, Plugin, PluginContext, RenderedChunk, RollupCache, SourceDescription} from "rollup"; +import type {ExistingRawSourceMap, InputOptions, InputPluginOption, OutputBundle, OutputOptions, Plugin, PluginContext, RenderedChunk, RollupCache, SourceDescription} from "rollup"; import {getParsedCommandLine} from "../util/get-parsed-command-line/get-parsed-command-line.js"; import {getForcedCompilerOptions} from "../util/get-forced-compiler-options/get-forced-compiler-options.js"; import {getSourceDescriptionFromEmitOutput} from "../util/get-source-description-from-emit-output/get-source-description-from-emit-output.js"; import {emitDiagnostics} from "../service/emit/diagnostics/emit-diagnostics.js"; -import {getSupportedExtensions, SupportedExtensions} from "../util/get-supported-extensions/get-supported-extensions.js"; +import type { SupportedExtensions} from "../util/get-supported-extensions/get-supported-extensions.js"; +import {getSupportedExtensions} from "../util/get-supported-extensions/get-supported-extensions.js"; import {ensureRelative, getExtension, isBabelHelper, isMultiEntryModule, isRegeneratorRuntime, isSwcHelper} from "../util/path/path-util.js"; import {takeBundledFilesNames} from "../util/take-bundled-filenames/take-bundled-filenames.js"; -import {TypescriptPluginOptions} from "./typescript-plugin-options.js"; +import type {TypescriptPluginOptions} from "./typescript-plugin-options.js"; import {getPluginOptions, getTranspilerOptions, isUsingTranspiler} from "../util/plugin-options/get-plugin-options.js"; import {getBrowserslist} from "../util/get-browserslist/get-browserslist.js"; import {ResolveCache} from "../service/cache/resolve-cache/resolve-cache.js"; @@ -15,7 +16,7 @@ import {REGENERATOR_SOURCE} from "../lib/regenerator/regenerator.js"; import {createFilter} from "@rollup/pluginutils"; import {mergeTransformers} from "../util/merge-transformers/merge-transformers.js"; import {ensureArray} from "../util/ensure-array/ensure-array.js"; -import {ParsedCommandLineResult} from "../util/get-parsed-command-line/parsed-command-line-result.js"; +import type {ParsedCommandLineResult} from "../util/get-parsed-command-line/parsed-command-line-result.js"; import {takeBrowserslistOrComputeBasedOnCompilerOptions} from "../util/take-browserslist-or-compute-based-on-compiler-options/take-browserslist-or-compute-based-on-compiler-options.js"; import {matchAll} from "@wessberg/stringutil"; import {emitDeclarations} from "../service/emit/declaration/emit-declarations.js"; @@ -27,11 +28,13 @@ import {logEmit} from "../util/logging/log-emit.js"; import {isJsonLike} from "../util/is-json-like/is-json-like.js"; import path from "crosspath"; import {loadBabel, loadSwc} from "../util/transpiler-loader.js"; -import {BabelConfigFactory, getBabelConfig, getDefaultBabelOptions, getForcedBabelOptions, replaceBabelHelpers} from "../transpiler/babel.js"; -import {getSwcConfigFactory, SwcConfigFactory} from "../transpiler/swc.js"; +import type {BabelConfigFactory} from "../transpiler/babel.js"; +import { getBabelConfig, getDefaultBabelOptions, getForcedBabelOptions, replaceBabelHelpers} from "../transpiler/babel.js"; +import type { SwcConfigFactory} from "../transpiler/swc.js"; +import {getSwcConfigFactory} from "../transpiler/swc.js"; import {inputOptionsAreEqual} from "../util/rollup/rollup-util.js"; -import { isPromise } from "../util/object/object-util.js"; -import { isDefined } from "../util/is-defined/is-defined.js"; +import {isPromise} from "../util/object/object-util.js"; +import {isDefined} from "../util/is-defined/is-defined.js"; /** * The name of the Rollup plugin @@ -222,7 +225,7 @@ export default function typescriptRollupPlugin(pluginInputOptions: Partial { + async function flattenPlugins(plugins: InputPluginOption | undefined): Promise { const flattened: Plugin[] = []; const awaitedPlugins = ensureArray(isPromise(plugins) ? await plugins : plugins).filter(isDefined); for (const awaitedPlugin of awaitedPlugins) { diff --git a/src/service/cache/cached-fs.ts b/src/service/cache/cached-fs.ts index 641a0e3e..d7c33bc0 100644 --- a/src/service/cache/cached-fs.ts +++ b/src/service/cache/cached-fs.ts @@ -1,6 +1,7 @@ -import {CachedWorker, CachedWorkerOptions} from "./cached-worker.js"; -import {TS} from "../../type/ts.js"; -import {FileSystem} from "../../util/file-system/file-system.js"; +import type { CachedWorkerOptions} from "./cached-worker.js"; +import {CachedWorker} from "./cached-worker.js"; +import type {TS} from "../../type/ts.js"; +import type {FileSystem} from "../../util/file-system/file-system.js"; export interface CachedFsWorkerOptions extends CachedWorkerOptions { fs: TS.System | FileSystem; diff --git a/src/service/cache/resolve-cache/extended-resolved-module.ts b/src/service/cache/resolve-cache/extended-resolved-module.ts index ff22e4b3..8aa46f54 100644 --- a/src/service/cache/resolve-cache/extended-resolved-module.ts +++ b/src/service/cache/resolve-cache/extended-resolved-module.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../type/ts.js"; +import type {TS} from "../../../type/ts.js"; export interface ExtendedResolvedModule extends Omit { resolvedFileName: string | undefined; diff --git a/src/service/cache/resolve-cache/get-resolved-id-with-caching-options.ts b/src/service/cache/resolve-cache/get-resolved-id-with-caching-options.ts index 43bbbdb9..0cb291f4 100644 --- a/src/service/cache/resolve-cache/get-resolved-id-with-caching-options.ts +++ b/src/service/cache/resolve-cache/get-resolved-id-with-caching-options.ts @@ -1,4 +1,4 @@ -import {ModuleResolutionHost} from "../../module-resolution-host/module-resolution-host.js"; +import type {ModuleResolutionHost} from "../../module-resolution-host/module-resolution-host.js"; export interface GetResolvedIdWithCachingOptions { id: string; diff --git a/src/service/cache/resolve-cache/resolve-cache.ts b/src/service/cache/resolve-cache/resolve-cache.ts index f0d1485e..c948b0d9 100644 --- a/src/service/cache/resolve-cache/resolve-cache.ts +++ b/src/service/cache/resolve-cache/resolve-cache.ts @@ -1,8 +1,8 @@ -import {GetResolvedIdWithCachingOptions} from "./get-resolved-id-with-caching-options.js"; -import {ExtendedResolvedModule} from "./extended-resolved-module.js"; +import type {GetResolvedIdWithCachingOptions} from "./get-resolved-id-with-caching-options.js"; +import type {ExtendedResolvedModule} from "./extended-resolved-module.js"; import {ensureAbsolute, isTslib, setExtension} from "../../../util/path/path-util.js"; import {D_TS_EXTENSION, JS_EXTENSION} from "../../../constant/constant.js"; -import {TS} from "../../../type/ts.js"; +import type {TS} from "../../../type/ts.js"; import path from "crosspath"; export interface ResolveCacheOptions { diff --git a/src/service/compiler-host/compiler-host-options.ts b/src/service/compiler-host/compiler-host-options.ts index e36ea4af..5ffab6d7 100644 --- a/src/service/compiler-host/compiler-host-options.ts +++ b/src/service/compiler-host/compiler-host-options.ts @@ -1,7 +1,7 @@ -import {ModuleResolutionHostOptions} from "../module-resolution-host/module-resolution-host-options.js"; -import {CustomTransformersFunction} from "../../util/merge-transformers/custom-transformer-options.js"; -import {TS} from "../../type/ts.js"; -import {ResolveCache} from "../cache/resolve-cache/resolve-cache.js"; +import type {ModuleResolutionHostOptions} from "../module-resolution-host/module-resolution-host-options.js"; +import type {CustomTransformersFunction} from "../../util/merge-transformers/custom-transformer-options.js"; +import type {TS} from "../../type/ts.js"; +import type {ResolveCache} from "../cache/resolve-cache/resolve-cache.js"; export type CustomTransformersInput = CustomTransformersFunction | TS.CustomTransformers | undefined; diff --git a/src/service/compiler-host/compiler-host.ts b/src/service/compiler-host/compiler-host.ts index 5715891b..65db2e1f 100644 --- a/src/service/compiler-host/compiler-host.ts +++ b/src/service/compiler-host/compiler-host.ts @@ -1,21 +1,22 @@ -import {TS} from "../../type/ts.js"; -import {CompilerHostOptions, CustomTransformersInput} from "./compiler-host-options.js"; +import type {TS} from "../../type/ts.js"; +import type {CompilerHostOptions, CustomTransformersInput} from "./compiler-host-options.js"; import {ModuleResolutionHost} from "../module-resolution-host/module-resolution-host.js"; import {getNewLineCharacter} from "../../util/get-new-line-character/get-new-line-character.js"; import {resolveId} from "../../util/resolve-id/resolve-id.js"; import {getScriptKindFromPath} from "../../util/get-script-kind-from-path/get-script-kind-from-path.js"; -import {VirtualFile, VirtualFileInput} from "../module-resolution-host/virtual-file.js"; +import type {VirtualFile, VirtualFileInput} from "../module-resolution-host/virtual-file.js"; import {mergeTransformers} from "../../util/merge-transformers/merge-transformers.js"; import {ensureModuleTransformer} from "../transformer/ensure-module/ensure-module-transformer.js"; -import {SourceFileToDependenciesMap} from "../transformer/declaration-bundler/declaration-bundler-options.js"; -import {ExtendedResolvedModule} from "../cache/resolve-cache/extended-resolved-module.js"; -import {getModuleDependencies, ModuleDependency} from "../../util/get-module-dependencies/get-module-dependencies.js"; +import type {SourceFileToDependenciesMap} from "../transformer/declaration-bundler/declaration-bundler-options.js"; +import type {ExtendedResolvedModule} from "../cache/resolve-cache/extended-resolved-module.js"; +import type { ModuleDependency} from "../../util/get-module-dependencies/get-module-dependencies.js"; +import {getModuleDependencies} from "../../util/get-module-dependencies/get-module-dependencies.js"; import {pickResolvedModule} from "../../util/pick-resolved-module.js"; import path from "crosspath"; import {ensureAbsolute, getExtension, isExternal, isTypeScriptLib} from "../../util/path/path-util.js"; import {ensureNodeFactory} from "compatfactory"; import {isRecord} from "../../util/object/object-util.js"; -import { KnownExtension } from "../../constant/constant.js"; +import type {KnownExtension} from "../../constant/constant.js"; export class CompilerHost extends ModuleResolutionHost implements TS.CompilerHost { private previousProgram: TS.EmitAndSemanticDiagnosticsBuilderProgram | undefined; @@ -256,7 +257,7 @@ export class CompilerHost extends ModuleResolutionHost implements TS.CompilerHos const sourceFile = this.constructSourceFile(fileInput.fileName, fileInput.text); const typescript = this.getTypescript(); const factory = ensureNodeFactory(typescript); - const transformedSourceFile = ensureModuleTransformer({typescript, factory, sourceFile, extensions: this.getSupportedExtensions()}); + const transformedSourceFile = ensureModuleTransformer({typescript, factory, sourceFile, extensions: this.getAllKnownTypescriptExtensions()}); if (transformedSourceFile !== sourceFile) { (fileInput as VirtualFile).transformedText = this.printer.printFile(transformedSourceFile); } @@ -528,10 +529,7 @@ export class CompilerHost extends ModuleResolutionHost implements TS.CompilerHos return resolvedModules; } - resolveTypeReferenceDirectives( - typeReferenceDirectiveNames: string[] | readonly TS.FileReference[], - containingFile: string - ): (TS.ResolvedTypeReferenceDirective | undefined)[] { + resolveTypeReferenceDirectives(typeReferenceDirectiveNames: string[] | readonly TS.FileReference[], containingFile: string): (TS.ResolvedTypeReferenceDirective | undefined)[] { const resolvedTypeReferenceDirectives: (TS.ResolvedTypeReferenceDirective | undefined)[] = []; for (const typeReferenceDirectiveName of typeReferenceDirectiveNames) { // try to use standard resolution diff --git a/src/service/emit/declaration/bundle-declarations-for-chunk.ts b/src/service/emit/declaration/bundle-declarations-for-chunk.ts index 3d8e9add..6b06c47a 100644 --- a/src/service/emit/declaration/bundle-declarations-for-chunk.ts +++ b/src/service/emit/declaration/bundle-declarations-for-chunk.ts @@ -1,7 +1,7 @@ -import {SourceDescription, SourceMap} from "rollup"; +import type {SourceDescription, SourceMap} from "rollup"; import {D_TS_EXTENSION, D_TS_MAP_EXTENSION, SOURCE_MAP_COMMENT, SOURCE_MAP_COMMENT_REGEXP} from "../../../constant/constant.js"; import {declarationBundler} from "../../transformer/declaration-bundler/declaration-bundler.js"; -import {DeclarationBundlerOptions} from "../../transformer/declaration-bundler/declaration-bundler-options.js"; +import type {DeclarationBundlerOptions} from "../../transformer/declaration-bundler/declaration-bundler-options.js"; export interface BundleDeclarationsForChunkOptions extends DeclarationBundlerOptions {} diff --git a/src/service/emit/declaration/emit-declarations.ts b/src/service/emit/declaration/emit-declarations.ts index bff7c01e..6385cd89 100644 --- a/src/service/emit/declaration/emit-declarations.ts +++ b/src/service/emit/declaration/emit-declarations.ts @@ -1,5 +1,5 @@ -import {ExternalOption, OutputBundle, OutputOptions, PluginContext} from "rollup"; -import {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; +import type {ExternalOption, OutputBundle, OutputOptions, PluginContext} from "rollup"; +import type {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; import {isOutputChunk} from "../../../util/is-output-chunk/is-output-chunk.js"; import {getDeclarationOutDir, getDeclarationOutExtension} from "../../../util/get-declaration-out-dir/get-declaration-out-dir.js"; import {getOutDir} from "../../../util/get-out-dir/get-out-dir.js"; @@ -7,15 +7,15 @@ import {setExtension} from "../../../util/path/path-util.js"; import path from "crosspath"; import {D_TS_EXTENSION, D_TS_MAP_EXTENSION, JS_EXTENSION} from "../../../constant/constant.js"; import {bundleDeclarationsForChunk} from "./bundle-declarations-for-chunk.js"; -import {ReferenceCache, SourceFileToNodeToReferencedIdentifiersCache} from "../../transformer/declaration-bundler/transformers/reference/cache/reference-cache.js"; +import type {ReferenceCache, SourceFileToNodeToReferencedIdentifiersCache} from "../../transformer/declaration-bundler/transformers/reference/cache/reference-cache.js"; import {normalizeChunk, preNormalizeChunk} from "../../../util/chunk/normalize-chunk.js"; import {shouldDebugEmit, shouldDebugMetrics} from "../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../util/logging/log-metrics.js"; -import {CompilerHost} from "../../compiler-host/compiler-host.js"; +import type {CompilerHost} from "../../compiler-host/compiler-host.js"; import {mergeChunksWithAmbientDependencies} from "../../../util/chunk/merge-chunks-with-ambient-dependencies.js"; import {preparePaths} from "../../transformer/declaration-bundler/util/prepare-paths/prepare-paths.js"; import {logEmit} from "../../../util/logging/log-emit.js"; -import {TS} from "../../../type/ts.js"; +import type {TS} from "../../../type/ts.js"; import {createFilter} from "@rollup/pluginutils"; export interface EmitDeclarationsOptions { @@ -58,7 +58,7 @@ export function emitDeclarations(options: EmitDeclarationsOptions): void { const referenceCache: ReferenceCache = new Map(); let virtualOutFile = preparePaths({ - fileName: `index${getDeclarationOutExtension(options.outputOptions, options.host.getSupportedExtensions())}`, + fileName: `index${getDeclarationOutExtension(options.outputOptions, options.host.getAllKnownTypescriptExtensions())}`, relativeOutDir: relativeDeclarationOutDir, absoluteOutDir: absoluteDeclarationOutDir }); @@ -124,13 +124,13 @@ export function emitDeclarations(options: EmitDeclarationsOptions): void { for (const chunk of normalizedChunks) { let declarationPaths = preparePaths({ - fileName: setExtension(chunk.paths.fileName, getDeclarationOutExtension(options.outputOptions, options.host.getSupportedExtensions(), chunk)), + fileName: setExtension(chunk.paths.fileName, getDeclarationOutExtension(options.outputOptions, options.host.getAllKnownTypescriptExtensions(), chunk)), relativeOutDir: relativeDeclarationOutDir, absoluteOutDir: absoluteDeclarationOutDir }); let declarationMapPaths = preparePaths({ - fileName: setExtension(chunk.paths.fileName, getDeclarationOutExtension(options.outputOptions, options.host.getSupportedExtensions(), chunk, true)), + fileName: setExtension(chunk.paths.fileName, getDeclarationOutExtension(options.outputOptions, options.host.getAllKnownTypescriptExtensions(), chunk, true)), relativeOutDir: relativeDeclarationOutDir, absoluteOutDir: absoluteDeclarationOutDir }); diff --git a/src/service/emit/diagnostics/emit-diagnostics.ts b/src/service/emit/diagnostics/emit-diagnostics.ts index e2397d98..78bab9f9 100644 --- a/src/service/emit/diagnostics/emit-diagnostics.ts +++ b/src/service/emit/diagnostics/emit-diagnostics.ts @@ -1,8 +1,8 @@ -import {RollupError, RollupWarning, PluginContext} from "rollup"; -import {ExtendedDiagnostic} from "../../../diagnostic/extended-diagnostic.js"; -import {TS} from "../../../type/ts.js"; -import {CompilerHost} from "../../compiler-host/compiler-host.js"; -import {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; +import type {RollupError, RollupWarning, PluginContext} from "rollup"; +import type {ExtendedDiagnostic} from "../../../diagnostic/extended-diagnostic.js"; +import type {TS} from "../../../type/ts.js"; +import type {CompilerHost} from "../../compiler-host/compiler-host.js"; +import type {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; export interface EmitDiagnosticsOptions { host: CompilerHost; diff --git a/src/service/emit/tsbuildinfo/emit-build-info.ts b/src/service/emit/tsbuildinfo/emit-build-info.ts index 91bfe91d..dc1f732e 100644 --- a/src/service/emit/tsbuildinfo/emit-build-info.ts +++ b/src/service/emit/tsbuildinfo/emit-build-info.ts @@ -1,6 +1,6 @@ -import {OutputOptions, PluginContext} from "rollup"; -import {CompilerHost} from "../../compiler-host/compiler-host.js"; -import {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; +import type {OutputOptions, PluginContext} from "rollup"; +import type {CompilerHost} from "../../compiler-host/compiler-host.js"; +import type {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; import path from "crosspath"; import {getOutDir} from "../../../util/get-out-dir/get-out-dir.js"; import {isBuildInfoOutputFile} from "../../../util/is-build-info-output-file/is-build-info-output-file.js"; diff --git a/src/service/module-resolution-host/module-resolution-host-options.ts b/src/service/module-resolution-host/module-resolution-host-options.ts index 8117d3bb..fcf6442a 100644 --- a/src/service/module-resolution-host/module-resolution-host-options.ts +++ b/src/service/module-resolution-host/module-resolution-host-options.ts @@ -1,7 +1,7 @@ -import {TS} from "../../type/ts.js"; -import {SupportedExtensions} from "../../util/get-supported-extensions/get-supported-extensions.js"; -import {ParsedCommandLineResult} from "../../util/get-parsed-command-line/parsed-command-line-result.js"; -import {ExternalOption} from "rollup"; +import type {TS} from "../../type/ts.js"; +import type {SupportedExtensions} from "../../util/get-supported-extensions/get-supported-extensions.js"; +import type {ParsedCommandLineResult} from "../../util/get-parsed-command-line/parsed-command-line-result.js"; +import type {ExternalOption} from "rollup"; export interface ModuleResolutionHostOptions { typescript: typeof TS; diff --git a/src/service/module-resolution-host/module-resolution-host.ts b/src/service/module-resolution-host/module-resolution-host.ts index 369662c0..70c725ec 100644 --- a/src/service/module-resolution-host/module-resolution-host.ts +++ b/src/service/module-resolution-host/module-resolution-host.ts @@ -1,9 +1,11 @@ -import {TS} from "../../type/ts.js"; -import {ModuleResolutionHostOptions} from "./module-resolution-host-options.js"; +import type {TS} from "../../type/ts.js"; +import type {ModuleResolutionHostOptions} from "./module-resolution-host-options.js"; import {ensureAbsolute} from "../../util/path/path-util.js"; -import {SupportedExtensions} from "../../util/get-supported-extensions/get-supported-extensions.js"; -import {VirtualFile, VirtualFileInput} from "./virtual-file.js"; -import {AmbientExtension, AMBIENT_EXTENSIONS} from "../../constant/constant.js"; +import type { SupportedExtensions} from "../../util/get-supported-extensions/get-supported-extensions.js"; +import {getSupportedExtensions} from "../../util/get-supported-extensions/get-supported-extensions.js"; +import type {VirtualFile, VirtualFileInput} from "./virtual-file.js"; +import type {AmbientExtension} from "../../constant/constant.js"; +import { AMBIENT_EXTENSIONS} from "../../constant/constant.js"; import path from "crosspath"; export class ModuleResolutionHost implements TS.ModuleResolutionHost { @@ -92,6 +94,10 @@ export class ModuleResolutionHost implements TS.ModuleResolutionHost { return this.currentNonAmbientSupportedExtensions; } + getAllKnownTypescriptExtensions(): SupportedExtensions { + return getSupportedExtensions(true, true, this.getTypescript()); + } + getTypescript(): typeof TS { return this.options.typescript; } diff --git a/src/service/transformer/declaration-bundler/declaration-bundler-options.ts b/src/service/transformer/declaration-bundler/declaration-bundler-options.ts index 4175792d..b437cd6b 100644 --- a/src/service/transformer/declaration-bundler/declaration-bundler-options.ts +++ b/src/service/transformer/declaration-bundler/declaration-bundler-options.ts @@ -1,15 +1,15 @@ -import {TS} from "../../../type/ts.js"; -import {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; -import {ReferenceCache, SourceFileToNodeToReferencedIdentifiersCache} from "./transformers/reference/cache/reference-cache.js"; -import {SourceFileBundlerVisitorOptions} from "./transformers/source-file-bundler/source-file-bundler-visitor-options.js"; -import {NormalizedChunk} from "../../../util/chunk/normalize-chunk.js"; -import {CompilerHost} from "../../compiler-host/compiler-host.js"; -import {PathsResult} from "./util/prepare-paths/prepare-paths.js"; -import {SourceFileToExportedSymbolSet} from "./transformers/track-exports-transformer/track-exports-transformer-visitor-options.js"; -import {SourceFileToImportedSymbolSet} from "./transformers/track-imports-transformer/track-imports-transformer-visitor-options.js"; -import {TypeReference} from "./util/get-type-reference-module-from-file-name.js"; -import {DeclarationStats} from "../../../type/declaration-stats.js"; -import {ModuleDependency} from "../../../util/get-module-dependencies/get-module-dependencies.js"; +import type {TS} from "../../../type/ts.js"; +import type {TypescriptPluginOptions} from "../../../plugin/typescript-plugin-options.js"; +import type {ReferenceCache, SourceFileToNodeToReferencedIdentifiersCache} from "./transformers/reference/cache/reference-cache.js"; +import type {SourceFileBundlerVisitorOptions} from "./transformers/source-file-bundler/source-file-bundler-visitor-options.js"; +import type {NormalizedChunk} from "../../../util/chunk/normalize-chunk.js"; +import type {CompilerHost} from "../../compiler-host/compiler-host.js"; +import type {PathsResult} from "./util/prepare-paths/prepare-paths.js"; +import type {SourceFileToExportedSymbolSet} from "./transformers/track-exports-transformer/track-exports-transformer-visitor-options.js"; +import type {SourceFileToImportedSymbolSet} from "./transformers/track-imports-transformer/track-imports-transformer-visitor-options.js"; +import type {TypeReference} from "./util/get-type-reference-module-from-file-name.js"; +import type {DeclarationStats} from "../../../type/declaration-stats.js"; +import type {ModuleDependency} from "../../../util/get-module-dependencies/get-module-dependencies.js"; export type SourceFileToDependenciesMap = Map>; export type ModuleSpecifierToSourceFileMap = Map; diff --git a/src/service/transformer/declaration-bundler/declaration-bundler.ts b/src/service/transformer/declaration-bundler/declaration-bundler.ts index 0dddb19f..3c2c613d 100644 --- a/src/service/transformer/declaration-bundler/declaration-bundler.ts +++ b/src/service/transformer/declaration-bundler/declaration-bundler.ts @@ -1,5 +1,5 @@ -import {DeclarationBundlerOptions} from "./declaration-bundler-options.js"; -import {TS} from "../../../type/ts.js"; +import type {DeclarationBundlerOptions} from "./declaration-bundler-options.js"; +import type {TS} from "../../../type/ts.js"; import {sourceFileBundler} from "./transformers/source-file-bundler/source-file-bundler.js"; import {moduleMerger} from "./transformers/module-merger/module-merger.js"; import {deconflicter} from "./transformers/deconflicter/deconflicter.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter-visitor-options.ts index e59fc589..ae9f8008 100644 --- a/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter-visitor-options.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; -import {ContinuationOptions, DeconflicterOptions} from "./deconflicter-options.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {ContinuationOptions, DeconflicterOptions} from "./deconflicter-options.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface DeconflicterVisitorOptions extends SourceFileBundlerVisitorOptions, DeconflicterOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter.ts b/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter.ts index fd71fed6..627500a7 100644 --- a/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter.ts +++ b/src/service/transformer/declaration-bundler/transformers/deconflicter/deconflicter.ts @@ -1,5 +1,5 @@ -import {DeconflicterVisitorOptions} from "./deconflicter-visitor-options.js"; -import {TS} from "../../../../../type/ts.js"; +import type {DeconflicterVisitorOptions} from "./deconflicter-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; import {deconflictBindingElement} from "./visitor/deconflict-binding-element.js"; import {deconflictClassDeclaration} from "./visitor/deconflict-class-declaration.js"; import {deconflictClassExpression} from "./visitor/deconflict-class-expression.js"; @@ -27,8 +27,8 @@ import {deconflictSetAccessorDeclaration} from "./visitor/deconflict-set-accesso import {deconflictTypeAliasDeclaration} from "./visitor/deconflict-type-alias-declaration.js"; import {deconflictTypeParameterDeclaration} from "./visitor/deconflict-type-parameter-declaration.js"; import {deconflictVariableDeclaration} from "./visitor/deconflict-variable-declaration.js"; -import {ContinuationOptions} from "./deconflicter-options.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {ContinuationOptions} from "./deconflicter-options.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; import {logTransformer} from "../../../../../util/logging/log-transformer.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-binding-element.ts b/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-binding-element.ts index 518549d5..2a1f0033 100644 --- a/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-binding-element.ts +++ b/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-binding-element.ts @@ -1,8 +1,8 @@ -import {DeconflicterVisitorOptions} from "../deconflicter-visitor-options.js"; +import type {DeconflicterVisitorOptions} from "../deconflicter-visitor-options.js"; import {addBindingToLexicalEnvironment} from "../../../util/add-binding-to-lexical-environment.js"; import {isIdentifierFree} from "../../../util/is-identifier-free.js"; import {generateUniqueBinding} from "../../../util/generate-unique-binding.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TS} from "../../../../../../type/ts.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {getOriginalSourceFile} from "../../../util/get-original-source-file.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-call-signature-declaration.ts b/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-call-signature-declaration.ts index 5c86d1c2..425d10a3 100644 --- a/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-call-signature-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-call-signature-declaration.ts @@ -1,8 +1,8 @@ -import {DeconflicterVisitorOptions} from "../deconflicter-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {DeconflicterVisitorOptions} from "../deconflicter-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; import {cloneLexicalEnvironment} from "../../../util/clone-lexical-environment.js"; import {nodeArraysAreEqual} from "../../../util/node-arrays-are-equal.js"; -import {ContinuationOptions} from "../deconflicter-options.js"; +import type {ContinuationOptions} from "../deconflicter-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; /** diff --git a/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-class-declaration.ts index e861a875..a7c11b0c 100644 --- a/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/deconflicter/visitor/deconflict-class-declaration.ts @@ -1,15 +1,15 @@ -import {DeconflicterVisitorOptions} from "../deconflicter-visitor-options.js"; +import type {DeconflicterVisitorOptions} from "../deconflicter-visitor-options.js"; import {nodeArraysAreEqual} from "../../../util/node-arrays-are-equal.js"; import {addBindingToLexicalEnvironment} from "../../../util/add-binding-to-lexical-environment.js"; import {cloneLexicalEnvironment} from "../../../util/clone-lexical-environment.js"; import {isIdentifierFree} from "../../../util/is-identifier-free.js"; import {generateUniqueBinding} from "../../../util/generate-unique-binding.js"; -import {TS} from "../../../../../../type/ts.js"; -import {ContinuationOptions} from "../deconflicter-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ContinuationOptions} from "../deconflicter-options.js"; import {getIdForNode} from "../../../util/get-id-for-node.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {getOriginalSourceFile} from "../../../util/get-original-source-file.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; /** * Deconflicts the given ClassDeclaration. @@ -59,9 +59,5 @@ export function deconflictClassDeclaration(options: DeconflicterVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/ensure-declare-modifier-transformer.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/ensure-declare-modifier-transformer.ts index 8e68ad24..d6c68b0c 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/ensure-declare-modifier-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/ensure-declare-modifier-transformer.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; import {visitNode} from "./visitor/visit-node.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logTransformer} from "../../../../../util/logging/log-transformer.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-declaration.ts index 5c0a2bfd..3d841433 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-declaration.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {ensureHasDeclareModifier, hasDeclareModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassDeclaration(options: EnsureDeclareModifierTransformerVisitorOptions): TS.ClassDeclaration { const {node, typescript, factory} = options; @@ -10,16 +10,5 @@ export function visitClassDeclaration(options: EnsureDeclareModifierTransformerV const modifierLikes = ensureHasDeclareModifier(getModifierLikes(node), factory, typescript); - return preserveMeta( - factory.updateClassDeclaration( - node, - modifierLikes, - node.name, - node.typeParameters, - node.heritageClauses, - node.members - ), - node, - options - ); + return preserveMeta(factory.updateClassDeclaration(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-expression.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-expression.ts index a19761e0..6b9b2aa6 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-class-expression.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {ensureHasDeclareModifier, hasDeclareModifier} from "../../../util/modifier-util.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassExpression(options: EnsureDeclareModifierTransformerVisitorOptions): TS.ClassExpression { const {node, typescript, factory} = options; @@ -10,16 +10,5 @@ export function visitClassExpression(options: EnsureDeclareModifierTransformerVi const modifierLikes = ensureHasDeclareModifier(getModifierLikes(node), factory, typescript); - return preserveMeta( - factory.updateClassExpression( - node, - modifierLikes, - node.name, - node.typeParameters, - node.heritageClauses, - node.members - ), - node, - options - ); + return preserveMeta(factory.updateClassExpression(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-enum-declaration.ts index ea933c4f..19a1f059 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-enum-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {ensureHasDeclareModifier, hasDeclareModifier} from "../../../util/modifier-util.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-declaration.ts index 3ff6cdd7..842591d0 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-declaration.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {ensureHasDeclareModifier, hasDeclareModifier} from "../../../util/modifier-util.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitFunctionDeclaration(options: EnsureDeclareModifierTransformerVisitorOptions): TS.FunctionDeclaration { const {node, factory, typescript} = options; @@ -11,16 +11,7 @@ export function visitFunctionDeclaration(options: EnsureDeclareModifierTransform const modifierLikes = ensureHasDeclareModifier(getModifierLikes(node), factory, typescript); return preserveMeta( - factory.updateFunctionDeclaration( - node, - modifierLikes, - node.asteriskToken, - node.name, - node.typeParameters, - node.parameters, - node.type, - node.body - ), + factory.updateFunctionDeclaration(node, modifierLikes, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body), node, options ); diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-expression.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-expression.ts index 3cd5b0f0..d4b201ff 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-function-expression.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {ensureHasDeclareModifier, hasDeclareModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-interface-declaration.ts index bdbf784a..a360c3e4 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-interface-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; @@ -8,14 +8,7 @@ export function visitInterfaceDeclaration(options: EnsureDeclareModifierTransfor if (!hasDeclareModifier(node, typescript)) return node; return preserveMeta( - factory.updateInterfaceDeclaration( - node, - removeDeclareModifier(node.modifiers, typescript), - node.name, - node.typeParameters, - node.heritageClauses, - node.members - ), + factory.updateInterfaceDeclaration(node, removeDeclareModifier(node.modifiers, typescript), node.name, node.typeParameters, node.heritageClauses, node.members), node, options ); diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-module-declaration.ts index c1dff183..033b979e 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {ensureHasDeclareModifier, hasDeclareModifier} from "../../../util/modifier-util.js"; @@ -7,7 +7,5 @@ export function visitModuleDeclaration(options: EnsureDeclareModifierTransformer const {node, factory, typescript} = options; if (hasDeclareModifier(node, typescript)) return node; - - return preserveMeta(factory.updateModuleDeclaration(node, ensureHasDeclareModifier(node.modifiers, factory, typescript), node.name, node.body), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-node.ts index 191995c6..cd2dd402 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {visitClassDeclaration} from "./visit-class-declaration.js"; import {visitClassExpression} from "./visit-class-expression.js"; import {visitFunctionDeclaration} from "./visit-function-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts index 74d5a20b..ca4ae5be 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; @@ -7,9 +7,5 @@ export function visitTypeAliasDeclaration(options: EnsureDeclareModifierTransfor const {node, factory, typescript} = options; if (!hasDeclareModifier(node, typescript)) return node; - return preserveMeta( - factory.updateTypeAliasDeclaration(node, removeDeclareModifier(node.modifiers, typescript), node.name, node.typeParameters, node.type), - node, - options - ); + return preserveMeta(factory.updateTypeAliasDeclaration(node, removeDeclareModifier(node.modifiers, typescript), node.name, node.typeParameters, node.type), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-variable-statement.ts b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-variable-statement.ts index b7d1b39d..4a76f2a0 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-variable-statement.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-declare-modifier-transformer/visitor/visit-variable-statement.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureDeclareModifierTransformerVisitorOptions} from "../ensure-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {ensureHasDeclareModifier, hasDeclareModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer-visitor-options.ts index 3ba2dec9..2db2ec90 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer-visitor-options.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface EnsureNoDeclareModifierTransformerVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer.ts index f168bc7f..992408cd 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/ensure-no-declare-modifier-transformer.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; import {visitNode} from "./visitor/visit-node.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-declaration.ts index 55f0b6ff..c39e9a27 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-declaration.ts @@ -1,19 +1,14 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassDeclaration(options: EnsureNoDeclareModifierTransformerVisitorOptions): TS.ClassDeclaration { const {node, factory, typescript} = options; if (!hasDeclareModifier(node, typescript)) return node; - const modifierLikes = removeDeclareModifier(getModifierLikes(node), typescript); - return preserveMeta( - factory.updateClassDeclaration(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), - node, - options - ); + return preserveMeta(factory.updateClassDeclaration(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-expression.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-expression.ts index 1be04ec7..9dfca242 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-class-expression.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassExpression(options: EnsureNoDeclareModifierTransformerVisitorOptions): TS.ClassExpression { const {node, factory, typescript} = options; @@ -10,9 +10,5 @@ export function visitClassExpression(options: EnsureNoDeclareModifierTransformer const modifierLikes = removeDeclareModifier(getModifierLikes(node), typescript); - return preserveMeta( - factory.updateClassExpression(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), - node, - options - ); + return preserveMeta(factory.updateClassExpression(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-enum-declaration.ts index c9323ad9..4bf8c0c7 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-enum-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-declaration.ts index ab79a93f..498a8fdc 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-declaration.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitFunctionDeclaration(options: EnsureNoDeclareModifierTransformerVisitorOptions): TS.FunctionDeclaration { const {node, factory, typescript} = options; @@ -11,16 +11,7 @@ export function visitFunctionDeclaration(options: EnsureNoDeclareModifierTransfo const modifierLikes = removeDeclareModifier(getModifierLikes(node), typescript); return preserveMeta( - factory.updateFunctionDeclaration( - node, - modifierLikes, - node.asteriskToken, - node.name, - node.typeParameters, - node.parameters, - node.type, - node.body - ), + factory.updateFunctionDeclaration(node, modifierLikes, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body), node, options ); diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-expression.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-expression.ts index eea97191..57917044 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-function-expression.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-interface-declaration.ts index 32c0bfc7..87616826 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-interface-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; @@ -8,14 +8,7 @@ export function visitInterfaceDeclaration(options: EnsureNoDeclareModifierTransf if (!hasDeclareModifier(node, typescript)) return node; return preserveMeta( - factory.updateInterfaceDeclaration( - node, - removeDeclareModifier(node.modifiers, typescript), - node.name, - node.typeParameters, - node.heritageClauses, - node.members - ), + factory.updateInterfaceDeclaration(node, removeDeclareModifier(node.modifiers, typescript), node.name, node.typeParameters, node.heritageClauses, node.members), node, options ); diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-module-declaration.ts index 0616eb50..f2733afe 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-node.ts index ee563dde..af16498a 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {visitClassDeclaration} from "./visit-class-declaration.js"; import {visitClassExpression} from "./visit-class-expression.js"; import {visitFunctionDeclaration} from "./visit-function-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts index b04e750a..c9caffa5 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-type-alias-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; @@ -7,9 +7,5 @@ export function visitTypeAliasDeclaration(options: EnsureNoDeclareModifierTransf const {node, factory, typescript} = options; if (!hasDeclareModifier(node, typescript)) return node; - return preserveMeta( - factory.updateTypeAliasDeclaration(node, removeDeclareModifier(node.modifiers, typescript), node.name, node.typeParameters, node.type), - node, - options - ); + return preserveMeta(factory.updateTypeAliasDeclaration(node, removeDeclareModifier(node.modifiers, typescript), node.name, node.typeParameters, node.type), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-variable-statement.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-variable-statement.ts index 3b95202f..7d7587be 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-variable-statement.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-declare-modifier-transformer/visitor/visit-variable-statement.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoDeclareModifierTransformerVisitorOptions} from "../ensure-no-declare-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasDeclareModifier, removeDeclareModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer-visitor-options.ts index aa3b8c58..6f9a0f61 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer-visitor-options.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface EnsureNoExportModifierTransformerVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer.ts index f4c138ff..e095d70a 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; import {visitNode} from "./visitor/visit-node.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-declaration.ts index 338b3a08..cab15c74 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-declaration.ts @@ -1,16 +1,12 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassDeclaration(options: EnsureNoExportModifierTransformerVisitorOptions): TS.ClassDeclaration { const {node, factory, typescript} = options; if (!hasExportModifier(node, typescript)) return node; const modifierLikes = removeExportModifier(getModifierLikes(node), typescript); - return preserveMeta( - factory.updateClassDeclaration(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), - node, - options - ); + return preserveMeta(factory.updateClassDeclaration(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-expression.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-expression.ts index 81d09285..677e9260 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-class-expression.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassExpression(options: EnsureNoExportModifierTransformerVisitorOptions): TS.ClassExpression { const {node, factory, typescript} = options; @@ -10,9 +10,5 @@ export function visitClassExpression(options: EnsureNoExportModifierTransformerV const modifierLikes = removeExportModifier(getModifierLikes(node), typescript); - return preserveMeta( - factory.updateClassExpression(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), - node, - options - ); + return preserveMeta(factory.updateClassExpression(node, modifierLikes, node.name, node.typeParameters, node.heritageClauses, node.members), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-enum-declaration.ts index 1a839dd6..bfa721b9 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-enum-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-declaration.ts index fa74fa09..9177ad63 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-declaration.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitFunctionDeclaration(options: EnsureNoExportModifierTransformerVisitorOptions): TS.FunctionDeclaration { const {node, factory, typescript} = options; @@ -11,16 +11,7 @@ export function visitFunctionDeclaration(options: EnsureNoExportModifierTransfor const modifierLikes = removeExportModifier(getModifierLikes(node), typescript); return preserveMeta( - factory.updateFunctionDeclaration( - node, - modifierLikes, - node.asteriskToken, - node.name, - node.typeParameters, - node.parameters, - node.type, - node.body - ), + factory.updateFunctionDeclaration(node, modifierLikes, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body), node, options ); diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-expression.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-expression.ts index ec48c598..1643c925 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-function-expression.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-interface-declaration.ts index 2d09ed18..3c19ab15 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-interface-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-module-declaration.ts index 869d4c38..fe025dba 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-node.ts index 96ae134e..7eb79d2b 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {visitClassDeclaration} from "./visit-class-declaration.js"; import {visitClassExpression} from "./visit-class-expression.js"; import {visitFunctionDeclaration} from "./visit-function-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-type-alias-declaration.ts index d943ea0d..d6df5ef6 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-type-alias-declaration.ts @@ -1,14 +1,10 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; export function visitTypeAliasDeclaration(options: EnsureNoExportModifierTransformerVisitorOptions): TS.TypeAliasDeclaration { const {node, factory, typescript} = options; if (!hasExportModifier(node, typescript)) return node; - return preserveMeta( - factory.updateTypeAliasDeclaration(node, removeExportModifier(node.modifiers, typescript), node.name, node.typeParameters, node.type), - node, - options - ); + return preserveMeta(factory.updateTypeAliasDeclaration(node, removeExportModifier(node.modifiers, typescript), node.name, node.typeParameters, node.type), node, options); } diff --git a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-variable-statement.ts b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-variable-statement.ts index 2c27364a..9321ea04 100644 --- a/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-variable-statement.ts +++ b/src/service/transformer/declaration-bundler/transformers/ensure-no-export-modifier-transformer/visitor/visit-variable-statement.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {EnsureNoExportModifierTransformerVisitorOptions} from "../ensure-no-export-modifier-transformer-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier, removeExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-options.ts b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-options.ts index 6313ec52..0b71f553 100644 --- a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-options.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; export interface InlineNamespaceModuleBlockOptions { intentToAddImportDeclaration(importDeclaration: TS.ImportDeclaration): void; diff --git a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-transformer.ts b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-transformer.ts index 0edb0e6c..ff539fe4 100644 --- a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-transformer.ts @@ -1,11 +1,11 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; import {visitNode} from "./visitor/visit-node.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; import {logTransformer} from "../../../../../util/logging/log-transformer.js"; import {preserveMeta} from "../../util/clone-node-with-meta.js"; -import {DeclarationTransformer} from "../../declaration-bundler-options.js"; -import {InlineNamespaceModuleBlockOptions} from "./inline-namespace-module-block-options.js"; +import type {DeclarationTransformer} from "../../declaration-bundler-options.js"; +import type {InlineNamespaceModuleBlockOptions} from "./inline-namespace-module-block-options.js"; export function inlineNamespaceModuleBlockTransformer({intentToAddImportDeclaration, intentToAddModuleDeclaration}: InlineNamespaceModuleBlockOptions): DeclarationTransformer { return options => { diff --git a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-visitor-options.ts index e4ea9f62..1582eaf1 100644 --- a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/inline-namespace-module-block-visitor-options.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; -import {InlineNamespaceModuleBlockOptions} from "./inline-namespace-module-block-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {InlineNamespaceModuleBlockOptions} from "./inline-namespace-module-block-options.js"; export interface InlineNamespaceModuleBlockVisitorOptions extends SourceFileBundlerVisitorOptions, InlineNamespaceModuleBlockOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-export-declaration.ts index abde25af..cf265163 100644 --- a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-export-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; import {preserveParents} from "../../../util/clone-node-with-meta.js"; import {generateIdentifierName} from "../../../util/generate-identifier-name.js"; import {addBindingToLexicalEnvironment} from "../../../util/add-binding-to-lexical-environment.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-import-declaration.ts b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-import-declaration.ts index 76bc0184..4042d528 100644 --- a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-import-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-import-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; import {cloneNodeWithMeta} from "../../../util/clone-node-with-meta.js"; export function visitImportDeclaration(options: InlineNamespaceModuleBlockVisitorOptions): undefined { diff --git a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-module-declaration.ts index 27dd2415..4c90084b 100644 --- a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; import {cloneNodeWithMeta} from "../../../util/clone-node-with-meta.js"; export function visitModuleDeclaration(options: InlineNamespaceModuleBlockVisitorOptions): undefined { diff --git a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-node.ts index 36fbb766..c5a3258d 100644 --- a/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/inline-namespace-module-block-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {InlineNamespaceModuleBlockVisitorOptions} from "../inline-namespace-module-block-visitor-options.js"; import {visitImportDeclaration} from "./visit-import-declaration.js"; import {visitExportDeclaration} from "./visit-export-declaration.js"; import {visitModuleDeclaration} from "./visit-module-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-options.ts b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-options.ts index 47cc2101..d6c9744a 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-options.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; -import {TypescriptPluginOptions} from "../../../../../plugin/typescript-plugin-options.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {TypescriptPluginOptions} from "../../../../../plugin/typescript-plugin-options.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface ModuleBlockExtractorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-visitor-options.ts index 6f38d4f3..7cbed952 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor-visitor-options.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface ModuleBlockExtractorVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor.ts b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor.ts index e5c8becd..a891d6d3 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/module-block-extractor.ts @@ -1,10 +1,10 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; import {visitNode} from "./visitor/visit-node.js"; -import {ModuleBlockExtractorOptions} from "./module-block-extractor-options.js"; +import type {ModuleBlockExtractorOptions} from "./module-block-extractor-options.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; import {logTransformer} from "../../../../../util/logging/log-transformer.js"; -import {ModuleBlockExtractorVisitorOptions} from "./module-block-extractor-visitor-options.js"; +import type {ModuleBlockExtractorVisitorOptions} from "./module-block-extractor-visitor-options.js"; import {preserveMeta} from "../../util/clone-node-with-meta.js"; export function moduleBlockExtractor(options: ModuleBlockExtractorOptions): TS.SourceFile { diff --git a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-module-declaration.ts index be15c6ba..e260b963 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {ModuleBlockExtractorVisitorOptions} from "../module-block-extractor-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {ModuleBlockExtractorVisitorOptions} from "../module-block-extractor-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitModuleDeclaration({node, typescript}: ModuleBlockExtractorVisitorOptions): TS.VisitResult { if (node.body == null) return undefined; diff --git a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-node.ts index 3e3b6de0..e0e98f4c 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-block-extractor/visitor/visit-node.ts @@ -1,6 +1,6 @@ import {visitModuleDeclaration} from "./visit-module-declaration.js"; -import {ModuleBlockExtractorVisitorOptions} from "../module-block-extractor-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {ModuleBlockExtractorVisitorOptions} from "../module-block-extractor-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitNode({node, ...options}: ModuleBlockExtractorVisitorOptions): TS.Node | TS.Node[] | readonly TS.Node[] | undefined { if (options.typescript.isModuleDeclaration(node)) { diff --git a/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger-visitor-options.ts index f85b4c4b..51f7a56e 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger-visitor-options.ts @@ -1,9 +1,9 @@ -import {TS} from "../../../../../type/ts.js"; -import {DeclarationTransformer} from "../../declaration-bundler-options.js"; -import {LexicalEnvironment} from "../deconflicter/deconflicter-options.js"; -import {NodePlacementQueue} from "../../util/get-node-placement-queue.js"; -import {ImportedSymbol} from "../track-imports-transformer/track-imports-transformer-visitor-options.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {DeclarationTransformer} from "../../declaration-bundler-options.js"; +import type {LexicalEnvironment} from "../deconflicter/deconflicter-options.js"; +import type {NodePlacementQueue} from "../../util/get-node-placement-queue.js"; +import type {ImportedSymbol} from "../track-imports-transformer/track-imports-transformer-visitor-options.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export type PayloadMap = { [Key in TS.SyntaxKind]: Key extends TS.SyntaxKind.ImportType | TS.SyntaxKind.ImportDeclaration | TS.SyntaxKind.ImportClause | TS.SyntaxKind.NamedImports diff --git a/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger.ts b/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger.ts index af7bcdc7..d0e07def 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-merger/module-merger.ts @@ -1,12 +1,12 @@ import {visitNode} from "./visitor/visit-node.js"; -import {TS} from "../../../../../type/ts.js"; -import {ChildVisitResult, IncludeSourceFileOptions, ModuleMergerVisitorOptions, PayloadMap, VisitResult} from "./module-merger-visitor-options.js"; -import {DeclarationTransformer} from "../../declaration-bundler-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {ChildVisitResult, IncludeSourceFileOptions, ModuleMergerVisitorOptions, PayloadMap, VisitResult} from "./module-merger-visitor-options.js"; +import type {DeclarationTransformer} from "../../declaration-bundler-options.js"; import {applyTransformers} from "../../util/apply-transformers.js"; import {getNodePlacementQueue} from "../../util/get-node-placement-queue.js"; import {findMatchingImportedSymbol} from "../../util/find-matching-imported-symbol.js"; import {cloneNodeWithMeta, preserveMeta} from "../../util/clone-node-with-meta.js"; -import {ImportedSymbol} from "../track-imports-transformer/track-imports-transformer-visitor-options.js"; +import type {ImportedSymbol} from "../track-imports-transformer/track-imports-transformer-visitor-options.js"; import {getChunkFilename} from "../../util/get-chunk-filename.js"; import {ensureNoExportModifierTransformer} from "../ensure-no-export-modifier-transformer/ensure-no-export-modifier-transformer.js"; import {noExportDeclarationTransformer} from "../no-export-declaration-transformer/no-export-declaration-transformer.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/module-merger/util/is-root-level-node.ts b/src/service/transformer/declaration-bundler/transformers/module-merger/util/is-root-level-node.ts index 309da913..f6ecd5ac 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-merger/util/is-root-level-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-merger/util/is-root-level-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import { isArray } from "../../../../../../util/object/object-util.js"; +import type {TS} from "../../../../../../type/ts.js"; +import {isArray} from "../../../../../../util/object/object-util.js"; import {isStatement} from "../../../util/is-statement.js"; export function isRootLevelNode(node: TS.VisitResult, typescript: typeof TS): node is TS.Statement { diff --git a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-declaration.ts index 34e05563..65bc3a29 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-declaration.ts @@ -1,5 +1,5 @@ -import {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; import {generateModuleSpecifier} from "../../../util/generate-module-specifier.js"; import {preserveMeta, preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; import {ensureHasDeclareModifier} from "../../../util/modifier-util.js"; @@ -30,9 +30,7 @@ function generateExportDeclarations(options: GenerateExportDeclarationsOptions, // If the generated moduleSpecifier is null, that's because it is a self-reference, in which case the 'export *' declaration must be skipped // in favor of all other named export bindings that will included anyway if (matchingSourceFile == null && generatedModuleSpecifier != null) { - exportDeclarations.push( - preserveParents(factory.createExportDeclaration(undefined, false, undefined, factory.createStringLiteral(generatedModuleSpecifier)), {typescript}) - ); + exportDeclarations.push(preserveParents(factory.createExportDeclaration(undefined, false, undefined, factory.createStringLiteral(generatedModuleSpecifier)), {typescript})); } // Otherwise, recursively add all exports for the reexported module diff --git a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-specifier.ts b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-specifier.ts index 7e769706..abc10bc1 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-specifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-export-specifier.ts @@ -1,5 +1,5 @@ -import {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; import {preserveMeta, preserveParents} from "../../../util/clone-node-with-meta.js"; import {locateExportedSymbolForSourceFile} from "../../../util/locate-exported-symbol.js"; import {generateModuleSpecifier} from "../../../util/generate-module-specifier.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-clause.ts b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-clause.ts index ed64a75b..2f2e5b99 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-clause.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-clause.ts @@ -1,5 +1,5 @@ -import {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; import {getImportedSymbolFromImportClauseName} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {preserveMeta, preserveParents} from "../../../util/clone-node-with-meta.js"; import {createAliasedBinding} from "../../../util/create-aliased-binding.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-declaration.ts b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-declaration.ts index 7722cf3b..1aa5b051 100644 --- a/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/module-merger/visitor/visit-import-declaration.ts @@ -1,5 +1,5 @@ -import {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {ModuleMergerVisitorOptions, VisitResult} from "../module-merger-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; import {generateModuleSpecifier} from "../../../util/generate-module-specifier.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; @@ -36,13 +36,7 @@ export function visitImportDeclaration(options: ModuleMergerVisitorOptions): VisitResult { const {node, factory, typescript, payload} = options; @@ -63,12 +63,7 @@ export function visitNamespaceImport(options: ModuleMergerVisitorOptions): VisitResult { for (const otherEntrySourceFileForChunk of options.otherEntrySourceFilesForChunk) { diff --git a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer-visitor-options.ts index 17519626..4cff4503 100644 --- a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer-visitor-options.ts @@ -1,7 +1,7 @@ -import {TS} from "../../../../../type/ts.js"; -import {NodePlacementQueue} from "../../util/get-node-placement-queue.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; -import {NoExportDeclarationTransformerOptions} from "./no-export-declaration-transformer-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {NodePlacementQueue} from "../../util/get-node-placement-queue.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {NoExportDeclarationTransformerOptions} from "./no-export-declaration-transformer-options.js"; export interface NoExportDeclarationTransformerVisitorOptions extends NoExportDeclarationTransformerOptions, diff --git a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer.ts b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer.ts index dc1fadbe..d65ff025 100644 --- a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/no-export-declaration-transformer.ts @@ -1,13 +1,13 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; import {visitNode} from "./visitor/visit-node.js"; import {getNodePlacementQueue} from "../../util/get-node-placement-queue.js"; -import {NoExportDeclarationTransformerVisitorOptions} from "./no-export-declaration-transformer-visitor-options.js"; +import type {NoExportDeclarationTransformerVisitorOptions} from "./no-export-declaration-transformer-visitor-options.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; import {logTransformer} from "../../../../../util/logging/log-transformer.js"; import {preserveMeta} from "../../util/clone-node-with-meta.js"; -import {DeclarationTransformer} from "../../declaration-bundler-options.js"; -import {NoExportDeclarationTransformerOptions} from "./no-export-declaration-transformer-options.js"; +import type {DeclarationTransformer} from "../../declaration-bundler-options.js"; +import type {NoExportDeclarationTransformerOptions} from "./no-export-declaration-transformer-options.js"; export function noExportDeclarationTransformer({ preserveAliasedExports = false, diff --git a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-assignment.ts b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-assignment.ts index f9c75242..aa6ecd84 100644 --- a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-assignment.ts +++ b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-assignment.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {NoExportDeclarationTransformerVisitorOptions} from "../no-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {NoExportDeclarationTransformerVisitorOptions} from "../no-export-declaration-transformer-visitor-options.js"; // eslint-disable-next-line @typescript-eslint/no-unused-vars export function visitExportAssignment(_options: NoExportDeclarationTransformerVisitorOptions): undefined { diff --git a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-declaration.ts index dabf7899..4ac1e123 100644 --- a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-export-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {NoExportDeclarationTransformerVisitorOptions} from "../no-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {NoExportDeclarationTransformerVisitorOptions} from "../no-export-declaration-transformer-visitor-options.js"; export function visitExportDeclaration(options: NoExportDeclarationTransformerVisitorOptions): TS.ExportDeclaration | undefined { const {node, typescript, preserveExportsWithModuleSpecifiers, preserveAliasedExports} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-node.ts index 7ca4cd15..91ca832c 100644 --- a/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/no-export-declaration-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {NoExportDeclarationTransformerVisitorOptions} from "../no-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {NoExportDeclarationTransformerVisitorOptions} from "../no-export-declaration-transformer-visitor-options.js"; import {visitExportDeclaration} from "./visit-export-declaration.js"; import {visitExportAssignment} from "./visit-export-assignment.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/cache/reference-cache.ts b/src/service/transformer/declaration-bundler/transformers/reference/cache/reference-cache.ts index b7ce45b7..da5c5f7f 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/cache/reference-cache.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/cache/reference-cache.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../../../type/ts.js"; +import type {TS} from "../../../../../../type/ts.js"; export type ReferenceCache = WeakMap; export type NodeToReferencedIdentifiersCache = Map>; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced-options.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced-options.ts index e89283ac..89ac6490 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced-options.ts @@ -1,6 +1,6 @@ -import {ReferenceCache, SourceFileToNodeToReferencedIdentifiersCache} from "../cache/reference-cache.js"; -import {TS} from "../../../../../../type/ts.js"; -import {GetIdentifiersWithCacheOptions} from "../../trace-identifiers/trace-identifiers.js"; +import type {ReferenceCache, SourceFileToNodeToReferencedIdentifiersCache} from "../cache/reference-cache.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {GetIdentifiersWithCacheOptions} from "../../trace-identifiers/trace-identifiers.js"; export interface IsReferencedOptions extends GetIdentifiersWithCacheOptions { referenceCache: ReferenceCache; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced.ts index 91c1c763..4baa075c 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/is-referenced.ts @@ -1,5 +1,5 @@ -import {IsReferencedOptions} from "./is-referenced-options.js"; -import {ReferenceVisitorOptions} from "./reference-visitor-options.js"; +import type {IsReferencedOptions} from "./is-referenced-options.js"; +import type {ReferenceVisitorOptions} from "./reference-visitor-options.js"; import {checkClassDeclaration} from "./visitor/check-class-declaration.js"; import {checkIdentifier} from "./visitor/check-identifier.js"; import {checkClassExpression} from "./visitor/check-class-expression.js"; @@ -10,7 +10,7 @@ import {checkFunctionDeclaration} from "./visitor/check-function-declaration.js" import {checkFunctionExpression} from "./visitor/check-function-expression.js"; import {checkVariableDeclaration} from "./visitor/check-variable-declaration.js"; import {checkExportSpecifier} from "./visitor/check-export-specifier.js"; -import {NodeToReferencedIdentifiersCache} from "../cache/reference-cache.js"; +import type {NodeToReferencedIdentifiersCache} from "../cache/reference-cache.js"; import {checkArrayBindingPattern} from "./visitor/check-array-binding-pattern.js"; import {checkObjectBindingPattern} from "./visitor/check-object-binding-pattern.js"; import {checkBindingElement} from "./visitor/check-binding-element.js"; @@ -29,7 +29,7 @@ import {checkModuleDeclaration} from "./visitor/check-module-declaration.js"; import {checkIndexedAccessTypeNode} from "./visitor/check-indexed-access-type-node.js"; import {checkPropertyAccessExpression} from "./visitor/check-property-access-expression.js"; import {checkQualifiedName} from "./visitor/check-qualified-name.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TS} from "../../../../../../type/ts.js"; import {nodeContainsChild} from "../../../util/node-contains-child.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {traceIdentifiers} from "../../trace-identifiers/trace-identifiers.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/reference-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/reference-visitor-options.ts index d90bc1b1..7d3a583c 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/reference-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/reference-visitor-options.ts @@ -1,5 +1,5 @@ -import {VisitorOptions} from "./visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {VisitorOptions} from "./visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export interface ReferenceVisitorOptions extends VisitorOptions { continuation(node: U): string[]; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor-options.ts index 173c6606..14cd5b44 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor-options.ts @@ -1,5 +1,5 @@ -import {IsReferencedOptions} from "./is-referenced-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {IsReferencedOptions} from "./is-referenced-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export interface VisitorOptions extends IsReferencedOptions { originalNode: TS.Node; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-array-binding-pattern.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-array-binding-pattern.ts index b43f84dd..b66ae062 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-array-binding-pattern.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-array-binding-pattern.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkArrayBindingPattern({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-binding-element.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-binding-element.ts index 6f95d32e..015b6a79 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-binding-element.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-binding-element.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkBindingElement({node, continuation, typescript}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-declaration.ts index 911e1683..9bd589cd 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkClassDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-expression.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-expression.ts index b18f91b0..98656b7b 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-class-expression.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkClassExpression({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-enum-declaration.ts index 9c0ef28a..18264554 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-enum-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkEnumDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-assignment.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-assignment.ts index 13eee087..12c59d0e 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-assignment.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-assignment.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkExportAssignment({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers = continuation(node.expression); diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-declaration.ts index 6d73266c..b6a241ce 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkExportDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-specifier.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-specifier.ts index 3926f718..46f95906 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-specifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-export-specifier.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkExportSpecifier({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-declaration.ts index e85b63c9..cbd4cd2f 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkFunctionDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-expression.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-expression.ts index 3d017dab..e76c0675 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-function-expression.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkFunctionExpression({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-get-accessor-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-get-accessor-declaration.ts index 890e679f..3b254224 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-get-accessor-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-get-accessor-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkGetAccessorDeclaration({node, continuation, typescript}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-identifier.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-identifier.ts index 00d2acf2..6529cda7 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-identifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-identifier.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; import {isSymbolIdentifier} from "../../../../util/is-symbol-identifier.js"; export function checkIdentifier({node, typescript}: ReferenceVisitorOptions): string[] { diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-import-equals-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-import-equals-declaration.ts index eac76785..0da1ca33 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-import-equals-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-import-equals-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkImportEqualsDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-indexed-access-type-node.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-indexed-access-type-node.ts index 74838048..111660fa 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-indexed-access-type-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-indexed-access-type-node.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkIndexedAccessTypeNode({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-interface-declaration.ts index 392dd71e..25572067 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-interface-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkInterfaceDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-declaration.ts index c4f47db0..e30ca8bf 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkMethodDeclaration({node, continuation, typescript}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-signature.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-signature.ts index e961581c..d3e11232 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-signature.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-method-signature.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; import {isSymbolIdentifier} from "../../../../util/is-symbol-identifier.js"; export function checkMethodSignature({node, continuation, typescript}: ReferenceVisitorOptions): string[] { diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-module-declaration.ts index 53f584c3..996334e0 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-module-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkModuleDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-object-binding-pattern.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-object-binding-pattern.ts index 7416416c..e91ba4d1 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-object-binding-pattern.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-object-binding-pattern.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkObjectBindingPattern({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-parameter-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-parameter-declaration.ts index 548cfcca..ef23451d 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-parameter-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-parameter-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkParameterDeclaration({node, continuation, typescript}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-access-expression.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-access-expression.ts index 3ddf0957..245cb688 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-access-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-access-expression.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkPropertyAccessExpression({node, continuation}: ReferenceVisitorOptions): string[] { return continuation(node.expression); diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-declaration.ts index 8f298a55..0f51cf58 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkPropertyDeclaration({node, continuation, typescript}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-signature.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-signature.ts index a87e49df..967d6b22 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-signature.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-property-signature.ts @@ -1,6 +1,6 @@ /* eslint-disable deprecation/deprecation */ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; import {isSymbolIdentifier} from "../../../../util/is-symbol-identifier.js"; export function checkPropertySignature({node, continuation, typescript}: ReferenceVisitorOptions): string[] { diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-qualified-name.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-qualified-name.ts index b21aa35f..b7cb78f3 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-qualified-name.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-qualified-name.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkQualifiedName({node, continuation}: ReferenceVisitorOptions): string[] { return continuation(node.left); diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-set-accessor-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-set-accessor-declaration.ts index 089b7df5..90033a7f 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-set-accessor-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-set-accessor-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkSetAccessorDeclaration({node, continuation, typescript}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-node.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-node.ts index d8f6e16a..52e67bd0 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-node.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkTemplateLiteralTypeNode({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-span.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-span.ts index ac162b9d..fc9fefbc 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-span.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-template-literal-type-span.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkTemplateLiteralTypeSpan({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-alias-declaration.ts index 0c6ca17f..91e52857 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-alias-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkTypeAliasDeclaration({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-reference-node.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-reference-node.ts index 1e2c9f42..12c1c959 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-reference-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-type-reference-node.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkTypeReferenceNode({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration-list.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration-list.ts index cdf5f96d..aeca5904 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration-list.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration-list.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkVariableDeclarationList({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration.ts index eeb992c3..c1e6da5b 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-declaration.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkVariableDeclaration({node, continuation}: ReferenceVisitorOptions): string[] { const referencedIdentifiers: string[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-statement.ts b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-statement.ts index 7dd48ce2..6a2bbca1 100644 --- a/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-statement.ts +++ b/src/service/transformer/declaration-bundler/transformers/reference/is-referenced/visitor/check-variable-statement.ts @@ -1,5 +1,5 @@ -import {ReferenceVisitorOptions} from "../reference-visitor-options.js"; -import {TS} from "../../../../../../../type/ts.js"; +import type {ReferenceVisitorOptions} from "../reference-visitor-options.js"; +import type {TS} from "../../../../../../../type/ts.js"; export function checkVariableStatement({node, continuation, markIdentifiersAsReferenced}: ReferenceVisitorOptions): string[] { const referencedIdentifiers = continuation(node.declarationList); diff --git a/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler-visitor-options.ts index 703d43ee..d9d44411 100644 --- a/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler-visitor-options.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../type/ts.js"; -import {DeclarationBundlerOptions} from "../../declaration-bundler-options.js"; -import {LexicalEnvironment} from "../deconflicter/deconflicter-options.js"; -import {ImportedSymbol} from "../track-imports-transformer/track-imports-transformer-visitor-options.js"; -import {TransformerBaseOptions} from "../transformer-base-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {DeclarationBundlerOptions} from "../../declaration-bundler-options.js"; +import type {LexicalEnvironment} from "../deconflicter/deconflicter-options.js"; +import type {ImportedSymbol} from "../track-imports-transformer/track-imports-transformer-visitor-options.js"; +import type {TransformerBaseOptions} from "../transformer-base-options.js"; export type SourceFileResolver = (fileName: string, from: string) => TS.SourceFile | undefined; diff --git a/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler.ts b/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler.ts index f3db6c0b..ecdcaa14 100644 --- a/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler.ts +++ b/src/service/transformer/declaration-bundler/transformers/source-file-bundler/source-file-bundler.ts @@ -1,15 +1,15 @@ -import {DeclarationBundlerOptions, DeclarationTransformer} from "../../declaration-bundler-options.js"; -import {TS} from "../../../../../type/ts.js"; +import type {DeclarationBundlerOptions, DeclarationTransformer} from "../../declaration-bundler-options.js"; +import type {TS} from "../../../../../type/ts.js"; import {applyTransformers} from "../../util/apply-transformers.js"; import {getChunkFilename} from "../../util/get-chunk-filename.js"; -import {SourceFileBundlerVisitorOptions} from "./source-file-bundler-visitor-options.js"; +import type {SourceFileBundlerVisitorOptions} from "./source-file-bundler-visitor-options.js"; import {formatLibReferenceDirective} from "../../util/format-lib-reference-directive.js"; import {formatTypeReferenceDirective} from "../../util/format-type-reference-directive.js"; import {pickResolvedModule} from "../../../../../util/pick-resolved-module.js"; import {trackImportsTransformer} from "../track-imports-transformer/track-imports-transformer.js"; import {trackExportsTransformer} from "../track-exports-transformer/track-exports-transformer.js"; import {statsCollector} from "../stats-collector/stats-collector.js"; -import {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; +import type {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; import {ensureNodeFactory} from "compatfactory"; function needsInitialize(options: DeclarationBundlerOptions): boolean { @@ -80,7 +80,7 @@ export function sourceFileBundler(options: DeclarationBundlerOptions, ...transfo ...options, context, factory, - extensions: host.getSupportedExtensions(), + extensions: host.getAllKnownTypescriptExtensions(), entrySourceFilesForChunk: entrySourceFiles, otherEntrySourceFilesForChunk, sourceFile: firstEntrySourceFile, diff --git a/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger-visitor-options.ts index 76661427..33b8e804 100644 --- a/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger-visitor-options.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface StatementMergerVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger.ts b/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger.ts index c3484b02..db85f8c5 100644 --- a/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger.ts +++ b/src/service/transformer/declaration-bundler/transformers/statement-merger/statement-merger.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {StatementMergerVisitorOptions} from "./statement-merger-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {StatementMergerVisitorOptions} from "./statement-merger-visitor-options.js"; import {visitNode} from "./visitor/visit-node.js"; import {getMergedImportDeclarationsForModules} from "../../util/get-merged-import-declarations-for-modules.js"; import {getMergedExportDeclarationsForModules} from "../../util/get-merged-export-declarations-for-modules.js"; @@ -8,8 +8,8 @@ import {hasExportModifier} from "../../util/modifier-util.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; import {logTransformer} from "../../../../../util/logging/log-transformer.js"; import {preserveMeta} from "../../util/clone-node-with-meta.js"; -import {DeclarationTransformer} from "../../declaration-bundler-options.js"; -import {StatementMergerOptions} from "./statement-merger-options.js"; +import type {DeclarationTransformer} from "../../declaration-bundler-options.js"; +import type {StatementMergerOptions} from "./statement-merger-options.js"; import {nodeHasSupportedExtension} from "../../util/node-has-supported-extension.js"; export function statementMerger({markAsModuleIfNeeded}: StatementMergerOptions): DeclarationTransformer { diff --git a/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-assignment.ts b/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-assignment.ts index febaa664..e29c74ae 100644 --- a/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-assignment.ts +++ b/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-assignment.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {StatementMergerVisitorOptions} from "../statement-merger-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {StatementMergerVisitorOptions} from "../statement-merger-visitor-options.js"; export function visitExportAssignment( options: StatementMergerVisitorOptions diff --git a/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-declaration.ts index b57631f2..b58688aa 100644 --- a/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-export-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {StatementMergerVisitorOptions} from "../statement-merger-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {StatementMergerVisitorOptions} from "../statement-merger-visitor-options.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; export function visitExportDeclaration(options: StatementMergerVisitorOptions): TS.ExportDeclaration[] | TS.ExportDeclaration | undefined { @@ -30,8 +30,5 @@ export function visitExportDeclaration(options: StatementMergerVisitorOptions): TS.ImportDeclaration[] | TS.ImportDeclaration | undefined { const {node, factory, typescript} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-node.ts index 1e5482e9..03e5a5ad 100644 --- a/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/statement-merger/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {StatementMergerVisitorOptions} from "../statement-merger-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {StatementMergerVisitorOptions} from "../statement-merger-visitor-options.js"; import {visitImportDeclaration} from "./visit-import-declaration.js"; import {visitExportDeclaration} from "./visit-export-declaration.js"; import {visitExportAssignment} from "./visit-export-assignment.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-options.ts b/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-options.ts index 7e920d02..1ca88acb 100644 --- a/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-options.ts @@ -1,7 +1,7 @@ -import {TS} from "../../../../../type/ts.js"; -import {CompilerHost} from "../../../../compiler-host/compiler-host.js"; -import {PathsResult} from "../../util/prepare-paths/prepare-paths.js"; -import {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {CompilerHost} from "../../../../compiler-host/compiler-host.js"; +import type {PathsResult} from "../../util/prepare-paths/prepare-paths.js"; +import type {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; export interface StatsCollectorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-visitor-options.ts index e0a8d4c5..e49d6dfb 100644 --- a/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector-visitor-options.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface StatsCollectorVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector.ts b/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector.ts index 8e610950..9e4899e1 100644 --- a/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector.ts +++ b/src/service/transformer/declaration-bundler/transformers/stats-collector/stats-collector.ts @@ -1,7 +1,7 @@ import {trackImportsTransformer} from "../track-imports-transformer/track-imports-transformer.js"; -import {DeclarationChunkStats} from "../../../../../type/declaration-stats.js"; -import {StatsCollectorOptions} from "./stats-collector-options.js"; -import {ExtendedResolvedModule} from "../../../../cache/resolve-cache/extended-resolved-module.js"; +import type {DeclarationChunkStats} from "../../../../../type/declaration-stats.js"; +import type {StatsCollectorOptions} from "./stats-collector-options.js"; +import type {ExtendedResolvedModule} from "../../../../cache/resolve-cache/extended-resolved-module.js"; export function statsCollector(options: StatsCollectorOptions): DeclarationChunkStats { const {typescript, sourceFile, declarationPaths, host, sourceFileToTypeReferencesSet} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer-visitor-options.ts index 6e464435..c378c8de 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer-visitor-options.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; -import {NodePlacementQueue} from "../../util/get-node-placement-queue.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {NodePlacementQueue} from "../../util/get-node-placement-queue.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface ToExportDeclarationTransformerVisitorOptions extends SourceFileBundlerVisitorOptions, NodePlacementQueue { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer.ts index 722cb1b5..2ac71ff5 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/to-export-declaration-transformer.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; import {visitNode} from "./visitor/visit-node.js"; import {getNodePlacementQueue} from "../../util/get-node-placement-queue.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "./to-export-declaration-transformer-visitor-options.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "./to-export-declaration-transformer-visitor-options.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; import {logTransformer} from "../../../../../util/logging/log-transformer.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-declaration.ts index 3d647742..e410c433 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-declaration.ts @@ -1,10 +1,10 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {generateIdentifierName} from "../../../util/generate-identifier-name.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {preserveMeta, preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes, getModifiers } from "../../../util/node-util.js"; +import {getModifierLikes, getModifiers} from "../../../util/node-util.js"; export function visitClassDeclaration(options: ToExportDeclarationTransformerVisitorOptions): TS.ClassDeclaration { const {node, factory, typescript, appendNodes, sourceFile} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-expression.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-expression.ts index 113f38e8..4d7b4bda 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-class-expression.ts @@ -1,10 +1,10 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {generateIdentifierName} from "../../../util/generate-identifier-name.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {preserveMeta, preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes, getModifiers } from "../../../util/node-util.js"; +import {getModifierLikes, getModifiers} from "../../../util/node-util.js"; export function visitClassExpression(options: ToExportDeclarationTransformerVisitorOptions): TS.ClassExpression { const {node, factory, typescript, appendNodes, sourceFile} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-enum-declaration.ts index 1a0bb8f9..90d9e313 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-enum-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-declaration.ts index c5e7c865..7e3050c6 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-declaration.ts @@ -1,10 +1,10 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {generateIdentifierName} from "../../../util/generate-identifier-name.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {preserveMeta, preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitFunctionDeclaration(options: ToExportDeclarationTransformerVisitorOptions): TS.FunctionDeclaration { const {node, factory, typescript, sourceFile, appendNodes} = options; @@ -24,16 +24,7 @@ export function visitFunctionDeclaration(options: ToExportDeclarationTransformer } else { const modifierLikes = getModifierLikes(node); returnNode = preserveMeta( - factory.updateFunctionDeclaration( - node, - modifierLikes, - node.asteriskToken, - factory.createIdentifier(nameText), - node.typeParameters, - node.parameters, - node.type, - node.body - ), + factory.updateFunctionDeclaration(node, modifierLikes, node.asteriskToken, factory.createIdentifier(nameText), node.typeParameters, node.parameters, node.type, node.body), node, options ); diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-expression.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-expression.ts index 6be63d44..d1356de5 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-function-expression.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {generateIdentifierName} from "../../../util/generate-identifier-name.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {preserveMeta, preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-interface-declaration.ts index 8e40f1a0..977173ed 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-interface-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; @@ -12,7 +12,7 @@ export function visitInterfaceDeclaration(options: ToExportDeclarationTransforme const {exportSpecifier} = createExportSpecifierFromNameAndModifiers({...options, name: node.name.text, modifiers: node.modifiers}); // Append an ExportDeclaration - appendNodes(preserveParents(factory.createExportDeclaration( undefined, false, factory.createNamedExports([exportSpecifier])), {typescript})); + appendNodes(preserveParents(factory.createExportDeclaration(undefined, false, factory.createNamedExports([exportSpecifier])), {typescript})); const propertyName = exportSpecifier.propertyName ?? exportSpecifier.name; preserveSymbols(propertyName, node, options); diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-module-declaration.ts index 202a678c..39126a3c 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-node.ts index ca0634d8..8956c5c8 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {visitClassDeclaration} from "./visit-class-declaration.js"; import {visitClassExpression} from "./visit-class-expression.js"; import {visitFunctionDeclaration} from "./visit-function-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-type-alias-declaration.ts index f84976aa..8268b01c 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-type-alias-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {preserveParents, preserveSymbols} from "../../../util/clone-node-with-meta.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-variable-statement.ts b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-variable-statement.ts index 9be75717..60e37975 100644 --- a/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-variable-statement.ts +++ b/src/service/transformer/declaration-bundler/transformers/to-export-declaration-transformer/visitor/visit-variable-statement.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {ToExportDeclarationTransformerVisitorOptions} from "../to-export-declaration-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {traceIdentifiers} from "../../trace-identifiers/trace-identifiers.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers-visitor-options.ts index eacb9341..1e0f50ab 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers-visitor-options.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; export interface TraceIdentifiersVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers.ts index 3566d52e..b969d3b5 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/trace-identifiers.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; import {traceIdentifiersForNode} from "./visitor/trace-identifiers-for-node.js"; export interface GetIdentifiersWithCacheOptions { diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-binding-element.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-binding-element.ts index 4991c545..675b71f3 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-binding-element.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-binding-element.ts @@ -1,5 +1,5 @@ -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; /** * Deconflicts the given BindingElement. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-call-expression.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-call-expression.ts index 9462e000..a5b6ea83 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-call-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-call-expression.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given CallExpression. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-class-declaration.ts index 8a867324..bc214dd4 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-class-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given ClassDeclaration. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-enum-declaration.ts index 2b8a0cb3..f27be3d7 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-enum-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given EnumDeclaration. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-assignment.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-assignment.ts index 494da880..3063e0f9 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-assignment.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-assignment.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given ExportAssignment. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-specifier.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-specifier.ts index 517e9fd5..ac9d3b4a 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-specifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-export-specifier.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given ExportSpecifier. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-function-declaration.ts index fa81fcc0..2999f2a5 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-function-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given FunctionDeclaration. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-identifier.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-identifier.ts index 14b50ff6..3bedf14b 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-identifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-identifier.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Deconflicts the given Identifier. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-clause.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-clause.ts index 8b3b6d7d..3ca9b4bb 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-clause.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-clause.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given ImportClause. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-equals-declaration.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-equals-declaration.ts index 37182e37..346ddd35 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-equals-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-equals-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given ImportEqualsDeclaration. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-specifier.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-specifier.ts index 92eb46f4..657fee51 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-specifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-import-specifier.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given ImportSpecifier. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-interface-declaration.ts index 76de0c07..24d00527 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-interface-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given InterfaceDeclaration. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-namespace-import.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-namespace-import.ts index 278cf1b7..0ff4a04e 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-namespace-import.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-namespace-import.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given NamespaceImport. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-new-expression.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-new-expression.ts index ae4544ee..f8f8d264 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-new-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-new-expression.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given NewExpression. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-node.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-node.ts index dc6399ce..3f948cc0 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-node.ts @@ -10,7 +10,7 @@ import {traceIdentifiersForIdentifier} from "./trace-identifiers-for-identifier. import {traceIdentifiersForInterfaceDeclaration} from "./trace-identifiers-for-interface-declaration.js"; import {traceIdentifiersForTypeAliasDeclaration} from "./trace-identifiers-for-type-alias-declaration.js"; import {traceIdentifiersForVariableDeclaration} from "./trace-identifiers-for-variable-declaration.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; import {traceIdentifiersForExportAssignment} from "./trace-identifiers-for-export-assignment.js"; import {traceIdentifiersForCallExpression} from "./trace-identifiers-for-call-expression.js"; import {traceIdentifiersForNewExpression} from "./trace-identifiers-for-new-expression.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-type-alias-declaration.ts index 5fe4da1b..9bc7f8a3 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-type-alias-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Traces identifiers for the given TypeAliasDeclaration. diff --git a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-variable-declaration.ts b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-variable-declaration.ts index 3b261207..e4748622 100644 --- a/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-variable-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/trace-identifiers/visitor/trace-identifiers-for-variable-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TraceIdentifiersVisitorOptions} from "../trace-identifiers-visitor-options.js"; /** * Deconflicts the given VariableDeclaration. diff --git a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer-visitor-options.ts index c24e038a..709f1c8f 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer-visitor-options.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; -import {CompilerHost} from "../../../../compiler-host/compiler-host.js"; -import {ModuleDependency} from "../../../../../util/get-module-dependencies/get-module-dependencies.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {CompilerHost} from "../../../../compiler-host/compiler-host.js"; +import type {ModuleDependency} from "../../../../../util/get-module-dependencies/get-module-dependencies.js"; export interface TrackDependenciesOptions { host: CompilerHost; diff --git a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer.ts b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer.ts index bb6caefe..4e821bda 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer.ts @@ -1,7 +1,7 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; import {visitNode} from "./visitor/visit-node.js"; -import {TrackDependenciesOptions, TrackDependenciesTransformerVisitorOptions} from "./track-dependencies-transformer-visitor-options.js"; -import {ModuleDependency} from "../../../../../util/get-module-dependencies/get-module-dependencies.js"; +import type {TrackDependenciesOptions, TrackDependenciesTransformerVisitorOptions} from "./track-dependencies-transformer-visitor-options.js"; +import type {ModuleDependency} from "../../../../../util/get-module-dependencies/get-module-dependencies.js"; export function trackDependenciesTransformer(options: TrackDependenciesOptions): Set { const typescript = options.host.getTypescript(); diff --git a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-export-declaration.ts index f99b6985..1c0b342e 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-export-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; export function visitExportDeclaration({node, typescript, host, sourceFile, addDependency}: TrackDependenciesTransformerVisitorOptions): void { if (node.moduleSpecifier == null || !typescript.isStringLiteralLike(node.moduleSpecifier)) return; diff --git a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-declaration.ts index 98d7b04f..a623c487 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; export function visitImportDeclaration({node, typescript, host, sourceFile, addDependency}: TrackDependenciesTransformerVisitorOptions): void { if (!typescript.isStringLiteralLike(node.moduleSpecifier)) return; diff --git a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-type-node.ts b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-type-node.ts index 5729b4b9..ef2e20a2 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-type-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-import-type-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; export function visitImportTypeNode({node, typescript, host, sourceFile, addDependency, continuation}: TrackDependenciesTransformerVisitorOptions): void { if (!typescript.isLiteralTypeNode(node.argument) || !typescript.isStringLiteralLike(node.argument.literal)) return; diff --git a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-module-declaration.ts index 7b5bf97d..6fc5fef3 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; export function visitModuleDeclaration({node, ...options}: TrackDependenciesTransformerVisitorOptions): void { if (node.body == null) return; diff --git a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-node.ts index f0e60bc4..1ed16dae 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-dependencies-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackDependenciesTransformerVisitorOptions} from "../track-dependencies-transformer-visitor-options.js"; import {visitImportDeclaration} from "./visit-import-declaration.js"; import {visitImportTypeNode} from "./visit-import-type-node.js"; import {visitModuleDeclaration} from "./visit-module-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer-visitor-options.ts index 4afb9075..36626062 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer-visitor-options.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; export interface ExportedSymbolBase {} diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer.ts index 91c80ca5..833eb7a5 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/track-exports-transformer.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; import {visitNode} from "./visitor/visit-node.js"; -import {ExportedSymbol, ExportedSymbolSet, TrackExportsOptions, TrackExportsTransformerVisitorOptions} from "./track-exports-transformer-visitor-options.js"; +import type {ExportedSymbol, ExportedSymbolSet, TrackExportsOptions, TrackExportsTransformerVisitorOptions} from "./track-exports-transformer-visitor-options.js"; export function trackExportsTransformer(options: TrackExportsOptions): ExportedSymbolSet { const {typescript} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-declaration.ts index b5838ac6..371a32f9 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-declaration.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; -import { getModifiers } from "../../../util/node-util.js"; +import {getModifiers} from "../../../util/node-util.js"; export function visitClassDeclaration({node, typescript, markAsExported, ...options}: TrackExportsTransformerVisitorOptions): void { // If the node has no export modifier, leave it as it is diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-expression.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-expression.ts index 13cfccd7..cd504f3c 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-class-expression.ts @@ -1,8 +1,8 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; -import { getModifiers } from "../../../util/node-util.js"; +import {getModifiers} from "../../../util/node-util.js"; export function visitClassExpression({node, typescript, markAsExported, ...options}: TrackExportsTransformerVisitorOptions): void { // If the node has no export modifier, leave it as it is diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-enum-declaration.ts index b99614c3..bfaa9f8d 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-enum-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-assignment.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-assignment.ts index 9c176f08..4849c9a7 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-assignment.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-assignment.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; export function visitExportAssignment(options: TrackExportsTransformerVisitorOptions): void { const {node, typescript, markAsExported} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-declaration.ts index 7634ea22..9e32eaaf 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-export-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {getExportedSymbolFromExportSpecifier} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; export function visitExportDeclaration({node, typescript, markAsExported}: TrackExportsTransformerVisitorOptions): void { diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-declaration.ts index 6265ad1a..1bd94352 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-expression.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-expression.ts index a8732294..f88602d8 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-function-expression.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-interface-declaration.ts index 03e8f0d3..fafac546 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-interface-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-module-declaration.ts index b17492d8..ef36f6e2 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-node.ts index c5a6f211..a2a750bb 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {visitClassDeclaration} from "./visit-class-declaration.js"; import {visitClassExpression} from "./visit-class-expression.js"; import {visitFunctionDeclaration} from "./visit-function-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-type-alias-declaration.ts index 733a6a62..1f2f3f29 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-type-alias-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-variable-statement.ts b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-variable-statement.ts index 3f22fedd..cbbf7447 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-variable-statement.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-exports-transformer/visitor/visit-variable-statement.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackExportsTransformerVisitorOptions} from "../track-exports-transformer-visitor-options.js"; import {createExportSpecifierFromNameAndModifiers} from "../../../util/create-export-specifier-from-name-and-modifiers.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {traceIdentifiers} from "../../trace-identifiers/trace-identifiers.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer-visitor-options.ts index 7c371abf..d6bd38f0 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer-visitor-options.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; export interface ImportedSymbolBase { moduleSpecifier: string; diff --git a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer.ts b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer.ts index db993c48..6be054a1 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/track-imports-transformer.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; +import type {TS} from "../../../../../type/ts.js"; import {visitNode} from "./visitor/visit-node.js"; -import {ImportedSymbol, ImportedSymbolSet, TrackImportsOptions, TrackImportsTransformerVisitorOptions} from "./track-imports-transformer-visitor-options.js"; +import type {ImportedSymbol, ImportedSymbolSet, TrackImportsOptions, TrackImportsTransformerVisitorOptions} from "./track-imports-transformer-visitor-options.js"; export function trackImportsTransformer(options: TrackImportsOptions): ImportedSymbolSet { const {typescript} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-declaration.ts index 21ca1469..2216d3a1 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; import { getImportedSymbolFromImportClauseName, getImportedSymbolFromImportSpecifier, diff --git a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-type-node.ts b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-type-node.ts index c58d3f9c..8d41b0e0 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-type-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-import-type-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; export function visitImportTypeNode({node, typescript, markAsImported, continuation}: TrackImportsTransformerVisitorOptions): void { if (!typescript.isLiteralTypeNode(node.argument) || !typescript.isStringLiteralLike(node.argument.literal)) return; diff --git a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-module-declaration.ts b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-module-declaration.ts index 13dd753c..b1a608cf 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-module-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-module-declaration.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; export function visitModuleDeclaration({node, ...options}: TrackImportsTransformerVisitorOptions): void { if (node.body == null) return; diff --git a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-node.ts index b37607b2..adc35102 100644 --- a/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/track-imports-transformer/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TrackImportsTransformerVisitorOptions} from "../track-imports-transformer-visitor-options.js"; import {visitImportDeclaration} from "./visit-import-declaration.js"; import {visitImportTypeNode} from "./visit-import-type-node.js"; import {visitModuleDeclaration} from "./visit-module-declaration.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/transformer-base-options.ts b/src/service/transformer/declaration-bundler/transformers/transformer-base-options.ts index bac57643..97ce0d25 100644 --- a/src/service/transformer/declaration-bundler/transformers/transformer-base-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/transformer-base-options.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../type/ts.js"; -import { SupportedExtensions } from "../../../../util/get-supported-extensions/get-supported-extensions.js"; +import type {TS} from "../../../../type/ts.js"; +import type {SupportedExtensions} from "../../../../util/get-supported-extensions/get-supported-extensions.js"; export interface TransformerBaseOptions { sourceFile: TS.SourceFile; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker-visitor-options.ts index 61701f8e..9caeed15 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker-visitor-options.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; export interface TreeShakerVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker.ts index 3a961037..7c02e1fd 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/tree-shaker.ts @@ -1,5 +1,5 @@ -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; -import {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; import {isReferenced} from "../reference/is-referenced/is-referenced.js"; import {shouldDebugMetrics, shouldDebugSourceFile} from "../../../../../util/is-debug/should-debug.js"; import {logMetrics} from "../../../../../util/logging/log-metrics.js"; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-array-binding-pattern.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-array-binding-pattern.ts index 7df93f72..7ddfb360 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-array-binding-pattern.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-array-binding-pattern.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitArrayBindingPattern({node, continuation, factory}: TreeShakerVisitorOptions): TS.ArrayBindingPattern | undefined { const filteredArrayBindingElements: TS.ArrayBindingElement[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-binding-element.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-binding-element.ts index 8faa1aa5..62ad5471 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-binding-element.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-binding-element.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitBindingElement({node, continuation, factory}: TreeShakerVisitorOptions): TS.BindingElement | undefined { const nameContinuationResult = continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-declaration.ts index 68b14f18..0aa0d08c 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-declaration.ts @@ -1,6 +1,6 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassDeclaration({node, continuation, factory}: TreeShakerVisitorOptions): TS.ClassDeclaration | undefined { const nameContinuationResult = node.name == null ? undefined : continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-expression.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-expression.ts index 36ef2cdc..9810787b 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-class-expression.ts @@ -1,6 +1,6 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitClassExpression({node, continuation, factory}: TreeShakerVisitorOptions): TS.ClassExpression | undefined { const nameContinuationResult = node.name == null ? undefined : continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-enum-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-enum-declaration.ts index f5ece196..7eef5f82 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-enum-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-enum-declaration.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitEnumDeclaration({node, continuation, factory}: TreeShakerVisitorOptions): TS.EnumDeclaration | undefined { const nameContinuationResult = continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-assignment.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-assignment.ts index 1b9ac4a9..c9881c2d 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-assignment.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-assignment.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitExportAssignment({node}: TreeShakerVisitorOptions): TS.ExportAssignment | undefined { return node; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-declaration.ts index 260d9f85..389d1a66 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-export-declaration.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitExportDeclaration({node}: TreeShakerVisitorOptions): TS.ExportDeclaration | undefined { return node; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-declaration.ts index e929fd1b..81cda615 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-declaration.ts @@ -1,6 +1,6 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; -import { getModifierLikes } from "../../../util/node-util.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import {getModifierLikes} from "../../../util/node-util.js"; export function visitFunctionDeclaration({node, continuation, factory}: TreeShakerVisitorOptions): TS.FunctionDeclaration | undefined { const nameContinuationResult = node.name == null ? undefined : continuation(node.name); @@ -9,14 +9,5 @@ export function visitFunctionDeclaration({node, continuation, factory}: TreeShak } return node.name === nameContinuationResult ? node - : factory.updateFunctionDeclaration( - node, - getModifierLikes(node), - node.asteriskToken, - nameContinuationResult, - node.typeParameters, - node.parameters, - node.type, - node.body - ); + : factory.updateFunctionDeclaration(node, getModifierLikes(node), node.asteriskToken, nameContinuationResult, node.typeParameters, node.parameters, node.type, node.body); } diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-expression.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-expression.ts index 25bcba16..c54667dd 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-expression.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-function-expression.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitFunctionExpression({node, continuation, factory}: TreeShakerVisitorOptions): TS.FunctionExpression | undefined { const nameContinuationResult = node.name == null ? undefined : continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-identifier.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-identifier.ts index 06e8f3f8..5809a091 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-identifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-identifier.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitIdentifier({node, isReferenced}: TreeShakerVisitorOptions): TS.Identifier | undefined { if (node != null && isReferenced(node)) { diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-clause.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-clause.ts index 5ea4e0c8..d2349620 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-clause.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-clause.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitImportClause({node, continuation, factory}: TreeShakerVisitorOptions): TS.ImportClause | undefined { const namedBindingsContinuationResult = node.namedBindings == null ? undefined : continuation(node.namedBindings); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-declaration.ts index b087bec8..027d4e57 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-declaration.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitImportDeclaration({node, continuation, factory}: TreeShakerVisitorOptions): TS.ImportDeclaration | undefined { if (node.importClause == null) return undefined; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-equals-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-equals-declaration.ts index b7522d7f..ae971f46 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-equals-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-equals-declaration.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; export function visitImportEqualsDeclaration(options: TreeShakerVisitorOptions): TS.ImportEqualsDeclaration | undefined { diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-specifier.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-specifier.ts index 649ceb17..d2f9afc1 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-specifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-import-specifier.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitImportSpecifier({node, continuation, factory}: TreeShakerVisitorOptions): TS.ImportSpecifier | undefined { const nameContinuationResult = continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-interface-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-interface-declaration.ts index a04879e1..ab076dbd 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-interface-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-interface-declaration.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; import {preserveMeta} from "../../../util/clone-node-with-meta.js"; export function visitInterfaceDeclaration(options: TreeShakerVisitorOptions): TS.InterfaceDeclaration | undefined { @@ -10,9 +10,5 @@ export function visitInterfaceDeclaration(options: TreeShakerVisitorOptions): TS.NamedImports | undefined { const filteredSpecifiers: TS.ImportSpecifier[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-namespace-import.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-namespace-import.ts index ad5b95e7..8eaad67e 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-namespace-import.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-namespace-import.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitNamespaceImport({node, continuation, factory}: TreeShakerVisitorOptions): TS.NamespaceImport | undefined { const nameContinuationResult = continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-node.ts index babd5709..866d853a 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-node.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../../../type/ts.js"; +import type {TS} from "../../../../../../type/ts.js"; import {hasExportModifier} from "../../../util/modifier-util.js"; import {visitClassDeclaration} from "./visit-class-declaration.js"; import {visitClassExpression} from "./visit-class-expression.js"; @@ -23,7 +23,7 @@ import {visitArrayBindingPattern} from "./visit-array-binding-pattern.js"; import {visitObjectBindingPattern} from "./visit-object-binding-pattern.js"; import {visitBindingElement} from "./visit-binding-element.js"; import {visitIdentifier} from "./visit-identifier.js"; -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; export function visitNode(options: TreeShakerVisitorOptions): TS.Node | undefined { const {node, typescript} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-object-binding-pattern.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-object-binding-pattern.ts index a6066af7..b4748609 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-object-binding-pattern.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-object-binding-pattern.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitObjectBindingPattern({node, continuation, factory}: TreeShakerVisitorOptions): TS.ObjectBindingPattern | undefined { const filteredObjectBindingElements: TS.BindingElement[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-type-alias-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-type-alias-declaration.ts index 16c7cb3c..01373713 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-type-alias-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-type-alias-declaration.ts @@ -1,12 +1,10 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitTypeAliasDeclaration({node, continuation, factory}: TreeShakerVisitorOptions): TS.TypeAliasDeclaration | undefined { const nameContinuationResult = continuation(node.name); if (nameContinuationResult == null) { return undefined; } - return node.name === nameContinuationResult - ? node - : factory.updateTypeAliasDeclaration(node, node.modifiers, nameContinuationResult, node.typeParameters, node.type); + return node.name === nameContinuationResult ? node : factory.updateTypeAliasDeclaration(node, node.modifiers, nameContinuationResult, node.typeParameters, node.type); } diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration-list.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration-list.ts index ddd13cb3..8b012e54 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration-list.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration-list.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitVariableDeclarationList({node, continuation, factory}: TreeShakerVisitorOptions): TS.VariableDeclarationList | undefined { const filteredVariableDeclarations: TS.VariableDeclaration[] = []; diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration.ts index 16c5c5fd..3e5567de 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-declaration.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitVariableDeclaration({node, continuation, factory}: TreeShakerVisitorOptions): TS.VariableDeclaration | undefined { const nameContinuationResult = continuation(node.name); diff --git a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-statement.ts b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-statement.ts index 578a09b8..3006c55a 100644 --- a/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-statement.ts +++ b/src/service/transformer/declaration-bundler/transformers/tree-shaker/visitor/visit-variable-statement.ts @@ -1,5 +1,5 @@ -import {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; -import {TS} from "../../../../../../type/ts.js"; +import type {TreeShakerVisitorOptions} from "../tree-shaker-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; export function visitVariableStatement({node, continuation, factory}: TreeShakerVisitorOptions): TS.VariableStatement | undefined { const variableDeclarationListContinuationResult = continuation(node.declarationList); diff --git a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector-visitor-options.ts b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector-visitor-options.ts index 61ff1d3e..a5acf15c 100644 --- a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector-visitor-options.ts +++ b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector-visitor-options.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; -import {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; export interface TypeReferenceCollectorVisitorOptions extends SourceFileBundlerVisitorOptions { typescript: typeof TS; diff --git a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector.ts b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector.ts index 7ec81e35..6ca7c051 100644 --- a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector.ts +++ b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/type-reference-collector.ts @@ -1,8 +1,8 @@ -import {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; -import {TS} from "../../../../../type/ts.js"; -import {TypeReferenceCollectorVisitorOptions} from "./type-reference-collector-visitor-options.js"; +import type {SourceFileBundlerVisitorOptions} from "../source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../../type/ts.js"; +import type {TypeReferenceCollectorVisitorOptions} from "./type-reference-collector-visitor-options.js"; import {visitNode} from "./visitor/visit-node.js"; -import {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; +import type {TypeReference} from "../../util/get-type-reference-module-from-file-name.js"; export function typeReferenceCollector(options: SourceFileBundlerVisitorOptions): TS.SourceFile { const {typescript} = options; diff --git a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-identifier.ts b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-identifier.ts index b8fbe487..5c503851 100644 --- a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-identifier.ts +++ b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-identifier.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TypeReferenceCollectorVisitorOptions} from "../type-reference-collector-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TypeReferenceCollectorVisitorOptions} from "../type-reference-collector-visitor-options.js"; import {getTypeReferenceModuleFromNode} from "../../../util/get-type-reference-module-from-node.js"; export function visitIdentifier(options: TypeReferenceCollectorVisitorOptions): void { diff --git a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-node.ts b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-node.ts index eb6be0df..7e64d531 100644 --- a/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-node.ts +++ b/src/service/transformer/declaration-bundler/transformers/type-reference-collector/visitor/visit-node.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../../../type/ts.js"; -import {TypeReferenceCollectorVisitorOptions} from "../type-reference-collector-visitor-options.js"; +import type {TS} from "../../../../../../type/ts.js"; +import type {TypeReferenceCollectorVisitorOptions} from "../type-reference-collector-visitor-options.js"; import {visitIdentifier} from "./visit-identifier.js"; export function visitNode({node, ...options}: TypeReferenceCollectorVisitorOptions): void { diff --git a/src/service/transformer/declaration-bundler/util/add-binding-to-lexical-environment.ts b/src/service/transformer/declaration-bundler/util/add-binding-to-lexical-environment.ts index 62add640..d09b111b 100644 --- a/src/service/transformer/declaration-bundler/util/add-binding-to-lexical-environment.ts +++ b/src/service/transformer/declaration-bundler/util/add-binding-to-lexical-environment.ts @@ -1,4 +1,4 @@ -import {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; +import type {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; export function addBindingToLexicalEnvironment(lexicalEnvironment: LexicalEnvironment, originalSourceFileName: string, value: string, oldValue: string = value): void { lexicalEnvironment.bindings.set(oldValue, {originalSourceFileName, value}); diff --git a/src/service/transformer/declaration-bundler/util/apply-transformers.ts b/src/service/transformer/declaration-bundler/util/apply-transformers.ts index dba2a30f..f5611c7d 100644 --- a/src/service/transformer/declaration-bundler/util/apply-transformers.ts +++ b/src/service/transformer/declaration-bundler/util/apply-transformers.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; -import {DeclarationTransformer} from "../declaration-bundler-options.js"; +import type {TS} from "../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; +import type {DeclarationTransformer} from "../declaration-bundler-options.js"; export interface ApplyTransformersOptions { transformers: DeclarationTransformer[]; diff --git a/src/service/transformer/declaration-bundler/util/clone-lexical-environment.ts b/src/service/transformer/declaration-bundler/util/clone-lexical-environment.ts index fe070fcb..85b17cc2 100644 --- a/src/service/transformer/declaration-bundler/util/clone-lexical-environment.ts +++ b/src/service/transformer/declaration-bundler/util/clone-lexical-environment.ts @@ -1,4 +1,4 @@ -import {LexicalEnvironment, LexicalEnvironmentBinding} from "../transformers/deconflicter/deconflicter-options.js"; +import type {LexicalEnvironment, LexicalEnvironmentBinding} from "../transformers/deconflicter/deconflicter-options.js"; export function cloneLexicalEnvironment(lexicalEnvironment?: LexicalEnvironment | undefined, ...entries: [string, LexicalEnvironmentBinding][]): LexicalEnvironment { return { diff --git a/src/service/transformer/declaration-bundler/util/clone-node-with-meta.ts b/src/service/transformer/declaration-bundler/util/clone-node-with-meta.ts index 99237e8b..a856285d 100644 --- a/src/service/transformer/declaration-bundler/util/clone-node-with-meta.ts +++ b/src/service/transformer/declaration-bundler/util/clone-node-with-meta.ts @@ -1,8 +1,8 @@ -import {SourceFileBundlerVisitorOptions} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; -import {TS} from "../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; +import type {TS} from "../../../../type/ts.js"; import {cloneNode, preserveNode, setParentNodes} from "ts-clone-node"; import {getSymbolAtLocation} from "./get-symbol-at-location.js"; -import {SafeNode} from "../../../../type/safe-node.js"; +import type {SafeNode} from "../../../../type/safe-node.js"; export interface PreserveMetaOptions extends SourceFileBundlerVisitorOptions {} diff --git a/src/service/transformer/declaration-bundler/util/create-aliased-binding.ts b/src/service/transformer/declaration-bundler/util/create-aliased-binding.ts index 008231d0..1df9ed7e 100644 --- a/src/service/transformer/declaration-bundler/util/create-aliased-binding.ts +++ b/src/service/transformer/declaration-bundler/util/create-aliased-binding.ts @@ -1,10 +1,10 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; import {ensureHasDeclareModifier} from "./modifier-util.js"; import {getAliasedDeclarationFromSymbol, isSymbol} from "./get-aliased-declaration.js"; -import {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; +import type {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; import {generateUniqueBinding} from "./generate-unique-binding.js"; import {preserveParents} from "./clone-node-with-meta.js"; -import {TransformerBaseOptions} from "../transformers/transformer-base-options.js"; +import type {TransformerBaseOptions} from "../transformers/transformer-base-options.js"; import {markAsInternalAlias} from "./node-util.js"; export interface CreateAliasedBindingOptions extends TransformerBaseOptions { @@ -33,11 +33,7 @@ export function createAliasedBinding({ undefined, factory.createIdentifier(moduleBinding), factory.createModuleBlock([ - factory.createExportDeclaration( - undefined, - false, - factory.createNamedExports([factory.createExportSpecifier(false, undefined, factory.createIdentifier(propertyName))]) - ) + factory.createExportDeclaration(undefined, false, factory.createNamedExports([factory.createExportSpecifier(false, undefined, factory.createIdentifier(propertyName))])) ]) ); diff --git a/src/service/transformer/declaration-bundler/util/create-export-specifier-from-name-and-modifiers.ts b/src/service/transformer/declaration-bundler/util/create-export-specifier-from-name-and-modifiers.ts index 15ddc36a..38d07a50 100644 --- a/src/service/transformer/declaration-bundler/util/create-export-specifier-from-name-and-modifiers.ts +++ b/src/service/transformer/declaration-bundler/util/create-export-specifier-from-name-and-modifiers.ts @@ -1,7 +1,7 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; import {hasDefaultExportModifier} from "./modifier-util.js"; -import {ExportedSymbol} from "../transformers/track-exports-transformer/track-exports-transformer-visitor-options.js"; -import {ImportedSymbol} from "../transformers/track-imports-transformer/track-imports-transformer-visitor-options.js"; +import type {ExportedSymbol} from "../transformers/track-exports-transformer/track-exports-transformer-visitor-options.js"; +import type {ImportedSymbol} from "../transformers/track-imports-transformer/track-imports-transformer-visitor-options.js"; export interface CreateExportSpecifierFromNameAndModifiersOptions { isTypeOnly?: boolean; diff --git a/src/service/transformer/declaration-bundler/util/find-matching-imported-symbol.ts b/src/service/transformer/declaration-bundler/util/find-matching-imported-symbol.ts index 75ae4054..5a4837d9 100644 --- a/src/service/transformer/declaration-bundler/util/find-matching-imported-symbol.ts +++ b/src/service/transformer/declaration-bundler/util/find-matching-imported-symbol.ts @@ -1,4 +1,4 @@ -import {ImportedSymbol} from "../transformers/track-imports-transformer/track-imports-transformer-visitor-options.js"; +import type {ImportedSymbol} from "../transformers/track-imports-transformer/track-imports-transformer-visitor-options.js"; export interface FindMatchingImportedSymbolOptions { loose: boolean; diff --git a/src/service/transformer/declaration-bundler/util/generate-module-specifier.ts b/src/service/transformer/declaration-bundler/util/generate-module-specifier.ts index 1bf64853..76a5899b 100644 --- a/src/service/transformer/declaration-bundler/util/generate-module-specifier.ts +++ b/src/service/transformer/declaration-bundler/util/generate-module-specifier.ts @@ -1,8 +1,8 @@ import {ensureHasLeadingDotAndPosix, stripKnownExtension} from "../../../../util/path/path-util.js"; import {getChunkFilename} from "./get-chunk-filename.js"; -import {NormalizedChunk} from "../../../../util/chunk/normalize-chunk.js"; -import {SourceFileResolver} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; -import {CompilerHost} from "../../../compiler-host/compiler-host.js"; +import type {NormalizedChunk} from "../../../../util/chunk/normalize-chunk.js"; +import type {SourceFileResolver} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; +import type {CompilerHost} from "../../../compiler-host/compiler-host.js"; import {pickResolvedModule} from "../../../../util/pick-resolved-module.js"; import {similarity} from "../../../../util/similarity-util.js"; import path from "crosspath"; @@ -60,5 +60,5 @@ export function generateModuleSpecifier(options: GenerateModuleSpecifierOptions) } const relativePath = path.relative(path.dirname(chunk.paths.absolute), chunkForModuleSpecifier); - return ensureHasLeadingDotAndPosix(stripKnownExtension(relativePath), false); + return `${ensureHasLeadingDotAndPosix(stripKnownExtension(relativePath), false)}.js`; } diff --git a/src/service/transformer/declaration-bundler/util/generate-unique-binding.ts b/src/service/transformer/declaration-bundler/util/generate-unique-binding.ts index bf4cfd31..e9a5b549 100644 --- a/src/service/transformer/declaration-bundler/util/generate-unique-binding.ts +++ b/src/service/transformer/declaration-bundler/util/generate-unique-binding.ts @@ -1,4 +1,4 @@ -import {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; +import type {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; export const DECONFLICT_SUFFIX = "$"; const RESERVED_WORDS = new Set(["default"]); diff --git a/src/service/transformer/declaration-bundler/util/get-aliased-declaration.ts b/src/service/transformer/declaration-bundler/util/get-aliased-declaration.ts index f89ea3f8..87e168fc 100644 --- a/src/service/transformer/declaration-bundler/util/get-aliased-declaration.ts +++ b/src/service/transformer/declaration-bundler/util/get-aliased-declaration.ts @@ -1,6 +1,7 @@ -import {TS} from "../../../../type/ts.js"; -import {SourceFileBundlerVisitorOptions} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; -import {getSymbolAtLocation, GetSymbolAtLocationOptions} from "./get-symbol-at-location.js"; +import type {TS} from "../../../../type/ts.js"; +import type {SourceFileBundlerVisitorOptions} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; +import type { GetSymbolAtLocationOptions} from "./get-symbol-at-location.js"; +import {getSymbolAtLocation} from "./get-symbol-at-location.js"; import {getParentNode} from "./get-parent-node.js"; import {isSameChunk} from "./generate-module-specifier.js"; diff --git a/src/service/transformer/declaration-bundler/util/get-binding-from-lexical-environment.ts b/src/service/transformer/declaration-bundler/util/get-binding-from-lexical-environment.ts index 69417ce9..ec3a2904 100644 --- a/src/service/transformer/declaration-bundler/util/get-binding-from-lexical-environment.ts +++ b/src/service/transformer/declaration-bundler/util/get-binding-from-lexical-environment.ts @@ -1,4 +1,4 @@ -import {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; +import type {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; export function getBindingFromLexicalEnvironment(lexicalEnvironment: LexicalEnvironment, key: string): string | undefined { if (lexicalEnvironment.bindings.has(key)) { diff --git a/src/service/transformer/declaration-bundler/util/get-chunk-filename.ts b/src/service/transformer/declaration-bundler/util/get-chunk-filename.ts index e6044744..f882e9cf 100644 --- a/src/service/transformer/declaration-bundler/util/get-chunk-filename.ts +++ b/src/service/transformer/declaration-bundler/util/get-chunk-filename.ts @@ -1,4 +1,4 @@ -import {NormalizedChunk, PreNormalizedChunk} from "../../../../util/chunk/normalize-chunk.js"; +import type {NormalizedChunk, PreNormalizedChunk} from "../../../../util/chunk/normalize-chunk.js"; /** * Gets the chunk filename that matches the given filename. It may be the same. diff --git a/src/service/transformer/declaration-bundler/util/get-id-for-node.ts b/src/service/transformer/declaration-bundler/util/get-id-for-node.ts index 90f854f7..db46e236 100644 --- a/src/service/transformer/declaration-bundler/util/get-id-for-node.ts +++ b/src/service/transformer/declaration-bundler/util/get-id-for-node.ts @@ -1,10 +1,11 @@ -import {getSymbolAtLocation, GetSymbolAtLocationOptions} from "./get-symbol-at-location.js"; -import {TS} from "../../../../type/ts.js"; +import type { GetSymbolAtLocationOptions} from "./get-symbol-at-location.js"; +import {getSymbolAtLocation} from "./get-symbol-at-location.js"; +import type {TS} from "../../../../type/ts.js"; import {generateRandomHash, generateRandomIntegerHash} from "../../../../util/hash/generate-random-hash.js"; import {getOriginalNode} from "./get-original-node.js"; import {getParentNode} from "./get-parent-node.js"; import {getAliasedDeclaration} from "./get-aliased-declaration.js"; -import {SafeNode} from "../../../../type/safe-node.js"; +import type {SafeNode} from "../../../../type/safe-node.js"; /** * According to TypeScript, multiple namespace imports, identically named, from the same module may have different IDs, because they are all local bindings in their respective modules. diff --git a/src/service/transformer/declaration-bundler/util/get-merged-export-declarations-for-modules.ts b/src/service/transformer/declaration-bundler/util/get-merged-export-declarations-for-modules.ts index f6dddbf8..4a42bbf7 100644 --- a/src/service/transformer/declaration-bundler/util/get-merged-export-declarations-for-modules.ts +++ b/src/service/transformer/declaration-bundler/util/get-merged-export-declarations-for-modules.ts @@ -1,7 +1,7 @@ import {ensureHasLeadingDotAndPosix} from "../../../../util/path/path-util.js"; -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; import {preserveParents} from "./clone-node-with-meta.js"; -import {TransformerBaseOptions} from "../transformers/transformer-base-options.js"; +import type {TransformerBaseOptions} from "../transformers/transformer-base-options.js"; export type MergedExportDeclarationsMap = Map; export type ExportedAliasedBindingsForModuleMap = Map>; diff --git a/src/service/transformer/declaration-bundler/util/get-merged-import-declarations-for-modules.ts b/src/service/transformer/declaration-bundler/util/get-merged-import-declarations-for-modules.ts index 7c72b235..8b95dbfb 100644 --- a/src/service/transformer/declaration-bundler/util/get-merged-import-declarations-for-modules.ts +++ b/src/service/transformer/declaration-bundler/util/get-merged-import-declarations-for-modules.ts @@ -1,7 +1,7 @@ import {ensureHasLeadingDotAndPosix} from "../../../../util/path/path-util.js"; -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; import {preserveParents} from "./clone-node-with-meta.js"; -import {TransformerBaseOptions} from "../transformers/transformer-base-options.js"; +import type {TransformerBaseOptions} from "../transformers/transformer-base-options.js"; export type MergedImportDeclarationsMap = Map; diff --git a/src/service/transformer/declaration-bundler/util/get-node-placement-queue.ts b/src/service/transformer/declaration-bundler/util/get-node-placement-queue.ts index 411f6a0d..66f55306 100644 --- a/src/service/transformer/declaration-bundler/util/get-node-placement-queue.ts +++ b/src/service/transformer/declaration-bundler/util/get-node-placement-queue.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; import {isRootLevelNode} from "../transformers/module-merger/util/is-root-level-node.js"; export interface NodePlacementQueue { diff --git a/src/service/transformer/declaration-bundler/util/get-original-node.ts b/src/service/transformer/declaration-bundler/util/get-original-node.ts index ed831153..2870558b 100644 --- a/src/service/transformer/declaration-bundler/util/get-original-node.ts +++ b/src/service/transformer/declaration-bundler/util/get-original-node.ts @@ -1,5 +1,5 @@ -import {SafeNode} from "../../../../type/safe-node.js"; -import {TS} from "../../../../type/ts.js"; +import type {SafeNode} from "../../../../type/safe-node.js"; +import type {TS} from "../../../../type/ts.js"; export function getOriginalNode(node: T, typescript: typeof TS): T { if (node._original != null) { diff --git a/src/service/transformer/declaration-bundler/util/get-original-source-file.ts b/src/service/transformer/declaration-bundler/util/get-original-source-file.ts index 06a00fd0..efa71f73 100644 --- a/src/service/transformer/declaration-bundler/util/get-original-source-file.ts +++ b/src/service/transformer/declaration-bundler/util/get-original-source-file.ts @@ -1,5 +1,5 @@ -import {SafeNode} from "../../../../type/safe-node.js"; -import {TS} from "../../../../type/ts.js"; +import type {SafeNode} from "../../../../type/safe-node.js"; +import type {TS} from "../../../../type/ts.js"; import {getOriginalNode} from "./get-original-node.js"; export function getOriginalSourceFile(node: T, currentSourceFile: TS.SourceFile, typescript: typeof TS): TS.SourceFile { diff --git a/src/service/transformer/declaration-bundler/util/get-parent-node.ts b/src/service/transformer/declaration-bundler/util/get-parent-node.ts index ae73c4f2..130aa26b 100644 --- a/src/service/transformer/declaration-bundler/util/get-parent-node.ts +++ b/src/service/transformer/declaration-bundler/util/get-parent-node.ts @@ -1,4 +1,4 @@ -import {SafeNode} from "../../../../type/safe-node.js"; +import type {SafeNode} from "../../../../type/safe-node.js"; export function getParentNode(node: T): T["parent"] { if (node._parent != null) { diff --git a/src/service/transformer/declaration-bundler/util/get-symbol-at-location.ts b/src/service/transformer/declaration-bundler/util/get-symbol-at-location.ts index 76961cda..5c5c2f31 100644 --- a/src/service/transformer/declaration-bundler/util/get-symbol-at-location.ts +++ b/src/service/transformer/declaration-bundler/util/get-symbol-at-location.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; import {getSymbolFlagsForNode} from "./get-symbol-flags-for-node.js"; -import {SafeNode} from "../../../../type/safe-node.js"; +import type {SafeNode} from "../../../../type/safe-node.js"; import {getOriginalNode} from "./get-original-node.js"; export interface GetSymbolAtLocationOptions { diff --git a/src/service/transformer/declaration-bundler/util/get-symbol-flags-for-node.ts b/src/service/transformer/declaration-bundler/util/get-symbol-flags-for-node.ts index 628bf54e..b6c3d481 100644 --- a/src/service/transformer/declaration-bundler/util/get-symbol-flags-for-node.ts +++ b/src/service/transformer/declaration-bundler/util/get-symbol-flags-for-node.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; export function getSymbolFlagsForNode(node: TS.Node, typescript: typeof TS): TS.SymbolFlags { if (typescript.isClassLike(node)) { diff --git a/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-file-name.ts b/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-file-name.ts index 79d6137f..722a8c8b 100644 --- a/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-file-name.ts +++ b/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-file-name.ts @@ -1,5 +1,5 @@ import {typeModuleReferenceIsAllowed} from "./type-module-reference-is-allowed.js"; -import {CompilerHost} from "../../../compiler-host/compiler-host.js"; +import type {CompilerHost} from "../../../compiler-host/compiler-host.js"; import path from "crosspath"; export interface GetTypeReferenceModuleFromFileNameOptions { diff --git a/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-node.ts b/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-node.ts index 8f5f5555..6de0d13f 100644 --- a/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-node.ts +++ b/src/service/transformer/declaration-bundler/util/get-type-reference-module-from-node.ts @@ -1,6 +1,8 @@ -import {getAliasedDeclaration, GetAliasedDeclarationOptions} from "./get-aliased-declaration.js"; -import {getTypeReferenceModuleFromFileName, TypeReference} from "./get-type-reference-module-from-file-name.js"; -import {TS} from "../../../../type/ts.js"; +import type { GetAliasedDeclarationOptions} from "./get-aliased-declaration.js"; +import {getAliasedDeclaration} from "./get-aliased-declaration.js"; +import type { TypeReference} from "./get-type-reference-module-from-file-name.js"; +import {getTypeReferenceModuleFromFileName} from "./get-type-reference-module-from-file-name.js"; +import type {TS} from "../../../../type/ts.js"; export interface GetTypeReferenceModuleFromNodeOptions extends GetAliasedDeclarationOptions { node: TS.Identifier; diff --git a/src/service/transformer/declaration-bundler/util/is-identifier-free.ts b/src/service/transformer/declaration-bundler/util/is-identifier-free.ts index 72a1dcac..84ccb824 100644 --- a/src/service/transformer/declaration-bundler/util/is-identifier-free.ts +++ b/src/service/transformer/declaration-bundler/util/is-identifier-free.ts @@ -1,4 +1,4 @@ -import {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; +import type {LexicalEnvironment} from "../transformers/deconflicter/deconflicter-options.js"; export function isIdentifierFree(lexicalEnvironment: LexicalEnvironment, identifier: string, originalSourceFileName: string, isInternalAlias = false): boolean { // So long as the current lexical environment doesn't already define the provided identifier, diff --git a/src/service/transformer/declaration-bundler/util/is-statement.ts b/src/service/transformer/declaration-bundler/util/is-statement.ts index 1c80e4d4..287cfcfb 100644 --- a/src/service/transformer/declaration-bundler/util/is-statement.ts +++ b/src/service/transformer/declaration-bundler/util/is-statement.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; /** * Returns true if the given Node is a Statement diff --git a/src/service/transformer/declaration-bundler/util/is-symbol-identifier.ts b/src/service/transformer/declaration-bundler/util/is-symbol-identifier.ts index 8893721d..14b7b223 100644 --- a/src/service/transformer/declaration-bundler/util/is-symbol-identifier.ts +++ b/src/service/transformer/declaration-bundler/util/is-symbol-identifier.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; export function isSymbolIdentifier(node: TS.Node, typescript: typeof TS): node is TS.Identifier { return typescript.isIdentifier(node) && node.text.startsWith("[") && node.text.endsWith("]"); diff --git a/src/service/transformer/declaration-bundler/util/locate-exported-symbol.ts b/src/service/transformer/declaration-bundler/util/locate-exported-symbol.ts index dab79df0..6863c55b 100644 --- a/src/service/transformer/declaration-bundler/util/locate-exported-symbol.ts +++ b/src/service/transformer/declaration-bundler/util/locate-exported-symbol.ts @@ -1,6 +1,6 @@ -import {NamedExportedSymbol, NamespaceExportedSymbol, SourceFileToExportedSymbolSet} from "../transformers/track-exports-transformer/track-exports-transformer-visitor-options.js"; -import {CompilerHost} from "../../../compiler-host/compiler-host.js"; -import {SourceFileResolver} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; +import type {NamedExportedSymbol, NamespaceExportedSymbol, SourceFileToExportedSymbolSet} from "../transformers/track-exports-transformer/track-exports-transformer-visitor-options.js"; +import type {CompilerHost} from "../../../compiler-host/compiler-host.js"; +import type {SourceFileResolver} from "../transformers/source-file-bundler/source-file-bundler-visitor-options.js"; export interface LocateExportedSymbolContext { host: CompilerHost; diff --git a/src/service/transformer/declaration-bundler/util/modifier-util.ts b/src/service/transformer/declaration-bundler/util/modifier-util.ts index 60c68fc1..12f2f1c5 100644 --- a/src/service/transformer/declaration-bundler/util/modifier-util.ts +++ b/src/service/transformer/declaration-bundler/util/modifier-util.ts @@ -1,5 +1,5 @@ -import {TS} from "../../../../type/ts.js"; -import { canHaveModifiers, getModifiers } from "./node-util.js"; +import type {TS} from "../../../../type/ts.js"; +import {canHaveModifiers, getModifiers} from "./node-util.js"; export type Modifiers = TS.ModifiersArray | TS.Modifier[] | readonly TS.Modifier[] | readonly TS.ModifierLike[]; diff --git a/src/service/transformer/declaration-bundler/util/node-arrays-are-equal.ts b/src/service/transformer/declaration-bundler/util/node-arrays-are-equal.ts index 44ef2ca2..39fe72b4 100644 --- a/src/service/transformer/declaration-bundler/util/node-arrays-are-equal.ts +++ b/src/service/transformer/declaration-bundler/util/node-arrays-are-equal.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; export function nodeArraysAreEqual(a: TS.NodeArray | TS.Node[] | undefined, b: TS.NodeArray | TS.Node[] | undefined): boolean { if (a == null && b == null) return true; diff --git a/src/service/transformer/declaration-bundler/util/node-contains-child.ts b/src/service/transformer/declaration-bundler/util/node-contains-child.ts index 031dd4ba..978aa6a0 100644 --- a/src/service/transformer/declaration-bundler/util/node-contains-child.ts +++ b/src/service/transformer/declaration-bundler/util/node-contains-child.ts @@ -1,4 +1,4 @@ -import {TS} from "../../../../type/ts.js"; +import type {TS} from "../../../../type/ts.js"; import {getParentNode} from "./get-parent-node.js"; /** diff --git a/src/service/transformer/declaration-bundler/util/node-has-supported-extension.ts b/src/service/transformer/declaration-bundler/util/node-has-supported-extension.ts index efa0fc2f..bce880f4 100644 --- a/src/service/transformer/declaration-bundler/util/node-has-supported-extension.ts +++ b/src/service/transformer/declaration-bundler/util/node-has-supported-extension.ts @@ -1,7 +1,7 @@ import path from "crosspath"; -import {KnownExtension} from "../../../../constant/constant.js"; -import {TS} from "../../../../type/ts.js"; -import {SupportedExtensions} from "../../../../util/get-supported-extensions/get-supported-extensions.js"; +import type {KnownExtension} from "../../../../constant/constant.js"; +import type {TS} from "../../../../type/ts.js"; +import type {SupportedExtensions} from "../../../../util/get-supported-extensions/get-supported-extensions.js"; export function nodeHasSupportedExtension( node: T, @@ -11,5 +11,6 @@ export function nodeHasSupportedExtension(node: T, typescript: typeof TS): void { @@ -11,43 +11,42 @@ export function isNodeInternalAlias(node: T, typescript: type return getOriginalNode(node as SafeNode, typescript)._internalAlias === true; } -export function getModifierLikes (node: TS.Node): readonly TS.ModifierLike[] | undefined { - if ("decorators" in node && Array.isArray(node.decorators)) { - return [...node.decorators ?? [], ...(node.modifiers ?? [])]; - } else { - return node.modifiers; - } +export function getModifierLikes(node: TS.Node): readonly TS.ModifierLike[] | undefined { + if ("decorators" in node && Array.isArray(node.decorators)) { + return [...(node.decorators ?? []), ...(node.modifiers ?? [])]; + } else { + return node.modifiers; + } } export function canHaveModifiers(node: TS.Node, typescript: typeof TS): node is TS.HasModifiers { - if ("canHaveModifiers" in typescript) { - return typescript.canHaveModifiers(node); - } else { - return true; - } + if ("canHaveModifiers" in typescript) { + return typescript.canHaveModifiers(node); + } else { + return true; + } } export function getModifiers(node: TS.HasModifiers, typescript: typeof TS): readonly TS.Modifier[] | undefined { - if ("getModifiers" in typescript) { - return typescript.getModifiers(node); - } else { - return node.modifiers?.filter(modifier => !("expression" in modifier)) as readonly TS.Modifier[] | undefined; - } + if ("getModifiers" in typescript) { + return typescript.getModifiers(node); + } else { + return node.modifiers?.filter(modifier => !("expression" in modifier)) as readonly TS.Modifier[] | undefined; + } } export function canHaveDecorators(node: TS.Node, typescript: typeof TS): node is TS.HasDecorators { - if ("canHaveDecorators" in typescript) { - return typescript.canHaveDecorators(node); - } else { - return true; - } + if ("canHaveDecorators" in typescript) { + return typescript.canHaveDecorators(node); + } else { + return true; + } } export function getDecorators(node: TS.HasDecorators, typescript: typeof TS): readonly TS.Decorator[] | undefined { - if ("getDecorators" in typescript) { - return typescript.getDecorators(node); - } else { - - const legacyDecorators = "decorators" in node && Array.isArray(node.decorators) ? node.decorators : undefined; - const decoratorModifierLikes = node.modifiers?.filter(modifier => ("expression" in modifier)) as readonly TS.Decorator[] | undefined; - return [...(legacyDecorators ?? []), ...(decoratorModifierLikes ?? [])]; - } -} \ No newline at end of file + if ("getDecorators" in typescript) { + return typescript.getDecorators(node); + } else { + const legacyDecorators = "decorators" in node && Array.isArray(node.decorators) ? node.decorators : undefined; + const decoratorModifierLikes = node.modifiers?.filter(modifier => "expression" in modifier) as readonly TS.Decorator[] | undefined; + return [...(legacyDecorators ?? []), ...(decoratorModifierLikes ?? [])]; + } +} diff --git a/src/service/transformer/declaration-bundler/util/type-module-reference-is-allowed.ts b/src/service/transformer/declaration-bundler/util/type-module-reference-is-allowed.ts index 91c40d52..83e321cf 100644 --- a/src/service/transformer/declaration-bundler/util/type-module-reference-is-allowed.ts +++ b/src/service/transformer/declaration-bundler/util/type-module-reference-is-allowed.ts @@ -1,4 +1,4 @@ -import {CompilerHost} from "../../../compiler-host/compiler-host.js"; +import type {CompilerHost} from "../../../compiler-host/compiler-host.js"; export interface TypeModuleReferenceIsAllowedOptions { host: CompilerHost; diff --git a/src/service/transformer/ensure-module/ensure-module-transformer.ts b/src/service/transformer/ensure-module/ensure-module-transformer.ts index c03f63c0..a18c2806 100644 --- a/src/service/transformer/ensure-module/ensure-module-transformer.ts +++ b/src/service/transformer/ensure-module/ensure-module-transformer.ts @@ -1,6 +1,6 @@ -import {TS} from "../../../type/ts.js"; -import {TransformerBaseOptions} from "../declaration-bundler/transformers/transformer-base-options.js"; -import { nodeHasSupportedExtension } from "../declaration-bundler/util/node-has-supported-extension.js"; +import type {TS} from "../../../type/ts.js"; +import type {TransformerBaseOptions} from "../declaration-bundler/transformers/transformer-base-options.js"; +import {nodeHasSupportedExtension} from "../declaration-bundler/util/node-has-supported-extension.js"; export function ensureModuleTransformer({typescript, factory, sourceFile, extensions}: TransformerBaseOptions): TS.SourceFile { // Only consider import declarations from modules with supported filenames diff --git a/src/transpiler/babel.ts b/src/transpiler/babel.ts index 1ef3982b..18f7c265 100644 --- a/src/transpiler/babel.ts +++ b/src/transpiler/babel.ts @@ -1,4 +1,4 @@ -import {ConfigItem, PluginObj, TransformOptions} from "@babel/core"; +import type {ConfigItem, PluginObj, TransformOptions} from "@babel/core"; import { BABEL_MINIFICATION_BLACKLIST_PLUGIN_NAMES, BABEL_MINIFICATION_BLACKLIST_PRESET_NAMES, @@ -14,8 +14,8 @@ import { BABEL_IMPORT_RUNTIME_HELPER_CJS_REGEXP_3, BABEL_IMPORT_RUNTIME_HELPER_CJS_REGEXP_4 } from "../constant/constant.js"; -import {BabelConfigHook, TranspilationPhase, TranspilerOptions, TypescriptPluginOptions} from "../plugin/typescript-plugin-options.js"; -import {Babel, BabelConfig} from "../type/babel.js"; +import type {BabelConfigHook, TranspilationPhase, TranspilerOptions, TypescriptPluginOptions} from "../plugin/typescript-plugin-options.js"; +import type {Babel, BabelConfig} from "../type/babel.js"; import {isDefined} from "../util/is-defined/is-defined.js"; import { isBabelPluginTransformRuntime, @@ -26,7 +26,7 @@ import { resolveModule, somePathsAreRelated } from "../util/path/path-util.js"; -import {SourceMap} from "rollup"; +import type {SourceMap} from "rollup"; import MagicString from "magic-string"; import {matchAll} from "@wessberg/stringutil"; @@ -167,7 +167,6 @@ export type BabelConfigFactory = (filename: string, inTypescriptStep?: boolean) */ export function getBabelConfig({babel, babelConfig, cwd, forcedOptions = {}, defaultOptions = {}, browserslist, phase, hook}: GetBabelConfigOptions): BabelConfigFactory { return async (filename: string, inTypescriptStep = false) => { - // Load a partial Babel config based on the input options const partialConfig = await babel.loadPartialConfigAsync( // If babel options are provided directly @@ -401,6 +400,7 @@ export function replaceBabelHelpers(code: string, filename: string, target: "cjs ]; if (matches.length < 1) return undefined; + const magicString = new MagicString(code, {filename, indentExclusionRanges: []}); for (const match of matches) { const start = match.index + match[1].length; diff --git a/src/transpiler/swc.ts b/src/transpiler/swc.ts index ddfde154..e7b900fd 100644 --- a/src/transpiler/swc.ts +++ b/src/transpiler/swc.ts @@ -1,10 +1,10 @@ -import {Options} from "@swc/core"; +import type {Options} from "@swc/core"; import path from "crosspath"; -import {MaybeArray} from "helpertypes"; +import type {MaybeArray} from "helpertypes"; import {FORCED_SWC_JSC_OPTIONS, FORCED_SWC_MODULE_OPTIONS} from "../constant/constant.js"; -import {SwcConfigHook, TranspilationPhase, TypescriptPluginOptions} from "../plugin/typescript-plugin-options.js"; -import {SwcConfig} from "../type/swc.js"; -import {TS} from "../type/ts.js"; +import type {SwcConfigHook, TranspilationPhase, TypescriptPluginOptions} from "../plugin/typescript-plugin-options.js"; +import type {SwcConfig} from "../type/swc.js"; +import type {TS} from "../type/ts.js"; import {ensureArray} from "../util/ensure-array/ensure-array.js"; import {getEcmaVersionForScriptTarget} from "../util/get-script-target-from-browserslist/get-script-target-from-browserslist.js"; import {removeSearchPathFromFilename} from "../util/path/path-util.js"; diff --git a/src/type/safe-node.ts b/src/type/safe-node.ts index 7209457b..bf3654ed 100644 --- a/src/type/safe-node.ts +++ b/src/type/safe-node.ts @@ -1,4 +1,4 @@ -import {TS} from "./ts.js"; +import type {TS} from "./ts.js"; export interface SafeNode extends TS.Node { // eslint-disable-next-line @typescript-eslint/naming-convention diff --git a/src/util/chunk/merge-chunks-with-ambient-dependencies.ts b/src/util/chunk/merge-chunks-with-ambient-dependencies.ts index 48969140..43d9d776 100644 --- a/src/util/chunk/merge-chunks-with-ambient-dependencies.ts +++ b/src/util/chunk/merge-chunks-with-ambient-dependencies.ts @@ -1,10 +1,10 @@ -import {ExternalOption, ModuleFormat, PreRenderedChunk} from "rollup"; -import {PreNormalizedChunk} from "./normalize-chunk.js"; +import type {ExternalOption, ModuleFormat, PreRenderedChunk} from "rollup"; +import type {PreNormalizedChunk} from "./normalize-chunk.js"; import {getChunkForModule} from "../../service/transformer/declaration-bundler/util/get-chunk-filename.js"; import {isExternal, stripKnownExtension} from "../path/path-util.js"; import {generateRandomHash} from "../hash/generate-random-hash.js"; -import {SourceFileToDependenciesMap} from "../../service/transformer/declaration-bundler/declaration-bundler-options.js"; -import {CompilerHost} from "../../service/compiler-host/compiler-host.js"; +import type {SourceFileToDependenciesMap} from "../../service/transformer/declaration-bundler/declaration-bundler-options.js"; +import type {CompilerHost} from "../../service/compiler-host/compiler-host.js"; import {pickResolvedModule} from "../pick-resolved-module.js"; import path from "crosspath"; diff --git a/src/util/chunk/normalize-chunk.ts b/src/util/chunk/normalize-chunk.ts index 73a0b98a..251dd12a 100644 --- a/src/util/chunk/normalize-chunk.ts +++ b/src/util/chunk/normalize-chunk.ts @@ -1,10 +1,11 @@ -import {OutputChunk, OutputOptions} from "rollup"; +import type {OutputChunk, OutputOptions} from "rollup"; import {getOutDir} from "../get-out-dir/get-out-dir.js"; -import {PathsResult, preparePaths} from "../../service/transformer/declaration-bundler/util/prepare-paths/prepare-paths.js"; -import {CompilerHost} from "../../service/compiler-host/compiler-host.js"; +import type {PathsResult} from "../../service/transformer/declaration-bundler/util/prepare-paths/prepare-paths.js"; +import { preparePaths} from "../../service/transformer/declaration-bundler/util/prepare-paths/prepare-paths.js"; +import type {CompilerHost} from "../../service/compiler-host/compiler-host.js"; import {ROLLUP_PLUGIN_MULTI_ENTRY_LEGACY} from "../../constant/constant.js"; import path from "crosspath"; -import { removeSearchPathFromFilename } from "../path/path-util.js"; +import {removeSearchPathFromFilename} from "../path/path-util.js"; export interface PreNormalizedChunk { fileName: string; diff --git a/src/util/file-system/file-system.ts b/src/util/file-system/file-system.ts index ce0fd655..e20f705c 100644 --- a/src/util/file-system/file-system.ts +++ b/src/util/file-system/file-system.ts @@ -1,4 +1,4 @@ -import fsModule from "fs"; +import type fsModule from "fs"; export type ReadonlyFileSystem = Pick; export type FileSystem = ReadonlyFileSystem & Pick; diff --git a/src/util/finalize-parsed-command-line/finalize-parsed-command-line.ts b/src/util/finalize-parsed-command-line/finalize-parsed-command-line.ts index bff61508..c618d4b5 100644 --- a/src/util/finalize-parsed-command-line/finalize-parsed-command-line.ts +++ b/src/util/finalize-parsed-command-line/finalize-parsed-command-line.ts @@ -1,7 +1,7 @@ -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; import {ensureAbsolute, setExtension} from "../path/path-util.js"; import {TSBUILDINFO_EXTENSION} from "../../constant/constant.js"; -import {ParsedCommandLineResult} from "../get-parsed-command-line/parsed-command-line-result.js"; +import type {ParsedCommandLineResult} from "../get-parsed-command-line/parsed-command-line-result.js"; import path from "crosspath"; export interface FinalizeParsedCommandLineOptions { diff --git a/src/util/get-browserslist/get-browserslist-options.ts b/src/util/get-browserslist/get-browserslist-options.ts index a0d145e1..f51ff468 100644 --- a/src/util/get-browserslist/get-browserslist-options.ts +++ b/src/util/get-browserslist/get-browserslist-options.ts @@ -1,5 +1,5 @@ -import {TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; -import {TS} from "../../type/ts.js"; +import type {TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; +import type {TS} from "../../type/ts.js"; export interface GetBrowserslistOptions { cwd: string; diff --git a/src/util/get-browserslist/get-browserslist.ts b/src/util/get-browserslist/get-browserslist.ts index 1a2435fe..8f5259d0 100644 --- a/src/util/get-browserslist/get-browserslist.ts +++ b/src/util/get-browserslist/get-browserslist.ts @@ -1,8 +1,8 @@ -import {GetBrowserslistOptions} from "./get-browserslist-options.js"; +import type {GetBrowserslistOptions} from "./get-browserslist-options.js"; import {normalizeBrowserslist} from "browserslist-generator"; import {ensureAbsolute} from "../path/path-util.js"; import browserslistModule from "browserslist"; -import {BrowserslistPathConfig, BrowserslistQueryConfig} from "../../plugin/typescript-plugin-options.js"; +import type {BrowserslistPathConfig, BrowserslistQueryConfig} from "../../plugin/typescript-plugin-options.js"; import {ensureArray} from "../ensure-array/ensure-array.js"; import path from "crosspath"; diff --git a/src/util/get-declaration-out-dir/get-declaration-out-dir.ts b/src/util/get-declaration-out-dir/get-declaration-out-dir.ts index bfdd67c8..79802a94 100644 --- a/src/util/get-declaration-out-dir/get-declaration-out-dir.ts +++ b/src/util/get-declaration-out-dir/get-declaration-out-dir.ts @@ -1,9 +1,10 @@ -import {OutputOptions} from "rollup"; +import type {OutputOptions} from "rollup"; import {ensureRelative} from "../path/path-util.js"; import {getOutDir} from "../get-out-dir/get-out-dir.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; +import type { + AmbientExtension} from "../../constant/constant.js"; import { - AmbientExtension, CJSX_EXTENSION, CJS_EXTENSION, CTSX_EXTENSION, @@ -20,8 +21,8 @@ import { MTS_EXTENSION } from "../../constant/constant.js"; import path from "crosspath"; -import {NormalizedChunk} from "../chunk/normalize-chunk.js"; -import {SupportedExtensions} from "../get-supported-extensions/get-supported-extensions.js"; +import type {NormalizedChunk} from "../chunk/normalize-chunk.js"; +import type {SupportedExtensions} from "../get-supported-extensions/get-supported-extensions.js"; /** * Gets the destination directory to use for declarations based on the given CompilerOptions and Rollup output options diff --git a/src/util/get-forced-compiler-options/get-forced-compiler-options-options.ts b/src/util/get-forced-compiler-options/get-forced-compiler-options-options.ts index ef500703..e80d96ca 100644 --- a/src/util/get-forced-compiler-options/get-forced-compiler-options-options.ts +++ b/src/util/get-forced-compiler-options/get-forced-compiler-options-options.ts @@ -1,5 +1,5 @@ -import {InputOptions} from "rollup"; -import {TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; +import type {InputOptions} from "rollup"; +import type {TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; export interface GetForcedCompilerOptionsOptions { pluginOptions: TypescriptPluginOptions; diff --git a/src/util/get-forced-compiler-options/get-forced-compiler-options.ts b/src/util/get-forced-compiler-options/get-forced-compiler-options.ts index a16465f0..c398bf37 100644 --- a/src/util/get-forced-compiler-options/get-forced-compiler-options.ts +++ b/src/util/get-forced-compiler-options/get-forced-compiler-options.ts @@ -1,8 +1,8 @@ -import {GetForcedCompilerOptionsOptions} from "./get-forced-compiler-options-options.js"; +import type {GetForcedCompilerOptionsOptions} from "./get-forced-compiler-options-options.js"; import {getScriptTargetFromBrowserslist} from "../get-script-target-from-browserslist/get-script-target-from-browserslist.js"; import {getOutDir} from "../get-out-dir/get-out-dir.js"; -import {TS} from "../../type/ts.js"; -import { getTranspilerOptions, isUsingTranspiler } from "../plugin-options/get-plugin-options.js"; +import type {TS} from "../../type/ts.js"; +import {getTranspilerOptions, isUsingTranspiler} from "../plugin-options/get-plugin-options.js"; /** * Gets the ModuleKind to force @@ -35,7 +35,7 @@ function getForcedScriptTargetOption({pluginOptions, browserslist}: GetForcedCom /** * Decide whether or not to force import helpers */ - function getForcedImportHelpersOption({pluginOptions}: GetForcedCompilerOptionsOptions): {importHelpers?: boolean} { +function getForcedImportHelpersOption({pluginOptions}: GetForcedCompilerOptionsOptions): {importHelpers?: boolean} { // If TypeScript is being used, which uses tslib, helpers should *always* be imported. // We don't want them to be duplicated multiple times within generated chunks. // When other transpilers are being used in some shape of form, they'll have similar enforced options diff --git a/src/util/get-module-dependencies/get-module-dependencies.ts b/src/util/get-module-dependencies/get-module-dependencies.ts index 410bf720..1f2b2240 100644 --- a/src/util/get-module-dependencies/get-module-dependencies.ts +++ b/src/util/get-module-dependencies/get-module-dependencies.ts @@ -1,5 +1,5 @@ -import {CompilerHost} from "../../service/compiler-host/compiler-host.js"; -import {ExtendedResolvedModule} from "../../service/cache/resolve-cache/extended-resolved-module.js"; +import type {CompilerHost} from "../../service/compiler-host/compiler-host.js"; +import type {ExtendedResolvedModule} from "../../service/cache/resolve-cache/extended-resolved-module.js"; import {getExtension} from "../path/path-util.js"; import {D_TS_EXTENSION} from "../../constant/constant.js"; import {trackDependenciesTransformer} from "../../service/transformer/declaration-bundler/transformers/track-dependencies-transformer/track-dependencies-transformer.js"; diff --git a/src/util/get-module-kind-from-rollup-format/get-module-kind-from-rollup-format.ts b/src/util/get-module-kind-from-rollup-format/get-module-kind-from-rollup-format.ts index 576a9e18..ad83a2f4 100644 --- a/src/util/get-module-kind-from-rollup-format/get-module-kind-from-rollup-format.ts +++ b/src/util/get-module-kind-from-rollup-format/get-module-kind-from-rollup-format.ts @@ -1,5 +1,5 @@ -import {ModuleFormat} from "rollup"; -import {TS} from "../../type/ts.js"; +import type {ModuleFormat} from "rollup"; +import type {TS} from "../../type/ts.js"; /** * Gets a proper ModuleKind for Typescript based on the format given from the Rollup options diff --git a/src/util/get-new-line-character/get-new-line-character.ts b/src/util/get-new-line-character/get-new-line-character.ts index ea6c7f15..2cd275e0 100644 --- a/src/util/get-new-line-character/get-new-line-character.ts +++ b/src/util/get-new-line-character/get-new-line-character.ts @@ -1,4 +1,4 @@ -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Gets the NewLineCharacter to use for a NewLineKind diff --git a/src/util/get-out-dir/get-out-dir.ts b/src/util/get-out-dir/get-out-dir.ts index 0228bd10..4ebe02f6 100644 --- a/src/util/get-out-dir/get-out-dir.ts +++ b/src/util/get-out-dir/get-out-dir.ts @@ -1,4 +1,4 @@ -import {OutputOptions} from "rollup"; +import type {OutputOptions} from "rollup"; import {ensureRelative} from "../path/path-util.js"; import path from "crosspath"; import {generateRandomHash} from "../hash/generate-random-hash.js"; diff --git a/src/util/get-parsed-command-line/get-parsed-command-line.ts b/src/util/get-parsed-command-line/get-parsed-command-line.ts index 5b2e3c94..cedf1642 100644 --- a/src/util/get-parsed-command-line/get-parsed-command-line.ts +++ b/src/util/get-parsed-command-line/get-parsed-command-line.ts @@ -1,8 +1,8 @@ import {ensureAbsolute} from "../path/path-util.js"; import {D_TS_EXTENSION, DEFAULT_TSCONFIG_FILE_NAME} from "../../constant/constant.js"; -import {ParsedCommandLineResult} from "./parsed-command-line-result.js"; -import {InputCompilerOptions, TsConfigResolver, TsConfigResolverWithFileName, TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; -import {TS} from "../../type/ts.js"; +import type {ParsedCommandLineResult} from "./parsed-command-line-result.js"; +import type {InputCompilerOptions, TsConfigResolver, TsConfigResolverWithFileName, TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; +import type {TS} from "../../type/ts.js"; import {finalizeParsedCommandLine} from "../finalize-parsed-command-line/finalize-parsed-command-line.js"; import {shouldDebugTsconfig} from "../is-debug/should-debug.js"; import {logTsconfig} from "../logging/log-tsconfig.js"; diff --git a/src/util/get-parsed-command-line/parsed-command-line-result.ts b/src/util/get-parsed-command-line/parsed-command-line-result.ts index ee2a83cc..bc0cc320 100644 --- a/src/util/get-parsed-command-line/parsed-command-line-result.ts +++ b/src/util/get-parsed-command-line/parsed-command-line-result.ts @@ -1,4 +1,4 @@ -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; export interface ParsedCommandLineResult { parsedCommandLine: TS.ParsedCommandLine; diff --git a/src/util/get-script-kind-from-path/get-script-kind-from-path.ts b/src/util/get-script-kind-from-path/get-script-kind-from-path.ts index 373f75cb..50ff9746 100644 --- a/src/util/get-script-kind-from-path/get-script-kind-from-path.ts +++ b/src/util/get-script-kind-from-path/get-script-kind-from-path.ts @@ -1,5 +1,5 @@ import {JS_EXTENSION, JSON_EXTENSION, JSX_EXTENSION, TS_EXTENSION, TSX_EXTENSION} from "../../constant/constant.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Gets a ScriptKind from the given path diff --git a/src/util/get-script-target-from-browserslist/get-script-target-from-browserslist.ts b/src/util/get-script-target-from-browserslist/get-script-target-from-browserslist.ts index 8fece781..a4cc58b2 100644 --- a/src/util/get-script-target-from-browserslist/get-script-target-from-browserslist.ts +++ b/src/util/get-script-target-from-browserslist/get-script-target-from-browserslist.ts @@ -1,5 +1,5 @@ import {getAppropriateEcmaVersionForBrowserslist} from "browserslist-generator"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Gets the ScriptTarget to use from the given Browserslist diff --git a/src/util/get-source-description-from-emit-output/get-source-description-from-emit-output.ts b/src/util/get-source-description-from-emit-output/get-source-description-from-emit-output.ts index 601c1872..0fd73542 100644 --- a/src/util/get-source-description-from-emit-output/get-source-description-from-emit-output.ts +++ b/src/util/get-source-description-from-emit-output/get-source-description-from-emit-output.ts @@ -1,8 +1,8 @@ -import {SourceDescription} from "rollup"; +import type {SourceDescription} from "rollup"; import {SOURCE_MAP_COMMENT} from "../../constant/constant.js"; import {isCodeOutputFile} from "../is-code-output-file/is-code-output-file.js"; import {isMapOutputFile} from "../is-map-output-file/is-map-output-file.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Gets a SourceDescription from the given EmitOutput diff --git a/src/util/get-supported-extensions/get-supported-extensions.ts b/src/util/get-supported-extensions/get-supported-extensions.ts index 047739e5..87fe6bbc 100644 --- a/src/util/get-supported-extensions/get-supported-extensions.ts +++ b/src/util/get-supported-extensions/get-supported-extensions.ts @@ -1,3 +1,6 @@ +import type { + KnownExtension, + AmbientExtension} from "../../constant/constant.js"; import { D_TS_EXTENSION, JS_EXTENSION, @@ -11,14 +14,12 @@ import { MJSX_EXTENSION, CJS_EXTENSION, CJSX_EXTENSION, - KnownExtension, - AmbientExtension, MTS_EXTENSION, CTS_EXTENSION, MTSX_EXTENSION, CTSX_EXTENSION } from "../../constant/constant.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; export type SupportedExtensions = Set; export type SupportedAmbientExtensions = Set; @@ -40,9 +41,15 @@ export function getSupportedExtensions(allowJs: boolean, allowJson: boolean, typ D_TS_EXTENSION, D_CTS_EXTENSION, D_MTS_EXTENSION, - ...(allowJs ? [JS_EXTENSION, JSX_EXTENSION, MJS_EXTENSION, MJSX_EXTENSION, CJS_EXTENSION, CJSX_EXTENSION] as const : []), - ...(allowJson ? [JSON_EXTENSION] as const : []) + ...(allowJs ? ([JS_EXTENSION, JSX_EXTENSION, MJS_EXTENSION, MJSX_EXTENSION, CJS_EXTENSION, CJSX_EXTENSION] as const) : []), + ...(allowJson ? ([JSON_EXTENSION] as const) : []) ] as const); } - return new Set([TS_EXTENSION, TSX_EXTENSION, D_TS_EXTENSION, ...(allowJs ? [JS_EXTENSION, JSX_EXTENSION] as const : []), ...(allowJson ? [JSON_EXTENSION] as const : [])] as const); + return new Set([ + TS_EXTENSION, + TSX_EXTENSION, + D_TS_EXTENSION, + ...(allowJs ? ([JS_EXTENSION, JSX_EXTENSION] as const) : []), + ...(allowJson ? ([JSON_EXTENSION] as const) : []) + ] as const); } diff --git a/src/util/is-build-info-output-file/is-build-info-output-file.ts b/src/util/is-build-info-output-file/is-build-info-output-file.ts index c516035c..983b9071 100644 --- a/src/util/is-build-info-output-file/is-build-info-output-file.ts +++ b/src/util/is-build-info-output-file/is-build-info-output-file.ts @@ -1,6 +1,6 @@ import {TSBUILDINFO_EXTENSION} from "../../constant/constant.js"; import {getExtension} from "../path/path-util.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Returns true if the given OutputFile represents .tsbuildinfo diff --git a/src/util/is-code-output-file/is-code-output-file.ts b/src/util/is-code-output-file/is-code-output-file.ts index 90eff374..938bc30e 100644 --- a/src/util/is-code-output-file/is-code-output-file.ts +++ b/src/util/is-code-output-file/is-code-output-file.ts @@ -1,6 +1,6 @@ import {D_TS_EXTENSION, D_TS_MAP_EXTENSION, SOURCE_MAP_EXTENSION} from "../../constant/constant.js"; import {getExtension} from "../path/path-util.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Returns true if the given OutputFile represents code diff --git a/src/util/is-debug/should-debug.ts b/src/util/is-debug/should-debug.ts index e3a12c60..e54227db 100644 --- a/src/util/is-debug/should-debug.ts +++ b/src/util/is-debug/should-debug.ts @@ -1,5 +1,5 @@ -import {EmitPathKind, TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; -import {TS} from "../../type/ts.js"; +import type {EmitPathKind, TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; +import type {TS} from "../../type/ts.js"; export function shouldDebugSourceFile(debug: TypescriptPluginOptions["debug"], {fileName, text}: TS.SourceFile): boolean { if (typeof debug === "boolean") return debug; diff --git a/src/util/is-map-output-file/is-map-output-file.ts b/src/util/is-map-output-file/is-map-output-file.ts index 27cc61b7..1c2ba77d 100644 --- a/src/util/is-map-output-file/is-map-output-file.ts +++ b/src/util/is-map-output-file/is-map-output-file.ts @@ -1,6 +1,6 @@ import {D_TS_MAP_EXTENSION, SOURCE_MAP_EXTENSION} from "../../constant/constant.js"; import {getExtension} from "../path/path-util.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Returns true if the given OutputFile represents a SourceMap diff --git a/src/util/is-output-chunk/is-output-chunk.ts b/src/util/is-output-chunk/is-output-chunk.ts index 0c4e4d0c..8c3fff76 100644 --- a/src/util/is-output-chunk/is-output-chunk.ts +++ b/src/util/is-output-chunk/is-output-chunk.ts @@ -1,4 +1,4 @@ -import {OutputChunk, OutputAsset} from "rollup"; +import type {OutputChunk, OutputAsset} from "rollup"; /** * Returns true if the given asset is an OutputChunk @@ -10,6 +10,6 @@ export function isOutputChunk(thing: OutputChunk | OutputAsset): thing is Output /** * Returns true if the given asset is an OutputChunk */ - export function isOutputAssetOrOutputChunk(thing: OutputChunk | OutputAsset): thing is OutputChunk|OutputAsset { +export function isOutputAssetOrOutputChunk(thing: OutputChunk | OutputAsset): thing is OutputChunk | OutputAsset { return thing.type === "chunk" || thing.type === "asset"; } diff --git a/src/util/logging/log-transformer.ts b/src/util/logging/log-transformer.ts index a9524a8e..e53886b3 100644 --- a/src/util/logging/log-transformer.ts +++ b/src/util/logging/log-transformer.ts @@ -1,4 +1,4 @@ -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; import color from "ansi-colors"; import {getFormattedDateTimePrefix} from "./get-formatted-date-time-prefix.js"; diff --git a/src/util/logging/log-tsconfig.ts b/src/util/logging/log-tsconfig.ts index 7dd109b7..a68307d9 100644 --- a/src/util/logging/log-tsconfig.ts +++ b/src/util/logging/log-tsconfig.ts @@ -1,6 +1,6 @@ import color from "ansi-colors"; import {getFormattedDateTimePrefix} from "./get-formatted-date-time-prefix.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; import {inspect} from "../inspect/inspect.js"; export function logTsconfig(config: TS.ParsedCommandLine): void { diff --git a/src/util/merge-transformers/custom-transformer-options.ts b/src/util/merge-transformers/custom-transformer-options.ts index 2c05bbe9..08241d65 100644 --- a/src/util/merge-transformers/custom-transformer-options.ts +++ b/src/util/merge-transformers/custom-transformer-options.ts @@ -1,5 +1,5 @@ -import {ExtendedDiagnostic} from "../../diagnostic/extended-diagnostic.js"; -import {TS} from "../../type/ts.js"; +import type {ExtendedDiagnostic} from "../../diagnostic/extended-diagnostic.js"; +import type {TS} from "../../type/ts.js"; export interface CustomTransformerOptions { program: TS.Program | undefined; diff --git a/src/util/merge-transformers/merge-transformers.ts b/src/util/merge-transformers/merge-transformers.ts index d8053e32..0ce4e280 100644 --- a/src/util/merge-transformers/merge-transformers.ts +++ b/src/util/merge-transformers/merge-transformers.ts @@ -1,5 +1,5 @@ -import {CustomTransformersFunction} from "./custom-transformer-options.js"; -import {TS} from "../../type/ts.js"; +import type {CustomTransformersFunction} from "./custom-transformer-options.js"; +import type {TS} from "../../type/ts.js"; import {isDefined} from "../is-defined/is-defined.js"; /** diff --git a/src/util/object/object-util.ts b/src/util/object/object-util.ts index c9b85a68..77ba87d6 100644 --- a/src/util/object/object-util.ts +++ b/src/util/object/object-util.ts @@ -1,4 +1,4 @@ -import {IgnoredLookupValue} from "helpertypes"; +import type {IgnoredLookupValue} from "helpertypes"; // eslint-disable-next-line @typescript-eslint/ban-types export function isRecord(value: T): value is Exclude & {} { @@ -14,13 +14,13 @@ export function isRecord(value: T): value is Exclude(value: unknown|Promise): value is Promise { +export function isPromise(value: unknown | Promise): value is Promise { return typeof value === "object" && value != null && "then" in value; } -export function isArray (value: unknown|readonly T[]): value is readonly T[]; -export function isArray (value: unknown|T[]): value is T[]; -export function isArray (value: unknown|T[]|readonly T[]): value is T[]|readonly T[]; -export function isArray (value: unknown|T[]|readonly T[]): value is T[]|readonly T[] { +export function isArray(value: unknown | readonly T[]): value is readonly T[]; +export function isArray(value: unknown | T[]): value is T[]; +export function isArray(value: unknown | T[] | readonly T[]): value is T[] | readonly T[]; +export function isArray(value: unknown | T[] | readonly T[]): value is T[] | readonly T[] { return Array.isArray(value); -} \ No newline at end of file +} diff --git a/src/util/os/os.ts b/src/util/os/os.ts index 27602e07..a220d1f3 100644 --- a/src/util/os/os.ts +++ b/src/util/os/os.ts @@ -1,3 +1,3 @@ -import osModule from "os"; +import type osModule from "os"; export type OS = Pick; diff --git a/src/util/path/path-util.ts b/src/util/path/path-util.ts index 9414a3ca..65ffde52 100644 --- a/src/util/path/path-util.ts +++ b/src/util/path/path-util.ts @@ -15,7 +15,7 @@ import { SWC_HELPERS_PREFIX, TSLIB_NAME } from "../../constant/constant.js"; -import {ExternalOption} from "rollup"; +import type {ExternalOption} from "rollup"; import {ensureArray} from "../ensure-array/ensure-array.js"; import {createRequire} from "module"; @@ -26,7 +26,7 @@ export function isTypeScriptLib(p: string): boolean { return p.startsWith(`lib.`) && p.endsWith(D_TS_EXTENSION); } -export function removeSearchPathFromFilename (p: string): string { +export function removeSearchPathFromFilename(p: string): string { if (p.includes(`?`)) { return p.slice(0, p.indexOf(`?`)); } @@ -102,7 +102,7 @@ export function isBabelPresetEnv(p: string): boolean { /** * Returns true if the given path represents @babel/preset-typescript */ - export function isBabelPresetTypescript(p: string): boolean { +export function isBabelPresetTypescript(p: string): boolean { return path.normalize(p).includes("@babel/preset-typescript"); } @@ -190,7 +190,7 @@ export function ensureHasLeadingDotAndPosix(p: string, externalGuard = true): st /** * Ensure that the given path has a leading "." */ - export function ensureHasNoLeadingDotAndPosix(p: string,): string { +export function ensureHasNoLeadingDotAndPosix(p: string): string { const posixPath = path.normalize(p); if (posixPath.startsWith("./")) return posixPath.slice(2); return posixPath; diff --git a/src/util/pick-resolved-module.ts b/src/util/pick-resolved-module.ts index 63eaa222..d35a5cfe 100644 --- a/src/util/pick-resolved-module.ts +++ b/src/util/pick-resolved-module.ts @@ -1,4 +1,4 @@ -import {ExtendedResolvedModule} from "../service/cache/resolve-cache/extended-resolved-module.js"; +import type {ExtendedResolvedModule} from "../service/cache/resolve-cache/extended-resolved-module.js"; export function pickResolvedModule(resolvedModule: ExtendedResolvedModule, preferAmbient: true): string; export function pickResolvedModule(resolvedModule: ExtendedResolvedModule, preferAmbient: false): string | undefined; diff --git a/src/util/plugin-options/get-plugin-options.ts b/src/util/plugin-options/get-plugin-options.ts index f38b93cb..b123ed78 100644 --- a/src/util/plugin-options/get-plugin-options.ts +++ b/src/util/plugin-options/get-plugin-options.ts @@ -1,5 +1,5 @@ import TSModule from "typescript"; -import {Transpiler, TranspilerOptions, TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; +import type {Transpiler, TranspilerOptions, TypescriptPluginOptions} from "../../plugin/typescript-plugin-options.js"; import {ensureAbsolute} from "../path/path-util.js"; import path from "crosspath"; @@ -43,7 +43,7 @@ export function getPluginOptions(options: Partial): Typ }; } -export function getTranspilerOptions (transpiler: TypescriptPluginOptions["transpiler"]): TranspilerOptions { +export function getTranspilerOptions(transpiler: TypescriptPluginOptions["transpiler"]): TranspilerOptions { if (typeof transpiler === "string") { return { typescriptSyntax: transpiler, @@ -53,6 +53,6 @@ export function getTranspilerOptions (transpiler: TypescriptPluginOptions["trans return transpiler; } -export function isUsingTranspiler (transpiler: Transpiler, options: TranspilerOptions): boolean { +export function isUsingTranspiler(transpiler: Transpiler, options: TranspilerOptions): boolean { return options.typescriptSyntax === transpiler || options.otherSyntax === transpiler; -} \ No newline at end of file +} diff --git a/src/util/predicates/predicates.ts b/src/util/predicates/predicates.ts index 72f5b4eb..129eb78c 100644 --- a/src/util/predicates/predicates.ts +++ b/src/util/predicates/predicates.ts @@ -1,4 +1,4 @@ -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * Returns true if the given Node is a TemplateLiteralTypeNode diff --git a/src/util/resolve-id/resolve-id.ts b/src/util/resolve-id/resolve-id.ts index b0e7735a..61d81999 100644 --- a/src/util/resolve-id/resolve-id.ts +++ b/src/util/resolve-id/resolve-id.ts @@ -1,5 +1,5 @@ -import {ResolveModuleOptions} from "./resolve-module-options.js"; -import {ExtendedResolvedModule} from "../../service/cache/resolve-cache/extended-resolved-module.js"; +import type {ResolveModuleOptions} from "./resolve-module-options.js"; +import type {ExtendedResolvedModule} from "../../service/cache/resolve-cache/extended-resolved-module.js"; /** * Resolves an id from the given parent diff --git a/src/util/resolve-id/resolve-module-options.ts b/src/util/resolve-id/resolve-module-options.ts index 450126ab..ed64901e 100644 --- a/src/util/resolve-id/resolve-module-options.ts +++ b/src/util/resolve-id/resolve-module-options.ts @@ -1,5 +1,5 @@ -import {GetResolvedIdWithCachingOptions} from "../../service/cache/resolve-cache/get-resolved-id-with-caching-options.js"; -import {ResolveCache} from "../../service/cache/resolve-cache/resolve-cache.js"; +import type {GetResolvedIdWithCachingOptions} from "../../service/cache/resolve-cache/get-resolved-id-with-caching-options.js"; +import type {ResolveCache} from "../../service/cache/resolve-cache/resolve-cache.js"; export interface ResolveModuleOptions extends GetResolvedIdWithCachingOptions { resolveCache: ResolveCache; diff --git a/src/util/rollup/rollup-util.ts b/src/util/rollup/rollup-util.ts index 8982fbae..b40f63a5 100644 --- a/src/util/rollup/rollup-util.ts +++ b/src/util/rollup/rollup-util.ts @@ -1,4 +1,4 @@ -import {InputOptions} from "rollup"; +import type {InputOptions} from "rollup"; interface EqualResult { equal: true; diff --git a/src/util/take-browserslist-or-compute-based-on-compiler-options/take-browserslist-or-compute-based-on-compiler-options.ts b/src/util/take-browserslist-or-compute-based-on-compiler-options/take-browserslist-or-compute-based-on-compiler-options.ts index 1658eb07..af109c02 100644 --- a/src/util/take-browserslist-or-compute-based-on-compiler-options/take-browserslist-or-compute-based-on-compiler-options.ts +++ b/src/util/take-browserslist-or-compute-based-on-compiler-options/take-browserslist-or-compute-based-on-compiler-options.ts @@ -1,6 +1,6 @@ import {browsersWithSupportForEcmaVersion} from "browserslist-generator"; import {getEcmaVersionForScriptTarget} from "../get-script-target-from-browserslist/get-script-target-from-browserslist.js"; -import {TS} from "../../type/ts.js"; +import type {TS} from "../../type/ts.js"; /** * If a browserslist is given, that one will be used. Otherwise, if the given CompilerOptions has a 'target' property, a Browserslist diff --git a/src/util/take-bundled-filenames/take-bundled-filenames.ts b/src/util/take-bundled-filenames/take-bundled-filenames.ts index 5666bdbc..5b0c1b36 100644 --- a/src/util/take-bundled-filenames/take-bundled-filenames.ts +++ b/src/util/take-bundled-filenames/take-bundled-filenames.ts @@ -1,4 +1,4 @@ -import {OutputBundle} from "rollup"; +import type {OutputBundle} from "rollup"; import {isOutputChunk} from "../is-output-chunk/is-output-chunk.js"; import path from "crosspath"; diff --git a/src/util/transpiler-loader.ts b/src/util/transpiler-loader.ts index 0f78b41c..5c974647 100644 --- a/src/util/transpiler-loader.ts +++ b/src/util/transpiler-loader.ts @@ -1,5 +1,5 @@ -import {Babel} from "../type/babel.js"; -import {Swc} from "../type/swc.js"; +import type {Babel} from "../type/babel.js"; +import type {Swc} from "../type/swc.js"; import {listFormat} from "./list-format.js"; /** diff --git a/test/babel.test.ts b/test/babel.test.ts index 0bf347a5..6edfa9ce 100644 --- a/test/babel.test.ts +++ b/test/babel.test.ts @@ -1,6 +1,7 @@ -import test, {ExecutionContext} from "ava"; +import type {ExecutionContext} from "ava"; +import test from "ava"; import {withTypeScript, withTypeScriptVersions} from "./util/ts-macro.js"; -import {ConfigItem} from "@babel/core"; +import type {ConfigItem} from "@babel/core"; import {generateRollupBundle} from "./setup/setup-rollup.js"; import {BABEL_CONFIG_JS_FILENAME, BABEL_CONFIG_JSON_FILENAME, BABELRC_FILENAME, BABEL_CONFIG_MJS_FILENAME} from "../src/constant/constant.js"; import {areTempFilesEqual, createTemporaryFile} from "./util/create-temporary-file.js"; diff --git a/test/cjs.test.ts b/test/cjs.test.ts index ca651159..278ecc1b 100644 --- a/test/cjs.test.ts +++ b/test/cjs.test.ts @@ -113,36 +113,40 @@ test.serial("Will generate a .d.cts declaration file when the output file is .cj t.deepEqual(file.fileName, `index.d.cts`); }); -test.serial("Will generate a .d.ts declaration file when the output file is .cjs, but the TypeScript version doesn't support the .d.cts format based. #1", withTypeScriptVersions("<4.7"), async (t, {typescript}) => { - const bundle = await generateRollupBundle( - [ - { - entry: true, - fileName: "source/index.ts", - text: `\ +test.serial( + "Will generate a .d.ts declaration file when the output file is .cjs, but the TypeScript version doesn't support the .d.cts format based. #1", + withTypeScriptVersions("<4.7"), + async (t, {typescript}) => { + const bundle = await generateRollupBundle( + [ + { + entry: true, + fileName: "source/index.ts", + text: `\ export type Foo = string; ` - } - ], - { - typescript, - debug: false, - tsconfig: { - declaration: true - }, - rollupOptions: { - output: { - file: "index.cjs" + } + ], + { + typescript, + debug: false, + tsconfig: { + declaration: true + }, + rollupOptions: { + output: { + file: "index.cjs" + } } } - } - ); - const { - declarations: [file] - } = bundle; + ); + const { + declarations: [file] + } = bundle; - t.deepEqual(file.fileName, `index.d.ts`); -}); + t.deepEqual(file.fileName, `index.d.ts`); + } +); test.serial("Can successfully author in .cts files. #1", withTypeScriptVersions(">=4.7"), async (t, {typescript}) => { const bundle = await generateRollupBundle( @@ -181,4 +185,4 @@ test.serial("Can successfully author in .cts files. #1", withTypeScriptVersions( export { Foo }; `) ); -}); \ No newline at end of file +}); diff --git a/test/code-splitting.test.ts b/test/code-splitting.test.ts index 5be969f7..135a9a03 100644 --- a/test/code-splitting.test.ts +++ b/test/code-splitting.test.ts @@ -53,7 +53,7 @@ test.serial("Declaration bundling supports code splitting. #1", withTypeScript, t.deepEqual( formatCode(aFile!.code), formatCode(`\ - import { Shared } from "./${stripKnownExtension(sharedFile!.fileName)}"; + import { Shared } from "./${stripKnownExtension(sharedFile!.fileName)}.js"; declare class A extends Shared { a: string; } @@ -64,7 +64,7 @@ test.serial("Declaration bundling supports code splitting. #1", withTypeScript, t.deepEqual( formatCode(bFile!.code), formatCode(`\ - import { Shared } from "./${stripKnownExtension(sharedFile!.fileName)}"; + import { Shared } from "./${stripKnownExtension(sharedFile!.fileName)}.js"; declare class B extends Shared { b: string; } @@ -135,7 +135,7 @@ test.serial("Declaration bundling supports code splitting. #2", withTypeScript, t.deepEqual( formatCode(aFile!.code), formatCode(`\ - export { Logger } from "./${stripKnownExtension(loggerFile!.fileName)}"; + export { Logger } from "./${stripKnownExtension(loggerFile!.fileName)}.js"; `) ); @@ -203,19 +203,19 @@ test.serial("Declaration bundling supports code splitting. #3", withTypeScript, t.deepEqual( formatCode(aFile!.code), formatCode(`\ - import Shared from "./${stripKnownExtension(sharedFile!.fileName)}"; + import Shared from "./${stripKnownExtension(sharedFile!.fileName)}.js"; declare class Foo extends Shared { } export { Foo }; - export * from "./${stripKnownExtension(sharedFile!.fileName)}"; - export { default as Shared } from "./${stripKnownExtension(sharedFile!.fileName)}"; + export * from "./${stripKnownExtension(sharedFile!.fileName)}.js"; + export { default as Shared } from "./${stripKnownExtension(sharedFile!.fileName)}.js"; `) ); t.deepEqual( formatCode(bFile!.code), formatCode(`\ - import Shared from "./${stripKnownExtension(sharedFile!.fileName)}"; + import Shared from "./${stripKnownExtension(sharedFile!.fileName)}.js"; declare class Bar extends Shared { } export { Bar }; @@ -274,7 +274,7 @@ test.serial("Declaration bundling supports code splitting. #4", withTypeScript, t.deepEqual( formatCode(apiFile!.code), formatCode(`\ - export { Foo } from "./${stripKnownExtension(fooFile!.fileName)}"; + export { Foo } from "./${stripKnownExtension(fooFile!.fileName)}.js"; `) ); diff --git a/test/custom-transformers.test.ts b/test/custom-transformers.test.ts index f2486313..3e1ee1d7 100644 --- a/test/custom-transformers.test.ts +++ b/test/custom-transformers.test.ts @@ -2,7 +2,7 @@ import test from "ava"; import {withTypeScript} from "./util/ts-macro.js"; import {formatCode} from "./util/format-code.js"; import {generateRollupBundle} from "./setup/setup-rollup.js"; -import {TS} from "../src/type/ts.js"; +import type {TS} from "../src/type/ts.js"; import {ensureNodeFactory} from "compatfactory"; test.serial("Supports Custom Transformers, including on bundled declarations. #1", withTypeScript, async (t, {typescript}) => { diff --git a/test/deconflict.test.ts b/test/deconflict.test.ts index e3c742c3..9b828381 100644 --- a/test/deconflict.test.ts +++ b/test/deconflict.test.ts @@ -1125,7 +1125,7 @@ test.serial("Deconflicts symbols. #20", withTypeScript, async (t, {typescript}) formatCode(`\ type Foo = 2; type Bar = Foo; - declare const Foo$0: import("./index").Foo; + declare const Foo$0: import("./index.js").Foo; export { Bar, Foo$0 as Foo }; `) ); diff --git a/test/external.test.ts b/test/external.test.ts index 667f49a9..2917b6f1 100644 --- a/test/external.test.ts +++ b/test/external.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/naming-convention */ import test from "ava"; import {withTypeScript} from "./util/ts-macro.js"; import {formatCode} from "./util/format-code.js"; diff --git a/test/hook.test.ts b/test/hook.test.ts index 8f2b678c..7ce6b1e1 100644 --- a/test/hook.test.ts +++ b/test/hook.test.ts @@ -2,7 +2,7 @@ import test from "ava"; import {withTypeScript} from "./util/ts-macro.js"; import {formatCode} from "./util/format-code.js"; import {generateRollupBundle} from "./setup/setup-rollup.js"; -import {DeclarationStats} from "../src/type/declaration-stats.js"; +import type {DeclarationStats} from "../src/type/declaration-stats.js"; import {createBuiltInModuleTestFiles, createExternalTestFiles} from "./setup/test-file.js"; test.serial("Declarations respect rewritten output paths. #1", withTypeScript, async (t, {typescript}) => { diff --git a/test/mjs.test.ts b/test/mjs.test.ts index 16fed70c..0437be39 100644 --- a/test/mjs.test.ts +++ b/test/mjs.test.ts @@ -113,36 +113,40 @@ test.serial("Will generate a .d.mts declaration file when the output file is .mj t.deepEqual(file.fileName, `index.d.mts`); }); -test.serial("Will generate a .d.ts declaration file when the output file is .mjs, but the TypeScript version doesn't support the .d.mts format based. #1", withTypeScriptVersions("<4.7"), async (t, {typescript}) => { - const bundle = await generateRollupBundle( - [ - { - entry: true, - fileName: "source/index.ts", - text: `\ +test.serial( + "Will generate a .d.ts declaration file when the output file is .mjs, but the TypeScript version doesn't support the .d.mts format based. #1", + withTypeScriptVersions("<4.7"), + async (t, {typescript}) => { + const bundle = await generateRollupBundle( + [ + { + entry: true, + fileName: "source/index.ts", + text: `\ export type Foo = string; ` - } - ], - { - typescript, - debug: false, - tsconfig: { - declaration: true - }, - rollupOptions: { - output: { - file: "index.mjs" + } + ], + { + typescript, + debug: false, + tsconfig: { + declaration: true + }, + rollupOptions: { + output: { + file: "index.mjs" + } } } - } - ); - const { - declarations: [file] - } = bundle; + ); + const { + declarations: [file] + } = bundle; - t.deepEqual(file.fileName, `index.d.ts`); -}); + t.deepEqual(file.fileName, `index.d.ts`); + } +); test.serial("Can successfully author in .mts files. #1", withTypeScriptVersions(">=4.7"), async (t, {typescript}) => { const bundle = await generateRollupBundle( @@ -181,4 +185,4 @@ test.serial("Can successfully author in .mts files. #1", withTypeScriptVersions( export { Foo }; `) ); -}); \ No newline at end of file +}); diff --git a/test/namespace-export.test.ts b/test/namespace-export.test.ts index d06edbe4..2ac0d165 100644 --- a/test/namespace-export.test.ts +++ b/test/namespace-export.test.ts @@ -353,7 +353,7 @@ test.serial("Handles namespace exports. #7", withTypeScriptVersions(">=3.8"), as ); }); -test("Handles namespace exports. #8", withTypeScriptVersions(">=3.8"), async (t, {typescript}) => { +test.serial("Handles namespace exports. #8", withTypeScriptVersions(">=3.8"), async (t, {typescript}) => { const bundle = await generateRollupBundle( [ { diff --git a/test/path-mapping.test.ts b/test/path-mapping.test.ts index 795be0af..7eae63b1 100644 --- a/test/path-mapping.test.ts +++ b/test/path-mapping.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/naming-convention */ import test from "ava"; import {withTypeScript} from "./util/ts-macro.js"; import {formatCode} from "./util/format-code.js"; diff --git a/test/setup/create-virtual-file-system.ts b/test/setup/create-virtual-file-system.ts index 46f20d40..658c950c 100644 --- a/test/setup/create-virtual-file-system.ts +++ b/test/setup/create-virtual-file-system.ts @@ -1,7 +1,7 @@ import path from "crosspath"; -import {TestFileRecord} from "./test-file.js"; +import type {TestFileRecord} from "./test-file.js"; import {createFsFromVolume, Volume} from "memfs"; -import {FileSystem} from "../../src/util/file-system/file-system.js"; +import type {FileSystem} from "../../src/util/file-system/file-system.js"; export function createVirtualFileSystem(files: TestFileRecord[]): FileSystem { const vol = new Volume(); diff --git a/test/setup/setup-rollup.ts b/test/setup/setup-rollup.ts index 2773554d..68323942 100644 --- a/test/setup/setup-rollup.ts +++ b/test/setup/setup-rollup.ts @@ -1,7 +1,8 @@ -import {InputPluginOption, OutputOptions, Plugin, rollup, RollupBuild, RollupCache, RollupOptions, RollupOutput} from "rollup"; +import type {InputPluginOption, OutputOptions, Plugin, RollupBuild, RollupCache, RollupOptions, RollupOutput} from "rollup"; +import { rollup} from "rollup"; // import commonjs from "@rollup/plugin-commonjs"; import typescriptRollupPlugin from "../../src/plugin/typescript-plugin.js"; -import {HookRecord, InputCompilerOptions, TypescriptPluginOptions} from "../../src/plugin/typescript-plugin-options.js"; +import type {HookRecord, InputCompilerOptions, TypescriptPluginOptions} from "../../src/plugin/typescript-plugin-options.js"; import { D_CTS_EXTENSION, D_CTS_MAP_EXTENSION, @@ -11,19 +12,19 @@ import { D_TS_MAP_EXTENSION, TSBUILDINFO_EXTENSION } from "../../src/constant/constant.js"; -import {TS} from "../../src/type/ts.js"; +import type {TS} from "../../src/type/ts.js"; import {logVirtualFiles} from "../../src/util/logging/log-virtual-files.js"; import {shouldDebugVirtualFiles} from "../../src/util/is-debug/should-debug.js"; import path from "crosspath"; import {builtinModules} from "module"; import {createTestSetup} from "./test-setup.js"; -import {TestFile} from "./test-file.js"; -import {MaybeArray, PartialExcept} from "helpertypes"; -import {FileResult} from "./test-result.js"; +import type {TestFile} from "./test-file.js"; +import type {MaybeArray, PartialExcept} from "helpertypes"; +import type {FileResult} from "./test-result.js"; import {removeSearchPathFromFilename, setExtension} from "../../src/util/path/path-util.js"; -import { ensureArray } from "../../src/util/ensure-array/ensure-array.js"; -import { isPromise } from "../../src/util/object/object-util.js"; -import { isDefined } from "../../src/util/is-defined/is-defined.js"; +import {ensureArray} from "../../src/util/ensure-array/ensure-array.js"; +import {isPromise} from "../../src/util/object/object-util.js"; +import {isDefined} from "../../src/util/is-defined/is-defined.js"; export interface GenerateRollupBundleResult { bundle: RollupOutput; @@ -84,7 +85,7 @@ export async function generateRollupBundle( fileSystem } = createTestSetup(inputFiles, options); - async function flattenPlugins (plugins: InputPluginOption|undefined): Promise { + async function flattenPlugins(plugins: InputPluginOption | undefined): Promise { const flattened: Plugin[] = []; const awaitedPlugins = ensureArray(isPromise(plugins) ? await plugins : plugins).filter(isDefined); for (const awaitedPlugin of awaitedPlugins) { diff --git a/test/setup/test-context.ts b/test/setup/test-context.ts index 9f69b32e..3effcbd8 100644 --- a/test/setup/test-context.ts +++ b/test/setup/test-context.ts @@ -1,7 +1,7 @@ -import {TS} from "../../src/type/ts.js"; -import {InputCompilerOptions, TypescriptPluginOptions} from "../../src/plugin/typescript-plugin-options.js"; +import type {TS} from "../../src/type/ts.js"; +import type {InputCompilerOptions, TypescriptPluginOptions} from "../../src/plugin/typescript-plugin-options.js"; import path from "crosspath"; -import {PartialExcept} from "helpertypes"; +import type {PartialExcept} from "helpertypes"; export interface TestContext { cwd: string; diff --git a/test/setup/test-file.ts b/test/setup/test-file.ts index 667bc9aa..b0774f93 100644 --- a/test/setup/test-file.ts +++ b/test/setup/test-file.ts @@ -1,7 +1,7 @@ import path from "crosspath"; import fs from "fs"; -import {TestContext} from "./test-context.js"; -import {MaybeArray} from "helpertypes"; +import type {TestContext} from "./test-context.js"; +import type {MaybeArray} from "helpertypes"; import {ensureArray} from "../../src/util/ensure-array/ensure-array.js"; import {generateRandomPath} from "../../src/util/hash/generate-random-hash.js"; import {CachedFs} from "../../src/service/cache/cached-fs.js"; diff --git a/test/setup/test-setup.ts b/test/setup/test-setup.ts index 3e01a8a9..762bb67a 100644 --- a/test/setup/test-setup.ts +++ b/test/setup/test-setup.ts @@ -1,9 +1,11 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import {createTestContext, TestContext} from "./test-context.js"; -import {createTestFileStructure, TestFile, TestFileStructure} from "./test-file.js"; +import type { TestContext} from "./test-context.js"; +import {createTestContext} from "./test-context.js"; +import type { TestFile, TestFileStructure} from "./test-file.js"; +import {createTestFileStructure} from "./test-file.js"; import {createVirtualFileSystem} from "./create-virtual-file-system.js"; -import {MaybeArray, PartialExcept} from "helpertypes"; -import {TS} from "../../src/type/ts.js"; +import type {MaybeArray, PartialExcept} from "helpertypes"; +import type {TS} from "../../src/type/ts.js"; import {createTypeScriptSystem} from "../util/create-typescript-system.js"; export interface TestSetup { diff --git a/test/statement-merge.test.ts b/test/statement-merge.test.ts index 95fb546f..d883c1f6 100644 --- a/test/statement-merge.test.ts +++ b/test/statement-merge.test.ts @@ -53,7 +53,7 @@ test.serial("Merges identical statements correctly. #1", withTypeScript, async ( t.deepEqual( formatCode(indexFile!.code), formatCode(`\ - export * from "./a"; + export * from "./a.js"; `) ); }); @@ -107,7 +107,7 @@ test.serial("Merges identical statements correctly. #2", withTypeScript, async ( t.deepEqual( formatCode(indexFile!.code), formatCode(`\ - export { foo as bar } from "./a"; + export { foo as bar } from "./a.js"; `) ); }); @@ -258,8 +258,8 @@ test.serial("Merges identical statements correctly. #5", withTypeScriptVersions( t.deepEqual( formatCode(indexFile!.code), formatCode(`\ - export type { foo as bar } from "./a"; - export { foo as baz } from "./a" + export type { foo as bar } from "./a.js"; + export { foo as baz } from "./a.js" `) ); }); @@ -313,8 +313,8 @@ test.serial("Merges identical statements correctly. #6", withTypeScriptVersions( t.deepEqual( formatCode(indexFile!.code), formatCode(`\ - export type { foo as bar } from "./a"; - export { bar as baz, foo as foobarbaz } from "./a"; + export type { foo as bar } from "./a.js"; + export { bar as baz, foo as foobarbaz } from "./a.js"; `) ); }); @@ -367,7 +367,7 @@ test.serial("Merges identical statements correctly. #7", withTypeScriptVersions( t.deepEqual( formatCode(indexFile!.code), formatCode(`\ - export { foo } from "./a"; + export { foo } from "./a.js"; `) ); }); diff --git a/test/util/create-typescript-system.ts b/test/util/create-typescript-system.ts index f5adb755..691af200 100644 --- a/test/util/create-typescript-system.ts +++ b/test/util/create-typescript-system.ts @@ -1,10 +1,10 @@ import * as fsModule from "fs"; import * as osModule from "os"; -import {TS} from "../../src/type/ts.js"; +import type {TS} from "../../src/type/ts.js"; import path from "crosspath"; -import {FileSystem} from "../../src/util/file-system/file-system.js"; -import {OS} from "../../src/util/os/os.js"; -import {PartialExcept} from "helpertypes"; +import type {FileSystem} from "../../src/util/file-system/file-system.js"; +import type {OS} from "../../src/util/os/os.js"; +import type {PartialExcept} from "helpertypes"; /** * TypeScript has a lot of internal helpers that aren't exposed. diff --git a/tsconfig.json b/tsconfig.json index f23d6ce2..971ccbef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,9 @@ { - "include": ["src/**/*.*", "test/**/*.*"], + "include": ["src/**/*.*", "test/**/*.*", "rollup.config.ts"], "extends": "@wessberg/ts-config", "compilerOptions": { - "module": "esnext", "target": "es2019", - "skipLibCheck": true, - "resolveJsonModule": true, - "allowJs": true + "downlevelIteration": false, + "moduleResolution": "node" } }