Update checked-in dependencies
This commit is contained in:
parent
fa428daf9c
commit
b3bf514df4
216 changed files with 4342 additions and 1611 deletions
55
node_modules/get-tsconfig/README.md
generated
vendored
55
node_modules/get-tsconfig/README.md
generated
vendored
|
|
@ -1,4 +1,11 @@
|
|||
# get-tsconfig [](https://npm.im/get-tsconfig)
|
||||
<p align="center">
|
||||
<img width="160" src=".github/logo.webp">
|
||||
</p>
|
||||
<h1 align="center">
|
||||
<sup>get-tsconfig</sup>
|
||||
<br>
|
||||
<a href="https://npm.im/get-tsconfig"><img src="https://badgen.net/npm/v/get-tsconfig"></a> <a href="https://npm.im/get-tsconfig"><img src="https://badgen.net/npm/dm/get-tsconfig"></a>
|
||||
</h1>
|
||||
|
||||
Find and parse `tsconfig.json` files.
|
||||
|
||||
|
|
@ -9,26 +16,35 @@ Find and parse `tsconfig.json` files.
|
|||
- Resolves [`extends`](https://www.typescriptlang.org/tsconfig/#extends)
|
||||
- Fully typed `tsconfig.json`
|
||||
- Validates and throws parsing errors
|
||||
- Tiny! `3.6 kB` Minified + Gzipped
|
||||
- Tiny! `7 kB` Minified + Gzipped
|
||||
|
||||
## 🚀 Install
|
||||
<br>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=398771"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/donate.webp"></a>
|
||||
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=397608"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
|
||||
</p>
|
||||
<p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/get-tsconfig">Development repo</a>!</sup></p>
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install get-tsconfig
|
||||
```
|
||||
|
||||
## 🙋♀️ Why?
|
||||
## Why?
|
||||
For TypeScript related tooling to correctly parse `tsconfig.json` file without depending on TypeScript.
|
||||
|
||||
## ⚙️ API
|
||||
## API
|
||||
|
||||
### getTsconfig(searchPath?, configName?)
|
||||
### getTsconfig(searchPath?, configName?, cache?)
|
||||
Searches for a `tsconfig.json` file and parses it. Returns `null` if a config file cannot be found, or an object containing the path and parsed TSConfig object if found.
|
||||
|
||||
Returns:
|
||||
|
||||
```ts
|
||||
type TsconfigResult = {
|
||||
|
||||
/**
|
||||
* The path to the tsconfig.json file
|
||||
*/
|
||||
|
|
@ -55,6 +71,13 @@ Default: `tsconfig.json`
|
|||
|
||||
The file name of the TypeScript config file.
|
||||
|
||||
#### cache
|
||||
Type: `Map<string, any>`
|
||||
|
||||
Default: `new Map()`
|
||||
|
||||
Optional cache for fs operations.
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
|
|
@ -78,7 +101,7 @@ console.log(getTsconfig('.', 'jsconfig.json'))
|
|||
|
||||
---
|
||||
|
||||
### parseTsconfig(tsconfigPath)
|
||||
### parseTsconfig(tsconfigPath, cache?)
|
||||
The `tsconfig.json` parser used internally by `getTsconfig`. Returns the parsed tsconfig as `TsConfigJsonResolved`.
|
||||
|
||||
#### tsconfigPath
|
||||
|
|
@ -86,6 +109,13 @@ Type: `string`
|
|||
|
||||
Required path to the tsconfig file.
|
||||
|
||||
#### cache
|
||||
Type: `Map<string, any>`
|
||||
|
||||
Default: `new Map()`
|
||||
|
||||
Optional cache for fs operations.
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
|
|
@ -95,8 +125,6 @@ import { parseTsconfig } from 'get-tsconfig'
|
|||
console.log(parseTsconfig('./path/to/tsconfig.custom.json'))
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### createFileMatcher(tsconfig: TsconfigResult, caseSensitivePaths?: boolean)
|
||||
|
||||
Given a `tsconfig.json` file, it returns a file-matcher function that determines whether it should apply to a file path.
|
||||
|
|
@ -157,7 +185,7 @@ import { getTsconfig, createPathsMatcher } from 'get-tsconfig'
|
|||
const tsconfig = getTsconfig()
|
||||
const pathsMatcher = createPathsMatcher(tsconfig)
|
||||
|
||||
function exampleResolver(request: string) {
|
||||
const exampleResolver = (request: string) => {
|
||||
if (pathsMatcher) {
|
||||
const tryPaths = pathsMatcher(request)
|
||||
|
||||
|
|
@ -194,3 +222,10 @@ const parsedTsconfig = parseJsonConfigFileContent(
|
|||
path.dirname(tsconfigPath)
|
||||
)
|
||||
```
|
||||
|
||||
## Sponsors
|
||||
<p align="center">
|
||||
<a href="https://github.com/sponsors/privatenumber">
|
||||
<img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
|
||||
</a>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue