@visulima/tsconfig 2.1.0 → 2.1.2

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,33 @@
1
+ ## @visulima/tsconfig [2.1.2](https://github.com/visulima/visulima/compare/@visulima/tsconfig@2.1.1...@visulima/tsconfig@2.1.2) (2025-11-13)
2
+
3
+ ### Bug Fixes
4
+
5
+ * bump packem, to fix minified version of the code ([2a36ceb](https://github.com/visulima/visulima/commit/2a36ceb09251b0ca1178701a26547a871ed717a7))
6
+
7
+
8
+ ### Dependencies
9
+
10
+ * **@visulima/fs:** upgraded to 4.0.6
11
+ * **@visulima/path:** upgraded to 2.0.5
12
+
13
+ ## @visulima/tsconfig [2.1.1](https://github.com/visulima/visulima/compare/@visulima/tsconfig@2.1.0...@visulima/tsconfig@2.1.1) (2025-11-12)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **deps:** update type-fest dependency across multiple packages ([93e13be](https://github.com/visulima/visulima/commit/93e13be5248207968a96303710db2a0604d16b9b))
18
+ * update package configurations and TypeScript definitions ([b59aa59](https://github.com/visulima/visulima/commit/b59aa59dac1508216b944f4b917fb4a7ab1f70a4))
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * Add jsr file to all packages for release ([#565](https://github.com/visulima/visulima/issues/565)) ([ec91652](https://github.com/visulima/visulima/commit/ec91652b4e4112adf14ba152c1239a7703ba425a))
23
+ * update license files and clean up TypeScript definitions ([fe668cc](https://github.com/visulima/visulima/commit/fe668cc26de23591d4df54a0954455ebbe31b22d))
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * **@visulima/fs:** upgraded to 4.0.5
29
+ * **@visulima/path:** upgraded to 2.0.4
30
+
1
31
  ## @visulima/tsconfig [2.1.0](https://github.com/visulima/visulima/compare/@visulima/tsconfig@2.0.3...@visulima/tsconfig@2.1.0) (2025-11-07)
2
32
 
3
33
  ### Features
@@ -0,0 +1,21 @@
1
+ import type { Options as ReadTsConfigOptions } from "./read-tsconfig.d.ts";
2
+ import type { TsConfigJsonResolved } from "./types.d.ts";
3
+ export type Options = ReadTsConfigOptions & {
4
+ cache?: Map<string, TsConfigJsonResolved> | boolean;
5
+ configFileName?: string;
6
+ };
7
+ export type TsConfigResult = {
8
+ config: TsConfigJsonResolved;
9
+ path: string;
10
+ };
11
+ /**
12
+ * An asynchronous function that retrieves the TSConfig by searching for the "tsconfig.json" first,
13
+ * second attempt is to look for the "jsconfig.json" file from a given current working directory.
14
+ * @param cwd Optional. The current working directory from which to search for the "tsconfig.json" file.
15
+ * The type of `cwd` is `string`.
16
+ * @returns A `Promise` that resolves to the TSConfig result object.
17
+ * The return type of the function is `Promise&lt;TsConfigResult>`.
18
+ * @throws An `Error` when the "tsconfig.json" file is not found.
19
+ */
20
+ export declare const findTsConfig: (cwd?: URL | string, options?: Options) => Promise<TsConfigResult>;
21
+ export declare const findTsConfigSync: (cwd?: URL | string, options?: Options) => TsConfigResult;
package/dist/index.d.ts CHANGED
@@ -1,32 +1,7 @@
1
- import { Except, TsConfigJson } from 'type-fest';
2
- export { TsConfigJson } from 'type-fest';
3
- import { WriteJsonOptions } from '@visulima/fs';
4
-
5
- type TsConfigJsonResolved = Except<TsConfigJson, "extends">;
6
-
7
- type Options$1 = {
8
- tscCompatible?: "5.3" | "5.4" | "5.5" | "5.6" | true;
9
- };
10
- declare const implicitBaseUrlSymbol: unique symbol;
11
- declare const readTsConfig: (tsconfigPath: string, options?: Options$1) => TsConfigJsonResolved;
12
-
13
- type Options = Options$1 & {
14
- cache?: Map<string, TsConfigJsonResolved> | boolean;
15
- configFileName?: string;
16
- };
17
- type TsConfigResult = {
18
- config: TsConfigJsonResolved;
19
- path: string;
20
- };
21
- declare const findTsConfig: (cwd?: URL | string, options?: Options) => Promise<TsConfigResult>;
22
- declare const findTsConfigSync: (cwd?: URL | string, options?: Options) => TsConfigResult;
23
-
24
- declare const writeTsConfig: (tsConfig: TsConfigJson, options?: WriteJsonOptions & {
25
- cwd?: URL | string;
26
- }) => Promise<void>;
27
- declare const writeTsConfigSync: (tsConfig: TsConfigJson, options?: WriteJsonOptions & {
28
- cwd?: URL | string;
29
- }) => void;
30
-
31
- export { findTsConfig, findTsConfigSync, implicitBaseUrlSymbol, readTsConfig, writeTsConfig, writeTsConfigSync };
32
- export type { Options as FindTsConfigOptions, Options$1 as ReadTsConfigOptions, TsConfigJsonResolved, TsConfigResult };
1
+ export type { Options as FindTsConfigOptions, TsConfigResult } from "./find-tsconfig.d.ts";
2
+ export { findTsConfig, findTsConfigSync } from "./find-tsconfig.d.ts";
3
+ export type { Options as ReadTsConfigOptions } from "./read-tsconfig.d.ts";
4
+ export { implicitBaseUrlSymbol, readTsConfig } from "./read-tsconfig.d.ts";
5
+ export type { TsConfigJsonResolved } from "./types.d.ts";
6
+ export { writeTsConfig, writeTsConfigSync } from "./write-tsconfig.d.ts";
7
+ export type { TsConfigJson } from "type-fest";
@@ -0,0 +1,13 @@
1
+ import type { TsConfigJsonResolved } from "./types.d.ts";
2
+ export type Options = {
3
+ /**
4
+ * Make the configuration compatible with the specified TypeScript version.
5
+ *
6
+ * When `true`, it will make the configuration compatible with the latest TypeScript version.
7
+ * @default undefined
8
+ */
9
+ tscCompatible?: "5.3" | "5.4" | "5.5" | "5.6" | true;
10
+ };
11
+ export declare const configDirectoryPlaceholder: string;
12
+ export declare const implicitBaseUrlSymbol: symbol;
13
+ export declare const readTsConfig: (tsconfigPath: string, options?: Options) => TsConfigJsonResolved;
@@ -0,0 +1,3 @@
1
+ import type { Except, TsConfigJson } from "type-fest";
2
+ export type TsConfigJsonResolved = Except<TsConfigJson, "extends">;
3
+ export type Cache<T = any> = Map<string, T>;
@@ -0,0 +1,3 @@
1
+ import type { Cache } from "../types.d.ts";
2
+ declare const resolveExtendsPath: (requestedPath: string, directoryPath: string, cache?: Cache<string>) => string | undefined;
3
+ export default resolveExtendsPath;
@@ -0,0 +1,24 @@
1
+ import type { WriteJsonOptions } from "@visulima/fs";
2
+ import type { TsConfigJson } from "type-fest";
3
+ /**
4
+ * An asynchronous function that writes the provided TypeScript configuration object to a tsconfig.json file.
5
+ * @param tsConfig The TypeScript configuration object to write. The type of `tsConfig` is `TsConfigJson`.
6
+ * @param options Optional. The write options and the current working directory. The type of `options` is an
7
+ * intersection type of `WriteOptions` and a Record type with an optional `cwd` key of type `string`.
8
+ * @returns A `Promise` that resolves when the tsconfig.json file has been written.
9
+ * The return type of function is `Promise&lt;void>`.
10
+ */
11
+ export declare const writeTsConfig: (tsConfig: TsConfigJson, options?: WriteJsonOptions & {
12
+ cwd?: URL | string;
13
+ }) => Promise<void>;
14
+ /**
15
+ * A function that writes the provided TypeScript configuration object to a tsconfig.json file.
16
+ * @param tsConfig The TypeScript configuration object to write. The type of `tsConfig` is `TsConfigJson`.
17
+ * @param options Optional. The write options and the current working directory. The type of `options` is an
18
+ * intersection type of `WriteOptions` and a Record type with an optional `cwd` key of type `string`.
19
+ * @returns A `Promise` that resolves when the tsconfig.json file has been written.
20
+ * The return type of function is `Promise&lt;void>`.
21
+ */
22
+ export declare const writeTsConfigSync: (tsConfig: TsConfigJson, options?: WriteJsonOptions & {
23
+ cwd?: URL | string;
24
+ }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/tsconfig",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Find and/or parse the tsconfig.json file from a directory path.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -50,11 +50,10 @@
50
50
  "CHANGELOG.md"
51
51
  ],
52
52
  "dependencies": {
53
- "@visulima/fs": "4.0.4",
54
- "@visulima/path": "2.0.3",
53
+ "@visulima/fs": "4.0.6",
54
+ "@visulima/path": "2.0.5",
55
55
  "jsonc-parser": "^3.3.1",
56
- "resolve-pkg-maps": "^1.0.0",
57
- "type-fest": "^5.2.0"
56
+ "resolve-pkg-maps": "^1.0.0"
58
57
  },
59
58
  "engines": {
60
59
  "node": ">=20.19 <=25.x"