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>
|
||||
|
|
|
|||
10
node_modules/get-tsconfig/dist/index.cjs
generated
vendored
10
node_modules/get-tsconfig/dist/index.cjs
generated
vendored
File diff suppressed because one or more lines are too long
26
node_modules/get-tsconfig/dist/index.d.cts
generated
vendored
26
node_modules/get-tsconfig/dist/index.d.cts
generated
vendored
|
|
@ -137,6 +137,7 @@ declare namespace TsConfigJson {
|
|||
| 'ESNext'
|
||||
| 'Node16'
|
||||
| 'NodeNext'
|
||||
| 'Preserve'
|
||||
| 'None'
|
||||
// Lowercase alternatives
|
||||
| 'commonjs'
|
||||
|
|
@ -150,6 +151,7 @@ declare namespace TsConfigJson {
|
|||
| 'esnext'
|
||||
| 'node16'
|
||||
| 'nodenext'
|
||||
| 'preserve'
|
||||
| 'none';
|
||||
|
||||
export type NewLine =
|
||||
|
|
@ -186,6 +188,7 @@ declare namespace TsConfigJson {
|
|||
| 'es2022'
|
||||
| 'esnext';
|
||||
|
||||
// eslint-disable-next-line unicorn/prevent-abbreviations
|
||||
export type Lib =
|
||||
| 'ES5'
|
||||
| 'ES6'
|
||||
|
|
@ -230,6 +233,14 @@ declare namespace TsConfigJson {
|
|||
| 'ES2021.Promise'
|
||||
| 'ES2021.String'
|
||||
| 'ES2021.WeakRef'
|
||||
| 'ES2022'
|
||||
| 'ES2022.Array'
|
||||
| 'ES2022.Error'
|
||||
| 'ES2022.Intl'
|
||||
| 'ES2022.Object'
|
||||
| 'ES2022.SharedMemory'
|
||||
| 'ES2022.String'
|
||||
| 'ES2022.RegExp'
|
||||
| 'ESNext'
|
||||
| 'ESNext.Array'
|
||||
| 'ESNext.AsyncIterable'
|
||||
|
|
@ -289,6 +300,14 @@ declare namespace TsConfigJson {
|
|||
| 'es2021.promise'
|
||||
| 'es2021.string'
|
||||
| 'es2021.weakref'
|
||||
| 'es2022'
|
||||
| 'es2022.array'
|
||||
| 'es2022.error'
|
||||
| 'es2022.intl'
|
||||
| 'es2022.object'
|
||||
| 'es2022.sharedmemory'
|
||||
| 'es2022.string'
|
||||
| 'es2022.regexp'
|
||||
| 'esnext'
|
||||
| 'esnext.array'
|
||||
| 'esnext.asynciterable'
|
||||
|
|
@ -1307,10 +1326,11 @@ type TsConfigResult = {
|
|||
*/
|
||||
config: TsConfigJsonResolved;
|
||||
};
|
||||
type Cache<value = any> = Map<string, value>;
|
||||
|
||||
declare const getTsconfig: (searchPath?: string, configName?: string) => TsConfigResult | null;
|
||||
declare const getTsconfig: (searchPath?: string, configName?: string, cache?: Cache) => TsConfigResult | null;
|
||||
|
||||
declare const parseTsconfig: (tsconfigPath: string) => TsConfigJsonResolved;
|
||||
declare const parseTsconfig: (tsconfigPath: string, cache?: Cache<string>) => TsConfigJsonResolved;
|
||||
|
||||
/**
|
||||
* Reference:
|
||||
|
|
@ -1321,4 +1341,4 @@ declare const createPathsMatcher: (tsconfig: TsConfigResult) => ((specifier: str
|
|||
type FileMatcher = (filePath: string) => (TsConfigJsonResolved | undefined);
|
||||
declare const createFilesMatcher: ({ config, path: tsconfigPath, }: TsConfigResult, caseSensitivePaths?: boolean) => FileMatcher;
|
||||
|
||||
export { FileMatcher, TsConfigJson, TsConfigJsonResolved, TsConfigResult, createFilesMatcher, createPathsMatcher, getTsconfig, parseTsconfig };
|
||||
export { type Cache, type FileMatcher, TsConfigJson, type TsConfigJsonResolved, type TsConfigResult, createFilesMatcher, createPathsMatcher, getTsconfig, parseTsconfig };
|
||||
|
|
|
|||
26
node_modules/get-tsconfig/dist/index.d.mts
generated
vendored
26
node_modules/get-tsconfig/dist/index.d.mts
generated
vendored
|
|
@ -137,6 +137,7 @@ declare namespace TsConfigJson {
|
|||
| 'ESNext'
|
||||
| 'Node16'
|
||||
| 'NodeNext'
|
||||
| 'Preserve'
|
||||
| 'None'
|
||||
// Lowercase alternatives
|
||||
| 'commonjs'
|
||||
|
|
@ -150,6 +151,7 @@ declare namespace TsConfigJson {
|
|||
| 'esnext'
|
||||
| 'node16'
|
||||
| 'nodenext'
|
||||
| 'preserve'
|
||||
| 'none';
|
||||
|
||||
export type NewLine =
|
||||
|
|
@ -186,6 +188,7 @@ declare namespace TsConfigJson {
|
|||
| 'es2022'
|
||||
| 'esnext';
|
||||
|
||||
// eslint-disable-next-line unicorn/prevent-abbreviations
|
||||
export type Lib =
|
||||
| 'ES5'
|
||||
| 'ES6'
|
||||
|
|
@ -230,6 +233,14 @@ declare namespace TsConfigJson {
|
|||
| 'ES2021.Promise'
|
||||
| 'ES2021.String'
|
||||
| 'ES2021.WeakRef'
|
||||
| 'ES2022'
|
||||
| 'ES2022.Array'
|
||||
| 'ES2022.Error'
|
||||
| 'ES2022.Intl'
|
||||
| 'ES2022.Object'
|
||||
| 'ES2022.SharedMemory'
|
||||
| 'ES2022.String'
|
||||
| 'ES2022.RegExp'
|
||||
| 'ESNext'
|
||||
| 'ESNext.Array'
|
||||
| 'ESNext.AsyncIterable'
|
||||
|
|
@ -289,6 +300,14 @@ declare namespace TsConfigJson {
|
|||
| 'es2021.promise'
|
||||
| 'es2021.string'
|
||||
| 'es2021.weakref'
|
||||
| 'es2022'
|
||||
| 'es2022.array'
|
||||
| 'es2022.error'
|
||||
| 'es2022.intl'
|
||||
| 'es2022.object'
|
||||
| 'es2022.sharedmemory'
|
||||
| 'es2022.string'
|
||||
| 'es2022.regexp'
|
||||
| 'esnext'
|
||||
| 'esnext.array'
|
||||
| 'esnext.asynciterable'
|
||||
|
|
@ -1307,10 +1326,11 @@ type TsConfigResult = {
|
|||
*/
|
||||
config: TsConfigJsonResolved;
|
||||
};
|
||||
type Cache<value = any> = Map<string, value>;
|
||||
|
||||
declare const getTsconfig: (searchPath?: string, configName?: string) => TsConfigResult | null;
|
||||
declare const getTsconfig: (searchPath?: string, configName?: string, cache?: Cache) => TsConfigResult | null;
|
||||
|
||||
declare const parseTsconfig: (tsconfigPath: string) => TsConfigJsonResolved;
|
||||
declare const parseTsconfig: (tsconfigPath: string, cache?: Cache<string>) => TsConfigJsonResolved;
|
||||
|
||||
/**
|
||||
* Reference:
|
||||
|
|
@ -1321,4 +1341,4 @@ declare const createPathsMatcher: (tsconfig: TsConfigResult) => ((specifier: str
|
|||
type FileMatcher = (filePath: string) => (TsConfigJsonResolved | undefined);
|
||||
declare const createFilesMatcher: ({ config, path: tsconfigPath, }: TsConfigResult, caseSensitivePaths?: boolean) => FileMatcher;
|
||||
|
||||
export { FileMatcher, TsConfigJson, TsConfigJsonResolved, TsConfigResult, createFilesMatcher, createPathsMatcher, getTsconfig, parseTsconfig };
|
||||
export { type Cache, type FileMatcher, TsConfigJson, type TsConfigJsonResolved, type TsConfigResult, createFilesMatcher, createPathsMatcher, getTsconfig, parseTsconfig };
|
||||
|
|
|
|||
10
node_modules/get-tsconfig/dist/index.mjs
generated
vendored
10
node_modules/get-tsconfig/dist/index.mjs
generated
vendored
File diff suppressed because one or more lines are too long
4
node_modules/get-tsconfig/package.json
generated
vendored
4
node_modules/get-tsconfig/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "get-tsconfig",
|
||||
"version": "4.6.2",
|
||||
"version": "4.7.6",
|
||||
"description": "Find and parse the tsconfig.json file from a directory path",
|
||||
"keywords": [
|
||||
"get-tsconfig",
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
"name": "Hiroki Osame",
|
||||
"email": "hiroki.osame@gmail.com"
|
||||
},
|
||||
"type": "module",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.cts",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue