Skip to content

Commit 0d5197c

Browse files
authored
Fix typo in baseUrl paths conversion message (#1546)
1 parent 4d28085 commit 0d5197c

File tree

59 files changed

+115
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+115
-115
lines changed

internal/compiler/program.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ func (p *Program) verifyCompilerOptions() {
484484
relative = "./" + relative
485485
}
486486
suggestion := tspath.CombinePaths(relative, "*")
487-
useInstead = fmt.Sprintf(`"paths": {"*": %s}`, core.Must(json.Marshal(suggestion)))
487+
useInstead = fmt.Sprintf(`"paths": {"*": [%s]}`, core.Must(json.Marshal(suggestion)))
488488
}
489489
createRemovedOptionDiagnostic("baseUrl", "", useInstead)
490490
}

testdata/baselines/reference/submodule/compiler/declarationEmitMonorepoBaseUrl.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/tsconfig.json(6,5): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
2-
Use '"paths": {"*": "./*"}' instead.
2+
Use '"paths": {"*": ["./*"]}' instead.
33

44

55
==== /tsconfig.json (1 errors) ====
@@ -11,7 +11,7 @@
1111
"baseUrl": "."
1212
~~~~~~~~~
1313
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
14-
!!! error TS5102: Use '"paths": {"*": "./*"}' instead.
14+
!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
1515
}
1616
}
1717

testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
packages/b/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
2-
Use '"paths": {"*": "./*"}' instead.
2+
Use '"paths": {"*": ["./*"]}' instead.
33

44

55
==== packages/b/tsconfig.json (1 errors) ====
@@ -10,7 +10,7 @@ packages/b/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed.
1010
"baseUrl": ".",
1111
~~~~~~~~~
1212
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
13-
!!! error TS5102: Use '"paths": {"*": "./*"}' instead.
13+
!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
1414
"paths": {
1515
"@ts-bug/a": ["../a"]
1616
}

testdata/baselines/reference/submodule/compiler/declarationEmitPathMappingMonorepo2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
packages/lab/src/index.ts(1,31): error TS2307: Cannot find module '@ts-bug/core/utils' or its corresponding type declarations.
22
packages/lab/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
3-
Use '"paths": {"*": "./../*"}' instead.
3+
Use '"paths": {"*": ["./../*"]}' instead.
44

55

66
==== packages/lab/tsconfig.json (1 errors) ====
@@ -11,7 +11,7 @@ packages/lab/tsconfig.json(5,9): error TS5102: Option 'baseUrl' has been removed
1111
"baseUrl": "../",
1212
~~~~~~~~~
1313
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
14-
!!! error TS5102: Use '"paths": {"*": "./../*"}' instead.
14+
!!! error TS5102: Use '"paths": {"*": ["./../*"]}' instead.
1515
"paths": {
1616
"@ts-bug/core": ["./core/src"],
1717
"@ts-bug/core/*": ["./core/src/*"],

testdata/baselines/reference/submodule/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/project/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
2-
Use '"paths": {"*": "./*"}' instead.
2+
Use '"paths": {"*": ["./*"]}' instead.
33

44

55
==== /project/tsconfig.json (1 errors) ====
@@ -8,7 +8,7 @@
88
"baseUrl": ".",
99
~~~~~~~~~
1010
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
11-
!!! error TS5102: Use '"paths": {"*": "./*"}' instead.
11+
!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
1212
"paths": {
1313
"@shared/*": ["../shared/*"]
1414
}

testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_withPaths.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/tsconfig.json(6,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
2-
Use '"paths": {"*": "./*"}' instead.
2+
Use '"paths": {"*": ["./*"]}' instead.
33
/tsconfig.json(11,14): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
44

55

@@ -12,7 +12,7 @@
1212
"baseUrl": "/",
1313
~~~~~~~~~
1414
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
15-
!!! error TS5102: Use '"paths": {"*": "./*"}' instead.
15+
!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
1616
"moduleResolution": "Node",
1717
"noImplicitAny": true,
1818
"traceResolution": true,

testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule_withPaths.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/tsconfig.json(9,3): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
2-
Use '"paths": {"*": "./*"}' instead.
2+
Use '"paths": {"*": ["./*"]}' instead.
33
/tsconfig.json(11,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
44
/tsconfig.json(12,23): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
55

@@ -16,7 +16,7 @@
1616
"baseUrl": "/",
1717
~~~~~~~~~
1818
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
19-
!!! error TS5102: Use '"paths": {"*": "./*"}' instead.
19+
!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
2020
"paths": {
2121
"some-library": ["node_modules/some-library/lib"],
2222
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution2_node.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
2-
Use '"paths": {"*": "./src/*"}' instead.
2+
Use '"paths": {"*": ["./src/*"]}' instead.
33
root/tsconfig.json(5,13): error TS5061: Pattern '*1*' can have at most one '*' character.
44
root/tsconfig.json(5,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character.
55
root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
@@ -11,7 +11,7 @@ root/tsconfig.json(5,22): error TS5090: Non-relative paths are not allowed. Did
1111
"baseUrl": "./src",
1212
~~~~~~~~~
1313
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
14-
!!! error TS5102: Use '"paths": {"*": "./src/*"}' instead.
14+
!!! error TS5102: Use '"paths": {"*": ["./src/*"]}' instead.
1515
"paths": {
1616
"*1*": [ "*2*" ]
1717
~~~~~

testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution4_node.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
c:/root/folder1/file1.ts(1,17): error TS2307: Cannot find module 'folder2/file2' or its corresponding type declarations.
22
c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
3-
Use '"paths": {"*": "./*"}' instead.
3+
Use '"paths": {"*": ["./*"]}' instead.
44

55

66
==== c:/root/tsconfig.json (1 errors) ====
@@ -9,7 +9,7 @@ c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Ple
99
"baseUrl": "."
1010
~~~~~~~~~
1111
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
12-
!!! error TS5102: Use '"paths": {"*": "./*"}' instead.
12+
!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
1313
}
1414
}
1515

testdata/baselines/reference/submodule/compiler/pathMappingBasedModuleResolution5_node.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
c:/root/tsconfig.json(3,9): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
2-
Use '"paths": {"*": "./*"}' instead.
2+
Use '"paths": {"*": ["./*"]}' instead.
33
c:/root/tsconfig.json(6,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
44
c:/root/tsconfig.json(7,17): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
55
c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
@@ -11,7 +11,7 @@ c:/root/tsconfig.json(10,21): error TS5090: Non-relative paths are not allowed.
1111
"baseUrl": ".",
1212
~~~~~~~~~
1313
!!! error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
14-
!!! error TS5102: Use '"paths": {"*": "./*"}' instead.
14+
!!! error TS5102: Use '"paths": {"*": ["./*"]}' instead.
1515
"paths": {
1616
"*": [
1717
"*",

0 commit comments

Comments
 (0)