@visulima/tsconfig 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +11 -11
- package/dist/index.d.cts +20 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/package.json +2 -69
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## @visulima/tsconfig [1.1.11](https://github.com/visulima/visulima/compare/@visulima/tsconfig@1.1.10...@visulima/tsconfig@1.1.11) (2025-01-25)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* updated all dev dependencies ([37fb298](https://github.com/visulima/visulima/commit/37fb298b2af7c63be64252024e54bb3af6ddabec))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Dependencies
|
|
9
|
+
|
|
10
|
+
* **@visulima/fs:** upgraded to 3.0.0
|
|
11
|
+
|
|
12
|
+
## @visulima/tsconfig [1.1.10](https://github.com/visulima/visulima/compare/@visulima/tsconfig@1.1.9...@visulima/tsconfig@1.1.10) (2025-01-22)
|
|
13
|
+
|
|
14
|
+
### Styles
|
|
15
|
+
|
|
16
|
+
* cs fixes ([f615a6a](https://github.com/visulima/visulima/commit/f615a6af4c0d4fb9ec054565fe5c93e88df487e9))
|
|
17
|
+
|
|
18
|
+
### Miscellaneous Chores
|
|
19
|
+
|
|
20
|
+
* updated all dev dependencies and all dependencies in the app folder ([87f4ccb](https://github.com/visulima/visulima/commit/87f4ccbf9f7900ec5b56f3c1477bc4a0ef571bcf))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Dependencies
|
|
24
|
+
|
|
25
|
+
* **@visulima/fs:** upgraded to 2.3.8
|
|
26
|
+
|
|
1
27
|
## @visulima/tsconfig [1.1.9](https://github.com/visulima/visulima/compare/@visulima/tsconfig@1.1.8...@visulima/tsconfig@1.1.9) (2025-01-21)
|
|
2
28
|
|
|
3
29
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ const tsconfig = await readTsConfig("/Users/../Projects/visulima/packages/tsconf
|
|
|
101
101
|
type TsConfigJson = object;
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
Defined in: node\_modules/.pnpm/type-fest@4.
|
|
104
|
+
Defined in: node\_modules/.pnpm/type-fest@4.33.0/node\_modules/type-fest/source/tsconfig-json.d.ts:1
|
|
105
105
|
|
|
106
106
|
Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 3.7).
|
|
107
107
|
|
|
@@ -191,7 +191,7 @@ Instructs the TypeScript compiler how to watch files.
|
|
|
191
191
|
function findTsConfig(cwd?, options?): Promise<TsConfigResult>
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
Defined in: [packages/tsconfig/src/find-tsconfig.ts:30](https://github.com/visulima/visulima/blob/
|
|
194
|
+
Defined in: [packages/tsconfig/src/find-tsconfig.ts:30](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/find-tsconfig.ts#L30)
|
|
195
195
|
|
|
196
196
|
An asynchronous function that retrieves the TSConfig by searching for the "tsconfig.json" first,
|
|
197
197
|
second attempt is to look for the "jsconfig.json" file from a given current working directory.
|
|
@@ -228,7 +228,7 @@ An `Error` when the "tsconfig.json" file is not found.
|
|
|
228
228
|
function findTsConfigSync(cwd?, options?): TsConfigResult
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
-
Defined in: [packages/tsconfig/src/find-tsconfig.ts:69](https://github.com/visulima/visulima/blob/
|
|
231
|
+
Defined in: [packages/tsconfig/src/find-tsconfig.ts:69](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/find-tsconfig.ts#L69)
|
|
232
232
|
|
|
233
233
|
#### Parameters
|
|
234
234
|
|
|
@@ -252,7 +252,7 @@ Defined in: [packages/tsconfig/src/find-tsconfig.ts:69](https://github.com/visul
|
|
|
252
252
|
function readTsConfig(tsconfigPath, options?): object
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
Defined in: [packages/tsconfig/src/read-tsconfig.ts:460](https://github.com/visulima/visulima/blob/
|
|
255
|
+
Defined in: [packages/tsconfig/src/read-tsconfig.ts:460](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/read-tsconfig.ts#L460)
|
|
256
256
|
|
|
257
257
|
#### Parameters
|
|
258
258
|
|
|
@@ -344,7 +344,7 @@ Instructs the TypeScript compiler how to watch files.
|
|
|
344
344
|
function writeTsConfig(tsConfig, options): Promise<void>
|
|
345
345
|
```
|
|
346
346
|
|
|
347
|
-
Defined in: [packages/tsconfig/src/write-tsconfig.ts:17](https://github.com/visulima/visulima/blob/
|
|
347
|
+
Defined in: [packages/tsconfig/src/write-tsconfig.ts:17](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/write-tsconfig.ts#L17)
|
|
348
348
|
|
|
349
349
|
An asynchronous function that writes the provided TypeScript configuration object to a tsconfig.json file.
|
|
350
350
|
|
|
@@ -378,7 +378,7 @@ The return type of function is `Promise<void>`.
|
|
|
378
378
|
function writeTsConfigSync(tsConfig, options): void
|
|
379
379
|
```
|
|
380
380
|
|
|
381
|
-
Defined in: [packages/tsconfig/src/write-tsconfig.ts:35](https://github.com/visulima/visulima/blob/
|
|
381
|
+
Defined in: [packages/tsconfig/src/write-tsconfig.ts:35](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/write-tsconfig.ts#L35)
|
|
382
382
|
|
|
383
383
|
A function that writes the provided TypeScript configuration object to a tsconfig.json file.
|
|
384
384
|
|
|
@@ -412,7 +412,7 @@ The return type of function is `Promise<void>`.
|
|
|
412
412
|
const implicitBaseUrlSymbol: typeof implicitBaseUrlSymbol;
|
|
413
413
|
```
|
|
414
414
|
|
|
415
|
-
Defined in: [packages/tsconfig/src/read-tsconfig.ts:457](https://github.com/visulima/visulima/blob/
|
|
415
|
+
Defined in: [packages/tsconfig/src/read-tsconfig.ts:457](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/read-tsconfig.ts#L457)
|
|
416
416
|
|
|
417
417
|
***
|
|
418
418
|
|
|
@@ -422,7 +422,7 @@ Defined in: [packages/tsconfig/src/read-tsconfig.ts:457](https://github.com/visu
|
|
|
422
422
|
type FindTsConfigOptions = ReadTsConfigOptions & object;
|
|
423
423
|
```
|
|
424
424
|
|
|
425
|
-
Defined in: [packages/tsconfig/src/find-tsconfig.ts:10](https://github.com/visulima/visulima/blob/
|
|
425
|
+
Defined in: [packages/tsconfig/src/find-tsconfig.ts:10](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/find-tsconfig.ts#L10)
|
|
426
426
|
|
|
427
427
|
#### Type declaration
|
|
428
428
|
|
|
@@ -448,7 +448,7 @@ optional configFileName: string;
|
|
|
448
448
|
type ReadTsConfigOptions = object;
|
|
449
449
|
```
|
|
450
450
|
|
|
451
|
-
Defined in: [packages/tsconfig/src/read-tsconfig.ts:444](https://github.com/visulima/visulima/blob/
|
|
451
|
+
Defined in: [packages/tsconfig/src/read-tsconfig.ts:444](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/read-tsconfig.ts#L444)
|
|
452
452
|
|
|
453
453
|
#### Type declaration
|
|
454
454
|
|
|
@@ -476,7 +476,7 @@ undefined
|
|
|
476
476
|
type TsConfigJsonResolved = Except<TsConfigJson, "extends">;
|
|
477
477
|
```
|
|
478
478
|
|
|
479
|
-
Defined in: [packages/tsconfig/src/types.ts:3](https://github.com/visulima/visulima/blob/
|
|
479
|
+
Defined in: [packages/tsconfig/src/types.ts:3](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/types.ts#L3)
|
|
480
480
|
|
|
481
481
|
***
|
|
482
482
|
|
|
@@ -486,7 +486,7 @@ Defined in: [packages/tsconfig/src/types.ts:3](https://github.com/visulima/visul
|
|
|
486
486
|
type TsConfigResult = object;
|
|
487
487
|
```
|
|
488
488
|
|
|
489
|
-
Defined in: [packages/tsconfig/src/find-tsconfig.ts:15](https://github.com/visulima/visulima/blob/
|
|
489
|
+
Defined in: [packages/tsconfig/src/find-tsconfig.ts:15](https://github.com/visulima/visulima/blob/4df22689997867be986ba7b5b5d744984e513ddf/packages/tsconfig/src/find-tsconfig.ts#L15)
|
|
490
490
|
|
|
491
491
|
#### Type declaration
|
|
492
492
|
|
package/dist/index.d.cts
CHANGED
|
@@ -108,6 +108,26 @@ type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
|
108
108
|
|
|
109
109
|
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
110
110
|
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
111
|
+
|
|
112
|
+
// The `Omit` utility type doesn't work when omitting specific keys from objects containing index signatures.
|
|
113
|
+
|
|
114
|
+
// Consider the following example:
|
|
115
|
+
|
|
116
|
+
type UserData = {
|
|
117
|
+
[metadata: string]: string;
|
|
118
|
+
email: string;
|
|
119
|
+
name: string;
|
|
120
|
+
role: 'admin' | 'user';
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// `Omit` clearly doesn't behave as expected in this case:
|
|
124
|
+
type PostPayload = Omit<UserData, 'email'>;
|
|
125
|
+
//=> type PostPayload = { [x: string]: string; [x: number]: string; }
|
|
126
|
+
|
|
127
|
+
// In situations like this, `Except` works better.
|
|
128
|
+
// It simply removes the `email` key while preserving all the other keys.
|
|
129
|
+
type PostPayload = Except<UserData, 'email'>;
|
|
130
|
+
//=> type PostPayload = { [x: string]: string; name: string; role: 'admin' | 'user'; }
|
|
111
131
|
```
|
|
112
132
|
|
|
113
133
|
@category Object
|
package/dist/index.d.mts
CHANGED
|
@@ -108,6 +108,26 @@ type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
|
108
108
|
|
|
109
109
|
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
110
110
|
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
111
|
+
|
|
112
|
+
// The `Omit` utility type doesn't work when omitting specific keys from objects containing index signatures.
|
|
113
|
+
|
|
114
|
+
// Consider the following example:
|
|
115
|
+
|
|
116
|
+
type UserData = {
|
|
117
|
+
[metadata: string]: string;
|
|
118
|
+
email: string;
|
|
119
|
+
name: string;
|
|
120
|
+
role: 'admin' | 'user';
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// `Omit` clearly doesn't behave as expected in this case:
|
|
124
|
+
type PostPayload = Omit<UserData, 'email'>;
|
|
125
|
+
//=> type PostPayload = { [x: string]: string; [x: number]: string; }
|
|
126
|
+
|
|
127
|
+
// In situations like this, `Except` works better.
|
|
128
|
+
// It simply removes the `email` key while preserving all the other keys.
|
|
129
|
+
type PostPayload = Except<UserData, 'email'>;
|
|
130
|
+
//=> type PostPayload = { [x: string]: string; name: string; role: 'admin' | 'user'; }
|
|
111
131
|
```
|
|
112
132
|
|
|
113
133
|
@category Object
|
package/dist/index.d.ts
CHANGED
|
@@ -108,6 +108,26 @@ type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
|
108
108
|
|
|
109
109
|
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
110
110
|
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
111
|
+
|
|
112
|
+
// The `Omit` utility type doesn't work when omitting specific keys from objects containing index signatures.
|
|
113
|
+
|
|
114
|
+
// Consider the following example:
|
|
115
|
+
|
|
116
|
+
type UserData = {
|
|
117
|
+
[metadata: string]: string;
|
|
118
|
+
email: string;
|
|
119
|
+
name: string;
|
|
120
|
+
role: 'admin' | 'user';
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// `Omit` clearly doesn't behave as expected in this case:
|
|
124
|
+
type PostPayload = Omit<UserData, 'email'>;
|
|
125
|
+
//=> type PostPayload = { [x: string]: string; [x: number]: string; }
|
|
126
|
+
|
|
127
|
+
// In situations like this, `Except` works better.
|
|
128
|
+
// It simply removes the `email` key while preserving all the other keys.
|
|
129
|
+
type PostPayload = Except<UserData, 'email'>;
|
|
130
|
+
//=> type PostPayload = { [x: string]: string; name: string; role: 'admin' | 'user'; }
|
|
111
131
|
```
|
|
112
132
|
|
|
113
133
|
@category Object
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/tsconfig",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "Find and/or parse the tsconfig.json file from a directory path.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -67,83 +67,16 @@
|
|
|
67
67
|
"CHANGELOG.md"
|
|
68
68
|
],
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@visulima/fs": "
|
|
70
|
+
"@visulima/fs": "3.0.0",
|
|
71
71
|
"@visulima/path": "1.3.3",
|
|
72
72
|
"jsonc-parser": "^3.3.1",
|
|
73
73
|
"resolve-pkg-maps": "^1.0.0"
|
|
74
74
|
},
|
|
75
|
-
"devDependencies": {
|
|
76
|
-
"@anolilab/eslint-config": "^15.0.3",
|
|
77
|
-
"@anolilab/prettier-config": "^5.0.14",
|
|
78
|
-
"@anolilab/semantic-release-pnpm": "1.1.6",
|
|
79
|
-
"@anolilab/semantic-release-preset": "^9.0.3",
|
|
80
|
-
"@arethetypeswrong/cli": "^0.17.2",
|
|
81
|
-
"@babel/core": "^7.26.0",
|
|
82
|
-
"@rushstack/eslint-plugin-security": "^0.8.3",
|
|
83
|
-
"@secretlint/secretlint-rule-preset-recommend": "^9.0.0",
|
|
84
|
-
"@total-typescript/ts-reset": "^0.6.1",
|
|
85
|
-
"@types/node": "18.18.14",
|
|
86
|
-
"@visulima/packem": "1.10.7",
|
|
87
|
-
"@vitest/coverage-v8": "^2.1.8",
|
|
88
|
-
"@vitest/ui": "^2.1.8",
|
|
89
|
-
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
90
|
-
"cross-env": "^7.0.3",
|
|
91
|
-
"esbuild": "0.24.2",
|
|
92
|
-
"eslint": "8.57.0",
|
|
93
|
-
"eslint-plugin-deprecation": "^3.0.0",
|
|
94
|
-
"eslint-plugin-etc": "^2.0.3",
|
|
95
|
-
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
|
|
96
|
-
"eslint-plugin-mdx": "^3.1.5",
|
|
97
|
-
"eslint-plugin-vitest": "^0.4.1",
|
|
98
|
-
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
99
|
-
"execa": "^9.5.2",
|
|
100
|
-
"prettier": "^3.4.2",
|
|
101
|
-
"rimraf": "6.0.1",
|
|
102
|
-
"secretlint": "9.0.0",
|
|
103
|
-
"semantic-release": "^24.2.1",
|
|
104
|
-
"tempy": "^3.1.0",
|
|
105
|
-
"type-fest": "^4.32.0",
|
|
106
|
-
"typedoc": "0.27.6",
|
|
107
|
-
"typedoc-plugin-markdown": "4.4.1",
|
|
108
|
-
"typedoc-plugin-rename-defaults": "0.7.2",
|
|
109
|
-
"typescript": "5.7.3",
|
|
110
|
-
"vitest": "^2.1.8"
|
|
111
|
-
},
|
|
112
75
|
"engines": {
|
|
113
76
|
"node": ">=18.* <=23.*"
|
|
114
77
|
},
|
|
115
78
|
"publishConfig": {
|
|
116
79
|
"access": "public",
|
|
117
80
|
"provenance": true
|
|
118
|
-
},
|
|
119
|
-
"anolilab": {
|
|
120
|
-
"eslint-config": {
|
|
121
|
-
"plugin": {
|
|
122
|
-
"tsdoc": false,
|
|
123
|
-
"etc": false
|
|
124
|
-
},
|
|
125
|
-
"warn_on_unsupported_typescript_version": false,
|
|
126
|
-
"info_on_disabling_jsx_react_rule": false,
|
|
127
|
-
"info_on_disabling_prettier_conflict_rule": false,
|
|
128
|
-
"info_on_disabling_jsonc_sort_keys_rule": false,
|
|
129
|
-
"info_on_disabling_etc_no_deprecated": false
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
"scripts": {
|
|
133
|
-
"build": "cross-env NODE_ENV=development packem build",
|
|
134
|
-
"build:prod": "cross-env NODE_ENV=production packem build",
|
|
135
|
-
"clean": "rimraf node_modules dist .eslintcache",
|
|
136
|
-
"dev": "pnpm run build --watch",
|
|
137
|
-
"lint:attw": "attw --pack",
|
|
138
|
-
"lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
|
|
139
|
-
"lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
|
|
140
|
-
"lint:package-json": "publint --strict",
|
|
141
|
-
"lint:prettier": "prettier --config=.prettierrc.cjs --check .",
|
|
142
|
-
"lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
|
|
143
|
-
"lint:types": "tsc --noEmit",
|
|
144
|
-
"test": "vitest run",
|
|
145
|
-
"test:coverage": "vitest run --coverage",
|
|
146
|
-
"test:ui": "vitest --ui --coverage.enabled=true",
|
|
147
|
-
"test:watch": "vitest"
|
|
148
81
|
}
|
|
149
82
|
}
|