Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Assume rootDir is the current configuration directory#62418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
sheetalkamat wants to merge10 commits intomain
base:main
Choose a base branch
Loading
fromrootDir
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Report on outDir and/or DeclarationDir
  • Loading branch information
@sheetalkamat
sheetalkamat committedOct 1, 2025
commit00f890805d4917f9b2fffc2affb2992ecaf9162b

Some comments aren't visible on the classic Files Changed page.

13 changes: 9 additions & 4 deletionssrc/compiler/program.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4269,10 +4269,15 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
// change in layout
programDiagnostics.addConfigDiagnostic(createCompilerDiagnosticFromMessageChain(chainDiagnosticMessages(
chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information),
Diagnostics.Inferred_common_source_directory_differs_from_tsconfig_directory_output_layout_will_be_changed,
)));
createDiagnosticForOption(
/*onKey*/ true,
options.outDir ? "outDir" : "declarationDir",
options.outDir ? "declarationDir" : undefined,
chainDiagnosticMessages(
chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information),
Diagnostics.Inferred_common_source_directory_differs_from_tsconfig_directory_output_layout_will_be_changed,
),
);
}
}

Expand Down
9 changes: 5 additions & 4 deletionstests/baselines/reference/commonSourceDirectory.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,16 +32,17 @@ export {};
//// [DtsFileErrors]


error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
/app/tsconfig.json(3,9):error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
==== /app/tsconfig.json (0 errors) ====
==== /app/tsconfig.json (1 errors) ====
{
"compilerOptions": {
"outDir": "bin",
~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
"typeRoots": ["../types"],
"sourceMap": true,
"mapRoot": "myMapRoot",
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
/app/tsconfig.json(3,9):error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
==== /app/tsconfig.json (0 errors) ====
==== /app/tsconfig.json (1 errors) ====
{
"compilerOptions": {
"outDir": "bin",
~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
"sourceMap": true,
"mapRoot": "myMapRoot",
"sourceRoot": "mySourceRoot",
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
/tsconfig.json(5,5):error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.
/tsconfig.json(6,5): error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Visit https://aka.ms/ts6 for migration information.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
==== /tsconfig.json (1 errors) ====
==== /tsconfig.json (2 errors) ====
{
"compilerOptions": {
"module": "nodenext",
"declaration": true,
"outDir": "temp",
~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
"baseUrl": "."
~~~~~~~~~
!!! error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
packages/b/tsconfig.json(3,9):error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.
packages/b/tsconfig.json(5,9): error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Visit https://aka.ms/ts6 for migration information.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
==== packages/b/tsconfig.json (1 errors) ====
==== packages/b/tsconfig.json (2 errors) ====
{
"compilerOptions": {
"outDir": "dist",
~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
"declaration": true,
"baseUrl": ".",
~~~~~~~~~
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
packages/lab/tsconfig.json(3,9):error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.
packages/lab/tsconfig.json(5,9): error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Visit https://aka.ms/ts6 for migration information.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
==== packages/lab/tsconfig.json (1 errors) ====
==== packages/lab/tsconfig.json (2 errors) ====
{
"compilerOptions": {
"outDir": "dist",
~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
"declaration": true,
"baseUrl": "../",
~~~~~~~~~
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,14 +22,15 @@ export default Foo;
//// [DtsFileErrors]


error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
/foo/tsconfig.json(2,47):error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
==== /foo/tsconfig.json (0 errors) ====
==== /foo/tsconfig.json (1 errors) ====
{
"compilerOptions": { "declaration": true, "declarationDir": "out" }
~~~~~~~~~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
}

Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.
error TS5055: Cannot write file '/bar.js' because it would overwrite input file.
/root/tsconfig.json(3,9): error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Visit https://aka.ms/ts6 for migration information.
/root/tsconfig.json(8,9): error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.
/root/a.ts(1,21): error TS6059: File '/foo.ts' is not under 'rootDir' '/root'. 'rootDir' is expected to contain all source files.
/root/a.ts(2,21): error TS6059: File '/bar.js' is not under 'rootDir' '/root'. 'rootDir' is expected to contain all source files.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
!!! error TS5055: Cannot write file '/bar.js' because it would overwrite input file.
==== /root/tsconfig.json (1 errors) ====
==== /root/tsconfig.json (2 errors) ====
{
"compilerOptions": {
"baseUrl": ".",
Expand All@@ -22,6 +20,9 @@ error TS5055: Cannot write file '/bar.js' because it would overwrite input file.
},
"allowJs": true,
"outDir": "bin"
~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
}
}

Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.
error TS5055: Cannot write file '/bar.js' because it would overwrite input file.
/root/tsconfig.json(3,9): error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Visit https://aka.ms/ts6 for migration information.
/root/tsconfig.json(8,9): error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.
/root/a.ts(1,21): error TS6059: File '/foo.ts' is not under 'rootDir' '/root'. 'rootDir' is expected to contain all source files.
/root/a.ts(2,21): error TS6059: File '/bar.js' is not under 'rootDir' '/root'. 'rootDir' is expected to contain all source files.


!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
!!! error TS5055: Cannot write file '/bar.js' because it would overwrite input file.
==== /root/tsconfig.json (1 errors) ====
==== /root/tsconfig.json (2 errors) ====
{
"compilerOptions": {
"baseUrl": ".",
Expand All@@ -22,6 +20,9 @@ error TS5055: Cannot write file '/bar.js' because it would overwrite input file.
},
"allowJs": true,
"outDir": "bin"
~~~~~~~~
!!! error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
}
}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,9 +34,12 @@ Output::

[HH:MM:SS AM] Building project '/home/src/workspaces/project/tsconfig.json'...

error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
tsconfig.json:3:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

3 "outDir": "dist"
   ~~~~~~~~


Found 1 error.

Expand DownExpand Up@@ -78,9 +81,12 @@ Output::

[HH:MM:SS AM] Building project '/home/src/workspaces/project/tsconfig.json'...

error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
tsconfig.json:3:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

3 "outDir": "dist"
   ~~~~~~~~


Found 1 error.

Expand All@@ -98,11 +104,14 @@ Input::

/home/src/tslibs/TS/Lib/tsc.js -p /home/src/workspaces/project/tsconfig.json
Output::
error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
tsconfig.json:3:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

3 "outDir": "dist"
   ~~~~~~~~

Found 1 error.

Found 1 error in tsconfig.json:3



Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,15 +51,18 @@ Output::

[HH:MM:SS AM] Building project '/home/src/workspaces/solution/project/tsconfig.json'...

error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

project/tsconfig.json:3: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.
Visit https://aka.ms/ts6 for migration information.

3 "moduleResolution": "node",
   ~~~~~~

project/tsconfig.json:8:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

8 "outDir": "dist",
   ~~~~~~~~

TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,15 +53,18 @@ Output::

[HH:MM:SS AM] Building project '/home/src/workspaces/solution/project/tsconfig.json'...

error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

project/tsconfig.json:3: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.
Visit https://aka.ms/ts6 for migration information.

3 "moduleResolution": "node",
   ~~~~~~

project/tsconfig.json:8:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

8 "outDir": "dist",
   ~~~~~~~~

TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,15 +51,18 @@ Output::

[HH:MM:SS AM] Building project '/home/src/workspaces/solution/project/tsconfig.json'...

error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

project/tsconfig.json:3: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.
Visit https://aka.ms/ts6 for migration information.

3 "moduleResolution": "node",
   ~~~~~~

project/tsconfig.json:8:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

8 "outDir": "dist",
   ~~~~~~~~

TSFILE: /home/src/workspaces/solution/project/dist/src/index.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,15 +51,18 @@ Output::

[HH:MM:SS AM] Building project '/home/src/workspaces/solution/project/tsconfig.json'...

error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

project/tsconfig.json:3: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.
Visit https://aka.ms/ts6 for migration information.

3 "moduleResolution": "node",
   ~~~~~~

project/tsconfig.json:8:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

8 "outDir": "dist",
   ~~~~~~~~

TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,15 +50,18 @@ Output::

[HH:MM:SS AM] Building project '/home/src/workspaces/solution/project/tsconfig.json'...

error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

project/tsconfig.json:3: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.
Visit https://aka.ms/ts6 for migration information.

3 "moduleResolution": "node",
   ~~~~~~

project/tsconfig.json:8:5 - error TS5011: Inferred common source directory differs from tsconfig directory, output layout will be changed.
Visit https://aka.ms/ts6 for migration information.

8 "outDir": "dist",
   ~~~~~~~~

TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp