@visulima/tsconfig 1.1.15 → 1.1.16
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 +12 -0
- package/README.md +11 -11
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +18 -2
- package/dist/index.d.mts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.mjs +3 -3
- package/dist/packem_shared/{findTsConfig-CFQb5wNY.cjs → findTsConfig-B5QKwx1b.cjs} +1 -1
- package/dist/packem_shared/{findTsConfig-Dmil42lC.mjs → findTsConfig-CPPNXDV7.mjs} +2 -2
- package/dist/packem_shared/{implicitBaseUrlSymbol-CRbImdkm.cjs → implicitBaseUrlSymbol-ClUn71e4.cjs} +22 -22
- package/dist/packem_shared/{implicitBaseUrlSymbol-CP13TLuE.mjs → implicitBaseUrlSymbol-CqmKQyEp.mjs} +22 -22
- package/dist/packem_shared/{writeTsConfig-BImVv2Ba.mjs → writeTsConfig-CcokKUZl.mjs} +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## @visulima/tsconfig [1.1.16](https://github.com/visulima/visulima/compare/@visulima/tsconfig@1.1.15...@visulima/tsconfig@1.1.16) (2025-03-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Dependencies
|
|
9
|
+
|
|
10
|
+
* **@visulima/fs:** upgraded to 3.1.2
|
|
11
|
+
* **@visulima/path:** upgraded to 1.3.5
|
|
12
|
+
|
|
1
13
|
## @visulima/tsconfig [1.1.15](https://github.com/visulima/visulima/compare/@visulima/tsconfig@1.1.14...@visulima/tsconfig@1.1.15) (2025-03-03)
|
|
2
14
|
|
|
3
15
|
|
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.37.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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/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/ae1c843808a0fea82d6f99ef936ec12dc5b255c1/packages/tsconfig/src/find-tsconfig.ts#L15)
|
|
490
490
|
|
|
491
491
|
#### Type declaration
|
|
492
492
|
|
package/dist/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
|
-
const findTsConfig = require('./packem_shared/findTsConfig-
|
|
6
|
-
const implicitBaseUrlSymbol = require('./packem_shared/implicitBaseUrlSymbol-
|
|
5
|
+
const findTsConfig = require('./packem_shared/findTsConfig-B5QKwx1b.cjs');
|
|
6
|
+
const implicitBaseUrlSymbol = require('./packem_shared/implicitBaseUrlSymbol-ClUn71e4.cjs');
|
|
7
7
|
const writeTsConfig = require('./packem_shared/writeTsConfig-DJa7JuZ_.cjs');
|
|
8
8
|
|
|
9
9
|
|
package/dist/index.d.cts
CHANGED
|
@@ -158,6 +158,7 @@ declare namespace TsConfigJson {
|
|
|
158
158
|
| 'ES2022'
|
|
159
159
|
| 'ESNext'
|
|
160
160
|
| 'Node16'
|
|
161
|
+
| 'Node18'
|
|
161
162
|
| 'NodeNext'
|
|
162
163
|
| 'Preserve'
|
|
163
164
|
| 'None'
|
|
@@ -172,6 +173,7 @@ declare namespace TsConfigJson {
|
|
|
172
173
|
| 'es2022'
|
|
173
174
|
| 'esnext'
|
|
174
175
|
| 'node16'
|
|
176
|
+
| 'node18'
|
|
175
177
|
| 'nodenext'
|
|
176
178
|
| 'preserve'
|
|
177
179
|
| 'none';
|
|
@@ -1246,6 +1248,20 @@ declare namespace TsConfigJson {
|
|
|
1246
1248
|
Suppress deprecation warnings
|
|
1247
1249
|
*/
|
|
1248
1250
|
ignoreDeprecations?: CompilerOptions.IgnoreDeprecations;
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
Do not allow runtime constructs that are not part of ECMAScript.
|
|
1254
|
+
|
|
1255
|
+
@default false
|
|
1256
|
+
*/
|
|
1257
|
+
erasableSyntaxOnly?: boolean;
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
Enable lib replacement.
|
|
1261
|
+
|
|
1262
|
+
@default true
|
|
1263
|
+
*/
|
|
1264
|
+
libReplacement?: boolean;
|
|
1249
1265
|
};
|
|
1250
1266
|
|
|
1251
1267
|
namespace WatchOptions {
|
|
@@ -1297,12 +1313,12 @@ declare namespace TsConfigJson {
|
|
|
1297
1313
|
synchronousWatchDirectory?: boolean;
|
|
1298
1314
|
|
|
1299
1315
|
/**
|
|
1300
|
-
Specifies a list of directories to exclude from watch
|
|
1316
|
+
Specifies a list of directories to exclude from watch.
|
|
1301
1317
|
*/
|
|
1302
1318
|
excludeDirectories?: string[];
|
|
1303
1319
|
|
|
1304
1320
|
/**
|
|
1305
|
-
Specifies a list of files to exclude from watch
|
|
1321
|
+
Specifies a list of files to exclude from watch.
|
|
1306
1322
|
*/
|
|
1307
1323
|
excludeFiles?: string[];
|
|
1308
1324
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -158,6 +158,7 @@ declare namespace TsConfigJson {
|
|
|
158
158
|
| 'ES2022'
|
|
159
159
|
| 'ESNext'
|
|
160
160
|
| 'Node16'
|
|
161
|
+
| 'Node18'
|
|
161
162
|
| 'NodeNext'
|
|
162
163
|
| 'Preserve'
|
|
163
164
|
| 'None'
|
|
@@ -172,6 +173,7 @@ declare namespace TsConfigJson {
|
|
|
172
173
|
| 'es2022'
|
|
173
174
|
| 'esnext'
|
|
174
175
|
| 'node16'
|
|
176
|
+
| 'node18'
|
|
175
177
|
| 'nodenext'
|
|
176
178
|
| 'preserve'
|
|
177
179
|
| 'none';
|
|
@@ -1246,6 +1248,20 @@ declare namespace TsConfigJson {
|
|
|
1246
1248
|
Suppress deprecation warnings
|
|
1247
1249
|
*/
|
|
1248
1250
|
ignoreDeprecations?: CompilerOptions.IgnoreDeprecations;
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
Do not allow runtime constructs that are not part of ECMAScript.
|
|
1254
|
+
|
|
1255
|
+
@default false
|
|
1256
|
+
*/
|
|
1257
|
+
erasableSyntaxOnly?: boolean;
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
Enable lib replacement.
|
|
1261
|
+
|
|
1262
|
+
@default true
|
|
1263
|
+
*/
|
|
1264
|
+
libReplacement?: boolean;
|
|
1249
1265
|
};
|
|
1250
1266
|
|
|
1251
1267
|
namespace WatchOptions {
|
|
@@ -1297,12 +1313,12 @@ declare namespace TsConfigJson {
|
|
|
1297
1313
|
synchronousWatchDirectory?: boolean;
|
|
1298
1314
|
|
|
1299
1315
|
/**
|
|
1300
|
-
Specifies a list of directories to exclude from watch
|
|
1316
|
+
Specifies a list of directories to exclude from watch.
|
|
1301
1317
|
*/
|
|
1302
1318
|
excludeDirectories?: string[];
|
|
1303
1319
|
|
|
1304
1320
|
/**
|
|
1305
|
-
Specifies a list of files to exclude from watch
|
|
1321
|
+
Specifies a list of files to exclude from watch.
|
|
1306
1322
|
*/
|
|
1307
1323
|
excludeFiles?: string[];
|
|
1308
1324
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -158,6 +158,7 @@ declare namespace TsConfigJson {
|
|
|
158
158
|
| 'ES2022'
|
|
159
159
|
| 'ESNext'
|
|
160
160
|
| 'Node16'
|
|
161
|
+
| 'Node18'
|
|
161
162
|
| 'NodeNext'
|
|
162
163
|
| 'Preserve'
|
|
163
164
|
| 'None'
|
|
@@ -172,6 +173,7 @@ declare namespace TsConfigJson {
|
|
|
172
173
|
| 'es2022'
|
|
173
174
|
| 'esnext'
|
|
174
175
|
| 'node16'
|
|
176
|
+
| 'node18'
|
|
175
177
|
| 'nodenext'
|
|
176
178
|
| 'preserve'
|
|
177
179
|
| 'none';
|
|
@@ -1246,6 +1248,20 @@ declare namespace TsConfigJson {
|
|
|
1246
1248
|
Suppress deprecation warnings
|
|
1247
1249
|
*/
|
|
1248
1250
|
ignoreDeprecations?: CompilerOptions.IgnoreDeprecations;
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
Do not allow runtime constructs that are not part of ECMAScript.
|
|
1254
|
+
|
|
1255
|
+
@default false
|
|
1256
|
+
*/
|
|
1257
|
+
erasableSyntaxOnly?: boolean;
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
Enable lib replacement.
|
|
1261
|
+
|
|
1262
|
+
@default true
|
|
1263
|
+
*/
|
|
1264
|
+
libReplacement?: boolean;
|
|
1249
1265
|
};
|
|
1250
1266
|
|
|
1251
1267
|
namespace WatchOptions {
|
|
@@ -1297,12 +1313,12 @@ declare namespace TsConfigJson {
|
|
|
1297
1313
|
synchronousWatchDirectory?: boolean;
|
|
1298
1314
|
|
|
1299
1315
|
/**
|
|
1300
|
-
Specifies a list of directories to exclude from watch
|
|
1316
|
+
Specifies a list of directories to exclude from watch.
|
|
1301
1317
|
*/
|
|
1302
1318
|
excludeDirectories?: string[];
|
|
1303
1319
|
|
|
1304
1320
|
/**
|
|
1305
|
-
Specifies a list of files to exclude from watch
|
|
1321
|
+
Specifies a list of files to exclude from watch.
|
|
1306
1322
|
*/
|
|
1307
1323
|
excludeFiles?: string[];
|
|
1308
1324
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { findTsConfig, findTsConfigSync } from './packem_shared/findTsConfig-
|
|
2
|
-
export { implicitBaseUrlSymbol, readTsConfig } from './packem_shared/implicitBaseUrlSymbol-
|
|
3
|
-
export { writeTsConfig, writeTsConfigSync } from './packem_shared/writeTsConfig-
|
|
1
|
+
export { findTsConfig, findTsConfigSync } from './packem_shared/findTsConfig-CPPNXDV7.mjs';
|
|
2
|
+
export { implicitBaseUrlSymbol, readTsConfig } from './packem_shared/implicitBaseUrlSymbol-CqmKQyEp.mjs';
|
|
3
|
+
export { writeTsConfig, writeTsConfigSync } from './packem_shared/writeTsConfig-CcokKUZl.mjs';
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
|
|
5
5
|
const fs = require('@visulima/fs');
|
|
6
6
|
const error = require('@visulima/fs/error');
|
|
7
|
-
const implicitBaseUrlSymbol = require('./implicitBaseUrlSymbol-
|
|
7
|
+
const implicitBaseUrlSymbol = require('./implicitBaseUrlSymbol-ClUn71e4.cjs');
|
|
8
8
|
|
|
9
9
|
var __defProp = Object.defineProperty;
|
|
10
10
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { findUpSync, findUp } from '@visulima/fs';
|
|
2
2
|
import { NotFoundError } from '@visulima/fs/error';
|
|
3
|
-
import { readTsConfig } from './implicitBaseUrlSymbol-
|
|
3
|
+
import { readTsConfig } from './implicitBaseUrlSymbol-CqmKQyEp.mjs';
|
|
4
4
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
package/dist/packem_shared/{implicitBaseUrlSymbol-CRbImdkm.cjs → implicitBaseUrlSymbol-ClUn71e4.cjs}
RENAMED
|
@@ -29,7 +29,7 @@ const resolveFromPackageJsonPath = /* @__PURE__ */ __name$1((packageJsonPath, su
|
|
|
29
29
|
}
|
|
30
30
|
const packageJson = readJsonc$1(packageJsonPath);
|
|
31
31
|
if (!packageJson) {
|
|
32
|
-
return
|
|
32
|
+
return void 0;
|
|
33
33
|
}
|
|
34
34
|
let resolvedPath = subpath || "tsconfig.json";
|
|
35
35
|
if (!ignoreExports && packageJson.exports) {
|
|
@@ -67,7 +67,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
67
67
|
return jsonPath;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return void 0;
|
|
71
71
|
}
|
|
72
72
|
const [orgOrName, ...remaining] = requestedPath.split("/");
|
|
73
73
|
const packageName = orgOrName.startsWith("@") ? orgOrName + "/" + remaining.shift() : orgOrName;
|
|
@@ -104,7 +104,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
104
104
|
if (fs.isAccessibleSync(path$1)) {
|
|
105
105
|
return path.join("node_modules", packageName);
|
|
106
106
|
}
|
|
107
|
-
return
|
|
107
|
+
return void 0;
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
cwd: directoryPath,
|
|
@@ -112,13 +112,13 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
if (!packagePath || !node_fs.statSync(packagePath).isDirectory()) {
|
|
115
|
-
return
|
|
115
|
+
return void 0;
|
|
116
116
|
}
|
|
117
117
|
const packageJsonPath = path.join(packagePath, PACKAGE_JSON);
|
|
118
118
|
if (fs.isAccessibleSync(packageJsonPath)) {
|
|
119
119
|
const resolvedPath = resolveFromPackageJsonPath(packageJsonPath, subpath, false, cache);
|
|
120
120
|
if (resolvedPath === false) {
|
|
121
|
-
return
|
|
121
|
+
return void 0;
|
|
122
122
|
}
|
|
123
123
|
if (resolvedPath && fs.isAccessibleSync(resolvedPath) && node_fs.statSync(resolvedPath).isFile()) {
|
|
124
124
|
return resolvedPath;
|
|
@@ -133,7 +133,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
if (!fs.isAccessibleSync(fullPackagePath)) {
|
|
136
|
-
return
|
|
136
|
+
return void 0;
|
|
137
137
|
}
|
|
138
138
|
if (node_fs.statSync(fullPackagePath).isDirectory()) {
|
|
139
139
|
const fullPackageJsonPath = path.join(fullPackagePath, PACKAGE_JSON);
|
|
@@ -150,7 +150,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
150
150
|
} else if (jsonExtension) {
|
|
151
151
|
return fullPackagePath;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
153
|
+
return void 0;
|
|
154
154
|
}, "resolveExtendsPath");
|
|
155
155
|
|
|
156
156
|
var __defProp = Object.defineProperty;
|
|
@@ -225,7 +225,7 @@ const internalParseTsConfig = /* @__PURE__ */ __name((tsconfigPath, options, cir
|
|
|
225
225
|
throw new error.NotFoundError("No such file or directory, for '" + extendsPath + "' found.");
|
|
226
226
|
}
|
|
227
227
|
const extendsConfig = resolveExtends(resolvedExtendsPath, directoryPath, new Set(circularExtendsTracker), options);
|
|
228
|
-
if (extendsConfig.compilerOptions?.rootDir !==
|
|
228
|
+
if (extendsConfig.compilerOptions?.rootDir !== void 0 && !extendsConfig.compilerOptions.rootDir.startsWith(configDirectoryPlaceholder)) {
|
|
229
229
|
extendsConfig.compilerOptions.rootDir = path.join(path.dirname(resolvedExtendsPath), extendsConfig.compilerOptions.rootDir);
|
|
230
230
|
}
|
|
231
231
|
const merged = {
|
|
@@ -306,26 +306,26 @@ const interpolateConfigDirectory = /* @__PURE__ */ __name((filePath, configDirec
|
|
|
306
306
|
if (filePath.startsWith(configDirectoryPlaceholder)) {
|
|
307
307
|
return path.normalize(path.join(configDirectory, filePath.slice(configDirectoryPlaceholder.length)));
|
|
308
308
|
}
|
|
309
|
-
return
|
|
309
|
+
return void 0;
|
|
310
310
|
}, "interpolateConfigDirectory");
|
|
311
311
|
const compilerFieldsWithConfigDirectory = ["outDir", "declarationDir", "outFile", "rootDir", "baseUrl", "tsBuildInfoFile"];
|
|
312
312
|
const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
313
|
-
if (config.compilerOptions ===
|
|
313
|
+
if (config.compilerOptions === void 0) {
|
|
314
314
|
return config;
|
|
315
315
|
}
|
|
316
316
|
if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
|
|
317
|
-
if (config.compilerOptions.esModuleInterop ===
|
|
317
|
+
if (config.compilerOptions.esModuleInterop === void 0 && (config.compilerOptions.module === "node16" || config.compilerOptions.module === "nodenext" || config.compilerOptions.module === "preserve")) {
|
|
318
318
|
config.compilerOptions.esModuleInterop = true;
|
|
319
319
|
}
|
|
320
|
-
if ((config.compilerOptions.esModuleInterop || config.compilerOptions.module === "system" || config.compilerOptions.moduleResolution === "bundler") && config.compilerOptions.allowSyntheticDefaultImports ===
|
|
320
|
+
if ((config.compilerOptions.esModuleInterop || config.compilerOptions.module === "system" || config.compilerOptions.moduleResolution === "bundler") && config.compilerOptions.allowSyntheticDefaultImports === void 0) {
|
|
321
321
|
config.compilerOptions.allowSyntheticDefaultImports = true;
|
|
322
322
|
}
|
|
323
|
-
if (config?.compilerOptions.moduleDetection ===
|
|
323
|
+
if (config?.compilerOptions.moduleDetection === void 0 && config.compilerOptions.module && ["node16", "nodenext"].includes(config.compilerOptions.module)) {
|
|
324
324
|
config.compilerOptions.moduleDetection = "force";
|
|
325
325
|
}
|
|
326
|
-
if (config.compilerOptions.moduleResolution ===
|
|
326
|
+
if (config.compilerOptions.moduleResolution === void 0) {
|
|
327
327
|
let moduleResolution = "classic";
|
|
328
|
-
if (config.compilerOptions.module !==
|
|
328
|
+
if (config.compilerOptions.module !== void 0) {
|
|
329
329
|
switch ((config.compilerOptions?.module).toLocaleLowerCase()) {
|
|
330
330
|
case "commonjs": {
|
|
331
331
|
moduleResolution = "node10";
|
|
@@ -354,14 +354,14 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
354
354
|
if (["bundler", "node16", "nodenext"].includes(config.compilerOptions.moduleResolution.toLocaleLowerCase())) {
|
|
355
355
|
resolvePackageJson = true;
|
|
356
356
|
}
|
|
357
|
-
if (config.compilerOptions.resolvePackageJsonExports ===
|
|
357
|
+
if (config.compilerOptions.resolvePackageJsonExports === void 0 && resolvePackageJson) {
|
|
358
358
|
config.compilerOptions.resolvePackageJsonExports = true;
|
|
359
359
|
}
|
|
360
|
-
if (config.compilerOptions.resolvePackageJsonImports ===
|
|
360
|
+
if (config.compilerOptions.resolvePackageJsonImports === void 0 && resolvePackageJson) {
|
|
361
361
|
config.compilerOptions.resolvePackageJsonImports = true;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
if (config.compilerOptions.target ===
|
|
364
|
+
if (config.compilerOptions.target === void 0) {
|
|
365
365
|
let target = "es5";
|
|
366
366
|
if (config.compilerOptions.module === "node16") {
|
|
367
367
|
target = "es2022";
|
|
@@ -372,11 +372,11 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
372
372
|
config.compilerOptions.target = target;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
if (config.compilerOptions.useDefineForClassFields ===
|
|
375
|
+
if (config.compilerOptions.useDefineForClassFields === void 0 && config.compilerOptions.target && (config.compilerOptions.target.includes("es202") || config.compilerOptions.target === "esnext")) {
|
|
376
376
|
config.compilerOptions.useDefineForClassFields = true;
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
if (["5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn ===
|
|
379
|
+
if (["5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn === void 0) {
|
|
380
380
|
config.compilerOptions.strictBuiltinIteratorReturn = true;
|
|
381
381
|
}
|
|
382
382
|
if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
|
|
@@ -389,7 +389,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
389
389
|
config.compilerOptions.strictPropertyInitialization = config.compilerOptions.strictPropertyInitialization ?? true;
|
|
390
390
|
config.compilerOptions.alwaysStrict = config.compilerOptions.alwaysStrict ?? true;
|
|
391
391
|
}
|
|
392
|
-
if (config.compilerOptions.useDefineForClassFields ===
|
|
392
|
+
if (config.compilerOptions.useDefineForClassFields === void 0 && config.compilerOptions.target) {
|
|
393
393
|
let useDefineForClassFields = false;
|
|
394
394
|
if (config.compilerOptions.target.includes("es202") || config.compilerOptions.target === "esnext") {
|
|
395
395
|
useDefineForClassFields = true;
|
|
@@ -398,7 +398,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
398
398
|
config.compilerOptions.useDefineForClassFields = true;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
if (config.compilerOptions.strict && config.compilerOptions.useUnknownInCatchVariables ===
|
|
401
|
+
if (config.compilerOptions.strict && config.compilerOptions.useUnknownInCatchVariables === void 0) {
|
|
402
402
|
config.compilerOptions.useUnknownInCatchVariables = true;
|
|
403
403
|
}
|
|
404
404
|
if (config.compilerOptions.isolatedModules) {
|
package/dist/packem_shared/{implicitBaseUrlSymbol-CP13TLuE.mjs → implicitBaseUrlSymbol-CqmKQyEp.mjs}
RENAMED
|
@@ -21,7 +21,7 @@ const resolveFromPackageJsonPath = /* @__PURE__ */ __name$1((packageJsonPath, su
|
|
|
21
21
|
}
|
|
22
22
|
const packageJson = readJsonc$1(packageJsonPath);
|
|
23
23
|
if (!packageJson) {
|
|
24
|
-
return
|
|
24
|
+
return void 0;
|
|
25
25
|
}
|
|
26
26
|
let resolvedPath = subpath || "tsconfig.json";
|
|
27
27
|
if (!ignoreExports && packageJson.exports) {
|
|
@@ -59,7 +59,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
59
59
|
return jsonPath;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return void 0;
|
|
63
63
|
}
|
|
64
64
|
const [orgOrName, ...remaining] = requestedPath.split("/");
|
|
65
65
|
const packageName = orgOrName.startsWith("@") ? orgOrName + "/" + remaining.shift() : orgOrName;
|
|
@@ -96,7 +96,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
96
96
|
if (isAccessibleSync(path)) {
|
|
97
97
|
return join("node_modules", packageName);
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return void 0;
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
cwd: directoryPath,
|
|
@@ -104,13 +104,13 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
106
|
if (!packagePath || !statSync(packagePath).isDirectory()) {
|
|
107
|
-
return
|
|
107
|
+
return void 0;
|
|
108
108
|
}
|
|
109
109
|
const packageJsonPath = join(packagePath, PACKAGE_JSON);
|
|
110
110
|
if (isAccessibleSync(packageJsonPath)) {
|
|
111
111
|
const resolvedPath = resolveFromPackageJsonPath(packageJsonPath, subpath, false, cache);
|
|
112
112
|
if (resolvedPath === false) {
|
|
113
|
-
return
|
|
113
|
+
return void 0;
|
|
114
114
|
}
|
|
115
115
|
if (resolvedPath && isAccessibleSync(resolvedPath) && statSync(resolvedPath).isFile()) {
|
|
116
116
|
return resolvedPath;
|
|
@@ -125,7 +125,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
if (!isAccessibleSync(fullPackagePath)) {
|
|
128
|
-
return
|
|
128
|
+
return void 0;
|
|
129
129
|
}
|
|
130
130
|
if (statSync(fullPackagePath).isDirectory()) {
|
|
131
131
|
const fullPackageJsonPath = join(fullPackagePath, PACKAGE_JSON);
|
|
@@ -142,7 +142,7 @@ const resolveExtendsPath = /* @__PURE__ */ __name$1((requestedPath, directoryPat
|
|
|
142
142
|
} else if (jsonExtension) {
|
|
143
143
|
return fullPackagePath;
|
|
144
144
|
}
|
|
145
|
-
return
|
|
145
|
+
return void 0;
|
|
146
146
|
}, "resolveExtendsPath");
|
|
147
147
|
|
|
148
148
|
var __defProp = Object.defineProperty;
|
|
@@ -217,7 +217,7 @@ const internalParseTsConfig = /* @__PURE__ */ __name((tsconfigPath, options, cir
|
|
|
217
217
|
throw new NotFoundError("No such file or directory, for '" + extendsPath + "' found.");
|
|
218
218
|
}
|
|
219
219
|
const extendsConfig = resolveExtends(resolvedExtendsPath, directoryPath, new Set(circularExtendsTracker), options);
|
|
220
|
-
if (extendsConfig.compilerOptions?.rootDir !==
|
|
220
|
+
if (extendsConfig.compilerOptions?.rootDir !== void 0 && !extendsConfig.compilerOptions.rootDir.startsWith(configDirectoryPlaceholder)) {
|
|
221
221
|
extendsConfig.compilerOptions.rootDir = join(dirname(resolvedExtendsPath), extendsConfig.compilerOptions.rootDir);
|
|
222
222
|
}
|
|
223
223
|
const merged = {
|
|
@@ -298,26 +298,26 @@ const interpolateConfigDirectory = /* @__PURE__ */ __name((filePath, configDirec
|
|
|
298
298
|
if (filePath.startsWith(configDirectoryPlaceholder)) {
|
|
299
299
|
return normalize(join(configDirectory, filePath.slice(configDirectoryPlaceholder.length)));
|
|
300
300
|
}
|
|
301
|
-
return
|
|
301
|
+
return void 0;
|
|
302
302
|
}, "interpolateConfigDirectory");
|
|
303
303
|
const compilerFieldsWithConfigDirectory = ["outDir", "declarationDir", "outFile", "rootDir", "baseUrl", "tsBuildInfoFile"];
|
|
304
304
|
const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
305
|
-
if (config.compilerOptions ===
|
|
305
|
+
if (config.compilerOptions === void 0) {
|
|
306
306
|
return config;
|
|
307
307
|
}
|
|
308
308
|
if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
|
|
309
|
-
if (config.compilerOptions.esModuleInterop ===
|
|
309
|
+
if (config.compilerOptions.esModuleInterop === void 0 && (config.compilerOptions.module === "node16" || config.compilerOptions.module === "nodenext" || config.compilerOptions.module === "preserve")) {
|
|
310
310
|
config.compilerOptions.esModuleInterop = true;
|
|
311
311
|
}
|
|
312
|
-
if ((config.compilerOptions.esModuleInterop || config.compilerOptions.module === "system" || config.compilerOptions.moduleResolution === "bundler") && config.compilerOptions.allowSyntheticDefaultImports ===
|
|
312
|
+
if ((config.compilerOptions.esModuleInterop || config.compilerOptions.module === "system" || config.compilerOptions.moduleResolution === "bundler") && config.compilerOptions.allowSyntheticDefaultImports === void 0) {
|
|
313
313
|
config.compilerOptions.allowSyntheticDefaultImports = true;
|
|
314
314
|
}
|
|
315
|
-
if (config?.compilerOptions.moduleDetection ===
|
|
315
|
+
if (config?.compilerOptions.moduleDetection === void 0 && config.compilerOptions.module && ["node16", "nodenext"].includes(config.compilerOptions.module)) {
|
|
316
316
|
config.compilerOptions.moduleDetection = "force";
|
|
317
317
|
}
|
|
318
|
-
if (config.compilerOptions.moduleResolution ===
|
|
318
|
+
if (config.compilerOptions.moduleResolution === void 0) {
|
|
319
319
|
let moduleResolution = "classic";
|
|
320
|
-
if (config.compilerOptions.module !==
|
|
320
|
+
if (config.compilerOptions.module !== void 0) {
|
|
321
321
|
switch ((config.compilerOptions?.module).toLocaleLowerCase()) {
|
|
322
322
|
case "commonjs": {
|
|
323
323
|
moduleResolution = "node10";
|
|
@@ -346,14 +346,14 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
346
346
|
if (["bundler", "node16", "nodenext"].includes(config.compilerOptions.moduleResolution.toLocaleLowerCase())) {
|
|
347
347
|
resolvePackageJson = true;
|
|
348
348
|
}
|
|
349
|
-
if (config.compilerOptions.resolvePackageJsonExports ===
|
|
349
|
+
if (config.compilerOptions.resolvePackageJsonExports === void 0 && resolvePackageJson) {
|
|
350
350
|
config.compilerOptions.resolvePackageJsonExports = true;
|
|
351
351
|
}
|
|
352
|
-
if (config.compilerOptions.resolvePackageJsonImports ===
|
|
352
|
+
if (config.compilerOptions.resolvePackageJsonImports === void 0 && resolvePackageJson) {
|
|
353
353
|
config.compilerOptions.resolvePackageJsonImports = true;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
if (config.compilerOptions.target ===
|
|
356
|
+
if (config.compilerOptions.target === void 0) {
|
|
357
357
|
let target = "es5";
|
|
358
358
|
if (config.compilerOptions.module === "node16") {
|
|
359
359
|
target = "es2022";
|
|
@@ -364,11 +364,11 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
364
364
|
config.compilerOptions.target = target;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
if (config.compilerOptions.useDefineForClassFields ===
|
|
367
|
+
if (config.compilerOptions.useDefineForClassFields === void 0 && config.compilerOptions.target && (config.compilerOptions.target.includes("es202") || config.compilerOptions.target === "esnext")) {
|
|
368
368
|
config.compilerOptions.useDefineForClassFields = true;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
if (["5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn ===
|
|
371
|
+
if (["5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn === void 0) {
|
|
372
372
|
config.compilerOptions.strictBuiltinIteratorReturn = true;
|
|
373
373
|
}
|
|
374
374
|
if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
|
|
@@ -381,7 +381,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
381
381
|
config.compilerOptions.strictPropertyInitialization = config.compilerOptions.strictPropertyInitialization ?? true;
|
|
382
382
|
config.compilerOptions.alwaysStrict = config.compilerOptions.alwaysStrict ?? true;
|
|
383
383
|
}
|
|
384
|
-
if (config.compilerOptions.useDefineForClassFields ===
|
|
384
|
+
if (config.compilerOptions.useDefineForClassFields === void 0 && config.compilerOptions.target) {
|
|
385
385
|
let useDefineForClassFields = false;
|
|
386
386
|
if (config.compilerOptions.target.includes("es202") || config.compilerOptions.target === "esnext") {
|
|
387
387
|
useDefineForClassFields = true;
|
|
@@ -390,7 +390,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
|
|
|
390
390
|
config.compilerOptions.useDefineForClassFields = true;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
if (config.compilerOptions.strict && config.compilerOptions.useUnknownInCatchVariables ===
|
|
393
|
+
if (config.compilerOptions.strict && config.compilerOptions.useUnknownInCatchVariables === void 0) {
|
|
394
394
|
config.compilerOptions.useUnknownInCatchVariables = true;
|
|
395
395
|
}
|
|
396
396
|
if (config.compilerOptions.isolatedModules) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/tsconfig",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"description": "Find and/or parse the tsconfig.json file from a directory path.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"CHANGELOG.md"
|
|
68
68
|
],
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@visulima/fs": "3.1.
|
|
71
|
-
"@visulima/path": "1.3.
|
|
70
|
+
"@visulima/fs": "3.1.2",
|
|
71
|
+
"@visulima/path": "1.3.5",
|
|
72
72
|
"jsonc-parser": "^3.3.1",
|
|
73
73
|
"resolve-pkg-maps": "^1.0.0"
|
|
74
74
|
},
|