@effected/lockfiles 0.18.0 → 0.19.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.
package/BunExtension.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/BunExtension.ts
3
+ // src/BunExtension.ts
4
4
  /**
5
5
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
6
6
  * when the format is `"bun"`.
@@ -21,5 +21,4 @@ var BunExtension = class extends Schema.Class("BunExtension")({
21
21
  trustedDependencies: Schema.optionalKey(Schema.Array(Schema.String))
22
22
  }) {};
23
23
 
24
- //#endregion
25
24
  export { BunExtension };
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/ConfigDependencyLock.ts
3
+ // src/ConfigDependencyLock.ts
4
4
  /**
5
5
  * One config dependency a `pnpm-lock.yaml` records, with the integrity pnpm
6
6
  * recorded for it — read from the lockfile's env preamble by
@@ -32,5 +32,4 @@ var ConfigDependencyLock = class extends Schema.Class("ConfigDependencyLock")({
32
32
  integrity: Schema.String
33
33
  }) {};
34
34
 
35
- //#endregion
36
35
  export { ConfigDependencyLock };
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { DependencyField, DependencySpecifier } from "@effected/npm";
3
3
 
4
- //#region src/ImporterDependency.ts
4
+ // src/ImporterDependency.ts
5
5
  /**
6
6
  * One declared dependency of one workspace importer, as the lockfile records it.
7
7
  *
@@ -41,5 +41,4 @@ var ImporterDependency = class extends Schema.Class("ImporterDependency")({
41
41
  depType: DependencyField
42
42
  }) {};
43
43
 
44
- //#endregion
45
44
  export { ImporterDependency };
package/Lockfile.js CHANGED
@@ -10,7 +10,7 @@ import { parseYarn } from "./internal/yarn.js";
10
10
  import { LockfileFormat } from "./LockfileFormat.js";
11
11
  import { Effect, Option, Schema } from "effect";
12
12
 
13
- //#region src/Lockfile.ts
13
+ // src/Lockfile.ts
14
14
  const EMPTY_IMPORTERS = [];
15
15
  /**
16
16
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -317,5 +317,4 @@ var Lockfile = class Lockfile extends Schema.Class("Lockfile")({
317
317
  }
318
318
  };
319
319
 
320
- //#endregion
321
320
  export { Lockfile, LockfileFramingError, LockfileParseError, materializeFailure };
package/LockfileFormat.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Option, Schema } from "effect";
2
2
 
3
- //#region src/LockfileFormat.ts
3
+ // src/LockfileFormat.ts
4
4
  /**
5
5
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
6
6
  * `package-lock.json` (JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -79,5 +79,4 @@ const fromFilename = (name) => {
79
79
  return Option.none();
80
80
  };
81
81
 
82
- //#endregion
83
82
  export { LockfileFormat, filenameFor, filenamesFor, fromFilename };
@@ -1,7 +1,7 @@
1
1
  import { ImporterDependency } from "./ImporterDependency.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/LockfileImporter.ts
4
+ // src/LockfileImporter.ts
5
5
  /**
6
6
  * One workspace importer's declared dependencies, as the lockfile records them.
7
7
  *
@@ -25,5 +25,4 @@ var LockfileImporter = class extends Schema.Class("LockfileImporter")({
25
25
  dependencies: Schema.Array(ImporterDependency)
26
26
  }) {};
27
27
 
28
- //#endregion
29
28
  export { LockfileImporter };
@@ -3,7 +3,7 @@ import { Exit, Schema } from "effect";
3
3
  import { DependencyField } from "@effected/npm";
4
4
  import { Range, SemVer } from "@effected/semver";
5
5
 
6
- //#region src/LockfileIntegrity.ts
6
+ // src/LockfileIntegrity.ts
7
7
  /**
8
8
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
9
9
  * lockfile against: a package name plus the four optional dependency maps.
@@ -119,5 +119,4 @@ var LockfileIntegrity = class LockfileIntegrity extends Schema.Class("LockfileIn
119
119
  }
120
120
  };
121
121
 
122
- //#endregion
123
122
  export { LockfileIntegrity, WorkspaceManifest };
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/PackageManagerLock.ts
3
+ // src/PackageManagerLock.ts
4
4
  /**
5
5
  * The package manager a `pnpm-lock.yaml` pins, with the integrity pnpm
6
6
  * recorded for it — read from the lockfile's env preamble by
@@ -38,5 +38,4 @@ var PackageManagerLock = class extends Schema.Class("PackageManagerLock")({
38
38
  nativeIntegrity: Schema.Record(Schema.String, Schema.String)
39
39
  }) {};
40
40
 
41
- //#endregion
42
41
  export { PackageManagerLock };
@@ -2,7 +2,7 @@ import { materializeFailure } from "./Lockfile.js";
2
2
  import { readPnpmConfigDependencies, readPnpmPackageManager } from "./internal/pnpmEnv.js";
3
3
  import { Effect, Option } from "effect";
4
4
 
5
- //#region src/PnpmEnvLockfile.ts
5
+ // src/PnpmEnvLockfile.ts
6
6
  /** Both readers surface an internal `ParseFailure` the one way `Lockfile.parse` does. */
7
7
  const materialize = Effect.mapError((failure) => materializeFailure("pnpm", failure));
8
8
  const packageManager = Effect.fn("PnpmEnvLockfile.packageManager")((content) => readPnpmPackageManager(content).pipe(materialize, Effect.map(Option.fromUndefinedOr)));
@@ -35,5 +35,4 @@ const PnpmEnvLockfile = {
35
35
  configDependencies
36
36
  };
37
37
 
38
- //#endregion
39
38
  export { PnpmEnvLockfile };
package/PnpmExtension.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/PnpmExtension.ts
3
+ // src/PnpmExtension.ts
4
4
  /**
5
5
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
6
6
  * when the format is `"pnpm"`.
@@ -25,5 +25,4 @@ var PnpmExtension = class extends Schema.Class("PnpmExtension")({
25
25
  }))
26
26
  }) {};
27
27
 
28
- //#endregion
29
28
  export { PnpmExtension };
@@ -1,7 +1,7 @@
1
1
  import { Effect, Schema } from "effect";
2
2
  import { IntegrityHash } from "@effected/npm";
3
3
 
4
- //#region src/ResolvedPackage.ts
4
+ // src/ResolvedPackage.ts
5
5
  const EMPTY_DEPENDENCIES = {};
6
6
  const EMPTY_PEER_META = {};
7
7
  const EMPTY_EDGE_NAMES = [];
@@ -91,5 +91,4 @@ var ResolvedPackage = class extends Schema.Class("ResolvedPackage")({
91
91
  unresolvedEdges: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed(EMPTY_EDGE_NAMES)), Schema.withConstructorDefault(Effect.succeed(EMPTY_EDGE_NAMES)))
92
92
  }) {};
93
93
 
94
- //#endregion
95
94
  export { ResolvedPackage };
@@ -1,4 +1,4 @@
1
- //#region src/UnsupportedLockfileVersion.ts
1
+ // src/UnsupportedLockfileVersion.ts
2
2
  /**
3
3
  * Whether a `LockfileParseError.cause` is an {@link UnsupportedLockfileVersion}.
4
4
  *
@@ -31,5 +31,4 @@
31
31
  */
32
32
  const isUnsupportedLockfileVersion = (cause) => typeof cause === "object" && cause !== null && Object.hasOwn(cause, "_tag") && cause._tag === "UnsupportedLockfileVersion" && typeof cause.format === "string" && typeof cause.minimumSupported === "number";
33
33
 
34
- //#endregion
35
34
  export { isUnsupportedLockfileVersion };
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { DependencyField } from "@effected/npm";
3
3
 
4
- //#region src/WorkspaceDependency.ts
4
+ // src/WorkspaceDependency.ts
5
5
  /**
6
6
  * A directed dependency edge between two workspace packages as recorded in
7
7
  * the lockfile.
@@ -23,5 +23,4 @@ var WorkspaceDependency = class extends Schema.Class("WorkspaceDependency")({
23
23
  constraint: Schema.String
24
24
  }) {};
25
25
 
26
- //#endregion
27
26
  export { WorkspaceDependency };
package/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Effect, Option, Schema } from "effect";
2
2
  import "@effected/npm";
3
- //#region src/BunExtension.d.ts
4
3
  declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
5
4
  readonly _tag: Schema.tag<"bun">;
6
5
  readonly catalog: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
@@ -21,8 +20,6 @@ declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
21
20
  * @public
22
21
  */
23
22
  export declare class BunExtension extends BunExtension_base {}
24
- //#endregion
25
- //#region src/ConfigDependencyLock.d.ts
26
23
  declare const ConfigDependencyLock_base: Schema.Class<ConfigDependencyLock, Schema.Struct<{
27
24
  readonly name: Schema.String;
28
25
  readonly specifier: Schema.String;
@@ -54,8 +51,6 @@ declare const ConfigDependencyLock_base: Schema.Class<ConfigDependencyLock, Sche
54
51
  * @public
55
52
  */
56
53
  export declare class ConfigDependencyLock extends ConfigDependencyLock_base {}
57
- //#endregion
58
- //#region src/ImporterDependency.d.ts
59
54
  declare const ImporterDependency_base: Schema.Class<ImporterDependency, Schema.Struct<{
60
55
  readonly name: Schema.NonEmptyString;
61
56
  readonly specifier: Schema.Codec<import("@effected/npm").ClassifiedSpecifier, string, never, never>;
@@ -95,8 +90,6 @@ declare const ImporterDependency_base: Schema.Class<ImporterDependency, Schema.S
95
90
  * @public
96
91
  */
97
92
  export declare class ImporterDependency extends ImporterDependency_base {}
98
- //#endregion
99
- //#region src/LockfileImporter.d.ts
100
93
  declare const LockfileImporter_base: Schema.Class<LockfileImporter, Schema.Struct<{
101
94
  readonly path: Schema.NonEmptyString;
102
95
  readonly dependencies: Schema.$Array<typeof ImporterDependency>;
@@ -120,8 +113,6 @@ declare const LockfileImporter_base: Schema.Class<LockfileImporter, Schema.Struc
120
113
  * @public
121
114
  */
122
115
  export declare class LockfileImporter extends LockfileImporter_base {}
123
- //#endregion
124
- //#region src/PnpmExtension.d.ts
125
116
  /**
126
117
  * The pnpm `catalogs:` record shape as it appears in `pnpm-lock.yaml`:
127
118
  * catalog name → package name → pinned version string or
@@ -161,8 +152,6 @@ declare const PnpmExtension_base: Schema.Class<PnpmExtension, Schema.Struct<{
161
152
  * @public
162
153
  */
163
154
  export declare class PnpmExtension extends PnpmExtension_base {}
164
- //#endregion
165
- //#region src/ResolvedPackage.d.ts
166
155
  declare const ResolvedPackage_base: Schema.Class<ResolvedPackage, Schema.Struct<{
167
156
  readonly name: Schema.NonEmptyString;
168
157
  readonly version: Schema.String;
@@ -258,8 +247,6 @@ declare const ResolvedPackage_base: Schema.Class<ResolvedPackage, Schema.Struct<
258
247
  * @public
259
248
  */
260
249
  export declare class ResolvedPackage extends ResolvedPackage_base {}
261
- //#endregion
262
- //#region src/WorkspaceDependency.d.ts
263
250
  declare const WorkspaceDependency_base: Schema.Class<WorkspaceDependency, Schema.Struct<{
264
251
  readonly from: Schema.NonEmptyString;
265
252
  readonly to: Schema.NonEmptyString;
@@ -281,8 +268,6 @@ declare const WorkspaceDependency_base: Schema.Class<WorkspaceDependency, Schema
281
268
  * @public
282
269
  */
283
270
  export declare class WorkspaceDependency extends WorkspaceDependency_base {}
284
- //#endregion
285
- //#region src/LockfileFormat.d.ts
286
271
  /**
287
272
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
288
273
  * `package-lock.json` (JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -352,8 +337,6 @@ export declare const filenamesFor: (format: LockfileFormat) => readonly [string,
352
337
  * @public
353
338
  */
354
339
  export declare const fromFilename: (name: string) => Option.Option<LockfileFormat>;
355
- //#endregion
356
- //#region src/Lockfile.d.ts
357
340
  declare const LockfileParseError_base: Schema.Class<LockfileParseError, Schema.TaggedStruct<"LockfileParseError", {
358
341
  /** The lockfile format that was being parsed. */
359
342
  readonly format: Schema.Literals<readonly ["bun", "npm", "pnpm", "yarn"]>;
@@ -548,8 +531,6 @@ export declare class Lockfile extends Lockfile_base {
548
531
  /** The workspace-local packages. */
549
532
  get workspacePackages(): ReadonlyArray<ResolvedPackage>;
550
533
  }
551
- //#endregion
552
- //#region src/LockfileIntegrity.d.ts
553
534
  declare const WorkspaceManifest_base: Schema.Class<WorkspaceManifest, Schema.Struct<{
554
535
  readonly name: Schema.NonEmptyString;
555
536
  readonly dependencies: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
@@ -625,8 +606,6 @@ export declare class LockfileIntegrity extends LockfileIntegrity_base {
625
606
  */
626
607
  static compare(lockfile: Lockfile, manifests: ReadonlyArray<WorkspaceManifest>): LockfileIntegrity;
627
608
  }
628
- //#endregion
629
- //#region src/PackageManagerLock.d.ts
630
609
  declare const PackageManagerLock_base: Schema.Class<PackageManagerLock, Schema.Struct<{
631
610
  readonly name: Schema.Literal<"pnpm">;
632
611
  readonly specifier: Schema.String;
@@ -664,8 +643,6 @@ declare const PackageManagerLock_base: Schema.Class<PackageManagerLock, Schema.S
664
643
  * @public
665
644
  */
666
645
  export declare class PackageManagerLock extends PackageManagerLock_base {}
667
- //#endregion
668
- //#region src/PnpmEnvLockfile.d.ts
669
646
  /**
670
647
  * Readers over the env ("preamble") document of a `pnpm-lock.yaml`.
671
648
  *
@@ -752,8 +729,6 @@ interface PnpmEnvLockfileReaders {
752
729
  * @public
753
730
  */
754
731
  export declare const PnpmEnvLockfile: PnpmEnvLockfileReaders;
755
- //#endregion
756
- //#region src/UnsupportedLockfileVersion.d.ts
757
732
  /**
758
733
  * The cause a {@link LockfileParseError} carries when a lockfile predates the
759
734
  * supported format version.
@@ -817,6 +792,5 @@ interface UnsupportedLockfileVersion {
817
792
  * @public
818
793
  */
819
794
  export declare const isUnsupportedLockfileVersion: (cause: unknown) => cause is UnsupportedLockfileVersion;
820
- //#endregion
821
795
  export type { PnpmCatalogs, PnpmEnvLockfileReaders, UnsupportedLockfileVersion };
822
796
  //# sourceMappingURL=index.d.ts.map
package/internal/bun.js CHANGED
@@ -5,7 +5,7 @@ import { extractWorkspaceDeps, importerDependencies, peerDeclarations, splitName
5
5
  import { Effect, Exit, Schema } from "effect";
6
6
  import { Jsonc } from "@effected/jsonc";
7
7
 
8
- //#region src/internal/bun.ts
8
+ // src/internal/bun.ts
9
9
  const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
10
10
  const OptionalPeers = Schema.optionalKey(Schema.Array(Schema.String));
11
11
  const BunWorkspaceEntry = Schema.Struct({
@@ -181,5 +181,4 @@ const toFields = (raw) => Effect.gen(function* () {
181
181
  };
182
182
  });
183
183
 
184
- //#endregion
185
184
  export { parseBun };
@@ -2,7 +2,7 @@ import { framingFailure, syntaxFailure } from "./shared.js";
2
2
  import { Effect } from "effect";
3
3
  import { Yaml } from "@effected/yaml";
4
4
 
5
- //#region src/internal/documents.ts
5
+ // src/internal/documents.ts
6
6
  /**
7
7
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
8
8
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -94,5 +94,4 @@ const selectSoleDocument = (content) => Effect.gen(function* () {
94
94
  };
95
95
  });
96
96
 
97
- //#endregion
98
97
  export { selectSoleDocument, splitPnpmStream };
package/internal/npm.js CHANGED
@@ -3,7 +3,7 @@ import { ResolvedPackage } from "../ResolvedPackage.js";
3
3
  import { extractWorkspaceDeps, importerDependencies, peerDeclarations, requireLockfileVersion, syntaxFailure, toIntegrityHash, validationFailure } from "./shared.js";
4
4
  import { Effect, Schema } from "effect";
5
5
 
6
- //#region src/internal/npm.ts
6
+ // src/internal/npm.ts
7
7
  const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
8
8
  const PeerMetaRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({ optional: Schema.optionalKey(Schema.Boolean) })));
9
9
  const NpmPackageEntry = Schema.Struct({
@@ -192,5 +192,4 @@ const toFields = (raw) => Effect.gen(function* () {
192
192
  };
193
193
  });
194
194
 
195
- //#endregion
196
195
  export { parseNpm };
package/internal/pnpm.js CHANGED
@@ -5,7 +5,7 @@ import { PnpmExtension } from "../PnpmExtension.js";
5
5
  import { splitPnpmStream } from "./documents.js";
6
6
  import { Effect, Schema } from "effect";
7
7
 
8
- //#region src/internal/pnpm.ts
8
+ // src/internal/pnpm.ts
9
9
  const PnpmImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
10
10
  specifier: Schema.String,
11
11
  version: Schema.String
@@ -352,5 +352,4 @@ const toFields = (raw) => Effect.gen(function* () {
352
352
  };
353
353
  });
354
354
 
355
- //#endregion
356
355
  export { parsePnpm };
@@ -5,7 +5,7 @@ import { PackageManagerLock } from "../PackageManagerLock.js";
5
5
  import { Effect, Schema } from "effect";
6
6
  import { IntegrityHash } from "@effected/npm";
7
7
 
8
- //#region src/internal/pnpmEnv.ts
8
+ // src/internal/pnpmEnv.ts
9
9
  const PnpmEnvImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
10
10
  specifier: Schema.String,
11
11
  version: Schema.String
@@ -131,5 +131,4 @@ const readPnpmConfigDependencies = (content) => Effect.gen(function* () {
131
131
  return locks;
132
132
  });
133
133
 
134
- //#endregion
135
134
  export { readPnpmConfigDependencies, readPnpmPackageManager };
@@ -3,7 +3,7 @@ import { WorkspaceDependency } from "../WorkspaceDependency.js";
3
3
  import { Effect, Exit, Schema } from "effect";
4
4
  import { DependencySpecifier, IntegrityHash } from "@effected/npm";
5
5
 
6
- //#region src/internal/shared.ts
6
+ // src/internal/shared.ts
7
7
  /**
8
8
  * The four dependency sections of a manifest, in a stable order — the shared
9
9
  * dependency-sections table. Each entry is both the
@@ -298,5 +298,4 @@ const extractWorkspaceDeps = (workspaces, workspaceNames) => {
298
298
  return deps;
299
299
  };
300
300
 
301
- //#endregion
302
301
  export { DEP_TYPES, MINIMUM_LOCKFILE_VERSION, extractWorkspaceDeps, framingFailure, gatePnpmVersion, importerDependencies, isWorkspaceSpecifier, peerDeclarations, requireLockfileVersion, splitNameVersion, splitPeerSuffix, syntaxFailure, toIntegrityHash, validationFailure };
package/internal/yarn.js CHANGED
@@ -3,7 +3,7 @@ import { extractWorkspaceDeps, peerDeclarations, toIntegrityHash, validationFail
3
3
  import { selectSoleDocument } from "./documents.js";
4
4
  import { Effect, Schema } from "effect";
5
5
 
6
- //#region src/internal/yarn.ts
6
+ // src/internal/yarn.ts
7
7
  const YarnLockfileRaw = Schema.Record(Schema.String, Schema.Unknown);
8
8
  const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
9
9
  const YarnEntry = Schema.Struct({
@@ -179,5 +179,4 @@ const cleanYarnDeps = (deps) => {
179
179
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
180
180
  };
181
181
 
182
- //#endregion
183
182
  export { parseYarn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/lockfiles",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "private": false,
5
5
  "description": "Pure lockfile parsing for bun, npm, pnpm and yarn Berry into one unified Effect schema model, with pure integrity checking against workspace manifests.",
6
6
  "keywords": [
@@ -40,10 +40,10 @@
40
40
  "./package.json": "./package.json"
41
41
  },
42
42
  "peerDependencies": {
43
- "@effected/jsonc": "^0.18.0",
44
- "@effected/npm": "^0.23.0",
45
- "@effected/semver": "^0.14.0",
46
- "@effected/yaml": "^0.22.0",
43
+ "@effected/jsonc": "^0.19.0",
44
+ "@effected/npm": "^0.24.0",
45
+ "@effected/semver": "^0.15.0",
46
+ "@effected/yaml": "^0.23.0",
47
47
  "effect": "^4.0.0"
48
48
  },
49
49
  "engines": {