Commit feafed8
committed
feat: port tsconfck (find tsconfig files) (#854)
Adds `Resolver::find_tsconfig`.
```
/// Finds the `tsconfig` to which this `path` belongs.
///
/// Algorithm:
///
/// 1. Search for `tsconfig.json` in ancestor directories.
/// 2. If the path is not included in this `tsconfig.json` through the `files`, `include`, or `exclude` fields:
/// 2.1. Search through project references until a referenced `tsconfig` includes this file.
/// 2.2. If none of the references include this path, return the `tsconfig.json` found in step 1.
///
/// # Errors
///
/// * Returns an error if the tsconfig is invalid, including any extended or referenced tsconfigs.
```
- [x] tracing
- [x] test windows
- [x] add benchmark
- [x] add cache1 parent 3d70607 commit feafed8
File tree
150 files changed
+1133
-70
lines changed- benches
- fixtures/tsconfck
- find/a
- b
- c
- node_modules
- some-js-lib
- src
- some-lib
- src
- node_modules
- @tsconfig
- parse
- invalid
- bom
- comma
- comments
- extends-array-circular
- src
- extends-circular
- deep
- extends-not-found
- mixed
- tsconfig.json
- solution
- jsconfig
- src
- mixed
- src
- referenced-exclude
- src
- referenced-extends-original
- src
- tests
- referenced-files
- src
- referenced-include
- src
- referenced-with-configDir-and-extends
- packages/foo
- src
- referenced-with-configDir
- src
- referenced-with-implicit-globs
- src
- tests
- simple
- src
- tests
- valid
- bom
- comma
- comments
- configDirNpm
- configDir
- a
- src
- b
- src
- src
- empty
- lib
- mixed
- moduleResolution
- bundler
- classic
- node16
- nodenext
- regular
- ts_node
- with_extends
- array
- src
- dotdot
- src
- dot
- src
- nested
- src
- nested
- no_compileroptions
- node_fallback
- node
- paths
- lib
- src
- simple
- without_json_extension
- src
- cache
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
150 files changed
+1133
-70
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
227 | 240 | | |
228 | 241 | | |
229 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Whitespace-only changes.
Whitespace-only changes.
0 commit comments