@effected/package-json 0.23.0 → 0.24.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/Dependency.js +1 -2
- package/DevEngines.js +1 -2
- package/EntryPoint.js +1 -2
- package/Funding.js +1 -2
- package/LenientManifest.js +1 -2
- package/License.js +1 -2
- package/Package.js +1 -2
- package/PackageJsonFile.js +1 -2
- package/PackageJsonFormat.js +1 -2
- package/PackageManager.js +1 -2
- package/PackageManagerRange.js +1 -2
- package/PackageManifest.js +1 -2
- package/PackageName.js +1 -2
- package/PackageValidator.js +1 -2
- package/Person.js +1 -2
- package/Repository.js +1 -2
- package/index.d.ts +0 -32
- package/internal/format.js +1 -2
- package/internal/wire.js +1 -2
- package/package.json +5 -5
package/Dependency.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DependencyKind, DependencySpecifier } from "@effected/npm";
|
|
2
2
|
import { Option, Schema } from "effect";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/Dependency.ts
|
|
5
5
|
/**
|
|
6
6
|
* A resolved dependency entry pairing a package name with its version
|
|
7
7
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -72,5 +72,4 @@ var Dependency = class extends Schema.Class("Dependency")({
|
|
|
72
72
|
*/
|
|
73
73
|
const isUnresolvedDependency = (dependency) => dependency.isUnresolved === true;
|
|
74
74
|
|
|
75
|
-
//#endregion
|
|
76
75
|
export { Dependency, isUnresolvedDependency };
|
package/DevEngines.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/DevEngines.ts
|
|
4
4
|
/**
|
|
5
5
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
6
6
|
*
|
|
@@ -38,5 +38,4 @@ const DevEnginesSchema = Schema.Struct({
|
|
|
38
38
|
libc: Schema.optionalKey(DevEngineOrArray)
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { DevEngine, DevEngineOrArray, DevEnginesSchema };
|
package/EntryPoint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Result, Schema } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/EntryPoint.ts
|
|
4
4
|
/**
|
|
5
5
|
* Raised when a manifest resolves no root entry point.
|
|
6
6
|
*
|
|
@@ -149,5 +149,4 @@ const resolveEntryPoint = (manifest, options) => {
|
|
|
149
149
|
return Result.succeed(typeof manifest.main === "string" && manifest.main !== "" ? manifest.main : "index.js");
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
-
//#endregion
|
|
153
152
|
export { UnresolvedEntryPointError, resolveEntryPoint };
|
package/Funding.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Schema, SchemaTransformation } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/Funding.ts
|
|
4
4
|
const entryWires = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
/**
|
|
6
6
|
* Entries that were the WHOLE field, written bare rather than inside an array.
|
|
@@ -142,5 +142,4 @@ var Funding = class Funding extends Schema.Class("Funding")({
|
|
|
142
142
|
})));
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
//#endregion
|
|
146
145
|
export { Funding };
|
package/LenientManifest.js
CHANGED
|
@@ -2,7 +2,7 @@ import { ExportsField, PackageDecodeError, PublishConfigField } from "./Package.
|
|
|
2
2
|
import { PackageJsonSyntaxError } from "./PackageJsonFormat.js";
|
|
3
3
|
import { Cause, Effect, Exit, Result, Schema } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/LenientManifest.ts
|
|
6
6
|
const LenientFieldIssueSchema = Schema.Struct({
|
|
7
7
|
field: Schema.String,
|
|
8
8
|
expected: Schema.String,
|
|
@@ -257,5 +257,4 @@ var LenientManifest = class LenientManifest extends Schema.Class("LenientManifes
|
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
|
|
260
|
-
//#endregion
|
|
261
260
|
export { LenientManifest };
|
package/License.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Result, Schema } from "effect";
|
|
2
2
|
import { SpdxExpression, isValidExpression } from "@effected/spdx";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/License.ts
|
|
5
5
|
/**
|
|
6
6
|
* Indicates that a string is not a valid SPDX license identifier or expression.
|
|
7
7
|
*
|
|
@@ -82,5 +82,4 @@ const SpdxLicense = Schema.String.pipe(Schema.check(Schema.makeFilter((value) =>
|
|
|
82
82
|
*/
|
|
83
83
|
const licenseExpressionOf = (license) => Result.getSuccess(SpdxExpression.parseResult(license));
|
|
84
84
|
|
|
85
|
-
//#endregion
|
|
86
85
|
export { InvalidSpdxLicenseError, SpdxLicense, isValidSpdx, licenseExpressionOf };
|
package/Package.js
CHANGED
|
@@ -12,7 +12,7 @@ import { CatalogResolver, DependencySpecifier, WorkspaceResolver } from "@effect
|
|
|
12
12
|
import { Effect, Function, HashMap, Option, Pipeable, Schema, SchemaTransformation } from "effect";
|
|
13
13
|
import { SemVer } from "@effected/semver";
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// src/Package.ts
|
|
16
16
|
const toHashMap = SchemaTransformation.transform({
|
|
17
17
|
decode: (record) => HashMap.fromIterable(Object.entries(record)),
|
|
18
18
|
encode: (map) => Object.fromEntries(HashMap.toEntries(map))
|
|
@@ -329,5 +329,4 @@ var Package = class Package extends Schema.Class("Package")({
|
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
//#endregion
|
|
333
332
|
export { BinField, DependencyMapField, ExportsField, Package, PackageDecodeError, PeerDependenciesMetaField, PublishConfigField, RepositoryField, StringMapField };
|
package/PackageJsonFile.js
CHANGED
|
@@ -3,7 +3,7 @@ import { PackageJsonFormat } from "./PackageJsonFormat.js";
|
|
|
3
3
|
import { PackageManifest } from "./PackageManifest.js";
|
|
4
4
|
import { Context, Effect, FileSystem, Layer, Path, Schema } from "effect";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/PackageJsonFile.ts
|
|
7
7
|
/**
|
|
8
8
|
* Indicates that a package.json file could not be read from the filesystem
|
|
9
9
|
* (a filesystem error other than not-found).
|
|
@@ -158,5 +158,4 @@ var PackageJsonFile = class PackageJsonFile extends Context.Service()("@effected
|
|
|
158
158
|
static layer = Layer.effect(PackageJsonFile, PackageJsonFile.make);
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
//#endregion
|
|
162
161
|
export { PackageJsonFile, PackageJsonNotFoundError, PackageJsonParseError, PackageJsonReadError, PackageJsonWriteError };
|
package/PackageJsonFormat.js
CHANGED
|
@@ -2,7 +2,7 @@ import { detectIndent, renderJson, resolveIndent, sortKeys } from "./internal/fo
|
|
|
2
2
|
import { JsoncEdit, JsoncModifier } from "@effected/jsonc";
|
|
3
3
|
import { Effect, Result, Schema } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/PackageJsonFormat.ts
|
|
6
6
|
/**
|
|
7
7
|
* Indicates that a text input could not be treated as a package.json document:
|
|
8
8
|
* either it is not valid JSON (`"invalid-json"`, carrying the underlying
|
|
@@ -229,5 +229,4 @@ var PackageJsonFormat = class PackageJsonFormat {
|
|
|
229
229
|
});
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
//#endregion
|
|
233
232
|
export { PackageJsonFormat, PackageJsonModifyError, PackageJsonSyntaxError };
|
package/PackageManager.js
CHANGED
|
@@ -2,7 +2,7 @@ import { CorepackIntegrityHash } from "@effected/npm";
|
|
|
2
2
|
import { Effect, Exit, Option, Schema, SchemaIssue, SchemaTransformation } from "effect";
|
|
3
3
|
import { SemVer } from "@effected/semver";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/PackageManager.ts
|
|
6
6
|
const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
|
|
7
7
|
const invalid = (input, message) => Effect.fail(new SchemaIssue.InvalidValue({ message }, input));
|
|
8
8
|
/**
|
|
@@ -122,5 +122,4 @@ var PackageManager = class PackageManager extends Schema.Class("PackageManager")
|
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
-
//#endregion
|
|
126
125
|
export { PackageManager };
|
package/PackageManagerRange.js
CHANGED
|
@@ -2,7 +2,7 @@ import { CorepackIntegrityHash } from "@effected/npm";
|
|
|
2
2
|
import { Effect, Exit, Option, Result, Schema, SchemaIssue, SchemaTransformation } from "effect";
|
|
3
3
|
import { Range, SemVer } from "@effected/semver";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/PackageManagerRange.ts
|
|
6
6
|
const SINGLE_COMPARATOR_RE = /^([\^~]?)(.+)$/;
|
|
7
7
|
const singleComparator = (range) => {
|
|
8
8
|
const match = SINGLE_COMPARATOR_RE.exec(range);
|
|
@@ -323,5 +323,4 @@ var PackageManagerRange = class PackageManagerRange extends Schema.Class("Packag
|
|
|
323
323
|
}
|
|
324
324
|
};
|
|
325
325
|
|
|
326
|
-
//#endregion
|
|
327
326
|
export { InvalidPackageManagerRangeError, PackageManagerRange };
|
package/PackageManifest.js
CHANGED
|
@@ -6,7 +6,7 @@ import { PackageManagerRange } from "./PackageManagerRange.js";
|
|
|
6
6
|
import { Effect, Schema } from "effect";
|
|
7
7
|
import { SemVer } from "@effected/semver";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/PackageManifest.ts
|
|
10
10
|
/**
|
|
11
11
|
* A package.json document as it exists on disk, publishable or not: every
|
|
12
12
|
* field of {@link Package} with `name` and `version` optional and
|
|
@@ -90,5 +90,4 @@ var PackageManifest = class PackageManifest extends Schema.Class("PackageManifes
|
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
//#endregion
|
|
94
93
|
export { PackageManifest };
|
package/PackageName.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option, Schema } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/PackageName.ts
|
|
4
4
|
/**
|
|
5
5
|
* Indicates that a string could not be used as a valid npm package name.
|
|
6
6
|
*
|
|
@@ -68,5 +68,4 @@ const PackageName = Object.assign(Schema.Union([ScopedPackageName, UnscopedPacka
|
|
|
68
68
|
isScoped
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
-
//#endregion
|
|
72
71
|
export { InvalidPackageNameError, PackageName, ScopedPackageName, UnscopedPackageName };
|
package/PackageValidator.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, Effect, HashMap, Layer, Option, Result, Schema } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/PackageValidator.ts
|
|
4
4
|
/**
|
|
5
5
|
* Indicates that a {@link Package} failed one or more validation rules.
|
|
6
6
|
*
|
|
@@ -146,5 +146,4 @@ var PackageValidator = class PackageValidator extends Context.Service()("@effect
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
-
//#endregion
|
|
150
149
|
export { PackageValidationError, PackageValidator, defaultRules, noLocalDepsRule, noUnresolvedDepsRule };
|
package/Person.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Option, Schema, SchemaTransformation } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/Person.ts
|
|
4
4
|
const parsePersonString = (input) => {
|
|
5
5
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
6
6
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -157,5 +157,4 @@ var Person = class Person extends Schema.Class("Person")({
|
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
//#endregion
|
|
161
160
|
export { Person };
|
package/Repository.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option, Schema, SchemaTransformation } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/Repository.ts
|
|
4
4
|
/** The shorthand hosts npm resolves without a scheme. */
|
|
5
5
|
const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
|
|
6
6
|
["github", "https://github.com"],
|
|
@@ -279,5 +279,4 @@ var Bugs = class Bugs extends Schema.Class("Bugs")({
|
|
|
279
279
|
})));
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
//#endregion
|
|
283
282
|
export { Bugs, Repository };
|
package/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { CatalogResolver, DependencyKind, DependencyProtocol, DependencyProtocol
|
|
|
3
3
|
import { InvalidVersionError, Range, SemVer } from "@effected/semver";
|
|
4
4
|
import { Brand, Context, Effect, FileSystem, HashMap, Layer, Option, Path, Result, Schema } from "effect";
|
|
5
5
|
import { SpdxExpression } from "@effected/spdx";
|
|
6
|
-
//#region src/Dependency.d.ts
|
|
7
6
|
declare const Dependency_base: Schema.Class<Dependency, Schema.Struct<{
|
|
8
7
|
/** The package name. */
|
|
9
8
|
readonly name: Schema.String;
|
|
@@ -65,8 +64,6 @@ export declare const isUnresolvedDependency: <T extends {
|
|
|
65
64
|
}>(dependency: T) => dependency is T & {
|
|
66
65
|
readonly isUnresolved: true;
|
|
67
66
|
};
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/DevEngines.d.ts
|
|
70
67
|
declare const DevEngine_base: Schema.Class<DevEngine, Schema.Struct<{
|
|
71
68
|
/** The engine name (e.g. `node`, `pnpm`). */
|
|
72
69
|
readonly name: Schema.String;
|
|
@@ -106,8 +103,6 @@ export declare const DevEnginesSchema: Schema.Struct<{
|
|
|
106
103
|
* @public
|
|
107
104
|
*/
|
|
108
105
|
type DevEngines = typeof DevEnginesSchema.Type;
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/EntryPoint.d.ts
|
|
111
106
|
/**
|
|
112
107
|
* Options for {@link resolveEntryPoint}.
|
|
113
108
|
*
|
|
@@ -223,8 +218,6 @@ interface EntryPointManifest {
|
|
|
223
218
|
* @public
|
|
224
219
|
*/
|
|
225
220
|
export declare const resolveEntryPoint: (manifest: EntryPointManifest, options?: ResolveEntryPointOptions) => Result.Result<string, UnresolvedEntryPointError>;
|
|
226
|
-
//#endregion
|
|
227
|
-
//#region src/Funding.d.ts
|
|
228
221
|
declare const Funding_base: Schema.Class<Funding, Schema.Struct<{
|
|
229
222
|
/** The funding platform, when the object form carried one (`"github"`, …). */
|
|
230
223
|
readonly type: Schema.optionalKey<Schema.String>;
|
|
@@ -289,8 +282,6 @@ export declare class Funding extends Funding_base {
|
|
|
289
282
|
readonly [k: string]: unknown;
|
|
290
283
|
}>>;
|
|
291
284
|
}
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region src/License.d.ts
|
|
294
285
|
declare const InvalidSpdxLicenseError_base: Schema.Class<InvalidSpdxLicenseError, Schema.TaggedStruct<"InvalidSpdxLicenseError", {
|
|
295
286
|
/** The raw input string that failed validation. */
|
|
296
287
|
readonly input: Schema.String;
|
|
@@ -372,8 +363,6 @@ export type SpdxLicense = string & Brand.Brand<"SpdxLicense">;
|
|
|
372
363
|
* @public
|
|
373
364
|
*/
|
|
374
365
|
export declare const licenseExpressionOf: (license: SpdxLicense) => Option.Option<SpdxExpression>;
|
|
375
|
-
//#endregion
|
|
376
|
-
//#region src/PackageManager.d.ts
|
|
377
366
|
declare const PackageManager_base: Schema.Class<PackageManager, Schema.Struct<{
|
|
378
367
|
/** The package-manager name (e.g. `pnpm`). Any lowercase name — see the class remarks. */
|
|
379
368
|
readonly name: Schema.String;
|
|
@@ -464,8 +453,6 @@ export declare class PackageManager extends PackageManager_base {
|
|
|
464
453
|
/** Whether an integrity hash is present. */
|
|
465
454
|
get hasIntegrity(): boolean;
|
|
466
455
|
}
|
|
467
|
-
//#endregion
|
|
468
|
-
//#region src/PackageName.d.ts
|
|
469
456
|
declare const InvalidPackageNameError_base: Schema.Class<InvalidPackageNameError, Schema.TaggedStruct<"InvalidPackageNameError", {
|
|
470
457
|
/** The raw input string that failed validation. */
|
|
471
458
|
readonly input: Schema.String;
|
|
@@ -535,8 +522,6 @@ export declare const PackageName: Schema.Union<readonly [Schema.brand<Schema.Str
|
|
|
535
522
|
unscoped: (name: string) => string;
|
|
536
523
|
isScoped: (name: string) => boolean;
|
|
537
524
|
};
|
|
538
|
-
//#endregion
|
|
539
|
-
//#region src/Person.d.ts
|
|
540
525
|
declare const Person_base: Schema.Class<Person, Schema.Struct<{
|
|
541
526
|
/** The person's name. */
|
|
542
527
|
readonly name: Schema.String;
|
|
@@ -610,8 +595,6 @@ export declare class Person extends Person_base {
|
|
|
610
595
|
*/
|
|
611
596
|
static wireStringOf(person: Person): Option.Option<string>;
|
|
612
597
|
}
|
|
613
|
-
//#endregion
|
|
614
|
-
//#region src/Repository.d.ts
|
|
615
598
|
declare const Repository_base: Schema.Class<Repository, Schema.Struct<{
|
|
616
599
|
/** The `type` field, when the object form carried one (`"git"`, …). */
|
|
617
600
|
readonly type: Schema.optionalKey<Schema.String>;
|
|
@@ -733,8 +716,6 @@ export declare class Bugs extends Bugs_base {
|
|
|
733
716
|
readonly [k: string]: unknown;
|
|
734
717
|
}>;
|
|
735
718
|
}
|
|
736
|
-
//#endregion
|
|
737
|
-
//#region src/Package.d.ts
|
|
738
719
|
/**
|
|
739
720
|
* A string→string map field decoding a plain JSON object to a `HashMap`,
|
|
740
721
|
* defaulting to an empty map when the key is absent. Backs the four dependency
|
|
@@ -1086,8 +1067,6 @@ export declare class Package extends Package_base {
|
|
|
1086
1067
|
*/
|
|
1087
1068
|
toJsonString(options?: PackageFormatOptions): string;
|
|
1088
1069
|
}
|
|
1089
|
-
//#endregion
|
|
1090
|
-
//#region src/PackageJsonFormat.d.ts
|
|
1091
1070
|
declare const PackageJsonSyntaxError_base: Schema.Class<PackageJsonSyntaxError, Schema.TaggedStruct<"PackageJsonSyntaxError", {
|
|
1092
1071
|
/** Which syntactic precondition failed. */
|
|
1093
1072
|
readonly reason: Schema.Literals<readonly ["invalid-json", "not-an-object"]>;
|
|
@@ -1297,8 +1276,6 @@ export declare class PackageJsonFormat {
|
|
|
1297
1276
|
*/
|
|
1298
1277
|
static readonly modifyToString: (source: string, path: JsoncPath$1, value: unknown) => Effect.Effect<string, PackageJsonModifyError | PackageJsonSyntaxError, never>;
|
|
1299
1278
|
}
|
|
1300
|
-
//#endregion
|
|
1301
|
-
//#region src/LenientManifest.d.ts
|
|
1302
1279
|
/**
|
|
1303
1280
|
* One degraded field from a lenient decode: the top-level `field` that did not
|
|
1304
1281
|
* match its permissive shape, a human-readable description of the `expected`
|
|
@@ -1454,8 +1431,6 @@ export declare class LenientManifest extends LenientManifest_base {
|
|
|
1454
1431
|
/** Whether the manifest declares ESM (`"type": "module"`, exact comparison). */
|
|
1455
1432
|
get isESM(): boolean;
|
|
1456
1433
|
}
|
|
1457
|
-
//#endregion
|
|
1458
|
-
//#region src/PackageManagerRange.d.ts
|
|
1459
1434
|
/**
|
|
1460
1435
|
* The encoded shape of a `devEngines.packageManager` entry: what a raw
|
|
1461
1436
|
* `package.json` object carries. A {@link DevEngine} instance satisfies it
|
|
@@ -1695,8 +1670,6 @@ export declare class PackageManagerRange extends PackageManagerRange_base {
|
|
|
1695
1670
|
/** Whether an integrity hash is present. */
|
|
1696
1671
|
get hasIntegrity(): boolean;
|
|
1697
1672
|
}
|
|
1698
|
-
//#endregion
|
|
1699
|
-
//#region src/PackageManifest.d.ts
|
|
1700
1673
|
declare const PackageManifest_base: Schema.Class<PackageManifest, Schema.Struct<{
|
|
1701
1674
|
readonly description: Schema.optionalKey<Schema.String>;
|
|
1702
1675
|
readonly private: Schema.optionalKey<Schema.Boolean>;
|
|
@@ -1826,8 +1799,6 @@ export declare class PackageManifest extends PackageManifest_base {
|
|
|
1826
1799
|
*/
|
|
1827
1800
|
toJsonString(options?: PackageFormatOptions): string;
|
|
1828
1801
|
}
|
|
1829
|
-
//#endregion
|
|
1830
|
-
//#region src/PackageJsonFile.d.ts
|
|
1831
1802
|
declare const PackageJsonReadError_base: Schema.Class<PackageJsonReadError, Schema.TaggedStruct<"PackageJsonReadError", {
|
|
1832
1803
|
/** The path that could not be read. */
|
|
1833
1804
|
readonly path: Schema.String;
|
|
@@ -1981,8 +1952,6 @@ export declare class PackageJsonFile extends PackageJsonFile_base {
|
|
|
1981
1952
|
*/
|
|
1982
1953
|
static readonly layer: Layer.Layer<PackageJsonFile, never, FileSystem.FileSystem | Path.Path>;
|
|
1983
1954
|
}
|
|
1984
|
-
//#endregion
|
|
1985
|
-
//#region src/PackageValidator.d.ts
|
|
1986
1955
|
/**
|
|
1987
1956
|
* A single validation-rule failure.
|
|
1988
1957
|
*
|
|
@@ -2084,6 +2053,5 @@ export declare class PackageValidator extends PackageValidator_base {
|
|
|
2084
2053
|
readonly rules: ReadonlyArray<ValidationRule>;
|
|
2085
2054
|
}): Layer.Layer<PackageValidator>;
|
|
2086
2055
|
}
|
|
2087
|
-
//#endregion
|
|
2088
2056
|
export { type DependencyKind, type DependencyProtocol, DependencySpecifier, type DependencySpecifierBrand, type DevEnginePackageManagerEntry, type DevEngines, type EntryPointManifest, InvalidDependencySpecifierError, JsoncEdit, type JsoncPath, type LenientFieldIssue, type PackageFieldEdit, type PackageFormatOptions, type PackageFormatTextOptions, type PackageIndent, type PackageJsonFileShape, type PackagePatch, type ResolveEntryPointOptions, type RuleFailure, type UnresolvedDependency, type ValidationRule, isValidDependencySpecifier };
|
|
2089
2057
|
//# sourceMappingURL=index.d.ts.map
|
package/internal/format.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/format.ts
|
|
2
2
|
const KEY_INDEX = new Map([
|
|
3
3
|
"$schema",
|
|
4
4
|
"name",
|
|
@@ -233,5 +233,4 @@ const renderJson = (raw, options) => {
|
|
|
233
233
|
return options.newline ? `${json}\n` : json;
|
|
234
234
|
};
|
|
235
235
|
|
|
236
|
-
//#endregion
|
|
237
236
|
export { detectIndent, renderJson, resolveFormatOptions, resolveIndent, sortKeys, stripEmptyDependencyMaps };
|
package/internal/wire.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema, SchemaTransformation } from "effect";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/internal/wire.ts
|
|
4
4
|
const RawJson = Schema.Record(Schema.String, Schema.Unknown);
|
|
5
5
|
/**
|
|
6
6
|
* Build the open-JSON ↔ class wire codec for a `Schema.Class` carrying a
|
|
@@ -31,5 +31,4 @@ const makeWire = (Class) => {
|
|
|
31
31
|
})));
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
export { makeWire };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/package-json",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "package.json parsing, editing, validation and file IO as Effect schemas.",
|
|
6
6
|
"keywords": [
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@effected/jsonc": "^0.
|
|
42
|
-
"@effected/npm": "^0.
|
|
43
|
-
"@effected/semver": "^0.
|
|
44
|
-
"@effected/spdx": "^0.
|
|
41
|
+
"@effected/jsonc": "^0.19.0",
|
|
42
|
+
"@effected/npm": "^0.24.0",
|
|
43
|
+
"@effected/semver": "^0.15.0",
|
|
44
|
+
"@effected/spdx": "^0.16.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"effect": "^4.0.0"
|