@effected/tsconfig-json 0.16.0 → 0.17.0

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.
@@ -1,6 +1,6 @@
1
1
  import { Schema, SchemaTransformation } from "effect";
2
2
 
3
- //#region src/CompilerOptions.ts
3
+ // src/CompilerOptions.ts
4
4
  /**
5
5
  * Case-insensitive literal-union decode; canonical lowercase encode. Module-
6
6
  * internal — every exported enum schema below is built
@@ -341,5 +341,4 @@ const CompilerOptions = Schema.StructWithRest(Schema.Struct({
341
341
  maxNodeModuleJsDepth: Schema.optionalKey(Schema.Number)
342
342
  }), [Schema.Record(Schema.String, Schema.Unknown)]);
343
343
 
344
- //#endregion
345
344
  export { CompilerOptions, Jsx, Lib, Module, ModuleDetection, ModuleResolution, NewLine, Target };
@@ -2,7 +2,7 @@ import { CompilerOptions } from "./CompilerOptions.js";
2
2
  import { TsEnumCodec } from "./TsEnumCodec.js";
3
3
  import { Schema, SchemaTransformation } from "effect";
4
4
 
5
- //#region src/CompilerOptionsFromProgrammatic.ts
5
+ // src/CompilerOptionsFromProgrammatic.ts
6
6
  const normalizeIn = (input) => TsEnumCodec.decodeCompilerOptions(input);
7
7
  const encodeOut = (encoded) => TsEnumCodec.encodeCompilerOptions(encoded);
8
8
  /**
@@ -48,5 +48,4 @@ const CompilerOptionsFromProgrammatic = Schema.Record(Schema.String, Schema.Unkn
48
48
  encode: encodeOut
49
49
  })));
50
50
 
51
- //#endregion
52
51
  export { CompilerOptionsFromProgrammatic };
package/JsxConfig.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Option, Schema } from "effect";
2
2
 
3
- //#region src/JsxConfig.ts
3
+ // src/JsxConfig.ts
4
4
  /**
5
5
  * The JSX transform configuration a `jsx` compiler option implies: which
6
6
  * runtime (`"automatic"` for `react-jsx` / `react-jsxdev`, `"classic"` for
@@ -37,5 +37,4 @@ var JsxConfig = class JsxConfig extends Schema.Class("JsxConfig")({
37
37
  }
38
38
  };
39
39
 
40
- //#endregion
41
40
  export { JsxConfig };
@@ -1,4 +1,4 @@
1
- //#region src/PortableTsconfig.ts
1
+ // src/PortableTsconfig.ts
2
2
  const TSCONFIG_SCHEMA_URL = "https://json.schemastore.org/tsconfig";
3
3
  /**
4
4
  * Boolean `compilerOptions` preserved in a {@link (PortableTsconfig:interface)}: the
@@ -156,5 +156,4 @@ var PortableTsconfig = class {
156
156
  static make = make;
157
157
  };
158
158
 
159
- //#endregion
160
159
  export { PortableTsconfig };
@@ -1,4 +1,4 @@
1
- //#region src/ResolvedTsconfig.ts
1
+ // src/ResolvedTsconfig.ts
2
2
  const CONFIG_DIR_TEMPLATE = `\${configDir}`;
3
3
  const CONFIG_DIR_TEMPLATE_LOWER = CONFIG_DIR_TEMPLATE.toLowerCase();
4
4
  /** A value is `${configDir}`-prefixed if its leading token matches case-insensitively. */
@@ -240,5 +240,4 @@ var ResolvedTsconfig = class {
240
240
  static substituteConfigDir = substituteConfigDir;
241
241
  };
242
242
 
243
- //#endregion
244
243
  export { ResolvedTsconfig };
package/TsEnumCodec.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Option } from "effect";
2
2
 
3
- //#region src/TsEnumCodec.ts
3
+ // src/TsEnumCodec.ts
4
4
  /**
5
5
  * Builds a family's forward/reverse maps from its row order. The
6
6
  * reverse map overwrites on every duplicate value, so the last-listed name
@@ -201,5 +201,4 @@ var TsEnumCodec = class {
201
201
  static decodeCompilerOptions = decodeCompilerOptions;
202
202
  };
203
203
 
204
- //#endregion
205
204
  export { TsEnumCodec };
@@ -1,7 +1,7 @@
1
1
  import { Effect, Path } from "effect";
2
2
  import { Walker } from "@effected/walker";
3
3
 
4
- //#region src/TsconfigDiscovery.ts
4
+ // src/TsconfigDiscovery.ts
5
5
  const findNearest = (start, options) => Effect.gen(function* () {
6
6
  const path = yield* Path.Path;
7
7
  const filename = options?.filename ?? "tsconfig.json";
@@ -38,5 +38,4 @@ var TsconfigDiscovery = class {
38
38
  static findNearest = findNearest;
39
39
  };
40
40
 
41
- //#endregion
42
41
  export { TsconfigDiscovery };
package/TsconfigJson.js CHANGED
@@ -2,7 +2,7 @@ import { CompilerOptions } from "./CompilerOptions.js";
2
2
  import { Schema, SchemaTransformation } from "effect";
3
3
  import { Jsonc } from "@effected/jsonc";
4
4
 
5
- //#region src/TsconfigJson.ts
5
+ // src/TsconfigJson.ts
6
6
  /**
7
7
  * Case-insensitive literal-union decode; canonical lowercase encode.
8
8
  * Replicated from `CompilerOptions.ts`'s module-private helper (not exported
@@ -117,5 +117,4 @@ var TsconfigParseError = class extends Schema.TaggedError()("TsconfigParseError"
117
117
  }
118
118
  };
119
119
 
120
- //#endregion
121
120
  export { FallbackPolling, Reference, TsconfigJson, TsconfigJsonFromString, TsconfigParseError, TypeAcquisition, WatchDirectory, WatchFile, WatchOptions };
package/TsconfigLoader.js CHANGED
@@ -3,7 +3,7 @@ import { TsconfigJsonFromString, TsconfigParseError } from "./TsconfigJson.js";
3
3
  import { resolveExtendsTarget } from "./internal/extendsTarget.js";
4
4
  import { Effect, FileSystem, Option, Path, Schema } from "effect";
5
5
 
6
- //#region src/TsconfigLoader.ts
6
+ // src/TsconfigLoader.ts
7
7
  /**
8
8
  * The maximum number of `extends` levels the loader will descend before failing
9
9
  * with {@link TsconfigExtendsError} `reason: "depth"`. A guard on the recursive
@@ -178,5 +178,4 @@ var TsconfigLoader = class {
178
178
  static compilerOptions = compilerOptions;
179
179
  };
180
180
 
181
- //#endregion
182
181
  export { TsconfigExtendsError, TsconfigLoader };
@@ -1,7 +1,7 @@
1
1
  import { TsconfigLoader } from "./TsconfigLoader.js";
2
2
  import { Cause, Effect, Exit, FileSystem, Option, Path, PlatformError, Result } from "effect";
3
3
 
4
- //#region src/TsconfigLoaderSync.ts
4
+ // src/TsconfigLoaderSync.ts
5
5
  /** A `Path.Path` member the loader pipeline never calls: throw an informative defect if something reaches it. */
6
6
  const unsupported = (member) => {
7
7
  throw new Error(`Path.${member} is not supported by TsconfigLoaderSync — its SyncPath adapter only carries resolve/dirname/join/isAbsolute/basename`);
@@ -125,5 +125,4 @@ var TsconfigLoaderSync = class {
125
125
  static compilerOptions = compilerOptions;
126
126
  };
127
127
 
128
- //#endregion
129
128
  export { TsconfigLoaderSync };
package/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Effect, FileSystem, Option, Path, PlatformError, Schema } from "effect";
2
- //#region src/CompilerOptions.d.ts
3
2
  /**
4
3
  * `compilerOptions.target` — the ECMAScript target. `es5` is deprecated in TS
5
4
  * 6.0; `es3` has no literal (a removed value — a `target: "es3"` value fails
@@ -189,8 +188,6 @@ export declare namespace CompilerOptions {
189
188
  */
190
189
  type Encoded = typeof CompilerOptions.Encoded;
191
190
  }
192
- //#endregion
193
- //#region src/CompilerOptionsFromProgrammatic.d.ts
194
191
  /**
195
192
  * The untyped record this codec accepts on its encoded side. Exported because
196
193
  * it names the codec's encoded type in the public signature; the values stay
@@ -242,8 +239,6 @@ interface ProgrammaticRecord {
242
239
  * @public
243
240
  */
244
241
  export declare const CompilerOptionsFromProgrammatic: Schema.Codec<typeof CompilerOptions.Type, ProgrammaticRecord>;
245
- //#endregion
246
- //#region src/JsxConfig.d.ts
247
242
  declare const JsxConfig_base: Schema.Class<JsxConfig, Schema.Struct<{
248
243
  /** The JSX transform runtime: `"automatic"` (`react-jsx` / `react-jsxdev`) or `"classic"` (`react`). */
249
244
  readonly runtime: Schema.Literals<readonly ["automatic", "classic"]>;
@@ -270,8 +265,6 @@ export declare class JsxConfig extends JsxConfig_base {
270
265
  */
271
266
  static fromCompilerOptions(options: CompilerOptions.Type): Option.Option<JsxConfig>;
272
267
  }
273
- //#endregion
274
- //#region src/TsconfigJson.d.ts
275
268
  /** `watchOptions.watchFile`. @public */
276
269
  export declare const WatchFile: Schema.decodeTo<Schema.Literals<readonly ["fixedpollinginterval", "prioritypollinginterval", "dynamicprioritypolling", "fixedchunksizepolling", "usefsevents", "usefseventsonparentdirectory"]>, Schema.String, never, never>;
277
270
  /** `watchOptions.watchDirectory`. @public */
@@ -563,8 +556,6 @@ declare const TsconfigParseError_base: Schema.Class<TsconfigParseError, Schema.T
563
556
  export declare class TsconfigParseError extends TsconfigParseError_base {
564
557
  get message(): string;
565
558
  }
566
- //#endregion
567
- //#region src/ResolvedTsconfig.d.ts
568
559
  /**
569
560
  * The result of resolving a tsconfig.json's full `extends` chain: the merged
570
561
  * compiler options and inherited settings, flattened the way tsc does, with enough
@@ -639,8 +630,6 @@ export declare class ResolvedTsconfig {
639
630
  */
640
631
  static readonly substituteConfigDir: (resolved: ResolvedTsconfig, finalDir: string) => ResolvedTsconfig;
641
632
  }
642
- //#endregion
643
- //#region src/PortableTsconfig.d.ts
644
633
  /**
645
634
  * A portable, JSON-serializable tsconfig.json (compilerOptions-only), for
646
635
  * virtual TypeScript environments that control their own file paths and emit
@@ -712,8 +701,6 @@ export declare class PortableTsconfig {
712
701
  */
713
702
  static readonly make: (input: ResolvedTsconfig | CompilerOptions.Type, options?: PortableTsconfigOptions) => PortableTsconfig;
714
703
  }
715
- //#endregion
716
- //#region src/TsconfigDiscovery.d.ts
717
704
  /**
718
705
  * Options for {@link TsconfigDiscovery.findNearest}.
719
706
  *
@@ -754,8 +741,6 @@ export declare class TsconfigDiscovery {
754
741
  */
755
742
  static readonly findNearest: (start: string, options?: FindNearestOptions) => Effect.Effect<Option.Option<string>, never, FileSystem.FileSystem | Path.Path>;
756
743
  }
757
- //#endregion
758
- //#region src/TsconfigLoader.d.ts
759
744
  declare const TsconfigExtendsError_base: Schema.Class<TsconfigExtendsError, Schema.TaggedStruct<"TsconfigExtendsError", {
760
745
  /** The config whose `extends` could not be resolved. */
761
746
  readonly path: Schema.String;
@@ -1094,8 +1079,6 @@ export declare class TsconfigLoader {
1094
1079
  readonly maxNodeModuleJsDepth?: number;
1095
1080
  }, PlatformError.PlatformError | TsconfigExtendsError | TsconfigParseError, FileSystem.FileSystem | Path.Path>;
1096
1081
  }
1097
- //#endregion
1098
- //#region src/TsconfigLoaderSync.d.ts
1099
1082
  /**
1100
1083
  * The synchronous file operations {@link TsconfigLoaderSync} needs, supplied
1101
1084
  * by the consumer. Node's built-ins satisfy it directly:
@@ -1220,8 +1203,6 @@ export declare class TsconfigLoaderSync {
1220
1203
  */
1221
1204
  static readonly compilerOptions: (configPath: string, options: TsconfigLoaderSyncOptions) => CompilerOptions.Type;
1222
1205
  }
1223
- //#endregion
1224
- //#region src/TsEnumCodec.d.ts
1225
1206
  /**
1226
1207
  * The nine `compilerOptions` / `watchOptions` enum families this codec knows.
1227
1208
  *
@@ -1373,6 +1354,5 @@ export declare class TsEnumCodec {
1373
1354
  */
1374
1355
  static readonly decodeCompilerOptions: (numeric: Readonly<Record<string, unknown>>) => Record<string, unknown>;
1375
1356
  }
1376
- //#endregion
1377
1357
  export type { EnumFamily, FindNearestOptions, PortableTsconfigOptions, ProgrammaticCompilerOptions, ProgrammaticCompilerOptionsValue, ProgrammaticRecord, SyncFileSystem, SyncPath, TsconfigLoaderSyncOptions };
1378
1358
  //# sourceMappingURL=index.d.ts.map
@@ -2,7 +2,7 @@ import { Effect, FileSystem, Option, Path } from "effect";
2
2
  import { Walker } from "@effected/walker";
3
3
  import { Jsonc } from "@effected/jsonc";
4
4
 
5
- //#region src/internal/extendsTarget.ts
5
+ // src/internal/extendsTarget.ts
6
6
  /**
7
7
  * The `extends` target-resolution engine (relative/rooted specifiers and the bare-specifier
8
8
  * `node_modules` lookup). Every input reaching {@link resolveExports} is an
@@ -230,5 +230,4 @@ const resolveExtendsTarget = (spec, fromConfigPath) => Effect.gen(function* () {
230
230
  return Option.none();
231
231
  });
232
232
 
233
- //#endregion
234
233
  export { resolveExports, resolveExtendsTarget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/tsconfig-json",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "private": false,
5
5
  "description": "Composable tsconfig.json handling for Effect: schemas, extends-chain resolution, and config discovery.",
6
6
  "keywords": [
@@ -39,9 +39,9 @@
39
39
  "./package.json": "./package.json"
40
40
  },
41
41
  "peerDependencies": {
42
- "@effected/glob": "^0.13.0",
43
- "@effected/jsonc": "^0.18.0",
44
- "@effected/walker": "^0.18.0",
42
+ "@effected/glob": "^0.14.0",
43
+ "@effected/jsonc": "^0.19.0",
44
+ "@effected/walker": "^0.19.0",
45
45
  "effect": "^4.0.0"
46
46
  },
47
47
  "engines": {