@visulima/tsconfig 1.1.13 → 1.1.14

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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## @visulima/tsconfig [1.1.14](https://github.com/visulima/visulima/compare/@visulima/tsconfig@1.1.13...@visulima/tsconfig@1.1.14) (2025-02-28)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **tsconfig:** added support for typescript 5.8 ([ed21d12](https://github.com/visulima/visulima/commit/ed21d122eada6146367236f092c89f7c4807a51e))
6
+
1
7
  ## @visulima/tsconfig [1.1.13](https://github.com/visulima/visulima/compare/@visulima/tsconfig@1.1.12...@visulima/tsconfig@1.1.13) (2025-01-29)
2
8
 
3
9
 
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.33.0/node\_modules/type-fest/source/tsconfig-json.d.ts:1
104
+ Defined in: node\_modules/.pnpm/type-fest@4.35.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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/find-tsconfig.ts#L30)
194
+ Defined in: [packages/tsconfig/src/find-tsconfig.ts:30](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/find-tsconfig.ts#L69)
231
+ Defined in: [packages/tsconfig/src/find-tsconfig.ts:69](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/read-tsconfig.ts#L460)
255
+ Defined in: [packages/tsconfig/src/read-tsconfig.ts:460](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/write-tsconfig.ts#L17)
347
+ Defined in: [packages/tsconfig/src/write-tsconfig.ts:17](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/write-tsconfig.ts#L35)
381
+ Defined in: [packages/tsconfig/src/write-tsconfig.ts:35](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/read-tsconfig.ts#L457)
415
+ Defined in: [packages/tsconfig/src/read-tsconfig.ts:457](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/find-tsconfig.ts#L10)
425
+ Defined in: [packages/tsconfig/src/find-tsconfig.ts:10](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/read-tsconfig.ts#L444)
451
+ Defined in: [packages/tsconfig/src/read-tsconfig.ts:444](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/types.ts#L3)
479
+ Defined in: [packages/tsconfig/src/types.ts:3](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/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/67337cb0395442540e7701c4dc8a4fef8a3fe1a2/packages/tsconfig/src/find-tsconfig.ts#L15)
489
+ Defined in: [packages/tsconfig/src/find-tsconfig.ts:15](https://github.com/visulima/visulima/blob/24f0ab32b59922321f76a936626fc7f6660585f0/packages/tsconfig/src/find-tsconfig.ts#L15)
490
490
 
491
491
  #### Type declaration
492
492
 
@@ -502,24 +502,6 @@ config: TsConfigJsonResolved;
502
502
  path: string;
503
503
  ```
504
504
 
505
- ## File
506
-
507
- - [TsConfigJson](README.md#tsconfigjson)
508
-
509
- ## Other
510
-
511
- - [findTsConfig](README.md#findtsconfig)
512
- - [findTsConfigSync](README.md#findtsconfigsync)
513
- - [readTsConfig](README.md#readtsconfig)
514
- - [writeTsConfig](README.md#writetsconfig)
515
- - [writeTsConfigSync](README.md#writetsconfigsync)
516
- - [TsConfigJson](namespaces/TsConfigJson/README.md)
517
- - [implicitBaseUrlSymbol](README.md#implicitbaseurlsymbol)
518
- - [FindTsConfigOptions](README.md#findtsconfigoptions)
519
- - [ReadTsConfigOptions](README.md#readtsconfigoptions)
520
- - [TsConfigJsonResolved](README.md#tsconfigjsonresolved)
521
- - [TsConfigResult](README.md#tsconfigresult)
522
-
523
505
  <!-- /TYPEDOC -->
524
506
 
525
507
  ## Related
@@ -547,6 +529,7 @@ If you would like to help take a look at the [list of issues](https://github.com
547
529
  The visulima tsconfig is open-sourced software licensed under the [MIT][license-url]
548
530
 
549
531
  [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
532
+
550
533
  [typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
551
534
  [license-image]: https://img.shields.io/npm/l/@visulima/tsconfig?color=blueviolet&style=for-the-badge
552
535
  [license-url]: LICENSE.md "license"
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-DeoHFadL.cjs');
6
- const implicitBaseUrlSymbol = require('./packem_shared/implicitBaseUrlSymbol-COTDbERy.cjs');
5
+ const findTsConfig = require('./packem_shared/findTsConfig-CFQb5wNY.cjs');
6
+ const implicitBaseUrlSymbol = require('./packem_shared/implicitBaseUrlSymbol-CRbImdkm.cjs');
7
7
  const writeTsConfig = require('./packem_shared/writeTsConfig-DJa7JuZ_.cjs');
8
8
 
9
9
 
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { findTsConfig, findTsConfigSync } from './packem_shared/findTsConfig-C0Rp7UlA.mjs';
2
- export { implicitBaseUrlSymbol, readTsConfig } from './packem_shared/implicitBaseUrlSymbol-QFe6oEcv.mjs';
1
+ export { findTsConfig, findTsConfigSync } from './packem_shared/findTsConfig-Dmil42lC.mjs';
2
+ export { implicitBaseUrlSymbol, readTsConfig } from './packem_shared/implicitBaseUrlSymbol-CP13TLuE.mjs';
3
3
  export { writeTsConfig, writeTsConfigSync } from './packem_shared/writeTsConfig-BImVv2Ba.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-COTDbERy.cjs');
7
+ const implicitBaseUrlSymbol = require('./implicitBaseUrlSymbol-CRbImdkm.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
1
  import { findUp, findUpSync } from '@visulima/fs';
2
2
  import { NotFoundError } from '@visulima/fs/error';
3
- import { readTsConfig } from './implicitBaseUrlSymbol-QFe6oEcv.mjs';
3
+ import { readTsConfig } from './implicitBaseUrlSymbol-CP13TLuE.mjs';
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -305,7 +305,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
305
305
  if (config.compilerOptions === undefined) {
306
306
  return config;
307
307
  }
308
- if (["5.4", "5.5", "5.6", "5.7", "true"].includes(String(options?.tscCompatible))) {
308
+ if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
309
309
  if (config.compilerOptions.esModuleInterop === undefined && (config.compilerOptions.module === "node16" || config.compilerOptions.module === "nodenext" || config.compilerOptions.module === "preserve")) {
310
310
  config.compilerOptions.esModuleInterop = true;
311
311
  }
@@ -341,7 +341,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
341
341
  config.compilerOptions.moduleResolution = moduleResolution;
342
342
  }
343
343
  }
344
- if (["5.7", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.moduleResolution) {
344
+ if (["5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.moduleResolution) {
345
345
  let resolvePackageJson = false;
346
346
  if (["bundler", "node16", "nodenext"].includes(config.compilerOptions.moduleResolution.toLocaleLowerCase())) {
347
347
  resolvePackageJson = true;
@@ -368,10 +368,10 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
368
368
  config.compilerOptions.useDefineForClassFields = true;
369
369
  }
370
370
  }
371
- if (["5.6", "5.7", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn === undefined) {
371
+ if (["5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn === undefined) {
372
372
  config.compilerOptions.strictBuiltinIteratorReturn = true;
373
373
  }
374
- if (["5.4", "5.5", "5.6", "5.7", "true"].includes(String(options?.tscCompatible))) {
374
+ if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
375
375
  if (config.compilerOptions.strict) {
376
376
  config.compilerOptions.noImplicitAny = config.compilerOptions.noImplicitAny ?? true;
377
377
  config.compilerOptions.noImplicitThis = config.compilerOptions.noImplicitThis ?? true;
@@ -313,7 +313,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
313
313
  if (config.compilerOptions === undefined) {
314
314
  return config;
315
315
  }
316
- if (["5.4", "5.5", "5.6", "5.7", "true"].includes(String(options?.tscCompatible))) {
316
+ if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
317
317
  if (config.compilerOptions.esModuleInterop === undefined && (config.compilerOptions.module === "node16" || config.compilerOptions.module === "nodenext" || config.compilerOptions.module === "preserve")) {
318
318
  config.compilerOptions.esModuleInterop = true;
319
319
  }
@@ -349,7 +349,7 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
349
349
  config.compilerOptions.moduleResolution = moduleResolution;
350
350
  }
351
351
  }
352
- if (["5.7", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.moduleResolution) {
352
+ if (["5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.moduleResolution) {
353
353
  let resolvePackageJson = false;
354
354
  if (["bundler", "node16", "nodenext"].includes(config.compilerOptions.moduleResolution.toLocaleLowerCase())) {
355
355
  resolvePackageJson = true;
@@ -376,10 +376,10 @@ const tsCompatibleWrapper = /* @__PURE__ */ __name((config, options) => {
376
376
  config.compilerOptions.useDefineForClassFields = true;
377
377
  }
378
378
  }
379
- if (["5.6", "5.7", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn === undefined) {
379
+ if (["5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible)) && config.compilerOptions.strict && config.compilerOptions.strictBuiltinIteratorReturn === undefined) {
380
380
  config.compilerOptions.strictBuiltinIteratorReturn = true;
381
381
  }
382
- if (["5.4", "5.5", "5.6", "5.7", "true"].includes(String(options?.tscCompatible))) {
382
+ if (["5.4", "5.5", "5.6", "5.7", "5.8", "true"].includes(String(options?.tscCompatible))) {
383
383
  if (config.compilerOptions.strict) {
384
384
  config.compilerOptions.noImplicitAny = config.compilerOptions.noImplicitAny ?? true;
385
385
  config.compilerOptions.noImplicitThis = config.compilerOptions.noImplicitThis ?? true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/tsconfig",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "Find and/or parse the tsconfig.json file from a directory path.",
5
5
  "keywords": [
6
6
  "anolilab",