diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0fd2046a1d7e9..d86554c25c28e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4715,7 +4715,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (errorNode && resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { errorOnImplicitAnyModule(/*isError*/ false, errorNode, currentSourceFile, mode, resolvedModule, moduleReference); } - if (errorNode && (moduleResolutionKind === ModuleResolutionKind.Node16 || moduleResolutionKind === ModuleResolutionKind.NodeNext)) { + if (errorNode && (moduleKind === ModuleKind.Node16 || moduleKind === ModuleKind.Node18)) { const isSyncImport = (currentSourceFile.impliedNodeFormat === ModuleKind.CommonJS && !findAncestor(location, isImportCall)) || !!findAncestor(location, isImportEqualsDeclaration); const overrideHost = findAncestor(location, l => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l)); // An override clause will take effect for type-only imports and import types, and allows importing the types across formats, regardless of @@ -48082,6 +48082,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); } + if (moduleKind === ModuleKind.NodeNext && !isImportAttributes) { + return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts); + } + if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === ModuleKind.CommonJS) { return grammarErrorOnNode( node, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index d757b34d5c384..0ff8b5b0317cf 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3980,6 +3980,10 @@ "category": "Error", "code": 2879 }, + "Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'.": { + "category": "Error", + "code": 2880 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", diff --git a/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt b/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt new file mode 100644 index 0000000000000..d898b0342c912 --- /dev/null +++ b/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt @@ -0,0 +1,20 @@ +error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. +error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. + + +!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. +!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'. +==== /app/test.ts (0 errors) ==== + import { test } from '../lib'; + +==== /lib/package.json (0 errors) ==== + { + "main": "./cjs/index.js" + } + +==== /lib/cjs/index.js (0 errors) ==== + export function test() {} + +==== /lib/cjs/index.d.ts (0 errors) ==== + export function test(): void; + \ No newline at end of file diff --git a/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=bundler).trace.json b/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=bundler).trace.json new file mode 100644 index 0000000000000..5eb873dbbce2f --- /dev/null +++ b/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=bundler).trace.json @@ -0,0 +1,827 @@ +[ + "======== Resolving module '../lib' from '/app/test.ts'. ========", + "Explicitly specified module resolution kind: 'Bundler'.", + "Resolving in CJS mode with conditions 'import', 'types'.", + "Loading module as file / folder, candidate module location '/lib', target file types: TypeScript, JavaScript, Declaration, JSON.", + "File '/lib.ts' does not exist.", + "File '/lib.tsx' does not exist.", + "File '/lib.d.ts' does not exist.", + "File '/lib.js' does not exist.", + "File '/lib.jsx' does not exist.", + "Found 'package.json' at '/lib/package.json'.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' does not have a 'typings' field.", + "'package.json' does not have a 'types' field.", + "'package.json' has 'main' field './cjs/index.js' that references '/lib/cjs/index.js'.", + "File name '/lib/cjs/index.js' has a '.js' extension - stripping it.", + "File '/lib/cjs/index.ts' does not exist.", + "File '/lib/cjs/index.tsx' does not exist.", + "File '/lib/cjs/index.d.ts' exists - use it as a name resolution result.", + "======== Module name '../lib' was successfully resolved to '/lib/cjs/index.d.ts'. ========", + "======== Resolving module '@typescript/lib-es2022' from '/.src/__lib_node_modules_lookup_lib.es2022.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022'", + "Loading module '@typescript/lib-es2022' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2021' from '/.src/__lib_node_modules_lookup_lib.es2021.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021'", + "Loading module '@typescript/lib-es2021' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020' from '/.src/__lib_node_modules_lookup_lib.es2020.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020'", + "Loading module '@typescript/lib-es2020' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2019' from '/.src/__lib_node_modules_lookup_lib.es2019.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019'", + "Loading module '@typescript/lib-es2019' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2018' from '/.src/__lib_node_modules_lookup_lib.es2018.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018'", + "Loading module '@typescript/lib-es2018' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017' from '/.src/__lib_node_modules_lookup_lib.es2017.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017'", + "Loading module '@typescript/lib-es2017' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2016' from '/.src/__lib_node_modules_lookup_lib.es2016.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2016' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016'", + "Loading module '@typescript/lib-es2016' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2016' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015' from '/.src/__lib_node_modules_lookup_lib.es2015.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015'", + "Loading module '@typescript/lib-es2015' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015' was not resolved. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es5'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es5'", + "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es5' was not resolved. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators'", + "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-decorators' was not resolved. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", + "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/core' from '/.src/__lib_node_modules_lookup_lib.es2015.core.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/core' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/core'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/core'", + "Loading module '@typescript/lib-es2015/core' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/core' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/collection' from '/.src/__lib_node_modules_lookup_lib.es2015.collection.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/collection' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/collection'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/collection'", + "Loading module '@typescript/lib-es2015/collection' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/collection' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/iterable' from '/.src/__lib_node_modules_lookup_lib.es2015.iterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/iterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/iterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/iterable'", + "Loading module '@typescript/lib-es2015/iterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/iterable' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/symbol' from '/.src/__lib_node_modules_lookup_lib.es2015.symbol.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/symbol' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol'", + "Loading module '@typescript/lib-es2015/symbol' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/symbol' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/generator' from '/.src/__lib_node_modules_lookup_lib.es2015.generator.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/generator' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/generator'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/generator'", + "Loading module '@typescript/lib-es2015/generator' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/generator' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/promise' from '/.src/__lib_node_modules_lookup_lib.es2015.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/promise'", + "Loading module '@typescript/lib-es2015/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/promise' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/proxy' from '/.src/__lib_node_modules_lookup_lib.es2015.proxy.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/proxy' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/proxy'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/proxy'", + "Loading module '@typescript/lib-es2015/proxy' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/proxy' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/reflect' from '/.src/__lib_node_modules_lookup_lib.es2015.reflect.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/reflect' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/reflect'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/reflect'", + "Loading module '@typescript/lib-es2015/reflect' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/reflect' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2015/symbol-wellknown' from '/.src/__lib_node_modules_lookup_lib.es2015.symbol.wellknown.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/symbol-wellknown' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol-wellknown'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol-wellknown'", + "Loading module '@typescript/lib-es2015/symbol-wellknown' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/symbol-wellknown' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2016/array-include' from '/.src/__lib_node_modules_lookup_lib.es2016.array.include.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2016/array-include' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/array-include'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/array-include'", + "Loading module '@typescript/lib-es2016/array-include' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2016/array-include' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2016/intl' from '/.src/__lib_node_modules_lookup_lib.es2016.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2016/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/intl'", + "Loading module '@typescript/lib-es2016/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2016/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017/arraybuffer' from '/.src/__lib_node_modules_lookup_lib.es2017.arraybuffer.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/arraybuffer' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/arraybuffer'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/arraybuffer'", + "Loading module '@typescript/lib-es2017/arraybuffer' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/arraybuffer' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017/date' from '/.src/__lib_node_modules_lookup_lib.es2017.date.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/date' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/date'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/date'", + "Loading module '@typescript/lib-es2017/date' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/date' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017/intl' from '/.src/__lib_node_modules_lookup_lib.es2017.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/intl'", + "Loading module '@typescript/lib-es2017/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017/object' from '/.src/__lib_node_modules_lookup_lib.es2017.object.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/object' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/object'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/object'", + "Loading module '@typescript/lib-es2017/object' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/object' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017/sharedmemory' from '/.src/__lib_node_modules_lookup_lib.es2017.sharedmemory.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/sharedmemory' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/sharedmemory'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/sharedmemory'", + "Loading module '@typescript/lib-es2017/sharedmemory' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/sharedmemory' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017/string' from '/.src/__lib_node_modules_lookup_lib.es2017.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/string'", + "Loading module '@typescript/lib-es2017/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/string' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2017/typedarrays' from '/.src/__lib_node_modules_lookup_lib.es2017.typedarrays.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/typedarrays' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/typedarrays'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/typedarrays'", + "Loading module '@typescript/lib-es2017/typedarrays' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/typedarrays' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2018/asynciterable' from '/.src/__lib_node_modules_lookup_lib.es2018.asynciterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/asynciterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asynciterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asynciterable'", + "Loading module '@typescript/lib-es2018/asynciterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/asynciterable' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2018/asyncgenerator' from '/.src/__lib_node_modules_lookup_lib.es2018.asyncgenerator.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/asyncgenerator' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asyncgenerator'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asyncgenerator'", + "Loading module '@typescript/lib-es2018/asyncgenerator' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/asyncgenerator' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2018/promise' from '/.src/__lib_node_modules_lookup_lib.es2018.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/promise'", + "Loading module '@typescript/lib-es2018/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/promise' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2018/regexp' from '/.src/__lib_node_modules_lookup_lib.es2018.regexp.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/regexp' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/regexp'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/regexp'", + "Loading module '@typescript/lib-es2018/regexp' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/regexp' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2018/intl' from '/.src/__lib_node_modules_lookup_lib.es2018.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/intl'", + "Loading module '@typescript/lib-es2018/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2019/array' from '/.src/__lib_node_modules_lookup_lib.es2019.array.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/array' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/array'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/array'", + "Loading module '@typescript/lib-es2019/array' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/array' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2019/object' from '/.src/__lib_node_modules_lookup_lib.es2019.object.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/object' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/object'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/object'", + "Loading module '@typescript/lib-es2019/object' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/object' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2019/string' from '/.src/__lib_node_modules_lookup_lib.es2019.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/string'", + "Loading module '@typescript/lib-es2019/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/string' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2019/symbol' from '/.src/__lib_node_modules_lookup_lib.es2019.symbol.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/symbol' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/symbol'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/symbol'", + "Loading module '@typescript/lib-es2019/symbol' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/symbol' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2019/intl' from '/.src/__lib_node_modules_lookup_lib.es2019.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/intl'", + "Loading module '@typescript/lib-es2019/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/bigint' from '/.src/__lib_node_modules_lookup_lib.es2020.bigint.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/bigint' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/bigint'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/bigint'", + "Loading module '@typescript/lib-es2020/bigint' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/bigint' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/intl' from '/.src/__lib_node_modules_lookup_lib.es2020.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/intl'", + "Loading module '@typescript/lib-es2020/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/date' from '/.src/__lib_node_modules_lookup_lib.es2020.date.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/date' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/date'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/date'", + "Loading module '@typescript/lib-es2020/date' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/date' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/number' from '/.src/__lib_node_modules_lookup_lib.es2020.number.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/number' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/number'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/number'", + "Loading module '@typescript/lib-es2020/number' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/number' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/promise' from '/.src/__lib_node_modules_lookup_lib.es2020.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/promise'", + "Loading module '@typescript/lib-es2020/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/promise' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/sharedmemory' from '/.src/__lib_node_modules_lookup_lib.es2020.sharedmemory.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/sharedmemory' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/sharedmemory'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/sharedmemory'", + "Loading module '@typescript/lib-es2020/sharedmemory' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/sharedmemory' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/string' from '/.src/__lib_node_modules_lookup_lib.es2020.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/string'", + "Loading module '@typescript/lib-es2020/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/string' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2020/symbol-wellknown' from '/.src/__lib_node_modules_lookup_lib.es2020.symbol.wellknown.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/symbol-wellknown' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/symbol-wellknown'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/symbol-wellknown'", + "Loading module '@typescript/lib-es2020/symbol-wellknown' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/symbol-wellknown' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2021/promise' from '/.src/__lib_node_modules_lookup_lib.es2021.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/promise'", + "Loading module '@typescript/lib-es2021/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/promise' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2021/string' from '/.src/__lib_node_modules_lookup_lib.es2021.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/string'", + "Loading module '@typescript/lib-es2021/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/string' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2021/weakref' from '/.src/__lib_node_modules_lookup_lib.es2021.weakref.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/weakref' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/weakref'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/weakref'", + "Loading module '@typescript/lib-es2021/weakref' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/weakref' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2021/intl' from '/.src/__lib_node_modules_lookup_lib.es2021.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/intl'", + "Loading module '@typescript/lib-es2021/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2022/array' from '/.src/__lib_node_modules_lookup_lib.es2022.array.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/array' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/array'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/array'", + "Loading module '@typescript/lib-es2022/array' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/array' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2022/error' from '/.src/__lib_node_modules_lookup_lib.es2022.error.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/error' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/error'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/error'", + "Loading module '@typescript/lib-es2022/error' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/error' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2022/intl' from '/.src/__lib_node_modules_lookup_lib.es2022.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/intl'", + "Loading module '@typescript/lib-es2022/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2022/object' from '/.src/__lib_node_modules_lookup_lib.es2022.object.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/object' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/object'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/object'", + "Loading module '@typescript/lib-es2022/object' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/object' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2022/regexp' from '/.src/__lib_node_modules_lookup_lib.es2022.regexp.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/regexp' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/regexp'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/regexp'", + "Loading module '@typescript/lib-es2022/regexp' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/regexp' was not resolved. ========", + "======== Resolving module '@typescript/lib-es2022/string' from '/.src/__lib_node_modules_lookup_lib.es2022.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/string'", + "Loading module '@typescript/lib-es2022/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/string' was not resolved. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom'", + "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-dom' was not resolved. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", + "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-scripthost'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-scripthost'", + "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-scripthost' was not resolved. ========", + "======== Resolving module '@typescript/lib-dom/iterable' from '/.src/__lib_node_modules_lookup_lib.dom.iterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-dom/iterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/iterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/iterable'", + "Loading module '@typescript/lib-dom/iterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-dom/iterable' was not resolved. ========", + "======== Resolving module '@typescript/lib-dom/asynciterable' from '/.src/__lib_node_modules_lookup_lib.dom.asynciterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-dom/asynciterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/asynciterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/asynciterable'", + "Loading module '@typescript/lib-dom/asynciterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-dom/asynciterable' was not resolved. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=nodenext).trace.json b/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=nodenext).trace.json new file mode 100644 index 0000000000000..f6fa74d934fb5 --- /dev/null +++ b/tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=nodenext).trace.json @@ -0,0 +1,957 @@ +[ + "File '/app/package.json' does not exist.", + "File '/package.json' does not exist.", + "======== Resolving module '../lib' from '/app/test.ts'. ========", + "Explicitly specified module resolution kind: 'NodeNext'.", + "Resolving in CJS mode with conditions 'require', 'types', 'node'.", + "Loading module as file / folder, candidate module location '/lib', target file types: TypeScript, JavaScript, Declaration.", + "File '/lib.ts' does not exist.", + "File '/lib.tsx' does not exist.", + "File '/lib.d.ts' does not exist.", + "File '/lib.js' does not exist.", + "File '/lib.jsx' does not exist.", + "Found 'package.json' at '/lib/package.json'.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' does not have a 'typings' field.", + "'package.json' does not have a 'types' field.", + "'package.json' has 'main' field './cjs/index.js' that references '/lib/cjs/index.js'.", + "File name '/lib/cjs/index.js' has a '.js' extension - stripping it.", + "File '/lib/cjs/index.ts' does not exist.", + "File '/lib/cjs/index.tsx' does not exist.", + "File '/lib/cjs/index.d.ts' exists - use it as a name resolution result.", + "======== Module name '../lib' was successfully resolved to '/lib/cjs/index.d.ts'. ========", + "File '/lib/cjs/package.json' does not exist.", + "File '/lib/package.json' exists according to earlier cached lookups.", + "File '/.ts/package.json' does not exist.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2022' from '/.src/__lib_node_modules_lookup_lib.es2022.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022'", + "Loading module '@typescript/lib-es2022' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2021' from '/.src/__lib_node_modules_lookup_lib.es2021.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021'", + "Loading module '@typescript/lib-es2021' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020' from '/.src/__lib_node_modules_lookup_lib.es2020.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020'", + "Loading module '@typescript/lib-es2020' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2019' from '/.src/__lib_node_modules_lookup_lib.es2019.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019'", + "Loading module '@typescript/lib-es2019' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2018' from '/.src/__lib_node_modules_lookup_lib.es2018.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018'", + "Loading module '@typescript/lib-es2018' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017' from '/.src/__lib_node_modules_lookup_lib.es2017.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017'", + "Loading module '@typescript/lib-es2017' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2016' from '/.src/__lib_node_modules_lookup_lib.es2016.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2016' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016'", + "Loading module '@typescript/lib-es2016' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2016' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015' from '/.src/__lib_node_modules_lookup_lib.es2015.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015'", + "Loading module '@typescript/lib-es2015' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es5'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es5'", + "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es5' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators'", + "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-decorators' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", + "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/core' from '/.src/__lib_node_modules_lookup_lib.es2015.core.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/core' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/core'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/core'", + "Loading module '@typescript/lib-es2015/core' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/core' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/collection' from '/.src/__lib_node_modules_lookup_lib.es2015.collection.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/collection' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/collection'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/collection'", + "Loading module '@typescript/lib-es2015/collection' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/collection' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/iterable' from '/.src/__lib_node_modules_lookup_lib.es2015.iterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/iterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/iterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/iterable'", + "Loading module '@typescript/lib-es2015/iterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/iterable' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/symbol' from '/.src/__lib_node_modules_lookup_lib.es2015.symbol.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/symbol' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol'", + "Loading module '@typescript/lib-es2015/symbol' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/symbol' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/generator' from '/.src/__lib_node_modules_lookup_lib.es2015.generator.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/generator' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/generator'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/generator'", + "Loading module '@typescript/lib-es2015/generator' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/generator' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/promise' from '/.src/__lib_node_modules_lookup_lib.es2015.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/promise'", + "Loading module '@typescript/lib-es2015/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/promise' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/proxy' from '/.src/__lib_node_modules_lookup_lib.es2015.proxy.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/proxy' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/proxy'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/proxy'", + "Loading module '@typescript/lib-es2015/proxy' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/proxy' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/reflect' from '/.src/__lib_node_modules_lookup_lib.es2015.reflect.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/reflect' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/reflect'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/reflect'", + "Loading module '@typescript/lib-es2015/reflect' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/reflect' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2015/symbol-wellknown' from '/.src/__lib_node_modules_lookup_lib.es2015.symbol.wellknown.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2015/symbol-wellknown' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol-wellknown'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2015/symbol-wellknown'", + "Loading module '@typescript/lib-es2015/symbol-wellknown' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2015/symbol-wellknown' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2016/array-include' from '/.src/__lib_node_modules_lookup_lib.es2016.array.include.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2016/array-include' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/array-include'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/array-include'", + "Loading module '@typescript/lib-es2016/array-include' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2016/array-include' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2016/intl' from '/.src/__lib_node_modules_lookup_lib.es2016.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2016/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2016/intl'", + "Loading module '@typescript/lib-es2016/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2016/intl' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017/arraybuffer' from '/.src/__lib_node_modules_lookup_lib.es2017.arraybuffer.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/arraybuffer' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/arraybuffer'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/arraybuffer'", + "Loading module '@typescript/lib-es2017/arraybuffer' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/arraybuffer' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017/date' from '/.src/__lib_node_modules_lookup_lib.es2017.date.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/date' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/date'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/date'", + "Loading module '@typescript/lib-es2017/date' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/date' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017/intl' from '/.src/__lib_node_modules_lookup_lib.es2017.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/intl'", + "Loading module '@typescript/lib-es2017/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/intl' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017/object' from '/.src/__lib_node_modules_lookup_lib.es2017.object.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/object' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/object'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/object'", + "Loading module '@typescript/lib-es2017/object' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/object' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017/sharedmemory' from '/.src/__lib_node_modules_lookup_lib.es2017.sharedmemory.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/sharedmemory' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/sharedmemory'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/sharedmemory'", + "Loading module '@typescript/lib-es2017/sharedmemory' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/sharedmemory' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017/string' from '/.src/__lib_node_modules_lookup_lib.es2017.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/string'", + "Loading module '@typescript/lib-es2017/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/string' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2017/typedarrays' from '/.src/__lib_node_modules_lookup_lib.es2017.typedarrays.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2017/typedarrays' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/typedarrays'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2017/typedarrays'", + "Loading module '@typescript/lib-es2017/typedarrays' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2017/typedarrays' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2018/asynciterable' from '/.src/__lib_node_modules_lookup_lib.es2018.asynciterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/asynciterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asynciterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asynciterable'", + "Loading module '@typescript/lib-es2018/asynciterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/asynciterable' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2018/asyncgenerator' from '/.src/__lib_node_modules_lookup_lib.es2018.asyncgenerator.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/asyncgenerator' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asyncgenerator'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/asyncgenerator'", + "Loading module '@typescript/lib-es2018/asyncgenerator' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/asyncgenerator' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2018/promise' from '/.src/__lib_node_modules_lookup_lib.es2018.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/promise'", + "Loading module '@typescript/lib-es2018/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/promise' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2018/regexp' from '/.src/__lib_node_modules_lookup_lib.es2018.regexp.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/regexp' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/regexp'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/regexp'", + "Loading module '@typescript/lib-es2018/regexp' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/regexp' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2018/intl' from '/.src/__lib_node_modules_lookup_lib.es2018.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2018/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2018/intl'", + "Loading module '@typescript/lib-es2018/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2018/intl' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2019/array' from '/.src/__lib_node_modules_lookup_lib.es2019.array.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/array' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/array'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/array'", + "Loading module '@typescript/lib-es2019/array' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/array' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2019/object' from '/.src/__lib_node_modules_lookup_lib.es2019.object.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/object' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/object'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/object'", + "Loading module '@typescript/lib-es2019/object' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/object' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2019/string' from '/.src/__lib_node_modules_lookup_lib.es2019.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/string'", + "Loading module '@typescript/lib-es2019/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/string' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2019/symbol' from '/.src/__lib_node_modules_lookup_lib.es2019.symbol.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/symbol' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/symbol'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/symbol'", + "Loading module '@typescript/lib-es2019/symbol' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/symbol' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2019/intl' from '/.src/__lib_node_modules_lookup_lib.es2019.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2019/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2019/intl'", + "Loading module '@typescript/lib-es2019/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2019/intl' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/bigint' from '/.src/__lib_node_modules_lookup_lib.es2020.bigint.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/bigint' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/bigint'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/bigint'", + "Loading module '@typescript/lib-es2020/bigint' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/bigint' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/intl' from '/.src/__lib_node_modules_lookup_lib.es2020.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/intl'", + "Loading module '@typescript/lib-es2020/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/intl' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/date' from '/.src/__lib_node_modules_lookup_lib.es2020.date.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/date' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/date'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/date'", + "Loading module '@typescript/lib-es2020/date' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/date' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/number' from '/.src/__lib_node_modules_lookup_lib.es2020.number.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/number' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/number'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/number'", + "Loading module '@typescript/lib-es2020/number' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/number' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/promise' from '/.src/__lib_node_modules_lookup_lib.es2020.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/promise'", + "Loading module '@typescript/lib-es2020/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/promise' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/sharedmemory' from '/.src/__lib_node_modules_lookup_lib.es2020.sharedmemory.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/sharedmemory' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/sharedmemory'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/sharedmemory'", + "Loading module '@typescript/lib-es2020/sharedmemory' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/sharedmemory' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/string' from '/.src/__lib_node_modules_lookup_lib.es2020.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/string'", + "Loading module '@typescript/lib-es2020/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/string' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2020/symbol-wellknown' from '/.src/__lib_node_modules_lookup_lib.es2020.symbol.wellknown.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2020/symbol-wellknown' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/symbol-wellknown'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2020/symbol-wellknown'", + "Loading module '@typescript/lib-es2020/symbol-wellknown' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2020/symbol-wellknown' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2021/promise' from '/.src/__lib_node_modules_lookup_lib.es2021.promise.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/promise'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/promise'", + "Loading module '@typescript/lib-es2021/promise' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/promise' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2021/string' from '/.src/__lib_node_modules_lookup_lib.es2021.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/string'", + "Loading module '@typescript/lib-es2021/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/string' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2021/weakref' from '/.src/__lib_node_modules_lookup_lib.es2021.weakref.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/weakref' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/weakref'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/weakref'", + "Loading module '@typescript/lib-es2021/weakref' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/weakref' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2021/intl' from '/.src/__lib_node_modules_lookup_lib.es2021.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2021/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2021/intl'", + "Loading module '@typescript/lib-es2021/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2021/intl' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2022/array' from '/.src/__lib_node_modules_lookup_lib.es2022.array.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/array' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/array'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/array'", + "Loading module '@typescript/lib-es2022/array' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/array' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2022/error' from '/.src/__lib_node_modules_lookup_lib.es2022.error.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/error' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/error'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/error'", + "Loading module '@typescript/lib-es2022/error' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/error' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2022/intl' from '/.src/__lib_node_modules_lookup_lib.es2022.intl.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/intl'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/intl'", + "Loading module '@typescript/lib-es2022/intl' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/intl' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2022/object' from '/.src/__lib_node_modules_lookup_lib.es2022.object.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/object' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/object'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/object'", + "Loading module '@typescript/lib-es2022/object' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/object' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2022/regexp' from '/.src/__lib_node_modules_lookup_lib.es2022.regexp.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/regexp' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/regexp'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/regexp'", + "Loading module '@typescript/lib-es2022/regexp' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/regexp' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-es2022/string' from '/.src/__lib_node_modules_lookup_lib.es2022.string.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-es2022/string' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/string'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-es2022/string'", + "Loading module '@typescript/lib-es2022/string' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-es2022/string' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom'", + "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-dom' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", + "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-scripthost'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-scripthost'", + "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-scripthost' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-dom/iterable' from '/.src/__lib_node_modules_lookup_lib.dom.iterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-dom/iterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/iterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/iterable'", + "Loading module '@typescript/lib-dom/iterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-dom/iterable' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "======== Resolving module '@typescript/lib-dom/asynciterable' from '/.src/__lib_node_modules_lookup_lib.dom.asynciterable.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-dom/asynciterable' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/asynciterable'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-dom/asynciterable'", + "Loading module '@typescript/lib-dom/asynciterable' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-dom/asynciterable' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups." +] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).errors.txt b/tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt similarity index 100% rename from tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).errors.txt rename to tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt diff --git a/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).trace.json b/tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).trace.json similarity index 100% rename from tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).trace.json rename to tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).trace.json diff --git a/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=nodenext).trace.json b/tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=nodenext).trace.json similarity index 100% rename from tests/baselines/reference/bundlerDirectoryModule(moduleresolution=nodenext).trace.json rename to tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=nodenext).trace.json diff --git a/tests/baselines/reference/cjsErrors.errors.txt b/tests/baselines/reference/cjsErrors(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/cjsErrors.errors.txt rename to tests/baselines/reference/cjsErrors(module=node18).errors.txt diff --git a/tests/baselines/reference/cjsErrors.js b/tests/baselines/reference/cjsErrors(module=node18).js similarity index 100% rename from tests/baselines/reference/cjsErrors.js rename to tests/baselines/reference/cjsErrors(module=node18).js diff --git a/tests/baselines/reference/cjsErrors(module=nodenext).errors.txt b/tests/baselines/reference/cjsErrors(module=nodenext).errors.txt new file mode 100644 index 0000000000000..010cc8f06a60c --- /dev/null +++ b/tests/baselines/reference/cjsErrors(module=nodenext).errors.txt @@ -0,0 +1,12 @@ +index.ts(1,22): error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts". + + +==== index.ts (1 errors) ==== + import foo = require("./foo.ts"); // Error + ~~~~~~~~~~ +!!! error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts". + import type _foo = require("./foo.ts"); // Ok + +==== foo.ts/index.ts (0 errors) ==== + export = {}; + \ No newline at end of file diff --git a/tests/baselines/reference/cjsErrors(module=nodenext).js b/tests/baselines/reference/cjsErrors(module=nodenext).js new file mode 100644 index 0000000000000..e5ccbfe43a87f --- /dev/null +++ b/tests/baselines/reference/cjsErrors(module=nodenext).js @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts] //// + +//// [index.ts] +export = {}; + +//// [index.ts] +import foo = require("./foo.ts"); // Error +import type _foo = require("./foo.ts"); // Ok + + +//// [index.js] +"use strict"; +module.exports = {}; +//// [index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const foo = require("./foo.js"); // Error diff --git a/tests/baselines/reference/declarationFileForTsJsImport.errors.txt b/tests/baselines/reference/declarationFileForTsJsImport(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/declarationFileForTsJsImport.errors.txt rename to tests/baselines/reference/declarationFileForTsJsImport(module=node18).errors.txt diff --git a/tests/baselines/reference/declarationFileForTsJsImport.js b/tests/baselines/reference/declarationFileForTsJsImport(module=node18).js similarity index 100% rename from tests/baselines/reference/declarationFileForTsJsImport.js rename to tests/baselines/reference/declarationFileForTsJsImport(module=node18).js diff --git a/tests/baselines/reference/declarationFileForTsJsImport.symbols b/tests/baselines/reference/declarationFileForTsJsImport(module=node18).symbols similarity index 100% rename from tests/baselines/reference/declarationFileForTsJsImport.symbols rename to tests/baselines/reference/declarationFileForTsJsImport(module=node18).symbols diff --git a/tests/baselines/reference/declarationFileForTsJsImport.types b/tests/baselines/reference/declarationFileForTsJsImport(module=node18).types similarity index 100% rename from tests/baselines/reference/declarationFileForTsJsImport.types rename to tests/baselines/reference/declarationFileForTsJsImport(module=node18).types diff --git a/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).errors.txt b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).errors.txt new file mode 100644 index 0000000000000..754dde9109382 --- /dev/null +++ b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).errors.txt @@ -0,0 +1,89 @@ +main.ts(1,18): error TS2307: Cannot find module './file.js' or its corresponding type declarations. +main.ts(2,18): error TS2307: Cannot find module './file.jsx' or its corresponding type declarations. +main.ts(3,18): error TS2307: Cannot find module './file.ts' or its corresponding type declarations. +main.ts(4,18): error TS2307: Cannot find module './file.tsx' or its corresponding type declarations. +main.ts(5,18): error TS2307: Cannot find module './file.mjs' or its corresponding type declarations. +main.ts(6,18): error TS2307: Cannot find module './file.cjs' or its corresponding type declarations. +main.ts(7,18): error TS2307: Cannot find module './file.mts' or its corresponding type declarations. +main.ts(8,18): error TS2307: Cannot find module './file.cts' or its corresponding type declarations. +main.ts(9,18): error TS2307: Cannot find module './file.d.ts' or its corresponding type declarations. +main.ts(10,19): error TS2307: Cannot find module './file.d.cts' or its corresponding type declarations. +main.ts(11,19): error TS2307: Cannot find module './file.d.mts' or its corresponding type declarations. +main.ts(12,19): error TS2307: Cannot find module './file.d.json.ts' or its corresponding type declarations. + + +==== package.json (0 errors) ==== + {"type": "module"} +==== main.ts (12 errors) ==== + import def1 from "./file.js"; + ~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.js' or its corresponding type declarations. + import def2 from "./file.jsx"; + ~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.jsx' or its corresponding type declarations. + import def3 from "./file.ts"; + ~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.ts' or its corresponding type declarations. + import def4 from "./file.tsx"; + ~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.tsx' or its corresponding type declarations. + import def5 from "./file.mjs"; + ~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.mjs' or its corresponding type declarations. + import def6 from "./file.cjs"; + ~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.cjs' or its corresponding type declarations. + import def7 from "./file.mts"; + ~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.mts' or its corresponding type declarations. + import def8 from "./file.cts"; + ~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.cts' or its corresponding type declarations. + import def9 from "./file.d.ts"; + ~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.d.ts' or its corresponding type declarations. + import def10 from "./file.d.cts"; + ~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.d.cts' or its corresponding type declarations. + import def11 from "./file.d.mts"; + ~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.d.mts' or its corresponding type declarations. + import def12 from "./file.d.json.ts"; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module './file.d.json.ts' or its corresponding type declarations. +==== file.d.js.ts (0 errors) ==== + declare var bad: "bad1"; + export default bad; +==== file.d.jsx.ts (0 errors) ==== + declare var bad: "bad2"; + export default bad; +==== file.d.ts.ts (0 errors) ==== + declare var bad: "bad3"; + export default bad; +==== file.d.tsx.ts (0 errors) ==== + declare var bad: "bad4"; + export default bad; +==== file.d.mjs.ts (0 errors) ==== + declare var bad: "bad5"; + export default bad; +==== file.d.cjs.ts (0 errors) ==== + declare var bad: "bad6"; + export default bad; +==== file.d.mts.ts (0 errors) ==== + declare var bad: "bad7"; + export default bad; +==== file.d.cts.ts (0 errors) ==== + declare var bad: "bad8"; + export default bad; +==== file.d.d.ts.ts (0 errors) ==== + declare var bad: "bad9"; + export default bad; +==== file.d.d.mts.ts (0 errors) ==== + declare var bad: "bad10"; + export default bad; +==== file.d.d.cts.ts (0 errors) ==== + declare var bad: "bad11"; + export default bad; +==== file.d.d.json.ts (0 errors) ==== + declare var bad: "bad12"; + export default bad; \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).js b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).js new file mode 100644 index 0000000000000..aec21f826cdf3 --- /dev/null +++ b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).js @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts] //// + +//// [package.json] +{"type": "module"} +//// [main.ts] +import def1 from "./file.js"; +import def2 from "./file.jsx"; +import def3 from "./file.ts"; +import def4 from "./file.tsx"; +import def5 from "./file.mjs"; +import def6 from "./file.cjs"; +import def7 from "./file.mts"; +import def8 from "./file.cts"; +import def9 from "./file.d.ts"; +import def10 from "./file.d.cts"; +import def11 from "./file.d.mts"; +import def12 from "./file.d.json.ts"; +//// [file.d.js.ts] +declare var bad: "bad1"; +export default bad; +//// [file.d.jsx.ts] +declare var bad: "bad2"; +export default bad; +//// [file.d.ts.ts] +declare var bad: "bad3"; +export default bad; +//// [file.d.tsx.ts] +declare var bad: "bad4"; +export default bad; +//// [file.d.mjs.ts] +declare var bad: "bad5"; +export default bad; +//// [file.d.cjs.ts] +declare var bad: "bad6"; +export default bad; +//// [file.d.mts.ts] +declare var bad: "bad7"; +export default bad; +//// [file.d.cts.ts] +declare var bad: "bad8"; +export default bad; +//// [file.d.d.ts.ts] +declare var bad: "bad9"; +export default bad; +//// [file.d.d.mts.ts] +declare var bad: "bad10"; +export default bad; +//// [file.d.d.cts.ts] +declare var bad: "bad11"; +export default bad; +//// [file.d.d.json.ts] +declare var bad: "bad12"; +export default bad; + +//// [main.js] +export {}; diff --git a/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).symbols b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).symbols new file mode 100644 index 0000000000000..e94d8d5321583 --- /dev/null +++ b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).symbols @@ -0,0 +1,123 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts] //// + +=== main.ts === +import def1 from "./file.js"; +>def1 : Symbol(def1, Decl(main.ts, 0, 6)) + +import def2 from "./file.jsx"; +>def2 : Symbol(def2, Decl(main.ts, 1, 6)) + +import def3 from "./file.ts"; +>def3 : Symbol(def3, Decl(main.ts, 2, 6)) + +import def4 from "./file.tsx"; +>def4 : Symbol(def4, Decl(main.ts, 3, 6)) + +import def5 from "./file.mjs"; +>def5 : Symbol(def5, Decl(main.ts, 4, 6)) + +import def6 from "./file.cjs"; +>def6 : Symbol(def6, Decl(main.ts, 5, 6)) + +import def7 from "./file.mts"; +>def7 : Symbol(def7, Decl(main.ts, 6, 6)) + +import def8 from "./file.cts"; +>def8 : Symbol(def8, Decl(main.ts, 7, 6)) + +import def9 from "./file.d.ts"; +>def9 : Symbol(def9, Decl(main.ts, 8, 6)) + +import def10 from "./file.d.cts"; +>def10 : Symbol(def10, Decl(main.ts, 9, 6)) + +import def11 from "./file.d.mts"; +>def11 : Symbol(def11, Decl(main.ts, 10, 6)) + +import def12 from "./file.d.json.ts"; +>def12 : Symbol(def12, Decl(main.ts, 11, 6)) + +=== file.d.js.ts === +declare var bad: "bad1"; +>bad : Symbol(bad, Decl(file.d.js.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.js.ts, 0, 11)) + +=== file.d.jsx.ts === +declare var bad: "bad2"; +>bad : Symbol(bad, Decl(file.d.jsx.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.jsx.ts, 0, 11)) + +=== file.d.ts.ts === +declare var bad: "bad3"; +>bad : Symbol(bad, Decl(file.d.ts.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.ts.ts, 0, 11)) + +=== file.d.tsx.ts === +declare var bad: "bad4"; +>bad : Symbol(bad, Decl(file.d.tsx.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.tsx.ts, 0, 11)) + +=== file.d.mjs.ts === +declare var bad: "bad5"; +>bad : Symbol(bad, Decl(file.d.mjs.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.mjs.ts, 0, 11)) + +=== file.d.cjs.ts === +declare var bad: "bad6"; +>bad : Symbol(bad, Decl(file.d.cjs.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.cjs.ts, 0, 11)) + +=== file.d.mts.ts === +declare var bad: "bad7"; +>bad : Symbol(bad, Decl(file.d.mts.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.mts.ts, 0, 11)) + +=== file.d.cts.ts === +declare var bad: "bad8"; +>bad : Symbol(bad, Decl(file.d.cts.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.cts.ts, 0, 11)) + +=== file.d.d.ts.ts === +declare var bad: "bad9"; +>bad : Symbol(bad, Decl(file.d.d.ts.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.d.ts.ts, 0, 11)) + +=== file.d.d.mts.ts === +declare var bad: "bad10"; +>bad : Symbol(bad, Decl(file.d.d.mts.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.d.mts.ts, 0, 11)) + +=== file.d.d.cts.ts === +declare var bad: "bad11"; +>bad : Symbol(bad, Decl(file.d.d.cts.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.d.cts.ts, 0, 11)) + +=== file.d.d.json.ts === +declare var bad: "bad12"; +>bad : Symbol(bad, Decl(file.d.d.json.ts, 0, 11)) + +export default bad; +>bad : Symbol(bad, Decl(file.d.d.json.ts, 0, 11)) + diff --git a/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).types b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).types new file mode 100644 index 0000000000000..1a1aadcb795a1 --- /dev/null +++ b/tests/baselines/reference/declarationFileForTsJsImport(module=nodenext).types @@ -0,0 +1,159 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts] //// + +=== main.ts === +import def1 from "./file.js"; +>def1 : any +> : ^^^ + +import def2 from "./file.jsx"; +>def2 : any +> : ^^^ + +import def3 from "./file.ts"; +>def3 : any +> : ^^^ + +import def4 from "./file.tsx"; +>def4 : any +> : ^^^ + +import def5 from "./file.mjs"; +>def5 : any +> : ^^^ + +import def6 from "./file.cjs"; +>def6 : any +> : ^^^ + +import def7 from "./file.mts"; +>def7 : any +> : ^^^ + +import def8 from "./file.cts"; +>def8 : any +> : ^^^ + +import def9 from "./file.d.ts"; +>def9 : any +> : ^^^ + +import def10 from "./file.d.cts"; +>def10 : any +> : ^^^ + +import def11 from "./file.d.mts"; +>def11 : any +> : ^^^ + +import def12 from "./file.d.json.ts"; +>def12 : any +> : ^^^ + +=== file.d.js.ts === +declare var bad: "bad1"; +>bad : "bad1" +> : ^^^^^^ + +export default bad; +>bad : "bad1" +> : ^^^^^^ + +=== file.d.jsx.ts === +declare var bad: "bad2"; +>bad : "bad2" +> : ^^^^^^ + +export default bad; +>bad : "bad2" +> : ^^^^^^ + +=== file.d.ts.ts === +declare var bad: "bad3"; +>bad : "bad3" +> : ^^^^^^ + +export default bad; +>bad : "bad3" +> : ^^^^^^ + +=== file.d.tsx.ts === +declare var bad: "bad4"; +>bad : "bad4" +> : ^^^^^^ + +export default bad; +>bad : "bad4" +> : ^^^^^^ + +=== file.d.mjs.ts === +declare var bad: "bad5"; +>bad : "bad5" +> : ^^^^^^ + +export default bad; +>bad : "bad5" +> : ^^^^^^ + +=== file.d.cjs.ts === +declare var bad: "bad6"; +>bad : "bad6" +> : ^^^^^^ + +export default bad; +>bad : "bad6" +> : ^^^^^^ + +=== file.d.mts.ts === +declare var bad: "bad7"; +>bad : "bad7" +> : ^^^^^^ + +export default bad; +>bad : "bad7" +> : ^^^^^^ + +=== file.d.cts.ts === +declare var bad: "bad8"; +>bad : "bad8" +> : ^^^^^^ + +export default bad; +>bad : "bad8" +> : ^^^^^^ + +=== file.d.d.ts.ts === +declare var bad: "bad9"; +>bad : "bad9" +> : ^^^^^^ + +export default bad; +>bad : "bad9" +> : ^^^^^^ + +=== file.d.d.mts.ts === +declare var bad: "bad10"; +>bad : "bad10" +> : ^^^^^^^ + +export default bad; +>bad : "bad10" +> : ^^^^^^^ + +=== file.d.d.cts.ts === +declare var bad: "bad11"; +>bad : "bad11" +> : ^^^^^^^ + +export default bad; +>bad : "bad11" +> : ^^^^^^^ + +=== file.d.d.json.ts === +declare var bad: "bad12"; +>bad : "bad12" +> : ^^^^^^^ + +export default bad; +>bad : "bad12" +> : ^^^^^^^ + diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).errors.txt b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).errors.txt rename to tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).errors.txt diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).js b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).js similarity index 100% rename from tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).js rename to tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).js diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).symbols b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).symbols similarity index 100% rename from tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).symbols rename to tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).symbols diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).types b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).types similarity index 100% rename from tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false).types rename to tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=node18).types diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).errors.txt b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).errors.txt new file mode 100644 index 0000000000000..04c3dfd21db95 --- /dev/null +++ b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).errors.txt @@ -0,0 +1,15 @@ +main.ts(1,22): error TS6263: Module './dir/native.node' was resolved to 'dir/native.d.node.ts', but '--allowArbitraryExtensions' is not set. + + +==== main.ts (1 errors) ==== + import mod = require("./dir/native.node"); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS6263: Module './dir/native.node' was resolved to 'dir/native.d.node.ts', but '--allowArbitraryExtensions' is not set. + mod.doNativeThing("good"); + +==== package.json (0 errors) ==== + {"type": "module"} +==== dir/package.json (0 errors) ==== + {"type": "commonjs"} +==== dir/native.d.node.ts (0 errors) ==== + export function doNativeThing(flag: string): unknown; \ No newline at end of file diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true).js b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).js similarity index 100% rename from tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true).js rename to tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).js diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).symbols b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).symbols new file mode 100644 index 0000000000000..ea430da48c093 --- /dev/null +++ b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).symbols @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] //// + +=== main.ts === +import mod = require("./dir/native.node"); +>mod : Symbol(mod, Decl(main.ts, 0, 0)) + +mod.doNativeThing("good"); +>mod : Symbol(mod, Decl(main.ts, 0, 0)) + diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).types b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).types new file mode 100644 index 0000000000000..8374dbda79e3d --- /dev/null +++ b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=false,module=nodenext).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] //// + +=== main.ts === +import mod = require("./dir/native.node"); +>mod : any +> : ^^^ + +mod.doNativeThing("good"); +>mod.doNativeThing("good") : any +> : ^^^ +>mod.doNativeThing : any +> : ^^^ +>mod : any +> : ^^^ +>doNativeThing : any +> : ^^^ +>"good" : "good" +> : ^^^^^^ + diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=node18).js b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=node18).js new file mode 100644 index 0000000000000..0db936c68b811 --- /dev/null +++ b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=node18).js @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] //// + +//// [package.json] +{"type": "module"} +//// [package.json] +{"type": "commonjs"} +//// [native.d.node.ts] +export function doNativeThing(flag: string): unknown; +//// [main.ts] +import mod = require("./dir/native.node"); +mod.doNativeThing("good"); + + +//// [main.js] +import { createRequire as _createRequire } from "module"; +const __require = _createRequire(import.meta.url); +const mod = __require("./dir/native.node"); +mod.doNativeThing("good"); diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true).symbols b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=node18).symbols similarity index 100% rename from tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true).symbols rename to tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=node18).symbols diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true).types b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=node18).types similarity index 100% rename from tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true).types rename to tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=node18).types diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).js b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).js new file mode 100644 index 0000000000000..0db936c68b811 --- /dev/null +++ b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).js @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] //// + +//// [package.json] +{"type": "module"} +//// [package.json] +{"type": "commonjs"} +//// [native.d.node.ts] +export function doNativeThing(flag: string): unknown; +//// [main.ts] +import mod = require("./dir/native.node"); +mod.doNativeThing("good"); + + +//// [main.js] +import { createRequire as _createRequire } from "module"; +const __require = _createRequire(import.meta.url); +const mod = __require("./dir/native.node"); +mod.doNativeThing("good"); diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).symbols b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).symbols new file mode 100644 index 0000000000000..dbe22cfd2c152 --- /dev/null +++ b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).symbols @@ -0,0 +1,16 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] //// + +=== main.ts === +import mod = require("./dir/native.node"); +>mod : Symbol(mod, Decl(main.ts, 0, 0)) + +mod.doNativeThing("good"); +>mod.doNativeThing : Symbol(mod.doNativeThing, Decl(native.d.node.ts, 0, 0)) +>mod : Symbol(mod, Decl(main.ts, 0, 0)) +>doNativeThing : Symbol(mod.doNativeThing, Decl(native.d.node.ts, 0, 0)) + +=== dir/native.d.node.ts === +export function doNativeThing(flag: string): unknown; +>doNativeThing : Symbol(doNativeThing, Decl(native.d.node.ts, 0, 0)) +>flag : Symbol(flag, Decl(native.d.node.ts, 0, 30)) + diff --git a/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).types b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).types new file mode 100644 index 0000000000000..15f33fb70a207 --- /dev/null +++ b/tests/baselines/reference/declarationFilesForNodeNativeModules(allowarbitraryextensions=true,module=nodenext).types @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] //// + +=== main.ts === +import mod = require("./dir/native.node"); +>mod : typeof mod +> : ^^^^^^^^^^ + +mod.doNativeThing("good"); +>mod.doNativeThing("good") : unknown +> : ^^^^^^^ +>mod.doNativeThing : (flag: string) => unknown +> : ^ ^^ ^^^^^ +>mod : typeof mod +> : ^^^^^^^^^^ +>doNativeThing : (flag: string) => unknown +> : ^ ^^ ^^^^^ +>"good" : "good" +> : ^^^^^^ + +=== dir/native.d.node.ts === +export function doNativeThing(flag: string): unknown; +>doNativeThing : (flag: string) => unknown +> : ^ ^^ ^^^^^ +>flag : string +> : ^^^^^^ + diff --git a/tests/baselines/reference/importAssertionNonstring.errors.txt b/tests/baselines/reference/importAssertionNonstring.errors.txt index 81a06f278084d..20df276c17cc0 100644 --- a/tests/baselines/reference/importAssertionNonstring.errors.txt +++ b/tests/baselines/reference/importAssertionNonstring.errors.txt @@ -1,25 +1,33 @@ +mod.mts(1,37): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. mod.mts(1,37): error TS2322: Type '{ field: 0; }' is not assignable to type 'ImportAttributes'. Property 'field' is incompatible with index signature. Type 'number' is not assignable to type 'string'. mod.mts(1,52): error TS2837: Import assertion values must be string literal expressions. +mod.mts(3,37): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. mod.mts(3,52): error TS2837: Import assertion values must be string literal expressions. +mod.mts(5,37): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. mod.mts(5,37): error TS2322: Type '{ field: RegExp; }' is not assignable to type 'ImportAttributes'. Property 'field' is incompatible with index signature. Type 'RegExp' is not assignable to type 'string'. mod.mts(5,52): error TS2837: Import assertion values must be string literal expressions. +mod.mts(7,37): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. mod.mts(7,37): error TS2322: Type '{ field: string[]; }' is not assignable to type 'ImportAttributes'. Property 'field' is incompatible with index signature. Type 'string[]' is not assignable to type 'string'. mod.mts(7,52): error TS2837: Import assertion values must be string literal expressions. +mod.mts(9,37): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. mod.mts(9,37): error TS2322: Type '{ field: { a: number; }; }' is not assignable to type 'ImportAttributes'. Property 'field' is incompatible with index signature. Type '{ a: number; }' is not assignable to type 'string'. mod.mts(9,52): error TS2837: Import assertion values must be string literal expressions. +mod.mts(11,37): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. mod.mts(11,66): error TS2837: Import assertion values must be string literal expressions. -==== mod.mts (10 errors) ==== +==== mod.mts (16 errors) ==== import * as thing1 from "./mod.mjs" assert {field: 0}; + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ field: 0; }' is not assignable to type 'ImportAttributes'. !!! error TS2322: Property 'field' is incompatible with index signature. @@ -28,10 +36,14 @@ mod.mts(11,66): error TS2837: Import assertion values must be string literal exp !!! error TS2837: Import assertion values must be string literal expressions. import * as thing2 from "./mod.mjs" assert {field: `a`}; + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ~~~ !!! error TS2837: Import assertion values must be string literal expressions. import * as thing3 from "./mod.mjs" assert {field: /a/g}; + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ field: RegExp; }' is not assignable to type 'ImportAttributes'. !!! error TS2322: Property 'field' is incompatible with index signature. @@ -40,6 +52,8 @@ mod.mts(11,66): error TS2837: Import assertion values must be string literal exp !!! error TS2837: Import assertion values must be string literal expressions. import * as thing4 from "./mod.mjs" assert {field: ["a"]}; + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ field: string[]; }' is not assignable to type 'ImportAttributes'. !!! error TS2322: Property 'field' is incompatible with index signature. @@ -48,6 +62,8 @@ mod.mts(11,66): error TS2837: Import assertion values must be string literal exp !!! error TS2837: Import assertion values must be string literal expressions. import * as thing5 from "./mod.mjs" assert {field: { a: 0 }}; + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ field: { a: number; }; }' is not assignable to type 'ImportAttributes'. !!! error TS2322: Property 'field' is incompatible with index signature. @@ -56,5 +72,7 @@ mod.mts(11,66): error TS2837: Import assertion values must be string literal exp !!! error TS2837: Import assertion values must be string literal expressions. import * as thing6 from "./mod.mjs" assert {type: "json", field: 0..toString()} + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ~~~~~~~~~~~~~ !!! error TS2837: Import assertion values must be string literal expressions. \ No newline at end of file diff --git a/tests/baselines/reference/importAttributes6.errors.txt b/tests/baselines/reference/importAttributes6(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/importAttributes6.errors.txt rename to tests/baselines/reference/importAttributes6(module=node18).errors.txt diff --git a/tests/baselines/reference/importAttributes6.js b/tests/baselines/reference/importAttributes6(module=node18).js similarity index 100% rename from tests/baselines/reference/importAttributes6.js rename to tests/baselines/reference/importAttributes6(module=node18).js diff --git a/tests/baselines/reference/importAttributes6.symbols b/tests/baselines/reference/importAttributes6(module=node18).symbols similarity index 100% rename from tests/baselines/reference/importAttributes6.symbols rename to tests/baselines/reference/importAttributes6(module=node18).symbols diff --git a/tests/baselines/reference/importAttributes6.types b/tests/baselines/reference/importAttributes6(module=node18).types similarity index 100% rename from tests/baselines/reference/importAttributes6.types rename to tests/baselines/reference/importAttributes6(module=node18).types diff --git a/tests/baselines/reference/importAttributes6(module=nodenext).errors.txt b/tests/baselines/reference/importAttributes6(module=nodenext).errors.txt new file mode 100644 index 0000000000000..f2f160a4bd0e1 --- /dev/null +++ b/tests/baselines/reference/importAttributes6(module=nodenext).errors.txt @@ -0,0 +1,56 @@ +mod.mts(1,37): error TS2322: Type '{ field: 0; }' is not assignable to type 'ImportAttributes'. + Property 'field' is incompatible with index signature. + Type 'number' is not assignable to type 'string'. +mod.mts(1,51): error TS2858: Import attribute values must be string literal expressions. +mod.mts(2,51): error TS2858: Import attribute values must be string literal expressions. +mod.mts(3,37): error TS2322: Type '{ field: RegExp; }' is not assignable to type 'ImportAttributes'. + Property 'field' is incompatible with index signature. + Type 'RegExp' is not assignable to type 'string'. +mod.mts(3,51): error TS2858: Import attribute values must be string literal expressions. +mod.mts(4,37): error TS2322: Type '{ field: string[]; }' is not assignable to type 'ImportAttributes'. + Property 'field' is incompatible with index signature. + Type 'string[]' is not assignable to type 'string'. +mod.mts(4,51): error TS2858: Import attribute values must be string literal expressions. +mod.mts(5,37): error TS2322: Type '{ field: { a: number; }; }' is not assignable to type 'ImportAttributes'. + Property 'field' is incompatible with index signature. + Type '{ a: number; }' is not assignable to type 'string'. +mod.mts(5,51): error TS2858: Import attribute values must be string literal expressions. +mod.mts(6,65): error TS2858: Import attribute values must be string literal expressions. + + +==== mod.mts (10 errors) ==== + import * as thing1 from "./mod.mjs" with { field: 0 }; + ~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ field: 0; }' is not assignable to type 'ImportAttributes'. +!!! error TS2322: Property 'field' is incompatible with index signature. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + ~ +!!! error TS2858: Import attribute values must be string literal expressions. + import * as thing2 from "./mod.mjs" with { field: `a` }; + ~~~ +!!! error TS2858: Import attribute values must be string literal expressions. + import * as thing3 from "./mod.mjs" with { field: /a/g }; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ field: RegExp; }' is not assignable to type 'ImportAttributes'. +!!! error TS2322: Property 'field' is incompatible with index signature. +!!! error TS2322: Type 'RegExp' is not assignable to type 'string'. + ~~~~ +!!! error TS2858: Import attribute values must be string literal expressions. + import * as thing4 from "./mod.mjs" with { field: ["a"] }; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ field: string[]; }' is not assignable to type 'ImportAttributes'. +!!! error TS2322: Property 'field' is incompatible with index signature. +!!! error TS2322: Type 'string[]' is not assignable to type 'string'. + ~~~~~ +!!! error TS2858: Import attribute values must be string literal expressions. + import * as thing5 from "./mod.mjs" with { field: { a: 0 } }; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ field: { a: number; }; }' is not assignable to type 'ImportAttributes'. +!!! error TS2322: Property 'field' is incompatible with index signature. +!!! error TS2322: Type '{ a: number; }' is not assignable to type 'string'. + ~~~~~~~~ +!!! error TS2858: Import attribute values must be string literal expressions. + import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() }; + ~~~~~~~~~~~~~ +!!! error TS2858: Import attribute values must be string literal expressions. + \ No newline at end of file diff --git a/tests/baselines/reference/importAttributes6(module=nodenext).js b/tests/baselines/reference/importAttributes6(module=nodenext).js new file mode 100644 index 0000000000000..6d346c55c8e5a --- /dev/null +++ b/tests/baselines/reference/importAttributes6(module=nodenext).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/importAttributes/importAttributes6.ts] //// + +//// [mod.mts] +import * as thing1 from "./mod.mjs" with { field: 0 }; +import * as thing2 from "./mod.mjs" with { field: `a` }; +import * as thing3 from "./mod.mjs" with { field: /a/g }; +import * as thing4 from "./mod.mjs" with { field: ["a"] }; +import * as thing5 from "./mod.mjs" with { field: { a: 0 } }; +import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() }; + + +//// [mod.mjs] +export {}; diff --git a/tests/baselines/reference/importAttributes6(module=nodenext).symbols b/tests/baselines/reference/importAttributes6(module=nodenext).symbols new file mode 100644 index 0000000000000..b46ae41350e9a --- /dev/null +++ b/tests/baselines/reference/importAttributes6(module=nodenext).symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/importAttributes/importAttributes6.ts] //// + +=== mod.mts === +import * as thing1 from "./mod.mjs" with { field: 0 }; +>thing1 : Symbol(thing1, Decl(mod.mts, 0, 6)) + +import * as thing2 from "./mod.mjs" with { field: `a` }; +>thing2 : Symbol(thing2, Decl(mod.mts, 1, 6)) + +import * as thing3 from "./mod.mjs" with { field: /a/g }; +>thing3 : Symbol(thing3, Decl(mod.mts, 2, 6)) + +import * as thing4 from "./mod.mjs" with { field: ["a"] }; +>thing4 : Symbol(thing4, Decl(mod.mts, 3, 6)) + +import * as thing5 from "./mod.mjs" with { field: { a: 0 } }; +>thing5 : Symbol(thing5, Decl(mod.mts, 4, 6)) +>a : Symbol(a, Decl(mod.mts, 4, 51)) + +import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() }; +>thing6 : Symbol(thing6, Decl(mod.mts, 5, 6)) +>0..toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) +>toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) + diff --git a/tests/baselines/reference/importAttributes6(module=nodenext).types b/tests/baselines/reference/importAttributes6(module=nodenext).types new file mode 100644 index 0000000000000..bb218f496175f --- /dev/null +++ b/tests/baselines/reference/importAttributes6(module=nodenext).types @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/importAttributes/importAttributes6.ts] //// + +=== mod.mts === +import * as thing1 from "./mod.mjs" with { field: 0 }; +>thing1 : typeof thing1 +> : ^^^^^^^^^^^^^ +>field : any +> : ^^^ + +import * as thing2 from "./mod.mjs" with { field: `a` }; +>thing2 : typeof thing1 +> : ^^^^^^^^^^^^^ +>field : any +> : ^^^ + +import * as thing3 from "./mod.mjs" with { field: /a/g }; +>thing3 : typeof thing1 +> : ^^^^^^^^^^^^^ +>field : any +> : ^^^ +>/a/g : RegExp +> : ^^^^^^ + +import * as thing4 from "./mod.mjs" with { field: ["a"] }; +>thing4 : typeof thing1 +> : ^^^^^^^^^^^^^ +>field : any +> : ^^^ +>["a"] : string[] +> : ^^^^^^^^ +>"a" : "a" +> : ^^^ + +import * as thing5 from "./mod.mjs" with { field: { a: 0 } }; +>thing5 : typeof thing1 +> : ^^^^^^^^^^^^^ +>field : any +> : ^^^ +>{ a: 0 } : { a: number; } +> : ^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>0 : 0 +> : ^ + +import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() }; +>thing6 : typeof thing1 +> : ^^^^^^^^^^^^^ +>type : any +> : ^^^ +>field : any +> : ^^^ +>0..toString() : string +> : ^^^^^^ +>0..toString : (radix?: number) => string +> : ^ ^^^ ^^^^^ +>0. : 0 +> : ^ +>toString : (radix?: number) => string +> : ^ ^^^ ^^^^^ + diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3.errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension3.errors.txt rename to tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).errors.txt diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3.js b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).js similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension3.js rename to tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).js diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3.symbols b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).symbols similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension3.symbols rename to tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).symbols diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3.types b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).types similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension3.types rename to tests/baselines/reference/moduleResolutionWithoutExtension3(module=node18).types diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).errors.txt new file mode 100644 index 0000000000000..9571e971dea6f --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).errors.txt @@ -0,0 +1,14 @@ +/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.jsx'? + + +==== /src/foo.tsx (0 errors) ==== + export function foo() { + return ""; + } + +==== /src/bar.mts (1 errors) ==== + // Extensionless relative path ES import in an ES module + import { foo } from "./foo"; // should error, suggest adding ".jsx" + ~~~~~~~ +!!! error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.jsx'? + \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).js b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).js new file mode 100644 index 0000000000000..3b4e816e48e71 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).js @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts] //// + +//// [foo.tsx] +export function foo() { + return ""; +} + +//// [bar.mts] +// Extensionless relative path ES import in an ES module +import { foo } from "./foo"; // should error, suggest adding ".jsx" + + +//// [foo.jsx] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; +function foo() { + return ""; +} +//// [bar.mjs] +export {}; diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).symbols b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).symbols new file mode 100644 index 0000000000000..8c8671bd3cae4 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts] //// + +=== /src/foo.tsx === +export function foo() { +>foo : Symbol(foo, Decl(foo.tsx, 0, 0)) + + return ""; +} + +=== /src/bar.mts === +// Extensionless relative path ES import in an ES module +import { foo } from "./foo"; // should error, suggest adding ".jsx" +>foo : Symbol(foo, Decl(bar.mts, 1, 8)) + diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).types b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).types new file mode 100644 index 0000000000000..34e0dc5a61e00 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension3(module=nodenext).types @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts] //// + +=== /src/foo.tsx === +export function foo() { +>foo : () => string +> : ^^^^^^^^^^^^ + + return ""; +>"" : "" +> : ^^ +} + +=== /src/bar.mts === +// Extensionless relative path ES import in an ES module +import { foo } from "./foo"; // should error, suggest adding ".jsx" +>foo : any +> : ^^^ + diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4.errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension4.errors.txt rename to tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).errors.txt diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4.js b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).js similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension4.js rename to tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).js diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4.symbols b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).symbols similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension4.symbols rename to tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).symbols diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4.types b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).types similarity index 100% rename from tests/baselines/reference/moduleResolutionWithoutExtension4.types rename to tests/baselines/reference/moduleResolutionWithoutExtension4(module=node18).types diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).errors.txt new file mode 100644 index 0000000000000..b1a357f1f1d1a --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).errors.txt @@ -0,0 +1,14 @@ +/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.js'? + + +==== /src/foo.tsx (0 errors) ==== + export function foo() { + return ""; + } + +==== /src/bar.mts (1 errors) ==== + // Extensionless relative path ES import in an ES module + import { foo } from "./foo"; // should error, suggest adding ".js" + ~~~~~~~ +!!! error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.js'? + \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).js b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).js new file mode 100644 index 0000000000000..9fe42ebd8fb44 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).js @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts] //// + +//// [foo.tsx] +export function foo() { + return ""; +} + +//// [bar.mts] +// Extensionless relative path ES import in an ES module +import { foo } from "./foo"; // should error, suggest adding ".js" + + +//// [foo.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; +function foo() { + return ""; +} +//// [bar.mjs] +export {}; diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).symbols b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).symbols new file mode 100644 index 0000000000000..27f69a9a5e0b0 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts] //// + +=== /src/foo.tsx === +export function foo() { +>foo : Symbol(foo, Decl(foo.tsx, 0, 0)) + + return ""; +} + +=== /src/bar.mts === +// Extensionless relative path ES import in an ES module +import { foo } from "./foo"; // should error, suggest adding ".js" +>foo : Symbol(foo, Decl(bar.mts, 1, 8)) + diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).types b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).types new file mode 100644 index 0000000000000..35993101c47e6 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithoutExtension4(module=nodenext).types @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts] //// + +=== /src/foo.tsx === +export function foo() { +>foo : () => string +> : ^^^^^^^^^^^^ + + return ""; +>"" : "" +> : ^^ +} + +=== /src/bar.mts === +// Extensionless relative path ES import in an ES module +import { foo } from "./foo"; // should error, suggest adding ".js" +>foo : any +> : ^^^ + diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt index fe6d0aa7e42be..8ceed405f3085 100644 --- a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt @@ -1,5 +1,4 @@ error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. -index.cjs(2,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. !!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. @@ -11,11 +10,9 @@ index.cjs(2,23): error TS1479: The current file is a CommonJS module whose impor // esm format file import * as self from "package"; self; -==== index.cjs (1 errors) ==== +==== index.cjs (0 errors) ==== // esm format file import * as self from "package"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. self; ==== package.json (0 errors) ==== { diff --git a/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt b/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt index acd3f749846d5..52d56aff661b7 100644 --- a/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt @@ -1,19 +1,3 @@ -index.cts(2,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.js")' call instead. -index.cts(3,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.mjs")' call instead. -index.cts(6,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder/index.mjs")' call instead. -index.cts(9,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/index.mjs")' call instead. -index.cts(11,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.js")' call instead. -index.cts(12,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.mjs")' call instead. -index.cts(15,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./")' call instead. -index.cts(16,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index")' call instead. -index.cts(23,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another")' call instead. -index.cts(24,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/")' call instead. -index.cts(25,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index")' call instead. -index.cts(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.cts(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.cts(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.cts(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.cts(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.cts(75,21): error TS2307: Cannot find module './' or its corresponding type declarations. index.cts(76,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? index.cts(77,21): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. @@ -36,11 +20,6 @@ index.mts(21,22): error TS2835: Relative import paths need explicit file extensi index.mts(22,22): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. index.mts(23,22): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. index.mts(24,22): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? -index.mts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.mts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.mts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.mts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.mts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.mts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. index.mts(75,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? index.mts(76,21): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. @@ -63,11 +42,6 @@ index.ts(21,22): error TS2835: Relative import paths need explicit file extensio index.ts(22,22): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. index.ts(23,22): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. index.ts(24,22): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? -index.ts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.ts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.ts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.ts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -index.ts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.ts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. index.ts(75,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? index.ts(76,21): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. @@ -117,7 +91,7 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio // cjs format file const x = 1; export {x}; -==== index.mts (27 errors) ==== +==== index.mts (22 errors) ==== import * as m1 from "./index.js"; import * as m2 from "./index.mjs"; import * as m3 from "./index.cjs"; @@ -190,11 +164,7 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio // These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!) import m24 = require("./"); - ~~~~ -!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m25 = require("./index"); - ~~~~~~~~~ -!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m26 = require("./subfolder"); import m27 = require("./subfolder/"); import m28 = require("./subfolder/index"); @@ -202,14 +172,8 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio import m30 = require("./subfolder2/"); import m31 = require("./subfolder2/index"); import m32 = require("./subfolder2/another"); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m33 = require("./subfolder2/another/"); - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m34 = require("./subfolder2/another/index"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. void m24; void m25; void m26; @@ -260,39 +224,23 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio // esm format file const x = 1; export {x}; -==== index.cts (27 errors) ==== +==== index.cts (11 errors) ==== // ESM-format imports below should issue errors import * as m1 from "./index.js"; - ~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.js")' call instead. import * as m2 from "./index.mjs"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.mjs")' call instead. import * as m3 from "./index.cjs"; import * as m4 from "./subfolder/index.js"; import * as m5 from "./subfolder/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder/index.mjs")' call instead. import * as m6 from "./subfolder/index.cjs"; import * as m7 from "./subfolder2/index.js"; import * as m8 from "./subfolder2/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/index.mjs")' call instead. import * as m9 from "./subfolder2/index.cjs"; import * as m10 from "./subfolder2/another/index.js"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.js")' call instead. import * as m11 from "./subfolder2/another/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.mjs")' call instead. import * as m12 from "./subfolder2/another/index.cjs"; // The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file) import * as m13 from "./"; - ~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./")' call instead. import * as m14 from "./index"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index")' call instead. import * as m15 from "./subfolder"; import * as m16 from "./subfolder/"; import * as m17 from "./subfolder/index"; @@ -300,14 +248,8 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio import * as m19 from "./subfolder2/"; import * as m20 from "./subfolder2/index"; import * as m21 from "./subfolder2/another"; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another")' call instead. import * as m22 from "./subfolder2/another/"; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/")' call instead. import * as m23 from "./subfolder2/another/index"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index")' call instead. void m1; void m2; void m3; @@ -334,11 +276,7 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio // These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!) import m24 = require("./"); - ~~~~ -!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m25 = require("./index"); - ~~~~~~~~~ -!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m26 = require("./subfolder"); import m27 = require("./subfolder/"); import m28 = require("./subfolder/index"); @@ -346,14 +284,8 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio import m30 = require("./subfolder2/"); import m31 = require("./subfolder2/index"); import m32 = require("./subfolder2/another"); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m33 = require("./subfolder2/another/"); - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m34 = require("./subfolder2/another/index"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. void m24; void m25; void m26; @@ -403,7 +335,7 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio // cjs format file const x = 1; export {x}; -==== index.ts (27 errors) ==== +==== index.ts (22 errors) ==== import * as m1 from "./index.js"; import * as m2 from "./index.mjs"; import * as m3 from "./index.cjs"; @@ -476,11 +408,7 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio // These should _mostly_ work - `import = require` always desugars to require calls, which do have extension and index resolution (but can't load anything that resolves to esm!) import m24 = require("./"); - ~~~~ -!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m25 = require("./index"); - ~~~~~~~~~ -!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m26 = require("./subfolder"); import m27 = require("./subfolder/"); import m28 = require("./subfolder/index"); @@ -488,14 +416,8 @@ index.ts(84,21): error TS2835: Relative import paths need explicit file extensio import m30 = require("./subfolder2/"); import m31 = require("./subfolder2/index"); import m32 = require("./subfolder2/another"); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m33 = require("./subfolder2/another/"); - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m34 = require("./subfolder2/another/index"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. void m24; void m25; void m26; diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt index 13ade2052e398..ddbe7ecee4cb1 100644 --- a/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt @@ -1,18 +1,5 @@ -index.cjs(2,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.js")' call instead. -index.cjs(3,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.mjs")' call instead. -index.cjs(6,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder/index.mjs")' call instead. -index.cjs(9,21): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/index.mjs")' call instead. -index.cjs(11,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.js")' call instead. -index.cjs(12,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.mjs")' call instead. -index.cjs(15,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./")' call instead. -index.cjs(16,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index")' call instead. -index.cjs(23,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another")' call instead. -index.cjs(24,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/")' call instead. -index.cjs(25,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index")' call instead. index.cjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.cjs(51,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.cjs(52,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.cjs(52,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.cjs(53,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.cjs(54,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.cjs(55,1): error TS8002: 'import ... =' can only be used in TypeScript files. @@ -20,11 +7,8 @@ index.cjs(56,1): error TS8002: 'import ... =' can only be used in TypeScript fil index.cjs(57,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.cjs(58,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.cjs(59,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.cjs(59,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.cjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.cjs(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.cjs(61,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.cjs(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.cjs(75,21): error TS2307: Cannot find module './' or its corresponding type declarations. index.cjs(76,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? index.cjs(77,21): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. @@ -48,9 +32,7 @@ index.js(22,22): error TS2834: Relative import paths need explicit file extensio index.js(23,22): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. index.js(24,22): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? index.js(50,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.js(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.js(51,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.js(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.js(52,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.js(53,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.js(54,1): error TS8002: 'import ... =' can only be used in TypeScript files. @@ -58,11 +40,8 @@ index.js(55,1): error TS8002: 'import ... =' can only be used in TypeScript file index.js(56,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.js(57,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.js(58,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.js(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.js(59,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.js(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.js(60,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.js(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.js(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. index.js(75,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? index.js(76,21): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. @@ -86,9 +65,7 @@ index.mjs(22,22): error TS2834: Relative import paths need explicit file extensi index.mjs(23,22): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. index.mjs(24,22): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? index.mjs(50,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.mjs(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.mjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.mjs(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.mjs(52,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.mjs(53,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.mjs(54,1): error TS8002: 'import ... =' can only be used in TypeScript files. @@ -96,11 +73,8 @@ index.mjs(55,1): error TS8002: 'import ... =' can only be used in TypeScript fil index.mjs(56,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.mjs(57,1): error TS8002: 'import ... =' can only be used in TypeScript files. index.mjs(58,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.mjs(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.mjs(59,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.mjs(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.mjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.mjs(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.mjs(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. index.mjs(75,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? index.mjs(76,21): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. @@ -150,7 +124,7 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi // esm format file const x = 1; export {x}; -==== index.js (38 errors) ==== +==== index.js (33 errors) ==== import * as m1 from "./index.js"; import * as m2 from "./index.mjs"; import * as m3 from "./index.cjs"; @@ -225,13 +199,9 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi import m24 = require("./"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~ -!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m25 = require("./index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~ -!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m26 = require("./subfolder"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. @@ -253,18 +223,12 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi import m32 = require("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m33 = require("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m34 = require("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. void m24; void m25; void m26; @@ -314,39 +278,23 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi // esm format file const x = 1; export {x}; -==== index.cjs (38 errors) ==== +==== index.cjs (22 errors) ==== // ESM-format imports below should issue errors import * as m1 from "./index.js"; - ~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.js")' call instead. import * as m2 from "./index.mjs"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.mjs")' call instead. import * as m3 from "./index.cjs"; import * as m4 from "./subfolder/index.js"; import * as m5 from "./subfolder/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder/index.mjs")' call instead. import * as m6 from "./subfolder/index.cjs"; import * as m7 from "./subfolder2/index.js"; import * as m8 from "./subfolder2/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/index.mjs")' call instead. import * as m9 from "./subfolder2/index.cjs"; import * as m10 from "./subfolder2/another/index.js"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.js")' call instead. import * as m11 from "./subfolder2/another/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index.mjs")' call instead. import * as m12 from "./subfolder2/another/index.cjs"; // The next ones should _mostly_ work - cjs format files have index resolution and extension resolution (except for those which resolve to an esm format file) import * as m13 from "./"; - ~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./")' call instead. import * as m14 from "./index"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index")' call instead. import * as m15 from "./subfolder"; import * as m16 from "./subfolder/"; import * as m17 from "./subfolder/index"; @@ -354,14 +302,8 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi import * as m19 from "./subfolder2/"; import * as m20 from "./subfolder2/index"; import * as m21 from "./subfolder2/another"; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another")' call instead. import * as m22 from "./subfolder2/another/"; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/")' call instead. import * as m23 from "./subfolder2/another/index"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./subfolder2/another/index")' call instead. void m1; void m2; void m3; @@ -390,13 +332,9 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi import m24 = require("./"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~ -!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m25 = require("./index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~ -!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m26 = require("./subfolder"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. @@ -418,18 +356,12 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi import m32 = require("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m33 = require("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m34 = require("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. void m24; void m25; void m26; @@ -479,7 +411,7 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi // cjs format file const x = 1; export {x}; -==== index.mjs (38 errors) ==== +==== index.mjs (33 errors) ==== import * as m1 from "./index.js"; import * as m2 from "./index.mjs"; import * as m3 from "./index.cjs"; @@ -554,13 +486,9 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi import m24 = require("./"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~ -!!! error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m25 = require("./index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~ -!!! error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m26 = require("./subfolder"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. @@ -582,18 +510,12 @@ index.mjs(84,21): error TS2835: Relative import paths need explicit file extensi import m32 = require("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m33 = require("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import m34 = require("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. void m24; void m25; void m26; diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt index af5e14950e1c9..643335c38309c 100644 --- a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt @@ -1,6 +1,4 @@ error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. -index.cjs(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. -index.cjs(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. @@ -38,15 +36,11 @@ node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import mjsi.mjsSource; typei.mjsSource; ts.mjsSource; -==== index.cjs (2 errors) ==== +==== index.cjs (0 errors) ==== // cjs format file import * as cjs from "package/cjs"; import * as mjs from "package/mjs"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. import * as type from "package"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. cjs; mjs; type; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt index f5736b5998181..36f24f2759974 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt @@ -1,10 +1,5 @@ error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. -index.cjs(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. -index.cjs(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. -index.cjs(9,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. !!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. @@ -36,34 +31,26 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ cjsi; mjsi; typei; -==== index.cjs (3 errors) ==== +==== index.cjs (0 errors) ==== // cjs format file import * as cjs from "package/cjs"; import * as mjs from "package/mjs"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. import * as type from "package"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. cjs; mjs; type; import * as cjsi from "inner/cjs"; import * as mjsi from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as typei from "inner"; cjsi; mjsi; typei; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs"; ~~~ !!! error TS2303: Circular definition of import alias 'cjs'. import * as mjs from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as type from "inner"; export { cjs }; export { mjs }; @@ -76,12 +63,10 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.cts (1 errors) ==== +==== node_modules/inner/index.d.cts (0 errors) ==== // cjs format file import * as cjs from "inner/cjs"; import * as mjs from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as type from "inner"; export { cjs }; export { mjs }; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt index e845dc72f0284..ebcc53aeb3f1a 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt @@ -1,6 +1,4 @@ error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. -index.cjs(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#mjs")' call instead. -index.cjs(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#type")' call instead. !!! error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. @@ -20,15 +18,11 @@ index.cjs(4,23): error TS1479: The current file is a CommonJS module whose impor cjs; mjs; type; -==== index.cjs (2 errors) ==== +==== index.cjs (0 errors) ==== // esm format file import * as cjs from "#cjs"; import * as mjs from "#mjs"; - ~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#mjs")' call instead. import * as type from "#type"; - ~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#type")' call instead. cjs; mjs; type; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).errors.txt index 37254a32db001..ec89adcd2ffb3 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).errors.txt @@ -1,7 +1,4 @@ -index.cjs(3,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. ==== index.js (0 errors) ==== @@ -20,24 +17,20 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ cjsi; mjsi; typei; -==== index.cjs (1 errors) ==== +==== index.cjs (0 errors) ==== // cjs format file import * as cjsi from "inner/cjs/index"; import * as mjsi from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as typei from "inner/js/index"; cjsi; mjsi; typei; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs/index"; ~~~ !!! error TS2303: Circular definition of import alias 'cjs'. import * as mjs from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as type from "inner/js/index"; export { cjs }; export { mjs }; @@ -50,12 +43,10 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.cts (1 errors) ==== +==== node_modules/inner/index.d.cts (0 errors) ==== // cjs format file import * as cjs from "inner/cjs/index"; import * as mjs from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as type from "inner/js/index"; export { cjs }; export { mjs }; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).errors.txt index dbaadfd82f599..6c025f4ba773b 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).errors.txt @@ -1,7 +1,4 @@ -index.cjs(3,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. ==== index.js (0 errors) ==== @@ -20,24 +17,20 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ cjsi; mjsi; typei; -==== index.cjs (1 errors) ==== +==== index.cjs (0 errors) ==== // cjs format file import * as cjsi from "inner/cjs/index.cjs"; import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. import * as typei from "inner/js/index.js"; cjsi; mjsi; typei; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs/index.cjs"; ~~~ !!! error TS2303: Circular definition of import alias 'cjs'. import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. import * as type from "inner/js/index.js"; export { cjs }; export { mjs }; @@ -50,12 +43,10 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.cts (1 errors) ==== +==== node_modules/inner/index.d.cts (0 errors) ==== // cjs format file import * as cjs from "inner/cjs/index.cjs"; import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. import * as type from "inner/js/index.js"; export { cjs }; export { mjs }; diff --git a/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=nodenext).errors.txt index a4ba6ab81a73f..2a46b9875db6e 100644 --- a/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=nodenext).errors.txt @@ -1,24 +1,15 @@ index.js(3,1): error TS8002: 'import ... =' can only be used in TypeScript files. -index.js(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. index.js(5,1): error TS8002: 'import ... =' can only be used in TypeScript files. -subfolder/index.js(2,17): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../index.js")' call instead. - To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`. subfolder/index.js(3,1): error TS8002: 'import ... =' can only be used in TypeScript files. -subfolder/index.js(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. subfolder/index.js(5,1): error TS8002: 'import ... =' can only be used in TypeScript files. -==== subfolder/index.js (4 errors) ==== +==== subfolder/index.js (2 errors) ==== // cjs format file import {h} from "../index.js"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../index.js")' call instead. -!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mjs' or create a local package.json file with `{ "type": "module" }`. import mod = require("../index.js"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~~ -!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import {f as _f} from "./index.js"; import mod2 = require("./index.js"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -28,14 +19,12 @@ subfolder/index.js(5,1): error TS8002: 'import ... =' can only be used in TypeSc const mod4 = await import ("./index.js"); h(); } -==== index.js (3 errors) ==== +==== index.js (2 errors) ==== // esm format file import {h as _h} from "./index.js"; import mod = require("./index.js"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS8002: 'import ... =' can only be used in TypeScript files. - ~~~~~~~~~~~~ -!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. import {f} from "./subfolder/index.js"; import mod2 = require("./subfolder/index.js"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/nodeModulesCJSEmit1.errors.txt b/tests/baselines/reference/nodeModulesCJSEmit1(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesCJSEmit1.errors.txt rename to tests/baselines/reference/nodeModulesCJSEmit1(module=node18).errors.txt diff --git a/tests/baselines/reference/nodeModulesCJSEmit1.js b/tests/baselines/reference/nodeModulesCJSEmit1(module=node18).js similarity index 100% rename from tests/baselines/reference/nodeModulesCJSEmit1.js rename to tests/baselines/reference/nodeModulesCJSEmit1(module=node18).js diff --git a/tests/baselines/reference/nodeModulesCJSEmit1(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesCJSEmit1(module=nodenext).errors.txt new file mode 100644 index 0000000000000..5e3604d311b92 --- /dev/null +++ b/tests/baselines/reference/nodeModulesCJSEmit1(module=nodenext).errors.txt @@ -0,0 +1,27 @@ +/3.cjs(2,1): error TS2304: Cannot find name 'exports'. +/5.cjs(2,8): error TS1192: Module '"/3"' has no default export. + + +==== /1.cjs (0 errors) ==== + module.exports = {}; + +==== /2.cjs (0 errors) ==== + exports.foo = 0; + +==== /3.cjs (1 errors) ==== + import "foo"; + exports.foo = {}; + ~~~~~~~ +!!! error TS2304: Cannot find name 'exports'. + +==== /4.cjs (0 errors) ==== + ; + +==== /5.cjs (1 errors) ==== + import two from "./2.cjs"; // ok + import three from "./3.cjs"; // error + ~~~~~ +!!! error TS1192: Module '"/3"' has no default export. + two.foo; + three.foo; + \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesCJSEmit1(module=nodenext).js b/tests/baselines/reference/nodeModulesCJSEmit1(module=nodenext).js new file mode 100644 index 0000000000000..5918985c97426 --- /dev/null +++ b/tests/baselines/reference/nodeModulesCJSEmit1(module=nodenext).js @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/node/nodeModulesCJSEmit1.ts] //// + +//// [1.cjs] +module.exports = {}; + +//// [2.cjs] +exports.foo = 0; + +//// [3.cjs] +import "foo"; +exports.foo = {}; + +//// [4.cjs] +; + +//// [5.cjs] +import two from "./2.cjs"; // ok +import three from "./3.cjs"; // error +two.foo; +three.foo; + + +//// [1.cjs] +"use strict"; +module.exports = {}; +//// [2.cjs] +"use strict"; +exports.foo = 0; +//// [3.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +require("foo"); +exports.foo = {}; +//// [4.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +; +//// [5.cjs] +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const _2_cjs_1 = __importDefault(require("./2.cjs")); // ok +const _3_cjs_1 = __importDefault(require("./3.cjs")); // error +_2_cjs_1.default.foo; +_3_cjs_1.default.foo; diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt index 41703e1cf0cc1..d078baf601f70 100644 --- a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt @@ -1,6 +1,4 @@ error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. -index.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. -index.cts(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. @@ -38,15 +36,11 @@ node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import mjsi.mjsSource; typei.mjsSource; ts.mjsSource; -==== index.cts (2 errors) ==== +==== index.cts (0 errors) ==== // cjs format file import * as cjs from "package/cjs"; import * as mjs from "package/mjs"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. import * as type from "package"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. cjs; mjs; type; diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node18).js similarity index 100% rename from tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js rename to tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node18).js diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.symbols b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node18).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.symbols rename to tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node18).symbols diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.types b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node18).types similarity index 100% rename from tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.types rename to tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node18).types diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).js b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).js new file mode 100644 index 0000000000000..3afe5f2a3f639 --- /dev/null +++ b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).js @@ -0,0 +1,171 @@ +//// [tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts] //// + +//// [index.ts] +// esm format file +export {}; +//// [index.mts] +// esm format file +export {}; +//// [index.cts] +// cjs format file +export {}; +//// [other.ts] +// esm format file +export const a = await import("package/cjs"); +export const b = await import("package/mjs"); +export const c = await import("package"); +export const f = await import("inner"); +//// [other2.ts] +// esm format file +export const d = await import("inner/cjs"); +export const e = await import("inner/mjs"); +//// [other.mts] +// esm format file +export const a = await import("package/cjs"); +export const b = await import("package/mjs"); +export const c = await import("package"); +export const f = await import("inner"); +//// [other2.mts] +// esm format file +export const d = await import("inner/cjs"); +export const e = await import("inner/mjs"); +//// [other.cts] +// cjs format file, no TLA +export const a = import("package/cjs"); +export const b = import("package/mjs"); +export const c = import("package"); +export const f = import("inner"); +//// [other2.cts] +// cjs format file, no TLA +export const d = import("inner/cjs"); +export const e = import("inner/mjs"); +//// [index.d.ts] +// cjs format file +export const cjsMain = true; +//// [index.d.mts] +// esm format file +export const esm = true; +//// [index.d.cts] +// cjs format file +export const cjsNonmain = true; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": { + "./cjs": "./index.cjs", + "./mjs": "./index.mjs", + ".": "./index.js" + } +} +//// [package.json] +{ + "name": "inner", + "private": true, + "exports": { + "./cjs": "./index.cjs", + "./mjs": "./index.mjs", + ".": "./index.js" + } +} + +//// [index.js] +export {}; +//// [index.mjs] +export {}; +//// [index.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//// [other.js] +// esm format file +export const a = await import("package/cjs"); +export const b = await import("package/mjs"); +export const c = await import("package"); +export const f = await import("inner"); +//// [other2.js] +// esm format file +export const d = await import("inner/cjs"); +export const e = await import("inner/mjs"); +//// [other.mjs] +// esm format file +export const a = await import("package/cjs"); +export const b = await import("package/mjs"); +export const c = await import("package"); +export const f = await import("inner"); +//// [other2.mjs] +// esm format file +export const d = await import("inner/cjs"); +export const e = await import("inner/mjs"); +//// [other.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = exports.c = exports.b = exports.a = void 0; +// cjs format file, no TLA +exports.a = import("package/cjs"); +exports.b = import("package/mjs"); +exports.c = import("package"); +exports.f = import("inner"); +//// [other2.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = exports.d = void 0; +// cjs format file, no TLA +exports.d = import("inner/cjs"); +exports.e = import("inner/mjs"); + + +//// [index.d.ts] +export {}; +//// [index.d.mts] +export {}; +//// [index.d.cts] +export {}; +//// [other.d.ts] +export declare const a: { + default: typeof import("package/cjs"); +}; +export declare const b: typeof import("package/mjs"); +export declare const c: typeof import("package"); +export declare const f: { + default: typeof import("inner"); + cjsMain: true; +}; +//// [other2.d.ts] +export declare const d: { + default: typeof import("inner/cjs"); + cjsNonmain: true; +}; +export declare const e: typeof import("inner/mjs"); +//// [other.d.mts] +export declare const a: { + default: typeof import("package/cjs"); +}; +export declare const b: typeof import("package/mjs"); +export declare const c: typeof import("package"); +export declare const f: { + default: typeof import("inner"); + cjsMain: true; +}; +//// [other2.d.mts] +export declare const d: { + default: typeof import("inner/cjs"); + cjsNonmain: true; +}; +export declare const e: typeof import("inner/mjs"); +//// [other.d.cts] +export declare const a: Promise<{ + default: typeof import("./index.cjs"); +}>; +export declare const b: Promise; +export declare const c: Promise; +export declare const f: Promise<{ + default: typeof import("inner"); + cjsMain: true; +}>; +//// [other2.d.cts] +export declare const d: Promise<{ + default: typeof import("inner/cjs"); + cjsNonmain: true; +}>; +export declare const e: Promise; diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).symbols b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).symbols new file mode 100644 index 0000000000000..653778e00a97f --- /dev/null +++ b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).symbols @@ -0,0 +1,113 @@ +//// [tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts] //// + +=== index.ts === + +// esm format file +export {}; +=== index.mts === + +// esm format file +export {}; +=== index.cts === + +// cjs format file +export {}; +=== other.ts === +// esm format file +export const a = await import("package/cjs"); +>a : Symbol(a, Decl(other.ts, 1, 12)) +>"package/cjs" : Symbol("index", Decl(index.cts, 0, 0)) + +export const b = await import("package/mjs"); +>b : Symbol(b, Decl(other.ts, 2, 12)) +>"package/mjs" : Symbol("index", Decl(index.mts, 0, 0)) + +export const c = await import("package"); +>c : Symbol(c, Decl(other.ts, 3, 12)) +>"package" : Symbol("index", Decl(index.ts, 0, 0)) + +export const f = await import("inner"); +>f : Symbol(f, Decl(other.ts, 4, 12)) +>"inner" : Symbol("node_modules/inner/index", Decl(index.d.ts, 0, 0)) + +=== other2.ts === +// esm format file +export const d = await import("inner/cjs"); +>d : Symbol(d, Decl(other2.ts, 1, 12)) +>"inner/cjs" : Symbol("node_modules/inner/index", Decl(index.d.cts, 0, 0)) + +export const e = await import("inner/mjs"); +>e : Symbol(e, Decl(other2.ts, 2, 12)) +>"inner/mjs" : Symbol("node_modules/inner/index", Decl(index.d.mts, 0, 0)) + +=== other.mts === +// esm format file +export const a = await import("package/cjs"); +>a : Symbol(a, Decl(other.mts, 1, 12)) +>"package/cjs" : Symbol("index", Decl(index.cts, 0, 0)) + +export const b = await import("package/mjs"); +>b : Symbol(b, Decl(other.mts, 2, 12)) +>"package/mjs" : Symbol("index", Decl(index.mts, 0, 0)) + +export const c = await import("package"); +>c : Symbol(c, Decl(other.mts, 3, 12)) +>"package" : Symbol("index", Decl(index.ts, 0, 0)) + +export const f = await import("inner"); +>f : Symbol(f, Decl(other.mts, 4, 12)) +>"inner" : Symbol("node_modules/inner/index", Decl(index.d.ts, 0, 0)) + +=== other2.mts === +// esm format file +export const d = await import("inner/cjs"); +>d : Symbol(d, Decl(other2.mts, 1, 12)) +>"inner/cjs" : Symbol("node_modules/inner/index", Decl(index.d.cts, 0, 0)) + +export const e = await import("inner/mjs"); +>e : Symbol(e, Decl(other2.mts, 2, 12)) +>"inner/mjs" : Symbol("node_modules/inner/index", Decl(index.d.mts, 0, 0)) + +=== other.cts === +// cjs format file, no TLA +export const a = import("package/cjs"); +>a : Symbol(a, Decl(other.cts, 1, 12)) +>"package/cjs" : Symbol("index", Decl(index.cts, 0, 0)) + +export const b = import("package/mjs"); +>b : Symbol(b, Decl(other.cts, 2, 12)) +>"package/mjs" : Symbol("index", Decl(index.mts, 0, 0)) + +export const c = import("package"); +>c : Symbol(c, Decl(other.cts, 3, 12)) +>"package" : Symbol("index", Decl(index.ts, 0, 0)) + +export const f = import("inner"); +>f : Symbol(f, Decl(other.cts, 4, 12)) +>"inner" : Symbol("node_modules/inner/index", Decl(index.d.ts, 0, 0)) + +=== other2.cts === +// cjs format file, no TLA +export const d = import("inner/cjs"); +>d : Symbol(d, Decl(other2.cts, 1, 12)) +>"inner/cjs" : Symbol("node_modules/inner/index", Decl(index.d.cts, 0, 0)) + +export const e = import("inner/mjs"); +>e : Symbol(e, Decl(other2.cts, 2, 12)) +>"inner/mjs" : Symbol("node_modules/inner/index", Decl(index.d.mts, 0, 0)) + +=== node_modules/inner/index.d.ts === +// cjs format file +export const cjsMain = true; +>cjsMain : Symbol(cjsMain, Decl(index.d.ts, 1, 12)) + +=== node_modules/inner/index.d.mts === +// esm format file +export const esm = true; +>esm : Symbol(esm, Decl(index.d.mts, 1, 12)) + +=== node_modules/inner/index.d.cts === +// cjs format file +export const cjsNonmain = true; +>cjsNonmain : Symbol(cjsNonmain, Decl(index.d.cts, 1, 12)) + diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).types b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).types new file mode 100644 index 0000000000000..597b7cc403c48 --- /dev/null +++ b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).types @@ -0,0 +1,218 @@ +//// [tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts] //// + +=== index.ts === + +// esm format file +export {}; +=== index.mts === + +// esm format file +export {}; +=== index.cts === + +// cjs format file +export {}; +=== other.ts === +// esm format file +export const a = await import("package/cjs"); +>a : { default: typeof import("index"); } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await import("package/cjs") : { default: typeof import("index"); } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("package/cjs") : Promise<{ default: typeof import("index"); }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package/cjs" : "package/cjs" +> : ^^^^^^^^^^^^^ + +export const b = await import("package/mjs"); +>b : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>await import("package/mjs") : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>import("package/mjs") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package/mjs" : "package/mjs" +> : ^^^^^^^^^^^^^ + +export const c = await import("package"); +>c : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>await import("package") : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>import("package") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package" : "package" +> : ^^^^^^^^^ + +export const f = await import("inner"); +>f : { default: typeof import("node_modules/inner/index"); cjsMain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>await import("inner") : { default: typeof import("node_modules/inner/index"); cjsMain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>import("inner") : Promise<{ default: typeof import("node_modules/inner/index"); cjsMain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>"inner" : "inner" +> : ^^^^^^^ + +=== other2.ts === +// esm format file +export const d = await import("inner/cjs"); +>d : { default: typeof import("node_modules/inner/index"); cjsNonmain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>await import("inner/cjs") : { default: typeof import("node_modules/inner/index"); cjsNonmain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>import("inner/cjs") : Promise<{ default: typeof import("node_modules/inner/index"); cjsNonmain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>"inner/cjs" : "inner/cjs" +> : ^^^^^^^^^^^ + +export const e = await import("inner/mjs"); +>e : typeof import("node_modules/inner/index") +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await import("inner/mjs") : typeof import("node_modules/inner/index") +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("inner/mjs") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"inner/mjs" : "inner/mjs" +> : ^^^^^^^^^^^ + +=== other.mts === +// esm format file +export const a = await import("package/cjs"); +>a : { default: typeof import("index"); } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await import("package/cjs") : { default: typeof import("index"); } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("package/cjs") : Promise<{ default: typeof import("index"); }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package/cjs" : "package/cjs" +> : ^^^^^^^^^^^^^ + +export const b = await import("package/mjs"); +>b : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>await import("package/mjs") : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>import("package/mjs") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package/mjs" : "package/mjs" +> : ^^^^^^^^^^^^^ + +export const c = await import("package"); +>c : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>await import("package") : typeof import("index") +> : ^^^^^^^^^^^^^^^^^^^^^^ +>import("package") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package" : "package" +> : ^^^^^^^^^ + +export const f = await import("inner"); +>f : { default: typeof import("node_modules/inner/index"); cjsMain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>await import("inner") : { default: typeof import("node_modules/inner/index"); cjsMain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>import("inner") : Promise<{ default: typeof import("node_modules/inner/index"); cjsMain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>"inner" : "inner" +> : ^^^^^^^ + +=== other2.mts === +// esm format file +export const d = await import("inner/cjs"); +>d : { default: typeof import("node_modules/inner/index"); cjsNonmain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>await import("inner/cjs") : { default: typeof import("node_modules/inner/index"); cjsNonmain: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>import("inner/cjs") : Promise<{ default: typeof import("node_modules/inner/index"); cjsNonmain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>"inner/cjs" : "inner/cjs" +> : ^^^^^^^^^^^ + +export const e = await import("inner/mjs"); +>e : typeof import("node_modules/inner/index") +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await import("inner/mjs") : typeof import("node_modules/inner/index") +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("inner/mjs") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"inner/mjs" : "inner/mjs" +> : ^^^^^^^^^^^ + +=== other.cts === +// cjs format file, no TLA +export const a = import("package/cjs"); +>a : Promise<{ default: typeof import("index"); }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("package/cjs") : Promise<{ default: typeof import("index"); }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package/cjs" : "package/cjs" +> : ^^^^^^^^^^^^^ + +export const b = import("package/mjs"); +>b : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("package/mjs") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package/mjs" : "package/mjs" +> : ^^^^^^^^^^^^^ + +export const c = import("package"); +>c : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("package") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"package" : "package" +> : ^^^^^^^^^ + +export const f = import("inner"); +>f : Promise<{ default: typeof import("node_modules/inner/index"); cjsMain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>import("inner") : Promise<{ default: typeof import("node_modules/inner/index"); cjsMain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>"inner" : "inner" +> : ^^^^^^^ + +=== other2.cts === +// cjs format file, no TLA +export const d = import("inner/cjs"); +>d : Promise<{ default: typeof import("node_modules/inner/index"); cjsNonmain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>import("inner/cjs") : Promise<{ default: typeof import("node_modules/inner/index"); cjsNonmain: true; }> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ +>"inner/cjs" : "inner/cjs" +> : ^^^^^^^^^^^ + +export const e = import("inner/mjs"); +>e : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>import("inner/mjs") : Promise +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"inner/mjs" : "inner/mjs" +> : ^^^^^^^^^^^ + +=== node_modules/inner/index.d.ts === +// cjs format file +export const cjsMain = true; +>cjsMain : true +> : ^^^^ +>true : true +> : ^^^^ + +=== node_modules/inner/index.d.mts === +// esm format file +export const esm = true; +>esm : true +> : ^^^^ +>true : true +> : ^^^^ + +=== node_modules/inner/index.d.cts === +// cjs format file +export const cjsNonmain = true; +>cjsNonmain : true +> : ^^^^ +>true : true +> : ^^^^ + diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt index f2737ac29f32f..ed1769f353bbb 100644 --- a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt @@ -1,11 +1,6 @@ error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. -index.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. -index.cts(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. -index.cts(9,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. node_modules/inner/index.d.cts(5,1): error TS1036: Statements are not allowed in ambient contexts. node_modules/inner/index.d.mts(5,1): error TS1036: Statements are not allowed in ambient contexts. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. node_modules/inner/index.d.ts(5,1): error TS1036: Statements are not allowed in ambient contexts. @@ -38,32 +33,24 @@ node_modules/inner/index.d.ts(5,1): error TS1036: Statements are not allowed in export const d = cjsi; export const e = mjsi; export const f = typei; -==== index.cts (3 errors) ==== +==== index.cts (0 errors) ==== // cjs format file import * as cjs from "package/cjs"; import * as mjs from "package/mjs"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. import * as type from "package"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. export const a = cjs; export const b = mjs; export const c = type; import * as cjsi from "inner/cjs"; import * as mjsi from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as typei from "inner"; export const d = cjsi; export const e = mjsi; export const f = typei; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs"; import * as mjs from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as type from "inner"; cjs; ~~~ @@ -82,12 +69,10 @@ node_modules/inner/index.d.ts(5,1): error TS1036: Statements are not allowed in mjs; type; export const esm = true; -==== node_modules/inner/index.d.cts (2 errors) ==== +==== node_modules/inner/index.d.cts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs"; import * as mjs from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as type from "inner"; cjs; ~~~ diff --git a/tests/baselines/reference/nodeModulesExportsDoubleAsterisk.errors.txt b/tests/baselines/reference/nodeModulesExportsDoubleAsterisk(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesExportsDoubleAsterisk.errors.txt rename to tests/baselines/reference/nodeModulesExportsDoubleAsterisk(module=node18).errors.txt diff --git a/tests/baselines/reference/nodeModulesExportsDoubleAsterisk(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesExportsDoubleAsterisk(module=nodenext).errors.txt new file mode 100644 index 0000000000000..1ab8b6bb276e0 --- /dev/null +++ b/tests/baselines/reference/nodeModulesExportsDoubleAsterisk(module=nodenext).errors.txt @@ -0,0 +1,21 @@ +/main.mts(1,16): error TS2307: Cannot find module 'double-asterisk/a/*/b/*/c/*' or its corresponding type declarations. + + +==== /node_modules/double-asterisk/package.json (0 errors) ==== + { + "name": "double-asterisk", + "version": "1.0.0", + "type": "module", + "exports": { + "./a/*/b/*/c/*": "./example.js" + } + } + +==== /node_modules/double-asterisk/example.d.ts (0 errors) ==== + export {}; + +==== /main.mts (1 errors) ==== + import {} from "double-asterisk/a/*/b/*/c/*"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'double-asterisk/a/*/b/*/c/*' or its corresponding type declarations. + \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt index b1d54f8e2145b..667a16dc4a59b 100644 --- a/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt @@ -1,12 +1,15 @@ -otherc.cts(1,35): error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. +index.ts(1,35): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. +otherc.cts(1,35): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. -==== index.ts (0 errors) ==== +==== index.ts (1 errors) ==== import json from "./package.json" assert { type: "json" }; + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ==== otherc.cts (1 errors) ==== import json from "./package.json" assert { type: "json" }; // should error, cjs mode imports don't support assertions - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. const json2 = import("./package.json", { assert: { type: "json" } }); // should be fine ==== package.json (0 errors) ==== { diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).errors.txt index e77140972a1ce..85d78cd955097 100644 --- a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).errors.txt @@ -1,6 +1,6 @@ -/index.ts(6,50): error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. +/index.ts(6,50): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. /index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'. -/index.ts(7,49): error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. +/index.ts(7,49): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ==== /index.ts (3 errors) ==== @@ -10,13 +10,13 @@ export interface LocalInterface extends RequireInterface, ImportInterface {} import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" }; ~~~~~~~~~~~~~~~ !!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. export interface Loc extends Req, Imp {} export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" }; diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=nodenext).errors.txt index 47c2ad040c0db..c9a427dbbfe63 100644 --- a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=nodenext).errors.txt @@ -1,6 +1,6 @@ /index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'. -/index.ts(6,50): error TS1454: `resolution-mode` can only be set for type-only imports. -/index.ts(7,49): error TS1454: `resolution-mode` can only be set for type-only imports. +/index.ts(6,50): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. +/index.ts(7,49): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ==== /index.ts (3 errors) ==== @@ -12,11 +12,11 @@ import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" }; ~~~~~~~~~~~~~~~~ !!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1454: `resolution-mode` can only be set for type-only imports. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1454: `resolution-mode` can only be set for type-only imports. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. export interface Loc extends Req, Imp {} export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" }; diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=nodenext).errors.txt index e1be07261876a..dbb1ccdb5af49 100644 --- a/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=nodenext).errors.txt @@ -1,27 +1,27 @@ -/index.ts(2,45): error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. +/index.ts(2,45): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. /index.ts(2,73): error TS1453: `resolution-mode` should be either `require` or `import`. /index.ts(4,10): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'. -/index.ts(4,39): error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. -/index.ts(6,76): error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. +/index.ts(4,39): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. +/index.ts(6,76): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ==== /index.ts (5 errors) ==== // incorrect mode import type { RequireInterface } from "pkg" assert { "resolution-mode": "foobar" }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. ~~~~~~~~ !!! error TS1453: `resolution-mode` should be either `require` or `import`. // not type-only import { ImportInterface } from "pkg" assert { "resolution-mode": "import" }; ~~~~~~~~~~~~~~~ !!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. // not exclusively type-only import {type RequireInterface as Req, RequireInterface as Req2} from "pkg" assert { "resolution-mode": "require" }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2836: Import assertions are not allowed on statements that compile to CommonJS 'require' calls. + ~~~~~~ +!!! error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'. export interface LocalInterface extends RequireInterface, ImportInterface {} diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt index 1c28214a47363..451122bc5b66b 100644 --- a/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt @@ -1,10 +1,5 @@ error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. -index.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. -index.cts(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. -index.cts(9,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. !!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate. @@ -36,34 +31,26 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ cjsi; mjsi; typei; -==== index.cts (3 errors) ==== +==== index.cts (0 errors) ==== // cjs format file import * as cjs from "package/cjs"; import * as mjs from "package/mjs"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead. import * as type from "package"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. cjs; mjs; type; import * as cjsi from "inner/cjs"; import * as mjsi from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as typei from "inner"; cjsi; mjsi; typei; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs"; ~~~ !!! error TS2303: Circular definition of import alias 'cjs'. import * as mjs from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as type from "inner"; export { cjs }; export { mjs }; @@ -76,12 +63,10 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.cts (1 errors) ==== +==== node_modules/inner/index.d.cts (0 errors) ==== // cjs format file import * as cjs from "inner/cjs"; import * as mjs from "inner/mjs"; - ~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs")' call instead. import * as type from "inner"; export { cjs }; export { mjs }; diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).errors.txt deleted file mode 100644 index 1599e814addf0..0000000000000 --- a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).errors.txt +++ /dev/null @@ -1,44 +0,0 @@ -index.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#mjs")' call instead. -index.cts(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#type")' call instead. - - -==== index.ts (0 errors) ==== - // esm format file - import * as cjs from "#cjs"; - import * as mjs from "#mjs"; - import * as type from "#type"; - cjs; - mjs; - type; -==== index.mts (0 errors) ==== - // esm format file - import * as cjs from "#cjs"; - import * as mjs from "#mjs"; - import * as type from "#type"; - cjs; - mjs; - type; -==== index.cts (2 errors) ==== - // esm format file - import * as cjs from "#cjs"; - import * as mjs from "#mjs"; - ~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#mjs")' call instead. - import * as type from "#type"; - ~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("#type")' call instead. - cjs; - mjs; - type; -==== package.json (0 errors) ==== - { - "name": "package", - "private": true, - "type": "module", - "exports": "./index.js", - "imports": { - "#cjs": "./index.cjs", - "#mjs": "./index.mjs", - "#type": "./index.js" - } - } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).errors.txt index 624ebe117783b..af540307689a6 100644 --- a/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).errors.txt @@ -1,7 +1,4 @@ -index.cts(3,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. ==== index.ts (0 errors) ==== @@ -20,24 +17,20 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ cjsi; mjsi; typei; -==== index.cts (1 errors) ==== +==== index.cts (0 errors) ==== // cjs format file import * as cjsi from "inner/cjs/index"; import * as mjsi from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as typei from "inner/js/index"; cjsi; mjsi; typei; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs/index"; ~~~ !!! error TS2303: Circular definition of import alias 'cjs'. import * as mjs from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as type from "inner/js/index"; export { cjs }; export { mjs }; @@ -50,12 +43,10 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.cts (1 errors) ==== +==== node_modules/inner/index.d.cts (0 errors) ==== // cjs format file import * as cjs from "inner/cjs/index"; import * as mjs from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as type from "inner/js/index"; export { cjs }; export { mjs }; diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).errors.txt index fd89603b91a5c..2c733359bbdea 100644 --- a/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).errors.txt @@ -1,7 +1,6 @@ index.cts(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. index.cts(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. index.cts(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. -index.cts(9,24): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. index.mts(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. index.mts(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. index.mts(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. @@ -17,9 +16,7 @@ node_modules/inner/exclude/index.d.mts(4,23): error TS2307: Cannot find module ' node_modules/inner/exclude/index.d.ts(2,22): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. node_modules/inner/exclude/index.d.ts(3,22): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. node_modules/inner/exclude/index.d.ts(4,23): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. ==== index.ts (3 errors) ==== @@ -62,7 +59,7 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ cjsi2; mjsi2; typei2; -==== index.cts (4 errors) ==== +==== index.cts (3 errors) ==== // cjs format file import * as cjsi from "inner/cjs/exclude/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -78,8 +75,6 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ typei; import * as cjsi2 from "inner/cjs/index"; import * as mjsi2 from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as typei2 from "inner/js/index"; cjsi2; mjsi2; @@ -126,14 +121,12 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs/index"; ~~~ !!! error TS2303: Circular definition of import alias 'cjs'. import * as mjs from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as type from "inner/js/index"; export { cjs }; export { mjs }; @@ -146,12 +139,10 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.cts (1 errors) ==== +==== node_modules/inner/index.d.cts (0 errors) ==== // cjs format file import * as cjs from "inner/cjs/index"; import * as mjs from "inner/mjs/index"; - ~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index")' call instead. import * as type from "inner/js/index"; export { cjs }; export { mjs }; diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).errors.txt index 0ec3660afe010..60c35df075b5d 100644 --- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).errors.txt @@ -1,7 +1,4 @@ -index.cts(3,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. -node_modules/inner/index.d.cts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. -node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. ==== index.ts (0 errors) ==== @@ -20,24 +17,20 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ cjsi; mjsi; typei; -==== index.cts (1 errors) ==== +==== index.cts (0 errors) ==== // cjs format file import * as cjsi from "inner/cjs/index.cjs"; import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. import * as typei from "inner/js/index.js"; cjsi; mjsi; typei; -==== node_modules/inner/index.d.ts (2 errors) ==== +==== node_modules/inner/index.d.ts (1 errors) ==== // cjs format file import * as cjs from "inner/cjs/index.cjs"; ~~~ !!! error TS2303: Circular definition of import alias 'cjs'. import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. import * as type from "inner/js/index.js"; export { cjs }; export { mjs }; @@ -50,12 +43,10 @@ node_modules/inner/index.d.ts(3,22): error TS1479: The current file is a CommonJ export { cjs }; export { mjs }; export { type }; -==== node_modules/inner/index.d.cts (1 errors) ==== +==== node_modules/inner/index.d.cts (0 errors) ==== // cjs format file import * as cjs from "inner/cjs/index.cjs"; import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("inner/mjs/index.mjs")' call instead. import * as type from "inner/js/index.js"; export { cjs }; export { mjs }; diff --git a/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=nodenext).errors.txt deleted file mode 100644 index 44537a76c954c..0000000000000 --- a/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=nodenext).errors.txt +++ /dev/null @@ -1,45 +0,0 @@ -index.ts(3,22): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. -subfolder/index.ts(2,17): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../index.js")' call instead. - To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`. -subfolder/index.ts(3,22): error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. - - -==== subfolder/index.ts (2 errors) ==== - // cjs format file - import {h} from "../index.js"; - ~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../index.js")' call instead. -!!! error TS1479: To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`. - import mod = require("../index.js"); - ~~~~~~~~~~~~~ -!!! error TS1471: Module '../index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. - import {f as _f} from "./index.js"; - import mod2 = require("./index.js"); - export async function f() { - const mod3 = await import ("../index.js"); - const mod4 = await import ("./index.js"); - h(); - } -==== index.ts (1 errors) ==== - // esm format file - import {h as _h} from "./index.js"; - import mod = require("./index.js"); - ~~~~~~~~~~~~ -!!! error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead. - import {f} from "./subfolder/index.js"; - import mod2 = require("./subfolder/index.js"); - export async function h() { - const mod3 = await import ("./index.js"); - const mod4 = await import ("./subfolder/index.js"); - f(); - } -==== package.json (0 errors) ==== - { - "name": "package", - "private": true, - "type": "module" - } -==== subfolder/package.json (0 errors) ==== - { - "type": "commonjs" - } \ No newline at end of file diff --git a/tests/baselines/reference/nodePackageSelfName(module=nodenext).errors.txt b/tests/baselines/reference/nodePackageSelfName(module=nodenext).errors.txt deleted file mode 100644 index 0c45f9b8f43a1..0000000000000 --- a/tests/baselines/reference/nodePackageSelfName(module=nodenext).errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -index.cts(2,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. - - -==== index.ts (0 errors) ==== - // esm format file - import * as self from "package"; - self; -==== index.mts (0 errors) ==== - // esm format file - import * as self from "package"; - self; -==== index.cts (1 errors) ==== - // esm format file - import * as self from "package"; - ~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead. - self; -==== package.json (0 errors) ==== - { - "name": "package", - "private": true, - "type": "module", - "exports": "./index.js" - } \ No newline at end of file diff --git a/tests/baselines/reference/nodePackageSelfNameScoped(module=nodenext).errors.txt b/tests/baselines/reference/nodePackageSelfNameScoped(module=nodenext).errors.txt deleted file mode 100644 index 2c0b58848c59a..0000000000000 --- a/tests/baselines/reference/nodePackageSelfNameScoped(module=nodenext).errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -index.cts(2,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@scope/package")' call instead. - - -==== index.ts (0 errors) ==== - // esm format file - import * as self from "@scope/package"; - self; -==== index.mts (0 errors) ==== - // esm format file - import * as self from "@scope/package"; - self; -==== index.cts (1 errors) ==== - // cjs format file - import * as self from "@scope/package"; - ~~~~~~~~~~~~~~~~ -!!! error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@scope/package")' call instead. - self; -==== package.json (0 errors) ==== - { - "name": "@scope/package", - "private": true, - "type": "module", - "exports": "./index.js" - } \ No newline at end of file diff --git a/tests/baselines/reference/nonTSExtensions.js b/tests/baselines/reference/nonTSExtensions(module=node18).js similarity index 100% rename from tests/baselines/reference/nonTSExtensions.js rename to tests/baselines/reference/nonTSExtensions(module=node18).js diff --git a/tests/baselines/reference/nonTSExtensions(module=nodenext).js b/tests/baselines/reference/nonTSExtensions(module=nodenext).js new file mode 100644 index 0000000000000..117d199aa7df9 --- /dev/null +++ b/tests/baselines/reference/nonTSExtensions(module=nodenext).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts] //// + +//// [example.json] +{} + +//// [styles.d.css.ts] +export {}; + +//// [index.mts] +import {} from "./example.json" with { type: "json" }; // Ok +import {} from "./styles.css"; // Ok + +//// [index.mjs] +export {}; diff --git a/tests/baselines/reference/packageJsonImportsErrors.errors.txt b/tests/baselines/reference/packageJsonImportsErrors(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/packageJsonImportsErrors.errors.txt rename to tests/baselines/reference/packageJsonImportsErrors(module=node18).errors.txt diff --git a/tests/baselines/reference/packageJsonImportsErrors.js b/tests/baselines/reference/packageJsonImportsErrors(module=node18).js similarity index 100% rename from tests/baselines/reference/packageJsonImportsErrors.js rename to tests/baselines/reference/packageJsonImportsErrors(module=node18).js diff --git a/tests/baselines/reference/packageJsonImportsErrors(module=nodenext).errors.txt b/tests/baselines/reference/packageJsonImportsErrors(module=nodenext).errors.txt new file mode 100644 index 0000000000000..8167e0cafd0ff --- /dev/null +++ b/tests/baselines/reference/packageJsonImportsErrors(module=nodenext).errors.txt @@ -0,0 +1,31 @@ +/index.ts(2,16): error TS2877: This import uses a '.ts' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path. + + +==== /package.json (0 errors) ==== + { + "name": "pkg", + "type": "module", + "imports": { + "#foo.ts": "./foo.ts", + "#internal/*": "./internal/*" + }, + "exports": { + "./*.ts": { + "source": "./*.ts", + "default": "./*.js" + } + } + } + +==== /foo.ts (0 errors) ==== + export {}; + +==== /internal/foo.ts (0 errors) ==== + export {}; + +==== /index.ts (1 errors) ==== + import {} from "#foo.ts"; // Ok + import {} from "#internal/foo.ts"; // Error + ~~~~~~~~~~~~~~~~~~ +!!! error TS2877: This import uses a '.ts' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path. + import {} from "pkg/foo.ts"; // Ok \ No newline at end of file diff --git a/tests/baselines/reference/packageJsonImportsErrors(module=nodenext).js b/tests/baselines/reference/packageJsonImportsErrors(module=nodenext).js new file mode 100644 index 0000000000000..5a0805f046fa1 --- /dev/null +++ b/tests/baselines/reference/packageJsonImportsErrors(module=nodenext).js @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/packageJsonImportsErrors.ts] //// + +//// [package.json] +{ + "name": "pkg", + "type": "module", + "imports": { + "#foo.ts": "./foo.ts", + "#internal/*": "./internal/*" + }, + "exports": { + "./*.ts": { + "source": "./*.ts", + "default": "./*.js" + } + } +} + +//// [foo.ts] +export {}; + +//// [foo.ts] +export {}; + +//// [index.ts] +import {} from "#foo.ts"; // Ok +import {} from "#internal/foo.ts"; // Error +import {} from "pkg/foo.ts"; // Ok + +//// [foo.js] +export {}; +//// [foo.js] +export {}; +//// [index.js] +import {} from "#foo.ts"; // Ok +import {} from "#internal/foo.ts"; // Error +import {} from "pkg/foo.ts"; // Ok diff --git a/tests/baselines/reference/typeOnlyESMImportFromCJS.errors.txt b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).errors.txt similarity index 100% rename from tests/baselines/reference/typeOnlyESMImportFromCJS.errors.txt rename to tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).errors.txt diff --git a/tests/baselines/reference/typeOnlyESMImportFromCJS.js b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).js similarity index 100% rename from tests/baselines/reference/typeOnlyESMImportFromCJS.js rename to tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).js diff --git a/tests/baselines/reference/typeOnlyESMImportFromCJS.symbols b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).symbols similarity index 100% rename from tests/baselines/reference/typeOnlyESMImportFromCJS.symbols rename to tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).symbols diff --git a/tests/baselines/reference/typeOnlyESMImportFromCJS.types b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).types similarity index 100% rename from tests/baselines/reference/typeOnlyESMImportFromCJS.types rename to tests/baselines/reference/typeOnlyESMImportFromCJS(module=node18).types diff --git a/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).js b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).js new file mode 100644 index 0000000000000..01b406ded5d80 --- /dev/null +++ b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts] //// + +//// [module.mts] +export {}; + +//// [common.cts] +import type {} from "./module.mts"; +import type {} from "./module.mts" with { "resolution-mode": "import" }; +import type {} from "./module.mts" with { "resolution-mode": "require" }; +type _1 = typeof import("./module.mts"); +type _2 = typeof import("./module.mts", { with: { "resolution-mode": "import" } }); +type _3 = typeof import("./module.mts", { with: { "resolution-mode": "require" } }); + + +//// [module.mjs] +export {}; +//// [common.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).symbols b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).symbols new file mode 100644 index 0000000000000..b47541e6f6105 --- /dev/null +++ b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts] //// + +=== module.mts === + +export {}; + +=== common.cts === +import type {} from "./module.mts"; +import type {} from "./module.mts" with { "resolution-mode": "import" }; +import type {} from "./module.mts" with { "resolution-mode": "require" }; +type _1 = typeof import("./module.mts"); +>_1 : Symbol(_1, Decl(common.cts, 2, 73)) + +type _2 = typeof import("./module.mts", { with: { "resolution-mode": "import" } }); +>_2 : Symbol(_2, Decl(common.cts, 3, 40)) + +type _3 = typeof import("./module.mts", { with: { "resolution-mode": "require" } }); +>_3 : Symbol(_3, Decl(common.cts, 4, 83)) + diff --git a/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).types b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).types new file mode 100644 index 0000000000000..1b0e522401930 --- /dev/null +++ b/tests/baselines/reference/typeOnlyESMImportFromCJS(module=nodenext).types @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts] //// + +=== module.mts === + +export {}; + +=== common.cts === +import type {} from "./module.mts"; +import type {} from "./module.mts" with { "resolution-mode": "import" }; +import type {} from "./module.mts" with { "resolution-mode": "require" }; +type _1 = typeof import("./module.mts"); +>_1 : typeof import("module", { with: { "resolution-mode": "import" } }) +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +type _2 = typeof import("./module.mts", { with: { "resolution-mode": "import" } }); +>_2 : typeof import("module", { with: { "resolution-mode": "import" } }) +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +type _3 = typeof import("./module.mts", { with: { "resolution-mode": "require" } }); +>_3 : typeof import("module", { with: { "resolution-mode": "import" } }) +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts index 2ec3ff1ad0116..e9e3b45633f5b 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts @@ -1,5 +1,5 @@ // @moduleResolution: nodenext -// @module: nodenext +// @module: node18,nodenext // @jsx: preserve // @filename: /src/foo.tsx diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts index c1eab70f92d82..86534df323aa6 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts @@ -1,5 +1,5 @@ // @moduleResolution: nodenext -// @module: nodenext +// @module: node18,nodenext // @jsx: react // @filename: /src/foo.tsx diff --git a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts index 6d5009e3ba90f..74c057f7ef610 100644 --- a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts +++ b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @rewriteRelativeImportExtensions: true // @noTypesAndSymbols: true // @verbatimModuleSyntax: true diff --git a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nodeModulesTsFiles.ts b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nodeModulesTsFiles.ts index e39b933d1f8e0..a2519eace725f 100644 --- a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nodeModulesTsFiles.ts +++ b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nodeModulesTsFiles.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @rewriteRelativeImportExtensions: true // @noTypesAndSymbols: true // @noEmit: true diff --git a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts index e7d6f2107d8d9..f207666dfd16a 100644 --- a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts +++ b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @rewriteRelativeImportExtensions: true // @allowArbitraryExtensions: true // @resolveJsonModule: true diff --git a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/packageJsonImportsErrors.ts b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/packageJsonImportsErrors.ts index d91b8c48f1405..b0677a69120fa 100644 --- a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/packageJsonImportsErrors.ts +++ b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/packageJsonImportsErrors.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @rewriteRelativeImportExtensions: true // @noTypesAndSymbols: true // @verbatimModuleSyntax: true diff --git a/tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts b/tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts index ce350f09b9358..b08a88a44cc81 100644 --- a/tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts +++ b/tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @Filename: module.mts export {}; diff --git a/tests/cases/conformance/importAttributes/importAttributes6.ts b/tests/cases/conformance/importAttributes/importAttributes6.ts index c23f2ef5a27e9..668777621344c 100644 --- a/tests/cases/conformance/importAttributes/importAttributes6.ts +++ b/tests/cases/conformance/importAttributes/importAttributes6.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @filename: mod.mts import * as thing1 from "./mod.mjs" with { field: 0 }; import * as thing2 from "./mod.mjs" with { field: `a` }; diff --git a/tests/cases/conformance/moduleResolution/bundler/bundlerDirectoryModule.ts b/tests/cases/conformance/moduleResolution/bundler/bundlerDirectoryModule.ts index 77055c33ed6d7..bf9dacf9e77c7 100644 --- a/tests/cases/conformance/moduleResolution/bundler/bundlerDirectoryModule.ts +++ b/tests/cases/conformance/moduleResolution/bundler/bundlerDirectoryModule.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @moduleResolution: nodenext,bundler // @noImplicitAny: true // @noEmit: true diff --git a/tests/cases/conformance/node/nodeModulesCJSEmit1.ts b/tests/cases/conformance/node/nodeModulesCJSEmit1.ts index 9c736278ec111..0432ec5989454 100644 --- a/tests/cases/conformance/node/nodeModulesCJSEmit1.ts +++ b/tests/cases/conformance/node/nodeModulesCJSEmit1.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @checkJs: true // @outDir: dist // @noTypesAndSymbols: true diff --git a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts index 3f8bae7ffc404..7bedbd6b7b24f 100644 --- a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesExportsDoubleAsterisk.ts b/tests/cases/conformance/node/nodeModulesExportsDoubleAsterisk.ts index b74fa70750993..cd29cab2997cb 100644 --- a/tests/cases/conformance/node/nodeModulesExportsDoubleAsterisk.ts +++ b/tests/cases/conformance/node/nodeModulesExportsDoubleAsterisk.ts @@ -1,4 +1,4 @@ -// @module: nodenext +// @module: node18,nodenext // @noTypesAndSymbols: true // @noEmit: true diff --git a/tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts b/tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts index 2cef80be152ff..b0705952ca05d 100644 --- a/tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts +++ b/tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts @@ -1,5 +1,5 @@ // @allowArbitraryExtensions: true -// @module: nodenext +// @module: node18,nodenext // @filename: package.json {"type": "module"} // @filename: main.ts diff --git a/tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts b/tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts index 941ea101a2c37..f9bc0e63aa89c 100644 --- a/tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts +++ b/tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts @@ -1,7 +1,7 @@ // @lib: es2020,dom // @target: es2020 // @allowArbitraryExtensions: true,false -// @module: nodenext +// @module: node18,nodenext // @filename: package.json {"type": "module"} // @filename: dir/package.json diff --git a/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts b/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts index 8db0bdb37d552..6b6a7e21a9951 100644 --- a/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts +++ b/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowImportingTsExtensions: true // @Filename: /node_modules/pkg/package.json diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts index 8556ac9c40ff5..ea45071a25952 100644 --- a/tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts @@ -1,5 +1,5 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/@sapphire/pieces/index.d.ts //// interface Container { diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts index bf984311cfb75..5decde4fd4e59 100644 --- a/tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts @@ -1,5 +1,5 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/@sapphire/pieces/index.d.ts //// interface Container { diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts index 7331ec3cedc02..ff5443fb99efd 100644 --- a/tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts @@ -1,5 +1,5 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/@sapphire/pieces/index.d.ts //// export interface Container { diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts index 58ded632a7019..bd2ba2ba72258 100644 --- a/tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/@sapphire/pieces/index.d.ts //// interface Container { diff --git a/tests/cases/fourslash/autoImportNoPackageJson_nodenext.ts b/tests/cases/fourslash/autoImportNoPackageJson_nodenext.ts index ff57e8fe71070..364025a999123 100644 --- a/tests/cases/fourslash/autoImportNoPackageJson_nodenext.ts +++ b/tests/cases/fourslash/autoImportNoPackageJson_nodenext.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/lit/index.d.cts //// export declare function customElement(name: string): any; diff --git a/tests/cases/fourslash/autoImportNodeNextJSRequire.ts b/tests/cases/fourslash/autoImportNodeNextJSRequire.ts index f5990cd92c84f..01d5b4a5c5171 100644 --- a/tests/cases/fourslash/autoImportNodeNextJSRequire.ts +++ b/tests/cases/fourslash/autoImportNodeNextJSRequire.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowJs: true // @checkJs: true // @noEmit: true diff --git a/tests/cases/fourslash/autoImportPackageJsonExportsSpecifierEndsInTs.ts b/tests/cases/fourslash/autoImportPackageJsonExportsSpecifierEndsInTs.ts index 7784b0334f929..8d2f243ed7335 100644 --- a/tests/cases/fourslash/autoImportPackageJsonExportsSpecifierEndsInTs.ts +++ b/tests/cases/fourslash/autoImportPackageJsonExportsSpecifierEndsInTs.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/pkg/package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts b/tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts index 79d62ec33ced0..b5f1e04ea3ae8 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowImportingTsExtensions: true // @Filename: /package.json diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsConditions.ts b/tests/cases/fourslash/autoImportPackageJsonImportsConditions.ts index 71fd139167ca9..62c9e648f9d3e 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsConditions.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsConditions.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsLength1.ts b/tests/cases/fourslash/autoImportPackageJsonImportsLength1.ts index ae0999fb7a3b0..50027faa51786 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsLength1.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsLength1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsLength2.ts b/tests/cases/fourslash/autoImportPackageJsonImportsLength2.ts index 5b54f6b3149c4..72542cf613e59 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsLength2.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsLength2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPattern.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPattern.ts index 70aeabcfdaaea..211922f460073 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPattern.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPattern.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js.ts index a5955a65c9275..0b7ddab015742 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js_ts.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js_ts.ts index bf9b3305d77bb..9cc610bfbaa48 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js_ts.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_js_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts.ts index a48ef7d4bc720..b3ba11feb6e1d 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_js.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_js.ts index 701b8fbd978b8..e87a4ba633867 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_js.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_js.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_ts.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_ts.ts index 19171deea3b58..a0688c1ed0704 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_ts.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPattern_ts_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPreference1.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPreference1.ts index dfac2a3ab55d0..bcc1a25fb0159 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPreference1.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPreference1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPreference2.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPreference2.ts index affd548cfa3ce..b145c9ee84f1d 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPreference2.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPreference2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsPreference3.ts b/tests/cases/fourslash/autoImportPackageJsonImportsPreference3.ts index 3113af1bab627..c419a0cd0e847 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImportsPreference3.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImportsPreference3.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath1.ts b/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath1.ts index 81b698ebd4d4c..26f9abd7b142b 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath1.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /Dev/package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath2.ts b/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath2.ts index eb0b0f6838140..cef9b88c6c719 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath2.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImports_capsInPath2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /Dev/package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImports_js.ts b/tests/cases/fourslash/autoImportPackageJsonImports_js.ts index 1056d13dd5076..ddbb3214b5f7f 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImports_js.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImports_js.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportPackageJsonImports_ts.ts b/tests/cases/fourslash/autoImportPackageJsonImports_ts.ts index a8e8b13b3d6e4..ca64bfca9b60a 100644 --- a/tests/cases/fourslash/autoImportPackageJsonImports_ts.ts +++ b/tests/cases/fourslash/autoImportPackageJsonImports_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/autoImportVerbatimCJS1.ts b/tests/cases/fourslash/autoImportVerbatimCJS1.ts index dc2b8177d007a..7a3bd2761cfb5 100644 --- a/tests/cases/fourslash/autoImportVerbatimCJS1.ts +++ b/tests/cases/fourslash/autoImportVerbatimCJS1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @verbatimModuleSyntax: true // @allowJs: true diff --git a/tests/cases/fourslash/autoImportVerbatimTypeOnly1.ts b/tests/cases/fourslash/autoImportVerbatimTypeOnly1.ts index 77e59525f47ce..7d03f78adac60 100644 --- a/tests/cases/fourslash/autoImportVerbatimTypeOnly1.ts +++ b/tests/cases/fourslash/autoImportVerbatimTypeOnly1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @verbatimModuleSyntax: true // @Filename: /mod.ts diff --git a/tests/cases/fourslash/autoImportsNodeNext1.ts b/tests/cases/fourslash/autoImportsNodeNext1.ts index 32aeaaef28d01..c8a99e9d7bd8e 100644 --- a/tests/cases/fourslash/autoImportsNodeNext1.ts +++ b/tests/cases/fourslash/autoImportsNodeNext1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/pack/package.json //// { diff --git a/tests/cases/fourslash/codeFixMissingResolutionModeImportAttribute.ts b/tests/cases/fourslash/codeFixMissingResolutionModeImportAttribute.ts index 29ec01f4f32d1..01492da152525 100644 --- a/tests/cases/fourslash/codeFixMissingResolutionModeImportAttribute.ts +++ b/tests/cases/fourslash/codeFixMissingResolutionModeImportAttribute.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { "type": "module" } diff --git a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter1.ts b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter1.ts index 65ee02dcf8dcb..9d35dfa8a6317 100644 --- a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter1.ts +++ b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /generation.d.ts //// export type GenerationConfigType = { max_length?: number }; diff --git a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter2.ts b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter2.ts index 764075a757be3..8693fbd91873e 100644 --- a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter2.ts +++ b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @FileName: /index.d.ts //// export declare class Cls { diff --git a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter3.ts b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter3.ts index 5edb4d7478e8b..c1da1d23bd5ec 100644 --- a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter3.ts +++ b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter3.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @FileName: /other/foo.d.ts //// export declare type Bar = { baz: string }; diff --git a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter4.ts b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter4.ts index 072725ac2f745..9f5df29f9707c 100644 --- a/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter4.ts +++ b/tests/cases/fourslash/completionsClassMemberImportTypeNodeParameter4.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @FileName: /other/cls.d.ts //// export declare class Cls { diff --git a/tests/cases/fourslash/completionsImportDefaultExportCrash1.ts b/tests/cases/fourslash/completionsImportDefaultExportCrash1.ts index 776a9fd8c4d4b..adecd114b089a 100644 --- a/tests/cases/fourslash/completionsImportDefaultExportCrash1.ts +++ b/tests/cases/fourslash/completionsImportDefaultExportCrash1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowJs: true // @Filename: /node_modules/dom7/index.d.ts diff --git a/tests/cases/fourslash/completionsImportDefaultExportCrash2.ts b/tests/cases/fourslash/completionsImportDefaultExportCrash2.ts index 2e4d28e5a6930..e0f9663aea4f1 100644 --- a/tests/cases/fourslash/completionsImportDefaultExportCrash2.ts +++ b/tests/cases/fourslash/completionsImportDefaultExportCrash2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowJs: true // @Filename: /node_modules/dom7/index.d.ts diff --git a/tests/cases/fourslash/completionsImportTypeKeyword.ts b/tests/cases/fourslash/completionsImportTypeKeyword.ts index b87c61c756181..c5bcb50fc5ceb 100644 --- a/tests/cases/fourslash/completionsImportTypeKeyword.ts +++ b/tests/cases/fourslash/completionsImportTypeKeyword.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /os.d.ts //// declare module "os" { diff --git a/tests/cases/fourslash/completionsImport_promoteTypeOnly6.ts b/tests/cases/fourslash/completionsImport_promoteTypeOnly6.ts index 117a4894ee8d4..b79ff1bae026f 100644 --- a/tests/cases/fourslash/completionsImport_promoteTypeOnly6.ts +++ b/tests/cases/fourslash/completionsImport_promoteTypeOnly6.ts @@ -1,5 +1,5 @@ /// -// @module: nodenext +// @module: node18 // @allowImportingTsExtensions: false // @Filename: /exports.ts diff --git a/tests/cases/fourslash/completionsImport_promoteTypeOnly7.ts b/tests/cases/fourslash/completionsImport_promoteTypeOnly7.ts index 8da76c18aa494..ff90666c311a5 100644 --- a/tests/cases/fourslash/completionsImport_promoteTypeOnly7.ts +++ b/tests/cases/fourslash/completionsImport_promoteTypeOnly7.ts @@ -1,5 +1,5 @@ /// -// @module: nodenext +// @module: node18 // @allowImportingTsExtensions: true // @Filename: /exports.ts diff --git a/tests/cases/fourslash/getOccurrencesNonStringImportAssertion.ts b/tests/cases/fourslash/getOccurrencesNonStringImportAssertion.ts index d8fdc1d497328..b1c28856ef11a 100644 --- a/tests/cases/fourslash/getOccurrencesNonStringImportAssertion.ts +++ b/tests/cases/fourslash/getOccurrencesNonStringImportAssertion.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 ////import * as react from "react" assert { cache: /**/0 }; ////react.Children; diff --git a/tests/cases/fourslash/getOccurrencesNonStringImportAttributes.ts b/tests/cases/fourslash/getOccurrencesNonStringImportAttributes.ts index 48611e02ee5f3..1ea21d59310f9 100644 --- a/tests/cases/fourslash/getOccurrencesNonStringImportAttributes.ts +++ b/tests/cases/fourslash/getOccurrencesNonStringImportAttributes.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 ////import * as react from "react" with { cache: /**/0 }; ////react.Children; diff --git a/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts b/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts index 0549081b7ddeb..3832c2f2bbc44 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/pkg/package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts b/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts index e381945b5d926..baa8d5ef9c1f4 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @moduleResolution: nodenext // @Filename: /node_modules/pkg/package.json diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts index 9bac2d834dd42..65160c3db1f20 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts index 36380677a29de..671ad9de4414d 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts index 8dd812c00ef2c..f0e1a50d054db 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts index 89b84c7b5bf47..0e36a26f60472 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts index 2cbea78b63351..609bdf4c38028 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowImportingTsExtensions: true // @Filename: /package.json diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts index f75079c117361..3bfa3c2b57b57 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /Dev/package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts index fcb66e518d0f4..072e7f5a42197 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /Dev/package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts index 62c47e19cfb12..269e34e1e866f 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts index 0b79cad7fbc52..cc106fb4418a2 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts index ef3ef47db4367..15f2e671ae578 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts index 595d3b0a7194d..5a4df22510017 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts index e6dafdb1a3dc7..f9dea4e12832c 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts index b650f213eaa89..cd6c8ffbe6c14 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts index 0c8563e8665b3..a9e27d4073e0c 100644 --- a/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts +++ b/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/importNameCodeFix_barrelExport5.ts b/tests/cases/fourslash/importNameCodeFix_barrelExport5.ts index 465f96c8b9f68..bb010c888d1ef 100644 --- a/tests/cases/fourslash/importNameCodeFix_barrelExport5.ts +++ b/tests/cases/fourslash/importNameCodeFix_barrelExport5.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { "type": "module" } diff --git a/tests/cases/fourslash/inlayHintsInteractiveMultifileFunctionCalls.ts b/tests/cases/fourslash/inlayHintsInteractiveMultifileFunctionCalls.ts index 4d68c05bde68b..6987b664dd09d 100644 --- a/tests/cases/fourslash/inlayHintsInteractiveMultifileFunctionCalls.ts +++ b/tests/cases/fourslash/inlayHintsInteractiveMultifileFunctionCalls.ts @@ -1,7 +1,7 @@ /// // @Target: esnext -// @module: nodenext +// @module: node18 // @Filename: aaa.mts ////import { helperB } from "./bbb.mjs"; diff --git a/tests/cases/fourslash/moveToFile_ctsTomts.ts b/tests/cases/fourslash/moveToFile_ctsTomts.ts index 2a911fa05c7c0..0edc496f2228d 100644 --- a/tests/cases/fourslash/moveToFile_ctsTomts.ts +++ b/tests/cases/fourslash/moveToFile_ctsTomts.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowImportingTsExtensions: true // @noEmit: true diff --git a/tests/cases/fourslash/moveToFile_impossibleImport.ts b/tests/cases/fourslash/moveToFile_impossibleImport.ts index 08f8b5e38a5a3..1b04ea9928acd 100644 --- a/tests/cases/fourslash/moveToFile_impossibleImport.ts +++ b/tests/cases/fourslash/moveToFile_impossibleImport.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /bar.cts ////const a = 2; diff --git a/tests/cases/fourslash/nodeModulesImportCompletions1.ts b/tests/cases/fourslash/nodeModulesImportCompletions1.ts index b2356088b0391..ead74b22b2adc 100644 --- a/tests/cases/fourslash/nodeModulesImportCompletions1.ts +++ b/tests/cases/fourslash/nodeModulesImportCompletions1.ts @@ -1,6 +1,6 @@ /// // @allowJs: true -// @module: nodenext +// @module: node18 // @Filename: /src/module.mts //// export {} // @Filename: /src/module.cts diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsCustomConditions.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsCustomConditions.ts index 749bd13855f11..6a29928fc6282 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsCustomConditions.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsCustomConditions.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @customConditions: custom-condition // @Filename: /node_modules/foo/package.json diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard1.ts index ea1c267ff7d90..6d4393067de9a 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard1.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts index 9b6dcd8ce31a7..a876ce696266c 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard2.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard2.ts index af7963a7e2c28..7aeadc589692e 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard2.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/salesforce-pageobjects/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard3.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard3.ts index 4ac89dfebc8b1..f48e0fc2b12f7 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard3.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard3.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard4.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard4.ts index 852b77b360659..4ae068923b69b 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard4.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard4.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard5.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard5.ts index 86694b2e0c62b..f738f57f7fc94 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard5.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard5.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard6.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard6.ts index 1fb17f1c81c3a..1b1e18c7fb0fe 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard6.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard6.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard7.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard7.ts index 7bd9389520e71..de60d6bd63790 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard7.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard7.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard8.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard8.ts index 243a01d360f05..09335a79b5ecf 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard8.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard8.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /node_modules/foo/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard9.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard9.ts index abc1092b1560a..651f7bfa3cdd4 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard9.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard9.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowJs: true // @maxNodeModuleJsDepth: 1 diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts index 81a4da924773e..3a11faf9daee2 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @customConditions: custom-condition // @Filename: /package.json diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts index c38db992d9a1f..f42022853f3b2 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /src/node_modules/#internal/package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts index 81616077fb03f..fe5b2d9bd095a 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts index 0c5e569b2a000..04bbe0285afd8 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts index 274412a2fe8d5..9a16fb07a3004 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts index d0fdfedbc1fa6..f12f5b3abe77a 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts index 0e53d02ecc378..01e915484f200 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts index e5ca68e643938..ad516ce9be114 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts index 06ead3662e97b..1ed22f57e27ce 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts index 4217ece6826c9..fcc2c4b687b87 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts index 265fbe322404e..0264df518ada1 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts index 42446088f6586..700310e36a6ba 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts index b66761c43257d..048ee57109298 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @Filename: /package.json //// { diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts index 5e3ba519e23c3..e9346ce9b5ba2 100644 --- a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts @@ -1,6 +1,6 @@ /// -// @module: nodenext +// @module: node18 // @allowJs: true // @Filename: /package.json diff --git a/tests/cases/fourslash/refactorConvertToEsModule_module_nodenext.ts b/tests/cases/fourslash/refactorConvertToEsModule_module_nodenext.ts index 622c3168b2fe7..86517676dd674 100644 --- a/tests/cases/fourslash/refactorConvertToEsModule_module_nodenext.ts +++ b/tests/cases/fourslash/refactorConvertToEsModule_module_nodenext.ts @@ -2,7 +2,7 @@ // @allowJs: true // @target: esnext -// @module: nodenext +// @module: node18 // @Filename: /a.js ////module.exports = 0; diff --git a/tests/cases/fourslash/refactorToReturnTypeWithImportAssertions.ts b/tests/cases/fourslash/refactorToReturnTypeWithImportAssertions.ts index 97a51e55442c9..d2a19e82f35d2 100644 --- a/tests/cases/fourslash/refactorToReturnTypeWithImportAssertions.ts +++ b/tests/cases/fourslash/refactorToReturnTypeWithImportAssertions.ts @@ -1,6 +1,6 @@ /// -// @module: NodeNext +// @module: node18 // @traceResolution: true // @filename: node_modules/inner/index.d.mts