From ff5d518c409e0c18101825af1e7fed69d543426c Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 15 Jul 2025 21:50:45 -0700 Subject: [PATCH 1/5] Override diagnostic about baseUrl path checks --- internal/compiler/program.go | 2 +- internal/diagnostics/diagnostics_generated.go | 2 +- .../diagnostics/extraDiagnosticMessages.json | 4 +++ internal/diagnostics/generate.go | 28 +++++++++++++++---- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 1786078277..2b90b83be2 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -609,7 +609,7 @@ func (p *Program) verifyCompilerOptions() { } if !tspath.PathIsRelative(subst) && !tspath.PathIsAbsolute(subst) { // !!! This needs a better message that doesn't mention baseUrl - createDiagnosticForOptionPathKeyValue(key, i, diagnostics.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash) + createDiagnosticForOptionPathKeyValue(key, i, diagnostics.Non_relative_paths_are_not_allowed_Did_you_forget_a_leading_Slash) } } } diff --git a/internal/diagnostics/diagnostics_generated.go b/internal/diagnostics/diagnostics_generated.go index 5fb56a7143..e26044f260 100644 --- a/internal/diagnostics/diagnostics_generated.go +++ b/internal/diagnostics/diagnostics_generated.go @@ -2306,7 +2306,7 @@ var The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_canno var Option_0_cannot_be_specified_when_option_jsx_is_1 = &Message{code: 5089, category: CategoryError, key: "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", text: "Option '{0}' cannot be specified when option 'jsx' is '{1}'."} -var Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash = &Message{code: 5090, category: CategoryError, key: "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", text: "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"} +var Non_relative_paths_are_not_allowed_Did_you_forget_a_leading_Slash = &Message{code: 5090, category: CategoryError, key: "Non_relative_paths_are_not_allowed_Did_you_forget_a_leading_Slash_5090", text: "Non-relative paths are not allowed. Did you forget a leading './'?"} var Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled = &Message{code: 5091, category: CategoryError, key: "Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091", text: "Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."} diff --git a/internal/diagnostics/extraDiagnosticMessages.json b/internal/diagnostics/extraDiagnosticMessages.json index b1de202b28..5c1416391a 100644 --- a/internal/diagnostics/extraDiagnosticMessages.json +++ b/internal/diagnostics/extraDiagnosticMessages.json @@ -10,5 +10,9 @@ "Generate pprof CPU/memory profiles to the given directory.": { "category": "Message", "code": 100002 + }, + "Non-relative paths are not allowed. Did you forget a leading './'?": { + "category": "Error", + "code": 5090 } } diff --git a/internal/diagnostics/generate.go b/internal/diagnostics/generate.go index 89ae69c0fb..07b1456d0e 100644 --- a/internal/diagnostics/generate.go +++ b/internal/diagnostics/generate.go @@ -46,7 +46,7 @@ func main() { return } - rawDiagnosticMessages := readRawMessages(filepath.Join(repo.TypeScriptSubmodulePath, "src", "compiler", "diagnosticMessages.json")) + rawDiagnosticMessages, rawDiagnosticMessagesByCode := readRawMessages(filepath.Join(repo.TypeScriptSubmodulePath, "src", "compiler", "diagnosticMessages.json")) _, filename, _, ok := runtime.Caller(0) if !ok { @@ -54,7 +54,18 @@ func main() { } filename = filepath.FromSlash(filename) // runtime.Caller always returns forward slashes; https://go.dev/issues/3335, https://go.dev/cl/603275 - rawExtraMessages := readRawMessages(filepath.Join(filepath.Dir(filename), "extraDiagnosticMessages.json")) + rawExtraMessages, rawExtraMessagesByCode := readRawMessages(filepath.Join(filepath.Dir(filename), "extraDiagnosticMessages.json")) + + for code, key := range rawExtraMessagesByCode { + existing, ok := rawDiagnosticMessagesByCode[code] + if !ok { + continue + } + log.Printf("overriding %q with %q from extraDiagnosticMessages.json", existing, key) + delete(rawDiagnosticMessages, existing) + delete(rawDiagnosticMessagesByCode, code) + } + maps.Copy(rawDiagnosticMessages, rawExtraMessages) diagnosticMessages := make([]*diagnosticMessage, 0, len(rawDiagnosticMessages)) @@ -103,21 +114,26 @@ func main() { } } -func readRawMessages(p string) map[string]*diagnosticMessage { +func readRawMessages(p string) (map[string]*diagnosticMessage, map[int]string) { file, err := os.Open(p) if err != nil { log.Fatalf("failed to open file: %v", err) - return nil + return nil, nil } defer file.Close() var rawMessages map[string]*diagnosticMessage if err := json.NewDecoder(file).Decode(&rawMessages); err != nil { log.Fatalf("failed to decode file: %v", err) - return nil + return nil, nil + } + + codeToNessage := make(map[int]string, len(rawMessages)) + for k, m := range rawMessages { + codeToNessage[m.Code] = k } - return rawMessages + return rawMessages, codeToNessage } var ( From b98da3b09e41aa86f6dd126d69f614125c8130f6 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 15 Jul 2025 21:53:26 -0700 Subject: [PATCH 2/5] Simplfy --- internal/diagnostics/generate.go | 34 ++++++++++---------------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/internal/diagnostics/generate.go b/internal/diagnostics/generate.go index 07b1456d0e..905198c519 100644 --- a/internal/diagnostics/generate.go +++ b/internal/diagnostics/generate.go @@ -46,7 +46,7 @@ func main() { return } - rawDiagnosticMessages, rawDiagnosticMessagesByCode := readRawMessages(filepath.Join(repo.TypeScriptSubmodulePath, "src", "compiler", "diagnosticMessages.json")) + rawDiagnosticMessages := readRawMessages(filepath.Join(repo.TypeScriptSubmodulePath, "src", "compiler", "diagnosticMessages.json")) _, filename, _, ok := runtime.Caller(0) if !ok { @@ -54,25 +54,10 @@ func main() { } filename = filepath.FromSlash(filename) // runtime.Caller always returns forward slashes; https://go.dev/issues/3335, https://go.dev/cl/603275 - rawExtraMessages, rawExtraMessagesByCode := readRawMessages(filepath.Join(filepath.Dir(filename), "extraDiagnosticMessages.json")) - - for code, key := range rawExtraMessagesByCode { - existing, ok := rawDiagnosticMessagesByCode[code] - if !ok { - continue - } - log.Printf("overriding %q with %q from extraDiagnosticMessages.json", existing, key) - delete(rawDiagnosticMessages, existing) - delete(rawDiagnosticMessagesByCode, code) - } + rawExtraMessages := readRawMessages(filepath.Join(filepath.Dir(filename), "extraDiagnosticMessages.json")) maps.Copy(rawDiagnosticMessages, rawExtraMessages) - - diagnosticMessages := make([]*diagnosticMessage, 0, len(rawDiagnosticMessages)) - for k, v := range rawDiagnosticMessages { - v.key = k - diagnosticMessages = append(diagnosticMessages, v) - } + diagnosticMessages := slices.Collect(maps.Values(rawDiagnosticMessages)) slices.SortFunc(diagnosticMessages, func(a *diagnosticMessage, b *diagnosticMessage) int { return cmp.Compare(a.Code, b.Code) @@ -114,26 +99,27 @@ func main() { } } -func readRawMessages(p string) (map[string]*diagnosticMessage, map[int]string) { +func readRawMessages(p string) map[int]*diagnosticMessage { file, err := os.Open(p) if err != nil { log.Fatalf("failed to open file: %v", err) - return nil, nil + return nil } defer file.Close() var rawMessages map[string]*diagnosticMessage if err := json.NewDecoder(file).Decode(&rawMessages); err != nil { log.Fatalf("failed to decode file: %v", err) - return nil, nil + return nil } - codeToNessage := make(map[int]string, len(rawMessages)) + codeToNessage := make(map[int]*diagnosticMessage, len(rawMessages)) for k, m := range rawMessages { - codeToNessage[m.Code] = k + m.key = k + codeToNessage[m.Code] = m } - return rawMessages, codeToNessage + return codeToNessage } var ( From 439f93fc31f5a0d5730e341baa6e2aeb9c7e070b Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 15 Jul 2025 21:56:50 -0700 Subject: [PATCH 3/5] Update baselines --- ...olutionWithExtensions_withPaths.errors.txt | 4 +-- ...es_one_externalModule_withPaths.errors.txt | 8 ++--- ...pingBasedModuleResolution1_node.errors.txt | 8 ++--- ...asedModuleResolution1_node.errors.txt.diff | 23 +++++++++++++++ ...pingBasedModuleResolution2_node.errors.txt | 4 +-- ...pingBasedModuleResolution5_node.errors.txt | 12 ++++---- ...pingBasedModuleResolution7_node.errors.txt | 8 ++--- ...pingBasedModuleResolution8_node.errors.txt | 4 +-- ...dModuleResolution_withExtension.errors.txt | 8 ++--- ...eResolution_withExtensionInName.errors.txt | 4 +-- ...ithExtension_MapedToNodeModules.errors.txt | 8 ++--- ...tion_withExtension_failedLookup.errors.txt | 4 +-- .../compiler/pathsValidation4.errors.txt | 4 +-- .../compiler/pathsValidation5.errors.txt | 12 ++++---- .../compiler/pathsValidation5.errors.txt.diff | 29 +++++++++++++++++++ ...ResolveJsonModuleAndPathMapping.errors.txt | 8 ++--- .../requireOfJsonFile_PathMapping.errors.txt | 8 ++--- ...onWithExtensions_withPaths.errors.txt.diff | 4 +-- ...e_externalModule_withPaths.errors.txt.diff | 8 ++--- ...asedModuleResolution2_node.errors.txt.diff | 4 +-- ...asedModuleResolution5_node.errors.txt.diff | 12 ++++---- ...asedModuleResolution7_node.errors.txt.diff | 8 ++--- ...asedModuleResolution8_node.errors.txt.diff | 4 +-- ...leResolution_withExtension.errors.txt.diff | 8 ++--- ...lution_withExtensionInName.errors.txt.diff | 4 +-- ...tension_MapedToNodeModules.errors.txt.diff | 8 ++--- ...withExtension_failedLookup.errors.txt.diff | 4 +-- .../compiler/pathsValidation4.errors.txt.diff | 4 +-- ...veJsonModuleAndPathMapping.errors.txt.diff | 8 ++--- ...uireOfJsonFile_PathMapping.errors.txt.diff | 8 ++--- .../configDir-template-with-commandline.js | 2 +- .../tsc/extends/configDir-template.js | 2 +- 32 files changed, 148 insertions(+), 96 deletions(-) create mode 100644 testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt index 4d02f72683..baa8c75720 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt @@ -1,6 +1,6 @@ /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 when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(11,14): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (2 errors) ==== @@ -19,7 +19,7 @@ "paths": { "foo/*": ["node_modules/foo/lib/*"] ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt index 28b31d95ad..10e5b58fb2 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt @@ -1,7 +1,7 @@ /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 when 'baseUrl' is not set. Did you forget a leading './'? -/tsconfig.json(12,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(11,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +/tsconfig.json(12,23): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (3 errors) ==== @@ -20,10 +20,10 @@ "paths": { "some-library": ["node_modules/some-library/lib"], ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? "some-library/*": ["node_modules/some-library/lib/*"] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt index 71451c8ef6..1b2c8e14b5 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt @@ -1,5 +1,5 @@ -c:/root/tsconfig.json(5,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/tsconfig.json(5,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== c:/root/tsconfig.json (2 errors) ==== @@ -9,10 +9,10 @@ c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed wh "*": [ "*", ~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? "generated/*" ~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ] } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt.diff new file mode 100644 index 0000000000..df649ae157 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution1_node.errors.txt.diff @@ -0,0 +1,23 @@ +--- old.pathMappingBasedModuleResolution1_node.errors.txt ++++ new.pathMappingBasedModuleResolution1_node.errors.txt +@@= skipped -0, +0 lines =@@ +-c:/root/tsconfig.json(5,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +-c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++c:/root/tsconfig.json(5,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + + ==== c:/root/tsconfig.json (2 errors) ==== +@@= skipped -8, +8 lines =@@ + "*": [ + "*", + ~~~ +-!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + "generated/*" + ~~~~~~~~~~~~~ +-!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ] + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt index a499b9b4a0..b81f3467c5 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt @@ -2,7 +2,7 @@ root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please Use '"paths": {"*": "./src/*"}' instead. root/tsconfig.json(5,13): error TS5061: Pattern '*1*' can have at most one '*' character. root/tsconfig.json(5,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. -root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== root/tsconfig.json (4 errors) ==== @@ -19,7 +19,7 @@ root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed when ~~~~~ !!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt index 7a71d71a17..dbac05adc7 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt @@ -1,8 +1,8 @@ c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -c:/root/tsconfig.json(7,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +c:/root/tsconfig.json(7,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== c:/root/tsconfig.json (4 errors) ==== @@ -16,15 +16,15 @@ c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed w "*": [ "*", ~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? "generated/*" ~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ], "components/*": [ "shared/components/*" ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ] } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt index 545c6df531..d867781fc0 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution7_node.errors.txt @@ -1,8 +1,8 @@ c:/root/src/file1.ts(1,17): error TS2307: Cannot find module './project/file2' or its corresponding type declarations. c:/root/src/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./../*"}' instead. -c:/root/src/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -c:/root/src/tsconfig.json(10,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/src/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +c:/root/src/tsconfig.json(10,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== c:/root/src/tsconfig.json (3 errors) ==== @@ -16,13 +16,13 @@ c:/root/src/tsconfig.json(10,17): error TS5090: Non-relative paths are not allow "*": [ "*", ~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? "c:/shared/*" ], "templates/*": [ "generated/src/templates/*" ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ] }, "rootDirs": [ diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution8_node.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution8_node.errors.txt index b16dec3b31..24c15a6b63 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution8_node.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution8_node.errors.txt @@ -1,6 +1,6 @@ c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -c:/root/tsconfig.json(6,16): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +c:/root/tsconfig.json(6,16): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== c:/root/tsconfig.json (2 errors) ==== @@ -14,7 +14,7 @@ c:/root/tsconfig.json(6,16): error TS5090: Non-relative paths are not allowed wh "@speedy/*/testing": [ "*/dist/index.ts" ~~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ] } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt index 7552d2f697..bcbd04fb72 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt @@ -1,7 +1,7 @@ /tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -/tsconfig.json(6,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +/tsconfig.json(6,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (3 errors) ==== @@ -14,10 +14,10 @@ "paths": { "foo": ["foo/foo.ts"], ~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? "bar": ["bar/bar.js"] ~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? }, "allowJs": true, "outDir": "bin" diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt index a640ae3f88..022fd880c6 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt @@ -1,6 +1,6 @@ /tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (2 errors) ==== @@ -13,7 +13,7 @@ "paths": { "*": ["foo/*"] ~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt index eda8bd3ea4..8dc0c3eb96 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt @@ -1,7 +1,7 @@ /tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (3 errors) ==== @@ -14,9 +14,9 @@ "paths": { "*": ["node_modules/*", "src/types"] ~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? }, "allowJs": true, "outDir": "bin" diff --git a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt index ab802b15c9..af6298db0d 100644 --- a/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt @@ -1,7 +1,7 @@ /a.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations. /tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (2 errors) ==== @@ -14,7 +14,7 @@ "paths": { "foo": ["foo/foo.ts"] ~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation4.errors.txt b/testdata/baselines/reference/submodule/compiler/pathsValidation4.errors.txt index e59f6a37b5..0e81e010c7 100644 --- a/testdata/baselines/reference/submodule/compiler/pathsValidation4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation4.errors.txt @@ -3,7 +3,7 @@ tsconfig.json(4,9): error TS5102: Option 'baseUrl' has been removed. Please remo tsconfig.json(6,11): error TS5061: Pattern '@interface/**/*' can have at most one '*' character. tsconfig.json(7,11): error TS5061: Pattern '@service/**/*' can have at most one '*' character. tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. -tsconfig.json(8,29): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +tsconfig.json(8,29): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== tsconfig.json (5 errors) ==== @@ -25,7 +25,7 @@ tsconfig.json(8,29): error TS5090: Non-relative paths are not allowed when 'base !!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. "@controller/*": ["controller/*"], ~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt b/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt index 80eaf2d68f..7c738ce102 100644 --- a/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt @@ -1,6 +1,6 @@ -tsconfig.json(5,26): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -tsconfig.json(6,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -tsconfig.json(7,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +tsconfig.json(5,26): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +tsconfig.json(6,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +tsconfig.json(7,23): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== tsconfig.json (3 errors) ==== @@ -10,13 +10,13 @@ tsconfig.json(7,23): error TS5090: Non-relative paths are not allowed when 'base "paths": { "@interface/*": ["src/interface/*"], ~~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? "@blah": ["blah"], ~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? "@humbug/*": ["*/generated"] ~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } diff --git a/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt.diff new file mode 100644 index 0000000000..44350fbc09 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/pathsValidation5.errors.txt.diff @@ -0,0 +1,29 @@ +--- old.pathsValidation5.errors.txt ++++ new.pathsValidation5.errors.txt +@@= skipped -0, +0 lines =@@ +-tsconfig.json(5,26): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +-tsconfig.json(6,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +-tsconfig.json(7,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++tsconfig.json(5,26): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++tsconfig.json(6,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++tsconfig.json(7,23): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + + ==== tsconfig.json (3 errors) ==== +@@= skipped -9, +9 lines =@@ + "paths": { + "@interface/*": ["src/interface/*"], + ~~~~~~~~~~~~~~~~~ +-!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + "@blah": ["blah"], + ~~~~~~ +-!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + "@humbug/*": ["*/generated"] + ~~~~~~~~~~~~~ +-!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt index 1db6a5a074..170c52543b 100644 --- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt @@ -1,8 +1,8 @@ /a.ts(1,20): error TS2732: Cannot find module 'foo/bar/foobar.json'. Consider using '--resolveJsonModule' to import module with '.json' extension. /tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (3 errors) ==== @@ -15,9 +15,9 @@ "paths": { "*": ["node_modules/*", "src/types"] ~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? }, "allowJs": true, "outDir": "bin" diff --git a/testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt b/testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt index 118ec09fbd..f533b02278 100644 --- a/testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt @@ -1,7 +1,7 @@ /tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. Use '"paths": {"*": "./*"}' instead. -/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? +/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ==== /tsconfig.json (3 errors) ==== @@ -14,9 +14,9 @@ "paths": { "*": ["node_modules/*", "src/types"] ~~~~~~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ~~~~~~~~~~~ -!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? }, "allowJs": true, "outDir": "bin" 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 d6a6878582..629a2d07d3 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithExtensions_withPaths.errors.txt.diff @@ -4,7 +4,7 @@ - +/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 when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(11,14): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (2 errors) ==== @@ -23,7 +23,7 @@ + "paths": { + "foo/*": ["node_modules/foo/lib/*"] + ~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + } + } + } 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 3e388380a0..fe8737e82e 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 @@ -4,8 +4,8 @@ - +/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 when 'baseUrl' is not set. Did you forget a leading './'? -+/tsconfig.json(12,23): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(11,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++/tsconfig.json(12,23): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== @@ -24,10 +24,10 @@ + "paths": { + "some-library": ["node_modules/some-library/lib"], + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + "some-library/*": ["node_modules/some-library/lib/*"] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + } + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff index 89bf4d0547..0126bd7ff9 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution2_node.errors.txt.diff @@ -8,7 +8,7 @@ - - -==== root/tsconfig.json (2 errors) ==== -+root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== root/tsconfig.json (4 errors) ==== @@ -25,7 +25,7 @@ ~~~~~ !!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. + ~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution5_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution5_node.errors.txt.diff index ceb8f38bdd..b9797250da 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution5_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution5_node.errors.txt.diff @@ -4,9 +4,9 @@ - +c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -+c:/root/tsconfig.json(7,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -+c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++c:/root/tsconfig.json(7,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== c:/root/tsconfig.json (4 errors) ==== @@ -20,15 +20,15 @@ + "*": [ + "*", + ~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + "generated/*" + ~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ], + "components/*": [ + "shared/components/*" + ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ] + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff index a1fc7cc1b4..292afc7a8c 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution7_node.errors.txt.diff @@ -5,8 +5,8 @@ +c:/root/src/file1.ts(1,17): error TS2307: Cannot find module './project/file2' or its corresponding type declarations. +c:/root/src/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./../*"}' instead. -+c:/root/src/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -+c:/root/src/tsconfig.json(10,17): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++c:/root/src/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++c:/root/src/tsconfig.json(10,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== c:/root/src/tsconfig.json (3 errors) ==== @@ -20,13 +20,13 @@ + "*": [ + "*", + ~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + "c:/shared/*" + ], + "templates/*": [ + "generated/src/templates/*" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ] + }, + "rootDirs": [ diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution8_node.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution8_node.errors.txt.diff index 0e9697db9b..8d6223e7c1 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution8_node.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution8_node.errors.txt.diff @@ -4,7 +4,7 @@ - +c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+c:/root/tsconfig.json(6,16): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++c:/root/tsconfig.json(6,16): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== c:/root/tsconfig.json (2 errors) ==== @@ -18,7 +18,7 @@ + "@speedy/*/testing": [ + "*/dist/index.ts" + ~~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ] + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt.diff index 0d33c557c3..30ade4135b 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension.errors.txt.diff @@ -4,8 +4,8 @@ - +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -+/tsconfig.json(6,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++/tsconfig.json(6,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== @@ -18,10 +18,10 @@ + "paths": { + "foo": ["foo/foo.ts"], + ~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + "bar": ["bar/bar.js"] + ~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + }, + "allowJs": true, + "outDir": "bin" diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt.diff index b42398de94..5908adb990 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtensionInName.errors.txt.diff @@ -4,7 +4,7 @@ - +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (2 errors) ==== @@ -17,7 +17,7 @@ + "paths": { + "*": ["foo/*"] + ~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + } + } + } diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt.diff index fe1ae18248..52e25d4764 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.errors.txt.diff @@ -4,8 +4,8 @@ - +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -+/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== @@ -18,9 +18,9 @@ + "paths": { + "*": ["node_modules/*", "src/types"] + ~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + }, + "allowJs": true, + "outDir": "bin" diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt.diff index e7807f0d7c..336efbdec0 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt.diff @@ -7,7 +7,7 @@ -==== /tsconfig.json (0 errors) ==== +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (2 errors) ==== @@ -20,7 +20,7 @@ "paths": { "foo": ["foo/foo.ts"] + ~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff index aa1dd0cee2..dae5d59e00 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/pathsValidation4.errors.txt.diff @@ -9,7 +9,7 @@ - - -==== tsconfig.json (3 errors) ==== -+tsconfig.json(8,29): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++tsconfig.json(8,29): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== tsconfig.json (5 errors) ==== @@ -28,7 +28,7 @@ !!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. "@controller/*": ["controller/*"], + ~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? } } } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt.diff index f6df22ae7f..548512aae2 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.errors.txt.diff @@ -7,8 +7,8 @@ -==== /tsconfig.json (0 errors) ==== +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -+/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== @@ -21,9 +21,9 @@ "paths": { "*": ["node_modules/*", "src/types"] + ~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? }, "allowJs": true, "outDir": "bin" \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFile_PathMapping.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFile_PathMapping.errors.txt.diff index 3f8f971808..caa8edaf38 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFile_PathMapping.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/requireOfJsonFile_PathMapping.errors.txt.diff @@ -4,8 +4,8 @@ - +/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration. + Use '"paths": {"*": "./*"}' instead. -+/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? -+/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++/tsconfig.json(5,19): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? ++/tsconfig.json(5,37): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + + +==== /tsconfig.json (3 errors) ==== @@ -18,9 +18,9 @@ + "paths": { + "*": ["node_modules/*", "src/types"] + ~~~~~~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + ~~~~~~~~~~~ -+!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? ++!!! error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? + }, + "allowJs": true, + "outDir": "bin" diff --git a/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js b/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js index bcb5418c24..c79a33c214 100644 --- a/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js +++ b/testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js @@ -63,7 +63,7 @@ CompilerOptions::{ "explainFiles": true } Output:: -tsconfig.json:3:2 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +tsconfig.json:3:2 - error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? 3 "compilerOptions": {    ~~~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/tsc/extends/configDir-template.js b/testdata/baselines/reference/tsc/extends/configDir-template.js index ab1e8c2623..bbceded14f 100644 --- a/testdata/baselines/reference/tsc/extends/configDir-template.js +++ b/testdata/baselines/reference/tsc/extends/configDir-template.js @@ -62,7 +62,7 @@ CompilerOptions::{ "explainFiles": true } Output:: -tsconfig.json:3:2 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'? +tsconfig.json:3:2 - error TS5090: Non-relative paths are not allowed. Did you forget a leading './'? 3 "compilerOptions": {    ~~~~~~~~~~~~~~~~~ From 77f1e3744a7f04d44baae4748ffd705ec2f4e8b1 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 16 Jul 2025 02:49:06 -0700 Subject: [PATCH 4/5] Remove TODO --- internal/compiler/program.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 2b90b83be2..38bfd7a41d 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -608,7 +608,6 @@ func (p *Program) verifyCompilerOptions() { createDiagnosticForOptionPathKeyValue(key, i, diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key) } if !tspath.PathIsRelative(subst) && !tspath.PathIsAbsolute(subst) { - // !!! This needs a better message that doesn't mention baseUrl createDiagnosticForOptionPathKeyValue(key, i, diagnostics.Non_relative_paths_are_not_allowed_Did_you_forget_a_leading_Slash) } } From e01d989b22e993c59c918bcc53a4300c08a6bfe2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 20 Jul 2025 13:22:53 -0700 Subject: [PATCH 5/5] Fix typo --- internal/diagnostics/generate.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/diagnostics/generate.go b/internal/diagnostics/generate.go index 905198c519..a4652ebc86 100644 --- a/internal/diagnostics/generate.go +++ b/internal/diagnostics/generate.go @@ -113,13 +113,13 @@ func readRawMessages(p string) map[int]*diagnosticMessage { return nil } - codeToNessage := make(map[int]*diagnosticMessage, len(rawMessages)) + codeToMessage := make(map[int]*diagnosticMessage, len(rawMessages)) for k, m := range rawMessages { m.key = k - codeToNessage[m.Code] = m + codeToMessage[m.Code] = m } - return codeToNessage + return codeToMessage } var (