Comments (9)
Using https://www.npmjs.com/package/every-ts:
$ every-ts bisect start
$ every-ts bisect bad main
$ every-ts bisect good 5.4.5
$ every-ts bisect run sh -c 'tsc -p tsconfig.json --outDir .'
c92bd16ac0e75834100ef57daa0083f161470509 is the first bad commit
commit c92bd16ac0e75834100ef57daa0083f161470509
Author: Sheetal Nandi <[email protected]>
Date: Fri Apr 26 13:14:40 2024 -0700
Exclude outDir and declarationDir even if they come from extended config (#58335)
from typescript.
This was intentional change to exclude the outDir
and declarationDir
if no excludes are specified.
from typescript.
It seems like that PR intended to change it for the case where outDir
and/or declarationDir
appear in the extend
ed tsconfig. file. Did you also instead to change the semantics for the --outDir
command-line flag?
from typescript.
For all flags we normally dont care if its in config file or passed on commandLine, so thats what this change did - always exclude outDir
and declaraitonDir
from typescript.
I think one would expect that these three tsconfigs would have identical behavior:
{
"compilerOptions": {}
}
{
"compilerOptions": {
"outDir": "."
}
}
{
"compilerOptions": {
"outDir": "."
},
"exclude": []
}
but (2) is the only one that fails with No inputs were found in config file
.
from typescript.
But they are not same:
- is without any
outDir
- Redirects output to
outDir
and there is no exclude specified so will excludeoutdir
- Has explicit excludes so it doesnt add any data to it.
from typescript.
I recognize the behavioral difference, but it seems like something that will be a source of confusion for users. Also I just wanted to get clarification, should this behavior only apply to tsconfig files that have been "extends"
ed from, or to any tsconfig files?
from typescript.
There is no change in behavior for scenario 2 with that PR. That behavior was always there
from typescript.
I believe that's not correct. Scenario 2 produced .js
outputs prior to your commit, and now it's an error.
Note, the repro is even simpler than I wrote above:
ts59036 % touch index.ts tsconfig.json
ts59036 % npx -p [email protected] tsc --outDir . -p .
ts59036 % ls
index.js index.ts tsconfig.json
ts59036 % npx -p [email protected] tsc --outDir . -p .
error TS18003: No inputs were found in config file '/Users/alexeagle/repros/ts59036/tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["/Users/alexeagle/repros/ts59036"]'.
Found 1 error.
from typescript.
Related Issues (20)
- Generic parameter type checking stops too early HOT 9
- TS 5.5 - Imports used by decorator output are removed HOT 2
- this.constructor.staticMethod() is ok in JS, but is an error in TS HOT 1
- Incorrect transform when namespace is empty HOT 1
- Filter with a type guard fails to narrow when the type guard's predicate is a tuple supertype HOT 4
- Declaration emit change in 5.5 with `exactOptionalPropertyTypes` HOT 3
- typing for navigator.clipboard HOT 5
- Investigate Wildcard Matching Performance HOT 2
- How to correctly obtain the type of return value after the decorator HOT 1
- The type reduction of the in operator is invalid in ts 5.5 HOT 7
- `getTypeListId` crashes with `TypeError: Cannot read properties of undefined (reading 'id')`
- Suggestion: A use case requires the "nameof" operator HOT 3
- Overload call signature resolution resolves to first overload HOT 14
- FR: Add TS config option to disable "<some regex feature> is only available when targeting 'es2018' or later.". HOT 5
- Deprecating no-default-lib and rethinking of other lib related CompilerOptions HOT 1
- Function overloading of generic functions allows for invalid code HOT 1
- TS7022 (circular reference) on simple assignments in a loop HOT 6
- Suggestion xml2typescript tooling HOT 4
- Signature help stopped expanding type alias in TypeScript 5.5 HOT 8
- Problem with .d.ts file generation for inner classes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript.