diff --git a/_submodules/TypeScript b/_submodules/TypeScript
index 1ee9e0d9a2..050a6f8127 160000
--- a/_submodules/TypeScript
+++ b/_submodules/TypeScript
@@ -1 +1 @@
-Subproject commit 1ee9e0d9a24b629da3a8cae2748616af1dc8fc0c
+Subproject commit 050a6f8127f54ce64c79ee992b9f0e27d0d712a2
diff --git a/internal/diagnostics/diagnostics_generated.go b/internal/diagnostics/diagnostics_generated.go
index 5c32430d2b..c40232cb15 100644
--- a/internal/diagnostics/diagnostics_generated.go
+++ b/internal/diagnostics/diagnostics_generated.go
@@ -2326,7 +2326,7 @@ var Compiler_option_0_may_only_be_used_with_build = &Message{code: 5093, categor
var Compiler_option_0_may_not_be_used_with_build = &Message{code: 5094, category: CategoryError, key: "Compiler_option_0_may_not_be_used_with_build_5094", text: "Compiler option '--{0}' may not be used with '--build'."}
-var Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later = &Message{code: 5095, category: CategoryError, key: "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", text: "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."}
+var Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later = &Message{code: 5095, category: CategoryError, key: "Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later_5095", text: "Option '{0}' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later."}
var Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set = &Message{code: 5096, category: CategoryError, key: "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", text: "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."}
diff --git a/internal/fourslash/_scripts/failingTests.txt b/internal/fourslash/_scripts/failingTests.txt
index a3851e759e..c8af636cc5 100644
--- a/internal/fourslash/_scripts/failingTests.txt
+++ b/internal/fourslash/_scripts/failingTests.txt
@@ -16,7 +16,6 @@ TestCompletionEntryClassMembersWithInferredFunctionReturnType1
TestCompletionEntryForArgumentConstrainedToString
TestCompletionEntryForArrayElementConstrainedToString
TestCompletionEntryForArrayElementConstrainedToString2
-TestCompletionEntryForClassMembers_StaticWhenBaseTypeIsNotResolved
TestCompletionEntryForUnionProperty
TestCompletionEntryForUnionProperty2
TestCompletionForComputedStringProperties
diff --git a/internal/fourslash/tests/gen/completionEntryForClassMembers_StaticWhenBaseTypeIsNotResolved_test.go b/internal/fourslash/tests/gen/completionEntryForClassMembers_StaticWhenBaseTypeIsNotResolved_test.go
index 3f67b274df..3f78988212 100644
--- a/internal/fourslash/tests/gen/completionEntryForClassMembers_StaticWhenBaseTypeIsNotResolved_test.go
+++ b/internal/fourslash/tests/gen/completionEntryForClassMembers_StaticWhenBaseTypeIsNotResolved_test.go
@@ -10,25 +10,9 @@ import (
func TestCompletionEntryForClassMembers_StaticWhenBaseTypeIsNotResolved(t *testing.T) {
t.Parallel()
- t.Skip()
+
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @Filename: /node_modules/@types/react/index.d.ts
-export = React;
-export as namespace React;
-declare namespace React {
- function createElement(): any;
- interface Component
{ }
- class Component
{
- static contextType?: any;
- context: any;
- constructor(props: Readonly
);
- setState(
- state: ((prevState: Readonly, props: Readonly) => (Pick | S | null)) | (Pick | S | null),
- callback?: () => void
- ): void;
- }
-}
-// @Filename: /a.ts
+ const content = `// @Filename: /a.ts
import React from 'react'
class Slider extends React.Component {
static defau/**/ltProps = {
diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go
index be55991de2..a269f1a909 100644
--- a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go
+++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go
@@ -16,6 +16,7 @@ func TestCompletionForStringLiteralNonrelativeImport16(t *testing.T) {
const content = `// @Filename: tsconfig.json
{
"compilerOptions": {
+ "resolveJsonModule": false,
"baseUrl": "./",
"paths": {
"module1/path1": ["some/path/whatever.ts"],
diff --git a/internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go b/internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go
index 57ecd5cb67..64dc8a4459 100644
--- a/internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go
+++ b/internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go
@@ -13,7 +13,7 @@ func TestCompletionsImport_umdDefaultNoCrash2(t *testing.T) {
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @moduleResolution: node
+ const content = `// @moduleResolution: bundler
// @allowJs: true
// @checkJs: true
// @Filename: /node_modules/dottie/package.json
diff --git a/internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go b/internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go
index a66a4523b6..0da18ee5e1 100644
--- a/internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go
+++ b/internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go
@@ -12,7 +12,7 @@ func TestCompletionsPathsJsonModuleWithoutResolveJsonModule(t *testing.T) {
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @moduleResolution: node
+ const content = `// @resolveJsonModule: false
// @Filename: /project/test.json
not read
// @Filename: /project/index.ts
diff --git a/internal/fourslash/tests/gen/completionsPathsJsonModule_test.go b/internal/fourslash/tests/gen/completionsPathsJsonModule_test.go
index b713e79f35..bf86ca473b 100644
--- a/internal/fourslash/tests/gen/completionsPathsJsonModule_test.go
+++ b/internal/fourslash/tests/gen/completionsPathsJsonModule_test.go
@@ -13,7 +13,7 @@ func TestCompletionsPathsJsonModule(t *testing.T) {
t.Parallel()
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @moduleResolution: node
+ const content = `// @moduleResolution: bundler
// @resolveJsonModule: true
// @Filename: /project/node_modules/test.json
not read
diff --git a/internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go b/internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go
index 98803f175d..48d174cad0 100644
--- a/internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go
+++ b/internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go
@@ -13,7 +13,7 @@ func TestCompletionsPathsRelativeJsonModule(t *testing.T) {
t.Parallel()
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @moduleResolution: node
+ const content = `// @moduleResolution: bundler
// @resolveJsonModule: true
// @Filename: /project/test.json
not read
diff --git a/internal/fourslash/tests/gen/completionsPaths_importType_test.go b/internal/fourslash/tests/gen/completionsPaths_importType_test.go
index 3caae8585e..a0b677054e 100644
--- a/internal/fourslash/tests/gen/completionsPaths_importType_test.go
+++ b/internal/fourslash/tests/gen/completionsPaths_importType_test.go
@@ -14,7 +14,7 @@ func TestCompletionsPaths_importType(t *testing.T) {
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @allowJs: true
-// @moduleResolution: node
+// @moduleResolution: bundler
// @Filename: /ns.ts
file content not read
// @Filename: /node_modules/package/index.ts
diff --git a/internal/fourslash/tests/gen/completionsWithDeprecatedTag9_test.go b/internal/fourslash/tests/gen/completionsWithDeprecatedTag9_test.go
deleted file mode 100644
index 3f86d91582..0000000000
--- a/internal/fourslash/tests/gen/completionsWithDeprecatedTag9_test.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package fourslash_test
-
-import (
- "testing"
-
- "github.com/microsoft/typescript-go/internal/fourslash"
- . "github.com/microsoft/typescript-go/internal/fourslash/tests/util"
- "github.com/microsoft/typescript-go/internal/ls"
- "github.com/microsoft/typescript-go/internal/lsp/lsproto"
- "github.com/microsoft/typescript-go/internal/testutil"
-)
-
-func TestCompletionsWithDeprecatedTag9(t *testing.T) {
- t.Parallel()
-
- defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @lib: dom
-// @allowJs: true
-// @Filename: globals.d.ts
-/** @deprecated foo */
-declare var foo: string;
-// @Filename: index.ts
-class Foo {
- foo: number;
- m() {
- foo/**/
- }
-}`
- f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
- f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{
- IsIncomplete: false,
- ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
- CommitCharacters: &DefaultCommitCharacters,
- EditRange: Ignored,
- },
- Items: &fourslash.CompletionsExpectedItems{
- Includes: []fourslash.CompletionsExpectedItem{
- &lsproto.CompletionItem{
- Label: "foo",
- Kind: PtrTo(lsproto.CompletionItemKindVariable),
- SortText: PtrTo(string(ls.DeprecateSortText(ls.SortTextGlobalsOrKeywords))),
- },
- },
- },
- })
- f.VerifyCompletions(t, nil, &fourslash.CompletionsExpectedList{
- IsIncomplete: false,
- ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
- CommitCharacters: &DefaultCommitCharacters,
- EditRange: Ignored,
- },
- Items: &fourslash.CompletionsExpectedItems{},
- })
-}
diff --git a/internal/fourslash/tests/gen/exportEqualNamespaceClassESModuleInterop_test.go b/internal/fourslash/tests/gen/exportEqualNamespaceClassESModuleInterop_test.go
index 32f1db0ff0..b610460f44 100644
--- a/internal/fourslash/tests/gen/exportEqualNamespaceClassESModuleInterop_test.go
+++ b/internal/fourslash/tests/gen/exportEqualNamespaceClassESModuleInterop_test.go
@@ -13,7 +13,7 @@ func TestExportEqualNamespaceClassESModuleInterop(t *testing.T) {
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @esModuleInterop: true
-// @moduleResolution: node
+// @moduleResolution: bundler
// @target: es2015
// @module: esnext
// @Filename: /node_modules/@bar/foo/index.d.ts
diff --git a/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash1_test.go b/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash1_test.go
index b219b100e5..d12c4f724b 100644
--- a/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash1_test.go
+++ b/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash1_test.go
@@ -11,7 +11,7 @@ func TestFindReferencesBindingPatternInJsdocNoCrash1(t *testing.T) {
t.Parallel()
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @moduleResolution: node
+ const content = `// @moduleResolution: bundler
// @Filename: node_modules/use-query/package.json
{
"name": "use-query",
diff --git a/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash2_test.go b/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash2_test.go
index 1fcafea499..94b4584713 100644
--- a/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash2_test.go
+++ b/internal/fourslash/tests/gen/findReferencesBindingPatternInJsdocNoCrash2_test.go
@@ -11,7 +11,7 @@ func TestFindReferencesBindingPatternInJsdocNoCrash2(t *testing.T) {
t.Parallel()
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
- const content = `// @moduleResolution: node
+ const content = `// @moduleResolution: bundler
// @Filename: node_modules/use-query/package.json
{
"name": "use-query",
diff --git a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go
index 558efd2c05..7f60525520 100644
--- a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go
+++ b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go
@@ -13,6 +13,7 @@ func TestPathCompletionsTypesVersionsWildcard2(t *testing.T) {
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @module: commonjs
+// @resolveJsonModule: false
// @Filename: /node_modules/foo/package.json
{
"types": "index.d.ts",
diff --git a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard3_test.go b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard3_test.go
index 8d63214eea..d8f8688a88 100644
--- a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard3_test.go
+++ b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard3_test.go
@@ -13,6 +13,7 @@ func TestPathCompletionsTypesVersionsWildcard3(t *testing.T) {
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @module: commonjs
+// @resolveJsonModule: false
// @Filename: /node_modules/foo/package.json
{
"types": "index.d.ts",
diff --git a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard4_test.go b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard4_test.go
index 320a68bfb2..d9f83bb7be 100644
--- a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard4_test.go
+++ b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard4_test.go
@@ -13,6 +13,7 @@ func TestPathCompletionsTypesVersionsWildcard4(t *testing.T) {
t.Skip()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @module: commonjs
+// @resolveJsonModule: false
// @Filename: /node_modules/foo/package.json
{
"types": "index.d.ts",
diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt.diff
deleted file mode 100644
index 8120ad3982..0000000000
--- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt.diff
+++ /dev/null
@@ -1,74 +0,0 @@
---- old.es6ExportEqualsInterop.errors.txt
-+++ new.es6ExportEqualsInterop.errors.txt
-@@= skipped -0, +0 lines =@@
- main.ts(15,1): error TS2693: 'z1' only refers to a type, but is being used as a value here.
- main.ts(21,4): error TS2339: Property 'a' does not exist on type '() => any'.
- main.ts(23,4): error TS2339: Property 'a' does not exist on type 'typeof Foo'.
--main.ts(27,8): error TS1259: Module '"interface"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(28,8): error TS1259: Module '"variable"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(29,8): error TS1259: Module '"interface-variable"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(30,8): error TS1259: Module '"module"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(31,8): error TS1259: Module '"interface-module"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(32,8): error TS1259: Module '"variable-module"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(33,8): error TS1259: Module '"function"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(34,8): error TS1259: Module '"function-module"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(35,8): error TS1259: Module '"class"' can only be default-imported using the 'esModuleInterop' flag
--main.ts(36,8): error TS1259: Module '"class-module"' can only be default-imported using the 'esModuleInterop' flag
- main.ts(39,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
- main.ts(45,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
- main.ts(47,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
-@@= skipped -40, +30 lines =@@
- main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'.
-
-
--==== main.ts (41 errors) ====
-+==== main.ts (31 errors) ====
- ///
-
- // import-equals
-@@= skipped -34, +34 lines =@@
-
- // default import
- import x1 from "interface";
-- ~~
--!!! error TS1259: Module '"interface"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:6:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x2 from "variable";
-- ~~
--!!! error TS1259: Module '"variable"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:14:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x3 from "interface-variable";
-- ~~
--!!! error TS1259: Module '"interface-variable"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:26:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x4 from "module";
-- ~~
--!!! error TS1259: Module '"module"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:34:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x5 from "interface-module";
-- ~~
--!!! error TS1259: Module '"interface-module"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:46:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x6 from "variable-module";
-- ~~
--!!! error TS1259: Module '"variable-module"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:60:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x7 from "function";
-- ~~
--!!! error TS1259: Module '"function"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:65:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x8 from "function-module";
-- ~~
--!!! error TS1259: Module '"function-module"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:74:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x9 from "class";
-- ~~
--!!! error TS1259: Module '"class"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:82:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
- import x0 from "class-module";
-- ~~
--!!! error TS1259: Module '"class-module"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 modules.d.ts:94:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
-
- // namespace import
- import * as y1 from "interface";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types.diff b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types.diff
deleted file mode 100644
index d79de05db2..0000000000
--- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types.diff
+++ /dev/null
@@ -1,43 +0,0 @@
---- old.es6ExportEqualsInterop.types
-+++ new.es6ExportEqualsInterop.types
-@@= skipped -88, +88 lines =@@
- >x1 : any
-
- import x2 from "variable";
-->x2 : any
-+>x2 : { a: number; b: number; }
-
- import x3 from "interface-variable";
-->x3 : any
-+>x3 : { a: number; b: number; }
-
- import x4 from "module";
-->x4 : any
-+>x4 : typeof z4
-
- import x5 from "interface-module";
-->x5 : any
-+>x5 : typeof z5
-
- import x6 from "variable-module";
-->x6 : any
-+>x6 : { a: number; b: number; }
-
- import x7 from "function";
-->x7 : any
-+>x7 : () => any
-
- import x8 from "function-module";
-->x8 : any
-+>x8 : typeof z8
-
- import x9 from "class";
-->x9 : any
-+>x9 : typeof z9
-
- import x0 from "class-module";
-->x0 : any
-+>x0 : typeof z0
-
- // namespace import
- import * as y1 from "interface";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.errors.txt.diff
deleted file mode 100644
index 2e5b58dc1b..0000000000
--- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.errors.txt.diff
+++ /dev/null
@@ -1,16 +0,0 @@
---- old.es6ImportDefaultBindingInEs5.errors.txt
-+++ new.es6ImportDefaultBindingInEs5.errors.txt
-@@= skipped -0, +0 lines =@@
--es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1259: Module '"es6ImportDefaultBindingInEs5_0"' can only be default-imported using the 'esModuleInterop' flag
--
--
--==== es6ImportDefaultBindingInEs5_0.ts (0 errors) ====
-- var a = 10;
-- export = a;
--
--==== es6ImportDefaultBindingInEs5_1.ts (1 errors) ====
-- import defaultBinding from "./es6ImportDefaultBindingInEs5_0";
-- ~~~~~~~~~~~~~~
--!!! error TS1259: Module '"es6ImportDefaultBindingInEs5_0"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 es6ImportDefaultBindingInEs5_0.ts:2:1: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.types.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.types.diff
deleted file mode 100644
index 2ba3f20ec6..0000000000
--- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.types.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.es6ImportDefaultBindingInEs5.types
-+++ new.es6ImportDefaultBindingInEs5.types
-@@= skipped -9, +9 lines =@@
-
- === es6ImportDefaultBindingInEs5_1.ts ===
- import defaultBinding from "./es6ImportDefaultBindingInEs5_0";
-->defaultBinding : any
-+>defaultBinding : number
diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.errors.txt.diff
deleted file mode 100644
index 3c2bc80adf..0000000000
--- a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.errors.txt.diff
+++ /dev/null
@@ -1,21 +0,0 @@
---- old.exportEqualsDefaultProperty.errors.txt
-+++ new.exportEqualsDefaultProperty.errors.txt
-@@= skipped -0, +0 lines =@@
--
-+imp.ts(2,5): error TS2339: Property 'toExponential' does not exist on type '{ greeting: string; default: number; }'.
-+
-+
-+==== exp.ts (0 errors) ====
-+ var x = {
-+ "greeting": "hello, world",
-+ "default": 42
-+ };
-+
-+ export = x
-+
-+==== imp.ts (1 errors) ====
-+ import foo from "./exp";
-+ foo.toExponential(2);
-+ ~~~~~~~~~~~~~
-+!!! error TS2339: Property 'toExponential' does not exist on type '{ greeting: string; default: number; }'.
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.symbols.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.symbols.diff
deleted file mode 100644
index 35de9ce474..0000000000
--- a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.symbols.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.exportEqualsDefaultProperty.symbols
-+++ new.exportEqualsDefaultProperty.symbols
-@@= skipped -19, +19 lines =@@
- >foo : Symbol(foo, Decl(imp.ts, 0, 6))
-
- foo.toExponential(2);
-->foo.toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --))
- >foo : Symbol(foo, Decl(imp.ts, 0, 6))
-->toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --))
diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.types.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.types.diff
deleted file mode 100644
index 6b7846da27..0000000000
--- a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.types.diff
+++ /dev/null
@@ -1,19 +0,0 @@
---- old.exportEqualsDefaultProperty.types
-+++ new.exportEqualsDefaultProperty.types
-@@= skipped -19, +19 lines =@@
-
- === imp.ts ===
- import foo from "./exp";
-->foo : number
-+>foo : { greeting: string; default: number; }
-
- foo.toExponential(2);
-->foo.toExponential(2) : string
-->foo.toExponential : (fractionDigits?: number) => string
-->foo : number
-->toExponential : (fractionDigits?: number) => string
-+>foo.toExponential(2) : any
-+>foo.toExponential : any
-+>foo : { greeting: string; default: number; }
-+>toExponential : any
- >2 : 2
diff --git a/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.errors.txt b/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.errors.txt
index c8e84730f2..384c3e74b4 100644
--- a/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.errors.txt
@@ -14,7 +14,7 @@ file.tsx(2,19): error TS2322: Type '{}' is not assignable to type 'IntrinsicClas
"name": "@types/react",
"version": "0.0.1",
"main": "",
- "types": "index.d.ts",
+ "types": "index.d.ts"
}
==== node_modules/@types/react/index.d.ts (0 errors) ====
interface IntrinsicClassAttributesAlias {
diff --git a/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.js b/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.js
index 0b71ffe9f6..474c490d7e 100644
--- a/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.js
+++ b/testdata/baselines/reference/submodule/compiler/jsxClassAttributeResolution.js
@@ -8,7 +8,7 @@ export const a = ;
"name": "@types/react",
"version": "0.0.1",
"main": "",
- "types": "index.d.ts",
+ "types": "index.d.ts"
}
//// [index.d.ts]
interface IntrinsicClassAttributesAlias {
diff --git a/testdata/baselines/reference/submodule/compiler/moduleElementsInWrongContext.types.diff b/testdata/baselines/reference/submodule/compiler/moduleElementsInWrongContext.types.diff
deleted file mode 100644
index 9e70d381f4..0000000000
--- a/testdata/baselines/reference/submodule/compiler/moduleElementsInWrongContext.types.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.moduleElementsInWrongContext.types
-+++ new.moduleElementsInWrongContext.types
-@@= skipped -50, +50 lines =@@
- >Foo : typeof Foo
-
- import bar from "ambient";
-->bar : any
-+>bar : typeof Foo
-
- import { baz } from "ambient";
- >baz : any
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_empty.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_empty.errors.txt.diff
new file mode 100644
index 0000000000..2f2399daf6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_empty.errors.txt.diff
@@ -0,0 +1,22 @@
+--- old.moduleResolutionWithSuffixes_empty.errors.txt
++++ new.moduleResolutionWithSuffixes_empty.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": []
+- }
+- }
+-==== /index.ts (0 errors) ====
+- import { base } from "./foo";
+-==== /foo.ts (0 errors) ====
+- export function base() {}
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_notSpecified.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_notSpecified.errors.txt.diff
new file mode 100644
index 0000000000..2f26d2d13f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_notSpecified.errors.txt.diff
@@ -0,0 +1,21 @@
+--- old.moduleResolutionWithSuffixes_notSpecified.errors.txt
++++ new.moduleResolutionWithSuffixes_notSpecified.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- }
+- }
+-==== /index.ts (0 errors) ====
+- import { base } from "./foo";
+-==== /foo.ts (0 errors) ====
+- export function base() {}
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one.errors.txt.diff
new file mode 100644
index 0000000000..7965155fa6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one.errors.txt.diff
@@ -0,0 +1,25 @@
+--- old.moduleResolutionWithSuffixes_one.errors.txt
++++ new.moduleResolutionWithSuffixes_one.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [".ios"]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { ios } from "./foo";
+-==== /foo.ios.ts (0 errors) ====
+- export function ios() {}
+-==== /foo.ts (0 errors) ====
+- export function base() {}
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneBlank.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneBlank.errors.txt.diff
new file mode 100644
index 0000000000..b4268cd42f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneBlank.errors.txt.diff
@@ -0,0 +1,23 @@
+--- old.moduleResolutionWithSuffixes_oneBlank.errors.txt
++++ new.moduleResolutionWithSuffixes_oneBlank.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [""]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { base } from "./foo";
+-==== /foo.ts (0 errors) ====
+- export function base() {}
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneNotFound.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneNotFound.errors.txt.diff
new file mode 100644
index 0000000000..779eeea7dd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneNotFound.errors.txt.diff
@@ -0,0 +1,17 @@
+--- old.moduleResolutionWithSuffixes_oneNotFound.errors.txt
++++ new.moduleResolutionWithSuffixes_oneNotFound.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ /index.ts(1,21): error TS2307: Cannot find module './foo' or its corresponding type declarations.
+
+
+-==== /tsconfig.json (1 errors) ====
++==== /tsconfig.json (0 errors) ====
+ {
+ "compilerOptions": {
+ "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ "traceResolution": true,
+ "moduleSuffixes": [".ios"]
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_dirModuleWithIndex.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_dirModuleWithIndex.errors.txt.diff
new file mode 100644
index 0000000000..69ab38bf7a
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_dirModuleWithIndex.errors.txt.diff
@@ -0,0 +1,24 @@
+--- old.moduleResolutionWithSuffixes_one_dirModuleWithIndex.errors.txt
++++ new.moduleResolutionWithSuffixes_one_dirModuleWithIndex.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [".ios"]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { ios } from "./foo";
+-==== /foo/index.ios.ts (0 errors) ====
+- export function ios() {}
+-==== /foo/index.ts (0 errors) ====
+- export function base() {}
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule.errors.txt.diff
new file mode 100644
index 0000000000..e85122c087
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule.errors.txt.diff
@@ -0,0 +1,39 @@
+--- old.moduleResolutionWithSuffixes_one_externalModule.errors.txt
++++ new.moduleResolutionWithSuffixes_one_externalModule.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(6,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "allowJs": true,
+- "checkJs": false,
+- "outDir": "bin",
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [".ios"]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { ios } from "some-library";
+-
+-==== /node_modules/some-library/index.ios.js (0 errors) ====
+- "use strict";
+- exports.__esModule = true;
+- function ios() {}
+- exports.ios = ios;
+-==== /node_modules/some-library/index.ios.d.ts (0 errors) ====
+- export declare function ios(): void;
+-==== /node_modules/some-library/index.js (0 errors) ====
+- "use strict";
+- exports.__esModule = true;
+- function base() {}
+- exports.base = base;
+-==== /node_modules/some-library/index.d.ts (0 errors) ====
+- export declare function base(): void;
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModulePath.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModulePath.errors.txt.diff
new file mode 100644
index 0000000000..c3459b508b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModulePath.errors.txt.diff
@@ -0,0 +1,39 @@
+--- old.moduleResolutionWithSuffixes_one_externalModulePath.errors.txt
++++ new.moduleResolutionWithSuffixes_one_externalModulePath.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(6,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "allowJs": true,
+- "checkJs": false,
+- "outDir": "bin",
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [".ios"]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { iosfoo } from "some-library/foo";
+-
+-==== /node_modules/some-library/foo.ios.js (0 errors) ====
+- "use strict";
+- exports.__esModule = true;
+- function iosfoo() {}
+- exports.iosfoo = iosfoo;
+-==== /node_modules/some-library/foo.ios.d.ts (0 errors) ====
+- export declare function iosfoo(): void;
+-==== /node_modules/some-library/foo.js (0 errors) ====
+- "use strict";
+- exports.__esModule = true;
+- function basefoo() {}
+- exports.basefoo = basefoo;
+-==== /node_modules/some-library/foo.d.ts (0 errors) ====
+- export declare function basefoo(): void;
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalTSModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalTSModule.errors.txt.diff
new file mode 100644
index 0000000000..156fb025fd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalTSModule.errors.txt.diff
@@ -0,0 +1,26 @@
+--- old.moduleResolutionWithSuffixes_one_externalTSModule.errors.txt
++++ new.moduleResolutionWithSuffixes_one_externalTSModule.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(4,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "outDir": "bin",
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [".ios"]
+- }
+- }
+-
+-==== /test.ts (0 errors) ====
+- import { ios } from "some-library";
+-
+-==== /node_modules/some-library/index.ios.ts (0 errors) ====
+- export function ios() {}
+-==== /node_modules/some-library/index.ts (0 errors) ====
+- export function base() {}
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_jsonModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_jsonModule.errors.txt.diff
new file mode 100644
index 0000000000..cada164092
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_jsonModule.errors.txt.diff
@@ -0,0 +1,33 @@
+--- old.moduleResolutionWithSuffixes_one_jsonModule.errors.txt
++++ new.moduleResolutionWithSuffixes_one_jsonModule.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(6,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "esModuleInterop": true,
+- "resolveJsonModule": true,
+- "outDir": "bin",
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [".ios"]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import foo from "./foo.json";
+- console.log(foo.ios);
+-==== /foo.ios.json (0 errors) ====
+- {
+- "ios": "platform ios"
+- }
+-==== /foo.json (0 errors) ====
+- {
+- "base": "platform base"
+- }
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank1.errors.txt.diff
new file mode 100644
index 0000000000..35f61639d6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank1.errors.txt.diff
@@ -0,0 +1,27 @@
+--- old.moduleResolutionWithSuffixes_threeLastIsBlank1.errors.txt
++++ new.moduleResolutionWithSuffixes_threeLastIsBlank1.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": ["-ios", "__native", ""]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { ios } from "./foo";
+-==== /foo-ios.ts (0 errors) ====
+- export function ios() {}
+-==== /foo__native.ts (0 errors) ====
+- export function native() {}
+-==== /foo.ts (0 errors) ====
+- export function base() {}
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank2.errors.txt.diff
new file mode 100644
index 0000000000..978953794a
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank2.errors.txt.diff
@@ -0,0 +1,25 @@
+--- old.moduleResolutionWithSuffixes_threeLastIsBlank2.errors.txt
++++ new.moduleResolutionWithSuffixes_threeLastIsBlank2.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": ["-ios", "__native", ""]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { native } from "./foo";
+-==== /foo__native.ts (0 errors) ====
+- export function native() {}
+-==== /foo.ts (0 errors) ====
+- export function base() {}
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank3.errors.txt.diff
new file mode 100644
index 0000000000..1672bb7aa0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank3.errors.txt.diff
@@ -0,0 +1,23 @@
+--- old.moduleResolutionWithSuffixes_threeLastIsBlank3.errors.txt
++++ new.moduleResolutionWithSuffixes_threeLastIsBlank3.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": ["-ios", "__native", ""]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { base } from "./foo";
+-==== /foo.ts (0 errors) ====
+- export function base() {}
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt.diff
new file mode 100644
index 0000000000..79da8b925c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt.diff
@@ -0,0 +1,17 @@
+--- old.moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt
++++ new.moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(3,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ /index.ts(1,22): error TS2307: Cannot find module './foo' or its corresponding type declarations.
+
+
+-==== /tsconfig.json (1 errors) ====
++==== /tsconfig.json (0 errors) ====
+ {
+ "compilerOptions": {
+ "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ "traceResolution": true,
+ "moduleSuffixes": ["-ios", "__native", ""]
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js
index 98c93b07b7..727cbed30c 100644
--- a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js
+++ b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js
@@ -1,8 +1,42 @@
//// [tests/cases/compiler/module_augmentUninstantiatedModule2.ts] ////
-//// [module_augmentUninstantiatedModule2.ts]
-declare var ng: ng.IAngularStatic;
declare module ng {
export interface IModule {
name: string;
}
export interface IAngularStatic {
module: (s: string) => IModule;
}
}
export = ng;
+//// [app.ts]
+import ng = require("angular");
+import "./moduleAugmentation";
+
+var x: number = ng.getNumber();
-//// [module_augmentUninstantiatedModule2.js]
+//// [moduleAugmentation.ts]
+import * as ng from "angular"
+declare module "angular" {
+ export interface IAngularStatic {
+ getNumber: () => number;
+ }
+}
+
+//// [index.d.ts]
+declare var ng: ng.IAngularStatic;
+
+declare module ng {
+ export interface IModule {
+ name: string;
+ }
+
+ export interface IAngularStatic {
+ module: (s: string) => IModule;
+ }
+}
+
+export = ng;
+
+
+
+//// [moduleAugmentation.js]
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//// [app.js]
"use strict";
-module.exports = ng;
+Object.defineProperty(exports, "__esModule", { value: true });
+const ng = require("angular");
+require("./moduleAugmentation");
+var x = ng.getNumber();
diff --git a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js.diff b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js.diff
new file mode 100644
index 0000000000..314247865d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js.diff
@@ -0,0 +1,10 @@
+--- old.module_augmentUninstantiatedModule2.js
++++ new.module_augmentUninstantiatedModule2.js
+@@= skipped -36, +36 lines =@@
+ //// [app.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var ng = require("angular");
++const ng = require("angular");
+ require("./moduleAugmentation");
+ var x = ng.getNumber();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.symbols b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.symbols
index d8a3779193..17c284df01 100644
--- a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.symbols
@@ -1,32 +1,59 @@
//// [tests/cases/compiler/module_augmentUninstantiatedModule2.ts] ////
-=== module_augmentUninstantiatedModule2.ts ===
+=== app.ts ===
+import ng = require("angular");
+>ng : Symbol(ng, Decl(app.ts, 0, 0))
+
+import "./moduleAugmentation";
+
+var x: number = ng.getNumber();
+>x : Symbol(x, Decl(app.ts, 3, 3))
+>ng.getNumber : Symbol(ng.IAngularStatic.getNumber, Decl(moduleAugmentation.ts, 2, 37))
+>ng : Symbol(ng, Decl(app.ts, 0, 0))
+>getNumber : Symbol(ng.IAngularStatic.getNumber, Decl(moduleAugmentation.ts, 2, 37))
+
+=== moduleAugmentation.ts ===
+import * as ng from "angular"
+>ng : Symbol(ng, Decl(moduleAugmentation.ts, 0, 6))
+
+declare module "angular" {
+>"angular" : Symbol(ng, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 34), Decl(moduleAugmentation.ts, 0, 29))
+
+ export interface IAngularStatic {
+>IAngularStatic : Symbol(IAngularStatic, Decl(index.d.ts, 5, 4), Decl(moduleAugmentation.ts, 1, 26))
+
+ getNumber: () => number;
+>getNumber : Symbol(IAngularStatic.getNumber, Decl(moduleAugmentation.ts, 2, 37))
+ }
+}
+
+=== node_modules/angular/index.d.ts ===
declare var ng: ng.IAngularStatic;
->ng : Symbol(ng, Decl(module_augmentUninstantiatedModule2.ts, 0, 11), Decl(module_augmentUninstantiatedModule2.ts, 0, 34))
->ng : Symbol(ng, Decl(module_augmentUninstantiatedModule2.ts, 0, 11), Decl(module_augmentUninstantiatedModule2.ts, 0, 34))
->IAngularStatic : Symbol(ng.IAngularStatic, Decl(module_augmentUninstantiatedModule2.ts, 5, 4))
+>ng : Symbol(ng, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 34), Decl(moduleAugmentation.ts, 0, 29))
+>ng : Symbol(ng, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 34), Decl(moduleAugmentation.ts, 0, 29))
+>IAngularStatic : Symbol(ng.IAngularStatic, Decl(index.d.ts, 5, 4), Decl(moduleAugmentation.ts, 1, 26))
declare module ng {
->ng : Symbol(ng, Decl(module_augmentUninstantiatedModule2.ts, 0, 11), Decl(module_augmentUninstantiatedModule2.ts, 0, 34))
+>ng : Symbol(ng, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 34), Decl(moduleAugmentation.ts, 0, 29))
export interface IModule {
->IModule : Symbol(IModule, Decl(module_augmentUninstantiatedModule2.ts, 2, 19))
+>IModule : Symbol(IModule, Decl(index.d.ts, 2, 19))
name: string;
->name : Symbol(IModule.name, Decl(module_augmentUninstantiatedModule2.ts, 3, 29))
+>name : Symbol(IModule.name, Decl(index.d.ts, 3, 29))
}
export interface IAngularStatic {
->IAngularStatic : Symbol(IAngularStatic, Decl(module_augmentUninstantiatedModule2.ts, 5, 4))
+>IAngularStatic : Symbol(IAngularStatic, Decl(index.d.ts, 5, 4), Decl(moduleAugmentation.ts, 1, 26))
module: (s: string) => IModule;
->module : Symbol(IAngularStatic.module, Decl(module_augmentUninstantiatedModule2.ts, 7, 36))
->s : Symbol(s, Decl(module_augmentUninstantiatedModule2.ts, 8, 16))
->IModule : Symbol(IModule, Decl(module_augmentUninstantiatedModule2.ts, 2, 19))
+>module : Symbol(IAngularStatic.module, Decl(index.d.ts, 7, 36))
+>s : Symbol(s, Decl(index.d.ts, 8, 16))
+>IModule : Symbol(IModule, Decl(index.d.ts, 2, 19))
}
}
export = ng;
->ng : Symbol(ng, Decl(module_augmentUninstantiatedModule2.ts, 0, 11), Decl(module_augmentUninstantiatedModule2.ts, 0, 34))
+>ng : Symbol(ng, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 34), Decl(moduleAugmentation.ts, 0, 29))
diff --git a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types
index 4256b711e0..c4feae8337 100644
--- a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types
+++ b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types
@@ -1,8 +1,34 @@
//// [tests/cases/compiler/module_augmentUninstantiatedModule2.ts] ////
-=== module_augmentUninstantiatedModule2.ts ===
+=== app.ts ===
+import ng = require("angular");
+>ng : ng.IAngularStatic
+
+import "./moduleAugmentation";
+
+var x: number = ng.getNumber();
+>x : number
+>ng.getNumber() : number
+>ng.getNumber : () => number
+>ng : ng.IAngularStatic
+>getNumber : () => number
+
+=== moduleAugmentation.ts ===
+import * as ng from "angular"
+>ng : ng.IAngularStatic
+
+declare module "angular" {
+>"angular" : IAngularStatic
+
+ export interface IAngularStatic {
+ getNumber: () => number;
+>getNumber : () => number
+ }
+}
+
+=== node_modules/angular/index.d.ts ===
declare var ng: ng.IAngularStatic;
->ng : import("module_augmentUninstantiatedModule2").IAngularStatic
+>ng : import("node_modules/angular/index.d.ts").IAngularStatic
>ng : any
declare module ng {
@@ -19,6 +45,6 @@ declare module ng {
}
export = ng;
->ng : import("module_augmentUninstantiatedModule2").IAngularStatic
+>ng : import("node_modules/angular/index.d.ts").IAngularStatic
diff --git a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types.diff b/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types.diff
deleted file mode 100644
index 2f98d353d6..0000000000
--- a/testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types.diff
+++ /dev/null
@@ -1,18 +0,0 @@
---- old.module_augmentUninstantiatedModule2.types
-+++ new.module_augmentUninstantiatedModule2.types
-@@= skipped -1, +1 lines =@@
-
- === module_augmentUninstantiatedModule2.ts ===
- declare var ng: ng.IAngularStatic;
-->ng : ng.IAngularStatic
-+>ng : import("module_augmentUninstantiatedModule2").IAngularStatic
- >ng : any
-
- declare module ng {
-@@= skipped -17, +17 lines =@@
- }
-
- export = ng;
-->ng : ng.IAngularStatic
-+>ng : import("module_augmentUninstantiatedModule2").IAngularStatic
-
diff --git a/testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.errors.txt.diff
deleted file mode 100644
index fa73d785e0..0000000000
--- a/testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.errors.txt.diff
+++ /dev/null
@@ -1,16 +0,0 @@
---- old.reexportMissingDefault4.errors.txt
-+++ new.reexportMissingDefault4.errors.txt
-@@= skipped -0, +0 lines =@@
--a.ts(2,10): error TS2305: Module '"./b"' has no exported member 'default'.
--
--
--==== b.d.ts (0 errors) ====
-- declare var b: number;
-- export { b };
--
--==== a.ts (1 errors) ====
-- export { b } from "./b";
-- export { default } from "./b";
-- ~~~~~~~
--!!! error TS2305: Module '"./b"' has no exported member 'default'.
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.types.diff b/testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.types.diff
deleted file mode 100644
index b2f037525c..0000000000
--- a/testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.types.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.reexportMissingDefault4.types
-+++ new.reexportMissingDefault4.types
-@@= skipped -11, +11 lines =@@
- >b : number
-
- export { default } from "./b";
-->default : any
-+>default : typeof import("b")
diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithModuleNodeResolutionEmitNone.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithModuleNodeResolutionEmitNone.errors.txt.diff
index 6c5fc37220..ced70dff4b 100644
--- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithModuleNodeResolutionEmitNone.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithModuleNodeResolutionEmitNone.errors.txt.diff
@@ -2,10 +2,12 @@
+++ new.requireOfJsonFileWithModuleNodeResolutionEmitNone.errors.txt
@@= skipped -0, +0 lines =@@
-error TS5071: Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'.
+-error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
-file1.ts(1,1): error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'.
-
-
-!!! error TS5071: Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'.
+-!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
-==== file1.ts (1 errors) ====
- import * as b from './b.json';
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.errors.txt.diff
index 44608e6282..eccd38e743 100644
--- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.errors.txt.diff
@@ -1,47 +1,37 @@
--- old.requireOfJsonFileWithoutResolveJsonModule.errors.txt
+++ new.requireOfJsonFileWithoutResolveJsonModule.errors.txt
@@= skipped -0, +0 lines =@@
--file1.ts(1,21): error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
--file1.ts(3,21): error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
--
--
--==== file1.ts (2 errors) ====
-+b.json(1,1): error TS1005: '{' expected.
-+b.json(1,10): error TS1005: ',' expected.
-+b.json(1,14): error TS1005: ',' expected.
-+b.json(1,18): error TS1005: '}' expected.
-+file1.ts(2,12): error TS2339: Property 'a' does not exist on type '{ contents: any; Not: any; read: any; }'.
-+file1.ts(5,16): error TS2339: Property 'b' does not exist on type '{ contents: any; Not: any; read: any; }'.
-+file1.ts(6,13): error TS2339: Property 'b' does not exist on type '{ contents: any; Not: any; read: any; }'.
-+
-+
-+==== file1.ts (3 errors) ====
- import b1 = require('./b.json'); // error
-- ~~~~~~~~~~
--!!! error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
- let x = b1.a;
-+ ~
-+!!! error TS2339: Property 'a' does not exist on type '{ contents: any; Not: any; read: any; }'.
- import b2 = require('./b.json'); // error
-- ~~~~~~~~~~
--!!! error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
- if (x) {
- let b = b2.b;
-+ ~
-+!!! error TS2339: Property 'b' does not exist on type '{ contents: any; Not: any; read: any; }'.
- x = (b1.b === b);
-+ ~
-+!!! error TS2339: Property 'b' does not exist on type '{ contents: any; Not: any; read: any; }'.
+ b.json(1,1): error TS1005: '{' expected.
+-b.json(1,1): error TS1136: Property assignment expected.
+ b.json(1,10): error TS1005: ',' expected.
+-b.json(1,10): error TS1136: Property assignment expected.
+ b.json(1,14): error TS1005: ',' expected.
+-b.json(1,14): error TS1136: Property assignment expected.
+ b.json(1,18): error TS1005: '}' expected.
+ file1.ts(2,12): error TS2339: Property 'a' does not exist on type '{ contents: any; Not: any; read: any; }'.
+ file1.ts(5,16): error TS2339: Property 'b' does not exist on type '{ contents: any; Not: any; read: any; }'.
+@@= skipped -24, +21 lines =@@
+ !!! error TS2339: Property 'b' does not exist on type '{ contents: any; Not: any; read: any; }'.
}
--==== b.json (0 errors) ====
+-==== b.json (7 errors) ====
+==== b.json (4 errors) ====
contents Not read
-+ ~~~~~~~~
-+!!! error TS1005: '{' expected.
+ ~~~~~~~~
+ !!! error TS1005: '{' expected.
+- ~~~~~~~~
+-!!! error TS1136: Property assignment expected.
+- ~~~
+-!!! error TS1005: ',' expected.
+- ~~~
+-!!! error TS1136: Property assignment expected.
+- ~~~~
+-!!! error TS1005: ',' expected.
+- ~~~~
+-!!! error TS1136: Property assignment expected.
+ ~~~
+!!! error TS1005: ',' expected.
+ ~~~~
+!!! error TS1005: ',' expected.
-+
-+!!! error TS1005: '}' expected.
\ No newline at end of file
+
+ !!! error TS1005: '}' expected.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.js.diff b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.js.diff
index 8663a3403b..d1d1ffc48a 100644
--- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.js.diff
@@ -1,11 +1,6 @@
--- old.requireOfJsonFileWithoutResolveJsonModule.js
+++ new.requireOfJsonFileWithoutResolveJsonModule.js
-@@= skipped -11, +11 lines =@@
- //// [b.json]
- contents Not read
-
-+//// [out/b.json]
-+{ contents, Not, read }
+@@= skipped -16, +16 lines =@@
//// [out/file1.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.symbols.diff b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.symbols.diff
deleted file mode 100644
index 49a2c5f46f..0000000000
--- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.symbols.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- old.requireOfJsonFileWithoutResolveJsonModule.symbols
-+++ new.requireOfJsonFileWithoutResolveJsonModule.symbols
-@@= skipped -23, +23 lines =@@
- >b : Symbol(b, Decl(file1.ts, 4, 7))
- }
-
-+=== b.json ===
-+contents Not read
-+>contents : Symbol(contents, Decl(b.json, 0, 0))
-+>Not : Symbol(Not, Decl(b.json, 0, 8))
-+>read : Symbol(read, Decl(b.json, 0, 12))
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.types.diff b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.types.diff
deleted file mode 100644
index a5c1231997..0000000000
--- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.types.diff
+++ /dev/null
@@ -1,47 +0,0 @@
---- old.requireOfJsonFileWithoutResolveJsonModule.types
-+++ new.requireOfJsonFileWithoutResolveJsonModule.types
-@@= skipped -1, +1 lines =@@
-
- === file1.ts ===
- import b1 = require('./b.json'); // error
-->b1 : any
-+>b1 : { contents: any; Not: any; read: any; }
-
- let x = b1.a;
- >x : any
- >b1.a : any
-->b1 : any
-+>b1 : { contents: any; Not: any; read: any; }
- >a : any
-
- import b2 = require('./b.json'); // error
-->b2 : any
-+>b2 : { contents: any; Not: any; read: any; }
-
- if (x) {
- >x : any
-@@= skipped -17, +17 lines =@@
- let b = b2.b;
- >b : any
- >b2.b : any
-->b2 : any
-+>b2 : { contents: any; Not: any; read: any; }
- >b : any
-
- x = (b1.b === b);
-@@= skipped -9, +9 lines =@@
- >(b1.b === b) : boolean
- >b1.b === b : boolean
- >b1.b : any
-->b1 : any
-+>b1 : { contents: any; Not: any; read: any; }
- >b : any
- >b : any
- }
-+
-+=== b.json ===
-+contents Not read
-+>contents Not read : { contents: any; Not: any; read: any; }
-+>contents : any
-+>Not : any
-+>read : any
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).errors.txt.diff
deleted file mode 100644
index 170780f0b0..0000000000
--- a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).errors.txt.diff
+++ /dev/null
@@ -1,16 +0,0 @@
---- old.resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).errors.txt
-+++ new.resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).errors.txt
-@@= skipped -0, +0 lines =@@
--tsconfig.json(2,5): error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
- test.ts(1,19): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
-
-
--==== tsconfig.json (1 errors) ====
-+==== tsconfig.json (0 errors) ====
- {
- "compilerOptions": {
-- ~~~~~~~~~~~~~~~~~
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
- "paths": {
- "foo/*": ["./dist/*"],
- "baz/*.ts": ["./types/*.d.ts"]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).errors.txt b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).errors.txt
deleted file mode 100644
index 40b353506a..0000000000
--- a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).errors.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-test.ts(1,19): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
-
-
-==== tsconfig.json (0 errors) ====
- {
- "compilerOptions": {
- "paths": {
- "foo/*": ["./dist/*"],
- "baz/*.ts": ["./types/*.d.ts"]
- }
- }
- }
-
-==== dist/bar.ts (0 errors) ====
- export const a = 1234;
-
-==== types/main.d.ts (0 errors) ====
- export const b: string;
-
-==== test.ts (1 errors) ====
- import { a } from "foo/bar.ts";
- ~~~~~~~~~~~~
-!!! error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
- import { b } from "baz/main.ts";
-
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).js b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).js
deleted file mode 100644
index fc322d5465..0000000000
--- a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).js
+++ /dev/null
@@ -1,21 +0,0 @@
-//// [tests/cases/compiler/resolutionCandidateFromPackageJsonField2.ts] ////
-
-//// [bar.ts]
-export const a = 1234;
-
-//// [main.d.ts]
-export const b: string;
-
-//// [test.ts]
-import { a } from "foo/bar.ts";
-import { b } from "baz/main.ts";
-
-
-//// [bar.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.a = void 0;
-exports.a = 1234;
-//// [test.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).symbols b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).symbols
deleted file mode 100644
index 5ea0f09478..0000000000
--- a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).symbols
+++ /dev/null
@@ -1,17 +0,0 @@
-//// [tests/cases/compiler/resolutionCandidateFromPackageJsonField2.ts] ////
-
-=== dist/bar.ts ===
-export const a = 1234;
->a : Symbol(a, Decl(bar.ts, 0, 12))
-
-=== types/main.d.ts ===
-export const b: string;
->b : Symbol(b, Decl(main.d.ts, 0, 12))
-
-=== test.ts ===
-import { a } from "foo/bar.ts";
->a : Symbol(a, Decl(test.ts, 0, 8))
-
-import { b } from "baz/main.ts";
->b : Symbol(b, Decl(test.ts, 1, 8))
-
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).types b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).types
deleted file mode 100644
index 297dbfbfe9..0000000000
--- a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=node10).types
+++ /dev/null
@@ -1,18 +0,0 @@
-//// [tests/cases/compiler/resolutionCandidateFromPackageJsonField2.ts] ////
-
-=== dist/bar.ts ===
-export const a = 1234;
->a : 1234
->1234 : 1234
-
-=== types/main.d.ts ===
-export const b: string;
->b : string
-
-=== test.ts ===
-import { a } from "foo/bar.ts";
->a : 1234
-
-import { b } from "baz/main.ts";
->b : string
-
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).errors.txt b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.errors.txt
similarity index 100%
rename from testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).errors.txt
rename to testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.errors.txt
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).js b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.js
similarity index 100%
rename from testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).js
rename to testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.js
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).symbols b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.symbols
similarity index 100%
rename from testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).symbols
rename to testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.symbols
diff --git a/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).types b/testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.types
similarity index 100%
rename from testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2(moduleresolution=bundler).types
rename to testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.types
diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=commonjs).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=commonjs).errors.txt.diff
deleted file mode 100644
index d1bf09c663..0000000000
--- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=commonjs).errors.txt.diff
+++ /dev/null
@@ -1,21 +0,0 @@
---- old.tripleSlashTypesReferenceWithMissingExports(module=commonjs).errors.txt
-+++ new.tripleSlashTypesReferenceWithMissingExports(module=commonjs).errors.txt
-@@= skipped -0, +0 lines =@@
--
-+usage.ts(1,23): error TS2688: Cannot find type definition file for 'pkg'.
-+
-+
-+==== node_modules/pkg/index.d.ts (0 errors) ====
-+ interface GlobalThing { a: number }
-+==== node_modules/pkg/package.json (0 errors) ====
-+ {
-+ "name": "pkg",
-+ "types": "index.d.ts",
-+ "exports": "some-other-thing.js"
-+ }
-+==== usage.ts (1 errors) ====
-+ ///
-+ ~~~
-+!!! error TS2688: Cannot find type definition file for 'pkg'.
-+
-+ const a: GlobalThing = { a: 0 };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=bundler).errors.txt.diff
deleted file mode 100644
index 46acfb6e3b..0000000000
--- a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=bundler).errors.txt.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.allowImportingTsExtensions(moduleresolution=bundler).errors.txt
-+++ new.allowImportingTsExtensions(moduleresolution=bundler).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
- /c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations.
-
-
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
- ==== /ts.ts (0 errors) ====
- export {};
-
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node10).errors.txt b/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node10).errors.txt
deleted file mode 100644
index 755f0d6eeb..0000000000
--- a/testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=node10).errors.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-/c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations.
-
-
-==== /ts.ts (0 errors) ====
- export {};
-
-==== /tsx.tsx (0 errors) ====
- export {};
-
-==== /dts.d.ts (0 errors) ====
- export {};
-
-==== /b.ts (0 errors) ====
- import {} from "./ts.js";
- import {} from "./ts.ts";
- import type {} from "./ts.d.ts";
-
- import {} from "./tsx.js";
- import {} from "./tsx.jsx";
- import {} from "./tsx.ts";
- import {} from "./tsx.tsx";
- import type {} from "./tsx.d.ts";
-
- import {} from "./dts.js";
- import {} from "./dts.ts";
- import type {} from "./dts.d.ts";
-
-==== /c.ts (1 errors) ====
- import {} from "./thisfiledoesnotexist.ts";
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-!!! error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations.
-
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.errors.txt b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.errors.txt
new file mode 100644
index 0000000000..3d67812bd0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.errors.txt
@@ -0,0 +1,35 @@
+/real-imports.mts(1,19): error TS2307: Cannot find module 'pkg' or its corresponding type declarations.
+
+
+==== /node_modules/pkg/package.json (0 errors) ====
+ {
+ "name": "pkg",
+ "version": "1.0.0",
+ "type": "commonjs",
+ "exports": {
+ "require": "./index.js"
+ }
+ }
+
+==== /node_modules/pkg/index.d.ts (0 errors) ====
+ export declare const x: number;
+
+==== /package.json (0 errors) ====
+ {
+ "": "type module is ignored in --module commonjs",
+ "type": "module"
+ }
+
+==== /requires.ts (0 errors) ====
+ import pkg = require("pkg");
+ pkg.x;
+
+==== /imports.ts (0 errors) ====
+ import { x } from "pkg";
+ x;
+
+==== /real-imports.mts (1 errors) ====
+ import { x } from "pkg"; // Error
+ ~~~~~
+!!! error TS2307: Cannot find module 'pkg' or its corresponding type declarations.
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js
new file mode 100644
index 0000000000..6d419cecbc
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js
@@ -0,0 +1,45 @@
+//// [tests/cases/conformance/moduleResolution/bundler/bundlerCommonJS.ts] ////
+
+//// [package.json]
+{
+ "name": "pkg",
+ "version": "1.0.0",
+ "type": "commonjs",
+ "exports": {
+ "require": "./index.js"
+ }
+}
+
+//// [index.d.ts]
+export declare const x: number;
+
+//// [package.json]
+{
+ "": "type module is ignored in --module commonjs",
+ "type": "module"
+}
+
+//// [requires.ts]
+import pkg = require("pkg");
+pkg.x;
+
+//// [imports.ts]
+import { x } from "pkg";
+x;
+
+//// [real-imports.mts]
+import { x } from "pkg"; // Error
+
+
+//// [requires.js]
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const pkg = require("pkg");
+pkg.x;
+//// [imports.js]
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const pkg_1 = require("pkg");
+pkg_1.x;
+//// [real-imports.mjs]
+export {};
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js.diff b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js.diff
new file mode 100644
index 0000000000..42e1efe9d2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js.diff
@@ -0,0 +1,17 @@
+--- old.bundlerCommonJS.js
++++ new.bundlerCommonJS.js
+@@= skipped -33, +33 lines =@@
+ //// [requires.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var pkg = require("pkg");
++const pkg = require("pkg");
+ pkg.x;
+ //// [imports.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var pkg_1 = require("pkg");
++const pkg_1 = require("pkg");
+ pkg_1.x;
+ //// [real-imports.mjs]
+ export {};
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.trace.json b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.trace.json
new file mode 100644
index 0000000000..4ccef64129
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/bundlerCommonJS.trace.json
@@ -0,0 +1,55 @@
+======== Resolving module 'pkg' from '/requires.ts'. ========
+Explicitly specified module resolution kind: 'Bundler'.
+Resolving in CJS mode with conditions 'require', 'types'.
+Found 'package.json' at '/package.json'.
+Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
+Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
+Found 'package.json' at '/node_modules/pkg/package.json'.
+Entering conditional exports.
+Matched 'exports' condition 'require'.
+Using 'exports' subpath '.' with target './index.js'.
+File name '/node_modules/pkg/index.js' has a '.js' extension - stripping it.
+File '/node_modules/pkg/index.ts' does not exist.
+File '/node_modules/pkg/index.tsx' does not exist.
+File '/node_modules/pkg/index.d.ts' exists - use it as a name resolution result.
+'package.json' does not have a 'peerDependencies' field.
+Resolved under condition 'require'.
+Exiting conditional exports.
+Resolving real path for '/node_modules/pkg/index.d.ts', result '/node_modules/pkg/index.d.ts'.
+======== Module name 'pkg' was successfully resolved to '/node_modules/pkg/index.d.ts' with Package ID 'pkg/index.d.ts@1.0.0'. ========
+======== Resolving module 'pkg' from '/imports.ts'. ========
+Explicitly specified module resolution kind: 'Bundler'.
+Resolving in CJS mode with conditions 'require', 'types'.
+File '/package.json' exists according to earlier cached lookups.
+Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
+Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
+File '/node_modules/pkg/package.json' exists according to earlier cached lookups.
+Entering conditional exports.
+Matched 'exports' condition 'require'.
+Using 'exports' subpath '.' with target './index.js'.
+File name '/node_modules/pkg/index.js' has a '.js' extension - stripping it.
+File '/node_modules/pkg/index.ts' does not exist according to earlier cached lookups.
+File '/node_modules/pkg/index.tsx' does not exist according to earlier cached lookups.
+File '/node_modules/pkg/index.d.ts' exists - use it as a name resolution result.
+'package.json' does not have a 'peerDependencies' field.
+Resolved under condition 'require'.
+Exiting conditional exports.
+Resolving real path for '/node_modules/pkg/index.d.ts', result '/node_modules/pkg/index.d.ts'.
+======== Module name 'pkg' was successfully resolved to '/node_modules/pkg/index.d.ts' with Package ID 'pkg/index.d.ts@1.0.0'. ========
+======== Resolving module 'pkg' from '/real-imports.mts'. ========
+Explicitly specified module resolution kind: 'Bundler'.
+Resolving in CJS mode with conditions 'import', 'types'.
+File '/package.json' exists according to earlier cached lookups.
+Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
+Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
+File '/node_modules/pkg/package.json' exists according to earlier cached lookups.
+Entering conditional exports.
+Saw non-matching condition 'require'.
+Exiting conditional exports.
+Directory '/node_modules/@types' does not exist, skipping all lookups in it.
+Searching all ancestor node_modules directories for fallback extensions: JavaScript, JSON.
+File '/node_modules/pkg/package.json' exists according to earlier cached lookups.
+Entering conditional exports.
+Saw non-matching condition 'require'.
+Exiting conditional exports.
+======== Module name 'pkg' was not resolved. ========
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff
index eff04db0b2..70ea38d3b0 100644
--- a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt.diff
@@ -1,11 +1,11 @@
--- old.bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt
+++ new.bundlerDirectoryModule(module=node18,moduleresolution=bundler).errors.txt
@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
+-error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or '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 TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or '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';
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node20,moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node20,moduleresolution=bundler).errors.txt.diff
index e165b28f03..d5fe908ca2 100644
--- a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node20,moduleresolution=bundler).errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=node20,moduleresolution=bundler).errors.txt.diff
@@ -1,11 +1,11 @@
--- old.bundlerDirectoryModule(module=node20,moduleresolution=bundler).errors.txt
+++ new.bundlerDirectoryModule(module=node20,moduleresolution=bundler).errors.txt
@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
+-error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node20'.
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
+-!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node20'.
==== /app/test.ts (0 errors) ====
import { test } from '../lib';
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff
index 4d64344afc..bb8cb1f706 100644
--- a/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt.diff
@@ -1,11 +1,11 @@
--- old.bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt
+++ new.bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).errors.txt
@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
+-error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
+-!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
==== /app/test.ts (0 errors) ====
import { test } from '../lib';
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt b/testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt
new file mode 100644
index 0000000000..e5e9133062
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt
@@ -0,0 +1,16 @@
+/tsconfig.json(4,25): error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
+
+
+==== /tsconfig.json (1 errors) ====
+ {
+ "compilerOptions": {
+ "module": "nodenext",
+ "moduleResolution": "bundler",
+ ~~~~~~~~~
+!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
+ "noEmit": true
+ }
+ }
+
+==== /index.ts (0 errors) ====
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt.diff
index fbffe1fcd9..cb19250ff0 100644
--- a/testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt.diff
@@ -1,20 +1,18 @@
--- old.bundlerOptionsCompat.errors.txt
+++ new.bundlerOptionsCompat.errors.txt
@@= skipped -0, +0 lines =@@
--/tsconfig.json(4,25): error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--==== /tsconfig.json (1 errors) ====
-- {
-- "compilerOptions": {
-- "module": "commonjs",
-- "moduleResolution": "bundler",
+-/tsconfig.json(4,25): error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
+ /tsconfig.json(4,25): error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
+
+
+-==== /tsconfig.json (2 errors) ====
++==== /tsconfig.json (1 errors) ====
+ {
+ "compilerOptions": {
+ "module": "nodenext",
+ "moduleResolution": "bundler",
- ~~~~~~~~~
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
-- "noEmit": true
-- }
-- }
--
--==== /index.ts (0 errors) ====
--
-+
\ No newline at end of file
+-!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later.
+ ~~~~~~~~~
+ !!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
+ "noEmit": true
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node).symbols b/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node).symbols
deleted file mode 100644
index 065ed64eca..0000000000
--- a/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node).symbols
+++ /dev/null
@@ -1,25 +0,0 @@
-//// [tests/cases/conformance/moduleResolution/extensionLoadingPriority.ts] ////
-
-=== /project/a.js ===
-
-export default "a.js";
-
-=== /project/a.js.js ===
-
-export default "a.js.js";
-
-=== /project/dir/index.ts ===
-
-export default "dir/index.ts";
-
-=== /project/dir.js ===
-
-export default "dir.js";
-
-=== /project/b.ts ===
-import a from "./a.js";
->a : Symbol(a, Decl(b.ts, 0, 6))
-
-import dir from "./dir";
->dir : Symbol(dir, Decl(b.ts, 1, 6))
-
diff --git a/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node).types b/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node).types
deleted file mode 100644
index a4a16f8cd5..0000000000
--- a/testdata/baselines/reference/submodule/conformance/extensionLoadingPriority(moduleresolution=node).types
+++ /dev/null
@@ -1,25 +0,0 @@
-//// [tests/cases/conformance/moduleResolution/extensionLoadingPriority.ts] ////
-
-=== /project/a.js ===
-
-export default "a.js";
-
-=== /project/a.js.js ===
-
-export default "a.js.js";
-
-=== /project/dir/index.ts ===
-
-export default "dir/index.ts";
-
-=== /project/dir.js ===
-
-export default "dir.js";
-
-=== /project/b.ts ===
-import a from "./a.js";
->a : "a.js"
-
-import dir from "./dir";
->dir : "dir.js"
-
diff --git a/testdata/baselines/reference/submodule/conformance/importCallExpressionInExportEqualsCJS.types.diff b/testdata/baselines/reference/submodule/conformance/importCallExpressionInExportEqualsCJS.types.diff
deleted file mode 100644
index 5dc9e8003a..0000000000
--- a/testdata/baselines/reference/submodule/conformance/importCallExpressionInExportEqualsCJS.types.diff
+++ /dev/null
@@ -1,15 +0,0 @@
---- old.importCallExpressionInExportEqualsCJS.types
-+++ new.importCallExpressionInExportEqualsCJS.types
-@@= skipped -8, +8 lines =@@
- >async function() { const something = await import("./something");} : () => Promise
-
- const something = await import("./something");
-->something : 42
-->await import("./something") : 42
-->import("./something") : Promise<42>
-+>something : { default: 42; }
-+>await import("./something") : { default: 42; }
-+>import("./something") : Promise<{ default: 42; }>
- >"./something" : "./something"
-
- };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.errors.txt.diff
deleted file mode 100644
index 112ac7c0a9..0000000000
--- a/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.errors.txt.diff
+++ /dev/null
@@ -1,39 +0,0 @@
---- old.legacyNodeModulesExportsSpecifierGenerationConditions.errors.txt
-+++ new.legacyNodeModulesExportsSpecifierGenerationConditions.errors.txt
-@@= skipped -0, +0 lines =@@
--
-+index.ts(1,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/private'. This is likely not portable. A type annotation is necessary.
-+
-+
-+==== index.ts (1 errors) ====
-+ export const a = async () => (await import("inner")).x();
-+ ~
-+!!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/private'. This is likely not portable. A type annotation is necessary.
-+==== node_modules/inner/index.d.ts (0 errors) ====
-+ export { x } from "./other.js";
-+==== node_modules/inner/other.d.ts (0 errors) ====
-+ import { Thing } from "./private.js"
-+ export const x: () => Thing;
-+==== node_modules/inner/private.d.ts (0 errors) ====
-+ export interface Thing {} // not exported in export map, inaccessible under new module modes
-+==== package.json (0 errors) ====
-+ {
-+ "name": "package",
-+ "private": true,
-+ "type": "module",
-+ "exports": "./index.js"
-+ }
-+==== node_modules/inner/package.json (0 errors) ====
-+ {
-+ "name": "inner",
-+ "private": true,
-+ "type": "module",
-+ "exports": {
-+ ".": {
-+ "default": "./index.js"
-+ },
-+ "./other": {
-+ "default": "./other.js"
-+ }
-+ }
-+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.js.diff b/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.js.diff
index 0b8fd49c2f..c49f2d13e9 100644
--- a/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.js.diff
@@ -18,8 +18,7 @@
-const a = () => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(function () { return require("inner"); })).x(); });
+const a = async () => (await Promise.resolve().then(() => require("inner"))).x();
exports.a = a;
-
-
- //// [index.d.ts]
--export declare const a: () => Promise;
++
++
++//// [index.d.ts]
+export declare const a: any;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.types.diff b/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.types.diff
deleted file mode 100644
index 67e8decade..0000000000
--- a/testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.types.diff
+++ /dev/null
@@ -1,14 +0,0 @@
---- old.legacyNodeModulesExportsSpecifierGenerationConditions.types
-+++ new.legacyNodeModulesExportsSpecifierGenerationConditions.types
-@@= skipped -5, +5 lines =@@
- >async () => (await import("inner")).x() : () => Promise
- >(await import("inner")).x() : import("node_modules/inner/private").Thing
- >(await import("inner")).x : () => import("node_modules/inner/private").Thing
-->(await import("inner")) : typeof import("node_modules/inner/index")
-->await import("inner") : typeof import("node_modules/inner/index")
-->import("inner") : Promise
-+>(await import("inner")) : { x: () => import("node_modules/inner/private").Thing; default: typeof import("node_modules/inner/index"); }
-+>await import("inner") : { x: () => import("node_modules/inner/private").Thing; default: typeof import("node_modules/inner/index"); }
-+>import("inner") : Promise<{ x: () => import("node_modules/inner/private").Thing; default: typeof import("node_modules/inner/index"); }>
- >"inner" : "inner"
- >x : () => import("node_modules/inner/private").Thing
diff --git a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt.diff
deleted file mode 100644
index 3d72a9b126..0000000000
--- a/testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt.diff
+++ /dev/null
@@ -1,32 +0,0 @@
---- old.nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt
-+++ new.nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--==== /node_modules/@restart/hooks/package.json (0 errors) ====
-- {
-- "name": "@restart/hooks",
-- "version": "0.3.25",
-- "main": "cjs/index.js",
-- "types": "cjs/index.d.ts",
-- "module": "esm/index.js"
-- }
--
--==== /node_modules/@restart/hooks/useMergedRefs/package.json (0 errors) ====
-- {
-- "name": "@restart/hooks/useMergedRefs",
-- "private": true,
-- "main": "../cjs/useMergedRefs.js",
-- "module": "../esm/useMergedRefs.js",
-- "types": "../esm/useMergedRefs.d.ts"
-- }
--
--==== /node_modules/@restart/hooks/esm/useMergedRefs.d.ts (0 errors) ====
-- export {};
--
--==== /main.ts (0 errors) ====
-- import {} from "@restart/hooks/useMergedRefs";
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/node10IsNode_node.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/node10IsNode_node.errors.txt.diff
new file mode 100644
index 0000000000..2dd569a21b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/node10IsNode_node.errors.txt.diff
@@ -0,0 +1,28 @@
+--- old.node10IsNode_node.errors.txt
++++ new.node10IsNode_node.errors.txt
+@@= skipped -0, +0 lines =@@
+-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-==== /node_modules/fancy-lib/package.json (0 errors) ====
+- {
+- "name": "fancy-lib",
+- "version": "1.0.0",
+- "main": "index.js",
+- "exports": {
+- ".": "./definitely-not-index.js"
+- }
+- }
+-
+-==== /node_modules/fancy-lib/index.d.ts (0 errors) ====
+- export declare const fancy: "feast";
+-
+-==== /node_modules/fancy-lib/definitely-not-index.d.ts (0 errors) ====
+- export declare const fancy: "ketchup";
+-
+-==== /main.ts (0 errors) ====
+- import { fancy } from "fancy-lib";
+- fancy;
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/node10IsNode_node10.types.diff b/testdata/baselines/reference/submodule/conformance/node10IsNode_node10.types.diff
deleted file mode 100644
index 3164038207..0000000000
--- a/testdata/baselines/reference/submodule/conformance/node10IsNode_node10.types.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- old.node10IsNode_node10.types
-+++ new.node10IsNode_node10.types
-@@= skipped -9, +9 lines =@@
-
- === /main.ts ===
- import { fancy } from "fancy-lib";
-->fancy : "feast"
-+>fancy : "ketchup"
-
- fancy;
-->fancy : "feast"
-+>fancy : "ketchup"
diff --git a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=bundler).errors.txt.diff
deleted file mode 100644
index 8ffa17c28d..0000000000
--- a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=bundler).errors.txt.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.packageJsonImportsExportsOptionCompat(moduleresolution=bundler).errors.txt
-+++ new.packageJsonImportsExportsOptionCompat(moduleresolution=bundler).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--==== index.ts (0 errors) ====
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node).errors.txt.diff
index 158e7c15c0..627302df32 100644
--- a/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node).errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=node).errors.txt.diff
@@ -3,10 +3,12 @@
@@= skipped -0, +0 lines =@@
-error TS5098: Option 'resolvePackageJsonExports' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.
-error TS5098: Option 'resolvePackageJsonImports' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.
+-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5098: Option 'resolvePackageJsonExports' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.
-!!! error TS5098: Option 'resolvePackageJsonImports' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== index.ts (0 errors) ====
-
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).errors.txt.diff
deleted file mode 100644
index 0aded09d59..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).errors.txt.diff
+++ /dev/null
@@ -1,46 +0,0 @@
---- old.resolutionModeImportType1(moduleresolution=node10).errors.txt
-+++ new.resolutionModeImportType1(moduleresolution=node10).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS2688: Cannot find type definition file for 'foo'.
-- The file is in the program because:
-- Entry point for implicit type library 'foo'
--/app.ts(1,30): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
-- There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
--
--
--!!! error TS2688: Cannot find type definition file for 'foo'.
--!!! error TS2688: The file is in the program because:
--!!! error TS2688: Entry point for implicit type library 'foo'
--==== /node_modules/@types/foo/package.json (0 errors) ====
-- {
-- "name": "@types/foo",
-- "version": "1.0.0",
-- "exports": {
-- ".": {
-- "import": "./index.d.mts",
-- "require": "./index.d.cts"
-- }
-- }
-- }
--
--==== /node_modules/@types/foo/index.d.mts (0 errors) ====
-- export declare const x: "module";
--
--==== /node_modules/@types/foo/index.d.cts (0 errors) ====
-- export declare const x: "script";
--
--==== /app.ts (1 errors) ====
-- type Default = typeof import("foo").x;
-- ~~~~~
--!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
--!!! error TS2307: There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
-- type Import = typeof import("foo", { assert: { "resolution-mode": "import" } }).x;
-- type Require = typeof import("foo", { assert: { "resolution-mode": "require" } }).x;
-- // resolution-mode does not enforce file extension in `bundler`, just sets conditions
-- type ImportRelative = typeof import("./other", { assert: { "resolution-mode": "import" } }).x;
-- type RequireRelative = typeof import("./other", { assert: { "resolution-mode": "require" } }).x;
--
--==== /other.ts (0 errors) ====
-- export const x = "other";
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).symbols b/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).symbols
deleted file mode 100644
index 3b36b51d0a..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).symbols
+++ /dev/null
@@ -1,36 +0,0 @@
-//// [tests/cases/conformance/moduleResolution/resolutionModeImportType1.ts] ////
-
-=== /node_modules/@types/foo/index.d.mts ===
-export declare const x: "module";
->x : Symbol(x, Decl(index.d.mts, 0, 20))
-
-=== /node_modules/@types/foo/index.d.cts ===
-export declare const x: "script";
->x : Symbol(x, Decl(index.d.cts, 0, 20))
-
-=== /app.ts ===
-type Default = typeof import("foo").x;
->Default : Symbol(Default, Decl(app.ts, 0, 0))
->x : Symbol(x, Decl(index.d.mts, 0, 20))
-
-type Import = typeof import("foo", { assert: { "resolution-mode": "import" } }).x;
->Import : Symbol(Import, Decl(app.ts, 0, 38))
->x : Symbol(x, Decl(index.d.mts, 0, 20))
-
-type Require = typeof import("foo", { assert: { "resolution-mode": "require" } }).x;
->Require : Symbol(Require, Decl(app.ts, 1, 82))
->x : Symbol(x, Decl(index.d.cts, 0, 20))
-
-// resolution-mode does not enforce file extension in `bundler`, just sets conditions
-type ImportRelative = typeof import("./other", { assert: { "resolution-mode": "import" } }).x;
->ImportRelative : Symbol(ImportRelative, Decl(app.ts, 2, 84))
->x : Symbol(x, Decl(other.ts, 0, 12))
-
-type RequireRelative = typeof import("./other", { assert: { "resolution-mode": "require" } }).x;
->RequireRelative : Symbol(RequireRelative, Decl(app.ts, 4, 94))
->x : Symbol(x, Decl(other.ts, 0, 12))
-
-=== /other.ts ===
-export const x = "other";
->x : Symbol(x, Decl(other.ts, 0, 12))
-
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).symbols.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).symbols.diff
deleted file mode 100644
index 9105647d6d..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).symbols.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.resolutionModeImportType1(moduleresolution=node10).symbols
-+++ new.resolutionModeImportType1(moduleresolution=node10).symbols
-@@= skipped -10, +10 lines =@@
- === /app.ts ===
- type Default = typeof import("foo").x;
- >Default : Symbol(Default, Decl(app.ts, 0, 0))
-+>x : Symbol(x, Decl(index.d.mts, 0, 20))
-
- type Import = typeof import("foo", { assert: { "resolution-mode": "import" } }).x;
- >Import : Symbol(Import, Decl(app.ts, 0, 38))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).types b/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).types
deleted file mode 100644
index 376327dbeb..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).types
+++ /dev/null
@@ -1,37 +0,0 @@
-//// [tests/cases/conformance/moduleResolution/resolutionModeImportType1.ts] ////
-
-=== /node_modules/@types/foo/index.d.mts ===
-export declare const x: "module";
->x : "module"
-
-=== /node_modules/@types/foo/index.d.cts ===
-export declare const x: "script";
->x : "script"
-
-=== /app.ts ===
-type Default = typeof import("foo").x;
->Default : "module"
->x : any
-
-type Import = typeof import("foo", { assert: { "resolution-mode": "import" } }).x;
->Import : "module"
->x : any
-
-type Require = typeof import("foo", { assert: { "resolution-mode": "require" } }).x;
->Require : "script"
->x : any
-
-// resolution-mode does not enforce file extension in `bundler`, just sets conditions
-type ImportRelative = typeof import("./other", { assert: { "resolution-mode": "import" } }).x;
->ImportRelative : "other"
->x : any
-
-type RequireRelative = typeof import("./other", { assert: { "resolution-mode": "require" } }).x;
->RequireRelative : "other"
->x : any
-
-=== /other.ts ===
-export const x = "other";
->x : "other"
->"other" : "other"
-
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).types.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).types.diff
deleted file mode 100644
index b3c686f1fe..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeImportType1(moduleresolution=node10).types.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.resolutionModeImportType1(moduleresolution=node10).types
-+++ new.resolutionModeImportType1(moduleresolution=node10).types
-@@= skipped -9, +9 lines =@@
-
- === /app.ts ===
- type Default = typeof import("foo").x;
-->Default : any
-+>Default : "module"
- >x : any
-
- type Import = typeof import("foo", { assert: { "resolution-mode": "import" } }).x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash4.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash4.errors.txt.diff
index f89f6b38a7..21390f0820 100644
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash4.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash4.errors.txt.diff
@@ -1,12 +1,22 @@
--- old.resolutionModeTripleSlash4.errors.txt
+++ new.resolutionModeTripleSlash4.errors.txt
@@= skipped -0, +0 lines =@@
+-/tsconfig.json(4,25): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-/app.ts(1,23): error TS2688: Cannot find type definition file for 'foo'.
-/app.ts(2,1): error TS2304: Cannot find name 'MODULE'.
/app.ts(3,1): error TS2552: Cannot find name 'SCRIPT'. Did you mean 'WScript'?
-@@= skipped -12, +10 lines =@@
+-==== /tsconfig.json (1 errors) ====
++==== /tsconfig.json (0 errors) ====
+ {
+ "compilerOptions": {
+ "module": "esnext",
+ "moduleResolution": "node10",
+- ~~~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ "noEmit": true,
+ "types": []
}
}
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash5.errors.txt.diff
new file mode 100644
index 0000000000..9ab160155c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash5.errors.txt.diff
@@ -0,0 +1,18 @@
+--- old.resolutionModeTripleSlash5.errors.txt
++++ new.resolutionModeTripleSlash5.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(4,25): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ /app.ts(3,1): error TS2552: Cannot find name 'SCRIPT'. Did you mean 'WScript'?
+
+
+-==== /tsconfig.json (1 errors) ====
++==== /tsconfig.json (0 errors) ====
+ {
+ "compilerOptions": {
+ "module": "esnext",
+ "moduleResolution": "node10",
+- ~~~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ "noEmit": true,
+ "types": []
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).errors.txt.diff
deleted file mode 100644
index d3c2ba7e29..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).errors.txt.diff
+++ /dev/null
@@ -1,60 +0,0 @@
---- old.resolutionModeTypeOnlyImport1(moduleresolution=node10).errors.txt
-+++ new.resolutionModeTypeOnlyImport1(moduleresolution=node10).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS2688: Cannot find type definition file for 'foo'.
-- The file is in the program because:
-- Entry point for implicit type library 'foo'
--/app.ts(1,35): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
-- There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
--
--
--!!! error TS2688: Cannot find type definition file for 'foo'.
--!!! error TS2688: The file is in the program because:
--!!! error TS2688: Entry point for implicit type library 'foo'
--==== /node_modules/@types/foo/package.json (0 errors) ====
-- {
-- "name": "@types/foo",
-- "version": "1.0.0",
-- "exports": {
-- ".": {
-- "import": "./index.d.mts",
-- "require": "./index.d.cts"
-- }
-- }
-- }
--
--==== /node_modules/@types/foo/index.d.mts (0 errors) ====
-- export declare const x: "module";
--
--==== /node_modules/@types/foo/index.d.cts (0 errors) ====
-- export declare const x: "script";
--
--==== /app.ts (1 errors) ====
-- import type { x as Default } from "foo";
-- ~~~~~
--!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
--!!! error TS2307: There are types at '/node_modules/@types/foo/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
-- import type { x as Import } from "foo" assert { "resolution-mode": "import" };
-- import type { x as Require } from "foo" assert { "resolution-mode": "require" };
-- type _Default = typeof Default;
-- type _Import = typeof Import;
-- type _Require = typeof Require;
--
-- // resolution-mode does not enforce file extension in `bundler`, just sets conditions
-- import type { x as ImportRelative } from "./other" assert { "resolution-mode": "import" };
-- import type { x as RequireRelative } from "./other" assert { "resolution-mode": "require" };
-- type _ImportRelative = typeof ImportRelative;
-- type _RequireRelative = typeof RequireRelative;
--
-- export {
-- _Default,
-- _Import,
-- _Require,
-- _ImportRelative,
-- _RequireRelative
-- }
--
--==== /other.ts (0 errors) ====
-- export const x = "other";
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).js b/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).js
deleted file mode 100644
index 961512bfab..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).js
+++ /dev/null
@@ -1,62 +0,0 @@
-//// [tests/cases/conformance/moduleResolution/resolutionModeTypeOnlyImport1.ts] ////
-
-//// [package.json]
-{
- "name": "@types/foo",
- "version": "1.0.0",
- "exports": {
- ".": {
- "import": "./index.d.mts",
- "require": "./index.d.cts"
- }
- }
-}
-
-//// [index.d.mts]
-export declare const x: "module";
-
-//// [index.d.cts]
-export declare const x: "script";
-
-//// [app.ts]
-import type { x as Default } from "foo";
-import type { x as Import } from "foo" assert { "resolution-mode": "import" };
-import type { x as Require } from "foo" assert { "resolution-mode": "require" };
-type _Default = typeof Default;
-type _Import = typeof Import;
-type _Require = typeof Require;
-
-// resolution-mode does not enforce file extension in `bundler`, just sets conditions
-import type { x as ImportRelative } from "./other" assert { "resolution-mode": "import" };
-import type { x as RequireRelative } from "./other" assert { "resolution-mode": "require" };
-type _ImportRelative = typeof ImportRelative;
-type _RequireRelative = typeof RequireRelative;
-
-export {
- _Default,
- _Import,
- _Require,
- _ImportRelative,
- _RequireRelative
-}
-
-//// [other.ts]
-export const x = "other";
-
-
-
-
-//// [other.d.ts]
-export declare const x = "other";
-//// [app.d.ts]
-import type { x as Default } from "foo";
-import type { x as Import } from "foo" assert { "resolution-mode": "import" };
-import type { x as Require } from "foo" assert { "resolution-mode": "require" };
-type _Default = typeof Default;
-type _Import = typeof Import;
-type _Require = typeof Require;
-import type { x as ImportRelative } from "./other" assert { "resolution-mode": "import" };
-import type { x as RequireRelative } from "./other" assert { "resolution-mode": "require" };
-type _ImportRelative = typeof ImportRelative;
-type _RequireRelative = typeof RequireRelative;
-export { _Default, _Import, _Require, _ImportRelative, _RequireRelative };
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols b/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols
deleted file mode 100644
index 1d28242ebf..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols
+++ /dev/null
@@ -1,73 +0,0 @@
-//// [tests/cases/conformance/moduleResolution/resolutionModeTypeOnlyImport1.ts] ////
-
-=== /node_modules/@types/foo/index.d.mts ===
-export declare const x: "module";
->x : Symbol(x, Decl(index.d.mts, 0, 20))
-
-=== /node_modules/@types/foo/index.d.cts ===
-export declare const x: "script";
->x : Symbol(x, Decl(index.d.cts, 0, 20))
-
-=== /app.ts ===
-import type { x as Default } from "foo";
->x : Symbol(Default, Decl(index.d.mts, 0, 20))
->Default : Symbol(Default, Decl(app.ts, 0, 13))
-
-import type { x as Import } from "foo" assert { "resolution-mode": "import" };
->x : Symbol(Default, Decl(index.d.mts, 0, 20))
->Import : Symbol(Import, Decl(app.ts, 1, 13))
-
-import type { x as Require } from "foo" assert { "resolution-mode": "require" };
->x : Symbol(Require, Decl(index.d.cts, 0, 20))
->Require : Symbol(Require, Decl(app.ts, 2, 13))
-
-type _Default = typeof Default;
->_Default : Symbol(_Default, Decl(app.ts, 2, 80))
->Default : Symbol(Default, Decl(app.ts, 0, 13))
-
-type _Import = typeof Import;
->_Import : Symbol(_Import, Decl(app.ts, 3, 31))
->Import : Symbol(Import, Decl(app.ts, 1, 13))
-
-type _Require = typeof Require;
->_Require : Symbol(_Require, Decl(app.ts, 4, 29))
->Require : Symbol(Require, Decl(app.ts, 2, 13))
-
-// resolution-mode does not enforce file extension in `bundler`, just sets conditions
-import type { x as ImportRelative } from "./other" assert { "resolution-mode": "import" };
->x : Symbol(ImportRelative, Decl(other.ts, 0, 12))
->ImportRelative : Symbol(ImportRelative, Decl(app.ts, 8, 13))
-
-import type { x as RequireRelative } from "./other" assert { "resolution-mode": "require" };
->x : Symbol(ImportRelative, Decl(other.ts, 0, 12))
->RequireRelative : Symbol(RequireRelative, Decl(app.ts, 9, 13))
-
-type _ImportRelative = typeof ImportRelative;
->_ImportRelative : Symbol(_ImportRelative, Decl(app.ts, 9, 92))
->ImportRelative : Symbol(ImportRelative, Decl(app.ts, 8, 13))
-
-type _RequireRelative = typeof RequireRelative;
->_RequireRelative : Symbol(_RequireRelative, Decl(app.ts, 10, 45))
->RequireRelative : Symbol(RequireRelative, Decl(app.ts, 9, 13))
-
-export {
- _Default,
->_Default : Symbol(_Default, Decl(app.ts, 13, 8))
-
- _Import,
->_Import : Symbol(_Import, Decl(app.ts, 14, 11))
-
- _Require,
->_Require : Symbol(_Require, Decl(app.ts, 15, 10))
-
- _ImportRelative,
->_ImportRelative : Symbol(_ImportRelative, Decl(app.ts, 16, 11))
-
- _RequireRelative
->_RequireRelative : Symbol(_RequireRelative, Decl(app.ts, 17, 18))
-}
-
-=== /other.ts ===
-export const x = "other";
->x : Symbol(x, Decl(other.ts, 0, 12))
-
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols.diff
deleted file mode 100644
index cee9d3c71a..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols.diff
+++ /dev/null
@@ -1,15 +0,0 @@
---- old.resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols
-+++ new.resolutionModeTypeOnlyImport1(moduleresolution=node10).symbols
-@@= skipped -9, +9 lines =@@
-
- === /app.ts ===
- import type { x as Default } from "foo";
-+>x : Symbol(Default, Decl(index.d.mts, 0, 20))
- >Default : Symbol(Default, Decl(app.ts, 0, 13))
-
- import type { x as Import } from "foo" assert { "resolution-mode": "import" };
-->x : Symbol(Import, Decl(index.d.mts, 0, 20))
-+>x : Symbol(Default, Decl(index.d.mts, 0, 20))
- >Import : Symbol(Import, Decl(app.ts, 1, 13))
-
- import type { x as Require } from "foo" assert { "resolution-mode": "require" };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).types b/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).types
deleted file mode 100644
index 404083065a..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).types
+++ /dev/null
@@ -1,74 +0,0 @@
-//// [tests/cases/conformance/moduleResolution/resolutionModeTypeOnlyImport1.ts] ////
-
-=== /node_modules/@types/foo/index.d.mts ===
-export declare const x: "module";
->x : "module"
-
-=== /node_modules/@types/foo/index.d.cts ===
-export declare const x: "script";
->x : "script"
-
-=== /app.ts ===
-import type { x as Default } from "foo";
->x : "module"
->Default : any
-
-import type { x as Import } from "foo" assert { "resolution-mode": "import" };
->x : "module"
->Import : any
-
-import type { x as Require } from "foo" assert { "resolution-mode": "require" };
->x : "script"
->Require : any
-
-type _Default = typeof Default;
->_Default : "module"
->Default : "module"
-
-type _Import = typeof Import;
->_Import : "module"
->Import : "module"
-
-type _Require = typeof Require;
->_Require : "script"
->Require : "script"
-
-// resolution-mode does not enforce file extension in `bundler`, just sets conditions
-import type { x as ImportRelative } from "./other" assert { "resolution-mode": "import" };
->x : "other"
->ImportRelative : any
-
-import type { x as RequireRelative } from "./other" assert { "resolution-mode": "require" };
->x : "other"
->RequireRelative : any
-
-type _ImportRelative = typeof ImportRelative;
->_ImportRelative : "other"
->ImportRelative : "other"
-
-type _RequireRelative = typeof RequireRelative;
->_RequireRelative : "other"
->RequireRelative : "other"
-
-export {
- _Default,
->_Default : any
-
- _Import,
->_Import : any
-
- _Require,
->_Require : any
-
- _ImportRelative,
->_ImportRelative : any
-
- _RequireRelative
->_RequireRelative : any
-}
-
-=== /other.ts ===
-export const x = "other";
->x : "other"
->"other" : "other"
-
diff --git a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).types.diff b/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).types.diff
deleted file mode 100644
index 6ac50255e8..0000000000
--- a/testdata/baselines/reference/submodule/conformance/resolutionModeTypeOnlyImport1(moduleresolution=node10).types.diff
+++ /dev/null
@@ -1,22 +0,0 @@
---- old.resolutionModeTypeOnlyImport1(moduleresolution=node10).types
-+++ new.resolutionModeTypeOnlyImport1(moduleresolution=node10).types
-@@= skipped -9, +9 lines =@@
-
- === /app.ts ===
- import type { x as Default } from "foo";
-->x : any
-+>x : "module"
- >Default : any
-
- import type { x as Import } from "foo" assert { "resolution-mode": "import" };
-@@= skipped -12, +12 lines =@@
- >Require : any
-
- type _Default = typeof Default;
-->_Default : any
-->Default : any
-+>_Default : "module"
-+>Default : "module"
-
- type _Import = typeof Import;
- >_Import : "module"
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/untypedModuleImport_allowJs.symbols.diff b/testdata/baselines/reference/submodule/conformance/untypedModuleImport_allowJs.symbols.diff
index b8241f1ff0..09efca276a 100644
--- a/testdata/baselines/reference/submodule/conformance/untypedModuleImport_allowJs.symbols.diff
+++ b/testdata/baselines/reference/submodule/conformance/untypedModuleImport_allowJs.symbols.diff
@@ -1,6 +1,13 @@
--- old.untypedModuleImport_allowJs.symbols
+++ new.untypedModuleImport_allowJs.symbols
-@@= skipped -11, +11 lines =@@
+@@= skipped -4, +4 lines =@@
+ >foo : Symbol(foo, Decl(a.ts, 0, 6))
+
+ foo.bar();
++>foo.bar : Symbol(bar, Decl(index.js, 0, 19))
+ >foo : Symbol(foo, Decl(a.ts, 0, 6))
++>bar : Symbol(bar, Decl(index.js, 0, 19))
+
=== /node_modules/foo/index.js ===
exports.default = { bar() { return 0; } }
>exports.default : Symbol(default, Decl(index.js, 0, 0))
diff --git a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).errors.txt.diff
deleted file mode 100644
index 0e9b1a3815..0000000000
--- a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).errors.txt.diff
+++ /dev/null
@@ -1,25 +0,0 @@
---- old.verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).errors.txt
-+++ new.verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).errors.txt
-@@= skipped -0, +0 lines =@@
- /main.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
--/main.ts(3,8): error TS1259: Module '"/decl"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
-
-
- ==== /decl.d.ts (0 errors) ====
-@@= skipped -15, +14 lines =@@
- interface Typey {}
- export type { Typey };
-
--==== /main.ts (2 errors) ====
-+==== /main.ts (1 errors) ====
- import CJSy = require("./decl"); // error
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- !!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
- import type CJSy2 = require("./decl"); // ok I guess?
- import CJSy3 from "./decl"; // ok in esModuleInterop
-- ~~~~~
--!!! error TS1259: Module '"/decl"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
--!!! related TS2594 /decl.d.ts:2:1: This module is declared with 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
- import * as types from "./types"; // ok
- CJSy;
-
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).types.diff b/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).types.diff
deleted file mode 100644
index fc8ad07d46..0000000000
--- a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).types.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).types
-+++ new.verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).types
-@@= skipped -30, +30 lines =@@
- >CJSy2 : typeof CJSy
-
- import CJSy3 from "./decl"; // ok in esModuleInterop
-->CJSy3 : any
-+>CJSy3 : typeof CJSy
-
- import * as types from "./types"; // ok
- >types : typeof types
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit1(module=commonjs).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit1(module=commonjs).errors.txt.diff
deleted file mode 100644
index 716f7eb3e0..0000000000
--- a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit1(module=commonjs).errors.txt.diff
+++ /dev/null
@@ -1,41 +0,0 @@
---- old.impliedNodeFormatEmit1(module=commonjs).errors.txt
-+++ new.impliedNodeFormatEmit1(module=commonjs).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--==== /a.ts (0 errors) ====
-- export const _ = 0;
--
--==== /b.mts (0 errors) ====
-- export const _ = 0;
--
--==== /c.cts (0 errors) ====
-- export const _ = 0;
--
--==== /d.js (0 errors) ====
-- export const _ = 0;
--
--==== /e.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /f.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /g.ts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /h.mts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /i.cts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /dummy.ts (0 errors) ====
-- export {};
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit2(module=commonjs).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit2(module=commonjs).errors.txt.diff
deleted file mode 100644
index b7f0510dc4..0000000000
--- a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit2(module=commonjs).errors.txt.diff
+++ /dev/null
@@ -1,44 +0,0 @@
---- old.impliedNodeFormatEmit2(module=commonjs).errors.txt
-+++ new.impliedNodeFormatEmit2(module=commonjs).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--==== /package.json (0 errors) ====
-- {}
--
--==== /a.ts (0 errors) ====
-- export const _ = 0;
--
--==== /b.mts (0 errors) ====
-- export const _ = 0;
--
--==== /c.cts (0 errors) ====
-- export const _ = 0;
--
--==== /d.js (0 errors) ====
-- export const _ = 0;
--
--==== /e.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /f.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /g.ts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /h.mts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /i.cts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /dummy.ts (0 errors) ====
-- export {};
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit3(module=commonjs).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit3(module=commonjs).errors.txt.diff
deleted file mode 100644
index 1542eb27fb..0000000000
--- a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit3(module=commonjs).errors.txt.diff
+++ /dev/null
@@ -1,46 +0,0 @@
---- old.impliedNodeFormatEmit3(module=commonjs).errors.txt
-+++ new.impliedNodeFormatEmit3(module=commonjs).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--==== /package.json (0 errors) ====
-- {
-- "type": "module"
-- }
--
--==== /a.ts (0 errors) ====
-- export const _ = 0;
--
--==== /b.mts (0 errors) ====
-- export const _ = 0;
--
--==== /c.cts (0 errors) ====
-- export const _ = 0;
--
--==== /d.js (0 errors) ====
-- export const _ = 0;
--
--==== /e.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /f.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /g.ts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /h.mts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /i.cts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /dummy.ts (0 errors) ====
-- export {};
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit4(module=commonjs).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit4(module=commonjs).errors.txt.diff
deleted file mode 100644
index 5bcce73555..0000000000
--- a/testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit4(module=commonjs).errors.txt.diff
+++ /dev/null
@@ -1,46 +0,0 @@
---- old.impliedNodeFormatEmit4(module=commonjs).errors.txt
-+++ new.impliedNodeFormatEmit4(module=commonjs).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--==== /package.json (0 errors) ====
-- {
-- "type": "commonjs"
-- }
--
--==== /a.ts (0 errors) ====
-- export const _ = 0;
--
--==== /b.mts (0 errors) ====
-- export const _ = 0;
--
--==== /c.cts (0 errors) ====
-- export const _ = 0;
--
--==== /d.js (0 errors) ====
-- export const _ = 0;
--
--==== /e.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /f.mjs (0 errors) ====
-- export const _ = 0;
--
--==== /g.ts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /h.mts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /i.cts (0 errors) ====
-- import {} from "./a";
-- import a = require("./a");
--
--==== /dummy.ts (0 errors) ====
-- export {};
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.errors.txt.diff
deleted file mode 100644
index f5b43be1b6..0000000000
--- a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.errors.txt.diff
+++ /dev/null
@@ -1,17 +0,0 @@
---- old.javascriptImportDefaultBadExport.errors.txt
-+++ new.javascriptImportDefaultBadExport.errors.txt
-@@= skipped -0, +0 lines =@@
--/b.js(1,8): error TS1259: Module '"/a"' can only be default-imported using the 'esModuleInterop' flag
--
--
--==== /a.js (0 errors) ====
-- const alias = {};
-- module.exports = alias;
--
--==== /b.js (1 errors) ====
-- import a from "./a";
-- ~
--!!! error TS1259: Module '"/a"' can only be default-imported using the 'esModuleInterop' flag
--!!! related TS2594 /a.js:2:1: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.types.diff
index aeec21acd4..784ed9da3d 100644
--- a/testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.types.diff
+++ b/testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.types.diff
@@ -8,8 +8,3 @@
+>module : { readonly alias: {}; }
>exports : {}
>alias : {}
-
- === /b.js ===
- import a from "./a";
-->a : any
-+>a : {}
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff
index e6c2e15dc9..eabb80cb29 100644
--- a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff
+++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff
@@ -1,55 +1,34 @@
--- old.moduleResolutionWithExtensions_withPaths.errors.txt
+++ new.moduleResolutionWithExtensions_withPaths.errors.txt
@@= skipped -0, +0 lines =@@
--
+-/tsconfig.json(7,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+/tsconfig.json(6,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
+ Use '"paths": {"*": ["./*"]}' instead.
+/tsconfig.json(11,14): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
+
+
+==== /tsconfig.json (2 errors) ====
-+ {
-+ "compilerOptions": {
-+ "outDir": "lib",
-+ "target": "ES6",
-+ "module": "ES6",
-+ "baseUrl": "/",
+ {
+ "compilerOptions": {
+ "outDir": "lib",
+ "target": "ES6",
+ "module": "ES6",
+ "baseUrl": "/",
+ ~~~~~~~~~
+!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
+!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
-+ "moduleResolution": "Node",
-+ "noImplicitAny": true,
-+ "traceResolution": true,
-+ "paths": {
-+ "foo/*": ["node_modules/foo/lib/*"]
+ "moduleResolution": "Node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ "noImplicitAny": true,
+ "traceResolution": true,
+ "paths": {
+ "foo/*": ["node_modules/foo/lib/*"]
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
-+ }
-+ }
-+ }
-+
-+==== /relative.d.ts (0 errors) ====
-+ export declare function relative(): void;
-+
-+
-+==== /test.ts (0 errors) ====
-+ import { test } from "foo/test.js";
-+ import { test as test2 } from "foo/test";
-+ import { relative } from "./relative.js";
-+ import { relative as relative2 } from "./relative";
-+
-+
-+
-+==== /node_modules/foo/lib/test.js (0 errors) ====
-+ export function test() {
-+ console.log("test");
-+ }
-+
-+==== /node_modules/foo/lib/test.d.ts (0 errors) ====
-+ export declare function test(): void;
-+
-+==== /relative.js (0 errors) ====
-+ export function relative() {
-+ console.log("test");
-+ }
-+
\ No newline at end of file
+ }
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt.diff
index 2b671ba16c..1dc67f7b32 100644
--- a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt.diff
+++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt.diff
@@ -1,7 +1,10 @@
--- old.moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt
+++ new.moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt
@@= skipped -0, +0 lines =@@
--
+-/tsconfig.json(6,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+/tsconfig.json(9,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
+ Use '"paths": {"*": ["./*"]}' instead.
+/tsconfig.json(11,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
@@ -9,46 +12,27 @@
+
+
+==== /tsconfig.json (3 errors) ====
-+ {
-+ "compilerOptions": {
-+ "allowJs": true,
-+ "checkJs": false,
-+ "outDir": "bin",
-+ "moduleResolution": "node",
-+ "traceResolution": true,
-+ "moduleSuffixes": [".ios"],
-+ "baseUrl": "/",
+ {
+ "compilerOptions": {
+ "allowJs": true,
+ "checkJs": false,
+ "outDir": "bin",
+ "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+ "traceResolution": true,
+ "moduleSuffixes": [".ios"],
+ "baseUrl": "/",
+ ~~~~~~~~~
+!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
+!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
-+ "paths": {
-+ "some-library": ["node_modules/some-library/lib"],
+ "paths": {
+ "some-library": ["node_modules/some-library/lib"],
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
-+ "some-library/*": ["node_modules/some-library/lib/*"]
+ "some-library/*": ["node_modules/some-library/lib/*"]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
-+ }
-+ }
-+ }
-+
-+==== /test.ts (0 errors) ====
-+ import { ios } from "some-library";
-+ import { ios as ios2 } from "some-library/index";
-+ import { ios as ios3 } from "some-library/index.js";
-+
-+==== /node_modules/some-library/lib/index.ios.js (0 errors) ====
-+ "use strict";
-+ exports.__esModule = true;
-+ function ios() {}
-+ exports.ios = ios;
-+==== /node_modules/some-library/lib/index.ios.d.ts (0 errors) ====
-+ export declare function ios(): void;
-+==== /node_modules/some-library/lib/index.js (0 errors) ====
-+ "use strict";
-+ exports.__esModule = true;
-+ function base() {}
-+ exports.base = base;
-+==== /node_modules/some-library/lib/index.d.ts (0 errors) ====
-+ export declare function base(): void;
-+
\ No newline at end of file
+ }
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_jsModule.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_jsModule.errors.txt.diff
new file mode 100644
index 0000000000..80d11e391b
--- /dev/null
+++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_jsModule.errors.txt.diff
@@ -0,0 +1,34 @@
+--- old.moduleResolutionWithSuffixes_one_jsModule.errors.txt
++++ new.moduleResolutionWithSuffixes_one_jsModule.errors.txt
+@@= skipped -0, +0 lines =@@
+-/tsconfig.json(6,23): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+-
+-
+-==== /tsconfig.json (1 errors) ====
+- {
+- "compilerOptions": {
+- "allowJs": true,
+- "checkJs": false,
+- "outDir": "bin",
+- "moduleResolution": "node",
+- ~~~~~~
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+- "traceResolution": true,
+- "moduleSuffixes": [".ios"]
+- }
+- }
+-
+-==== /index.ts (0 errors) ====
+- import { ios } from "./foo.js";
+-==== /foo.ios.js (0 errors) ====
+- "use strict";
+- exports.__esModule = true;
+- function ios() {}
+- exports.ios = ios;
+-==== /foo.js (0 errors) ====
+- "use strict";
+- exports.__esModule = true;
+- function base() {}
+- exports.base = base;
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=bundler).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=bundler).errors.txt.diff
deleted file mode 100644
index 61cf962fad..0000000000
--- a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=bundler).errors.txt.diff
+++ /dev/null
@@ -1,24 +0,0 @@
---- old.extensionLoadingPriority(moduleresolution=bundler).errors.txt
-+++ new.extensionLoadingPriority(moduleresolution=bundler).errors.txt
-@@= skipped -0, +0 lines =@@
--error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--
--
--!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
--==== /project/a.js (0 errors) ====
-- export default "a.js";
--
--==== /project/a.js.js (0 errors) ====
-- export default "a.js.js";
--
--==== /project/dir/index.ts (0 errors) ====
-- export default "dir/index.ts";
--
--==== /project/dir.js (0 errors) ====
-- export default "dir.js";
--
--==== /project/b.ts (0 errors) ====
-- import a from "./a.js";
-- import dir from "./dir";
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=node).types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=node).types.diff
deleted file mode 100644
index 9d61d367b4..0000000000
--- a/testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=node).types.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.extensionLoadingPriority(moduleresolution=node).types
-+++ new.extensionLoadingPriority(moduleresolution=node).types
-@@= skipped -20, +20 lines =@@
- >a : "a.js"
-
- import dir from "./dir";
-->dir : "dir/index.ts"
-+>dir : "dir.js"
diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/node10AlternateResult_noResolution.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/node10AlternateResult_noResolution.errors.txt.diff
index cec346e587..a6775022ac 100644
--- a/testdata/baselines/reference/submoduleAccepted/conformance/node10AlternateResult_noResolution.errors.txt.diff
+++ b/testdata/baselines/reference/submoduleAccepted/conformance/node10AlternateResult_noResolution.errors.txt.diff
@@ -1,13 +1,19 @@
--- old.node10AlternateResult_noResolution.errors.txt
+++ new.node10AlternateResult_noResolution.errors.txt
@@= skipped -0, +0 lines =@@
+-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-/index.ts(1,21): error TS2307: Cannot find module 'pkg' or its corresponding type declarations.
- There are types at '/node_modules/pkg/definitely-not-index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
+-
+-
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+/index.ts(1,10): error TS2305: Module '"pkg"' has no exported member 'pkg'.
-
-
++
++
==== /node_modules/pkg/package.json (0 errors) ====
-@@= skipped -15, +14 lines =@@
+ {
+ "name": "pkg",
+@@= skipped -17, +14 lines =@@
==== /index.ts (1 errors) ====
import { pkg } from "pkg";
diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/node10Alternateresult_noTypes.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/node10Alternateresult_noTypes.errors.txt.diff
index cbdb934c2a..7a0400b9f7 100644
--- a/testdata/baselines/reference/submoduleAccepted/conformance/node10Alternateresult_noTypes.errors.txt.diff
+++ b/testdata/baselines/reference/submoduleAccepted/conformance/node10Alternateresult_noTypes.errors.txt.diff
@@ -1,6 +1,7 @@
--- old.node10Alternateresult_noTypes.errors.txt
+++ new.node10Alternateresult_noTypes.errors.txt
@@= skipped -0, +0 lines =@@
+-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-error TS6504: File '/node_modules/pkg/untyped.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
- The file is in the program because:
- Root file specified for compilation
@@ -8,6 +9,7 @@
- There are types at '/node_modules/pkg/definitely-not-index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
-
-
+-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS6504: File '/node_modules/pkg/untyped.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
-!!! error TS6504: The file is in the program because:
-!!! error TS6504: Root file specified for compilation
@@ -17,7 +19,7 @@
==== /node_modules/pkg/package.json (0 errors) ====
{
"name": "pkg",
-@@= skipped -25, +18 lines =@@
+@@= skipped -27, +18 lines =@@
==== /index.ts (1 errors) ====
import { pkg } from "pkg";
diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.errors.txt.diff
new file mode 100644
index 0000000000..1d8aabb7f2
--- /dev/null
+++ b/testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.errors.txt.diff
@@ -0,0 +1,16 @@
+--- old.untypedModuleImport_allowJs.errors.txt
++++ new.untypedModuleImport_allowJs.errors.txt
+@@= skipped -0, +0 lines =@@
+-/a.ts(2,5): error TS2339: Property 'bar' does not exist on type 'typeof import("/node_modules/foo/index")'.
+-
+-
+-==== /a.ts (1 errors) ====
+- import foo from "foo";
+- foo.bar();
+- ~~~
+-!!! error TS2339: Property 'bar' does not exist on type 'typeof import("/node_modules/foo/index")'.
+-
+-==== /node_modules/foo/index.js (0 errors) ====
+- exports.default = { bar() { return 0; } }
+-
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.types.diff
new file mode 100644
index 0000000000..ede066d4fe
--- /dev/null
+++ b/testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.types.diff
@@ -0,0 +1,21 @@
+--- old.untypedModuleImport_allowJs.types
++++ new.untypedModuleImport_allowJs.types
+@@= skipped -1, +1 lines =@@
+
+ === /a.ts ===
+ import foo from "foo";
+->foo : typeof foo
++>foo : { bar(): number; }
+
+ foo.bar();
+->foo.bar() : any
+->foo.bar : any
+->foo : typeof foo
+->bar : any
++>foo.bar() : number
++>foo.bar : () => number
++>foo : { bar(): number; }
++>bar : () => number
+
+ === /node_modules/foo/index.js ===
+ exports.default = { bar() { return 0; } }
\ No newline at end of file