Skip to content

Commit 899f667

Browse files
committed
Recognize relative path using in outDir property (microsoft#9025)
* Recognize relative path using in outDir property * Add projects tests * Add project .json files * Update baselines
1 parent 179d423 commit 899f667

92 files changed

Lines changed: 420 additions & 2 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ tests/webhost/*.d.ts
3434
tests/webhost/webtsc.js
3535
tests/cases/**/*.js
3636
tests/cases/**/*.js.map
37-
tests/cases/**/*.d.ts
3837
*.config
3938
scripts/debug.bat
4039
scripts/run.bat
@@ -49,3 +48,4 @@ internal/
4948
**/.vs
5049
**/.vscode
5150
!**/.vscode/tasks.json
51+
!tests/cases/projects/projectOption/**/node_modules

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ namespace ts {
717717
if (outDir) {
718718
exclude.push(outDir);
719719
}
720-
exclude = map(exclude, normalizeSlashes);
720+
exclude = map(exclude, e => getNormalizedAbsolutePath(e, basePath));
721721

722722
const supportedExtensions = getSupportedExtensions(options);
723723
Debug.assert(indexOf(supportedExtensions, ".ts") < indexOf(supportedExtensions, ".d.ts"), "Changed priority of extensions to pick");
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare var test: number;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var test = 10;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"scenario": "Verify default exclude property in project option",
3+
"projectRoot": "tests/cases/projects/projectOption/DefaultExcludeNodeModulesAndOutDir",
4+
"baselineCheck": true,
5+
"declaration": true,
6+
"resolvedInputFiles": [
7+
"lib.d.ts",
8+
"a.ts"
9+
],
10+
"emittedFiles": [
11+
"OutDir/a.js",
12+
"OutDir/a.d.ts"
13+
]
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare var test: number;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var test = 10;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"scenario": "Verify default exclude property in project option",
3+
"projectRoot": "tests/cases/projects/projectOption/DefaultExcludeNodeModulesAndOutDir",
4+
"baselineCheck": true,
5+
"declaration": true,
6+
"resolvedInputFiles": [
7+
"lib.d.ts",
8+
"a.ts"
9+
],
10+
"emittedFiles": [
11+
"OutDir/a.js",
12+
"OutDir/a.d.ts"
13+
]
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var test = 10;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"scenario": "Verify default exclude property in project option",
3+
"projectRoot": "tests/cases/projects/projectOption/DefaultExcludeNodeModulesAndOutDirWithAllowJS",
4+
"baselineCheck": true,
5+
"resolvedInputFiles": [
6+
"lib.d.ts",
7+
"a.ts"
8+
],
9+
"emittedFiles": [
10+
"OutDir/a.js"
11+
]
12+
}

0 commit comments

Comments
 (0)