@effected/package-json 0.14.0 → 0.15.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/Funding.js CHANGED
@@ -107,7 +107,7 @@ var Funding = class Funding extends Schema.Class("Funding")({
107
107
  * Provenance belongs to the instance, so an entry that is *rebuilt* rather
108
108
  * than carried through has none and encodes in the canonical object form.
109
109
  */
110
- static FromValue = EntryValue.pipe(Schema.decodeTo(Schema.instanceOf(Funding), SchemaTransformation.transformOrFail({
110
+ static FromValue = EntryValue.pipe(Schema.decodeTo(Schema.instanceOf(Funding), SchemaTransformation.transformEffect({
111
111
  decode: (input) => decodeEntry(input),
112
112
  encode: (funding) => Effect.succeed(encodeEntry(funding))
113
113
  })));
@@ -124,7 +124,7 @@ var Funding = class Funding extends Schema.Class("Funding")({
124
124
  * the addition. An entry built by hand has no provenance, so an array of
125
125
  * such entries encodes as an array.
126
126
  */
127
- static FromField = FieldValue.pipe(Schema.decodeTo(Schema.Array(Schema.instanceOf(Funding)), SchemaTransformation.transformOrFail({
127
+ static FromField = FieldValue.pipe(Schema.decodeTo(Schema.Array(Schema.instanceOf(Funding)), SchemaTransformation.transformEffect({
128
128
  decode: (input) => {
129
129
  const bare = !Array.isArray(input);
130
130
  const values = bare ? [input] : input;
package/PackageManager.js CHANGED
@@ -78,7 +78,7 @@ var PackageManager = class PackageManager extends Schema.Class("PackageManager")
78
78
  * the component that failed. Encoding prints the canonical string, which is
79
79
  * byte-identical to any input this codec accepts.
80
80
  */
81
- static FromString = Schema.String.pipe(Schema.decodeTo(Schema.instanceOf(PackageManager), SchemaTransformation.transformOrFail({
81
+ static FromString = Schema.String.pipe(Schema.decodeTo(Schema.instanceOf(PackageManager), SchemaTransformation.transformEffect({
82
82
  decode: (input) => {
83
83
  const at = input.indexOf("@");
84
84
  if (at === -1) return invalid(input, `Invalid packageManager format: "${input}"`);
@@ -75,7 +75,7 @@ var PackageManagerRange = class PackageManagerRange extends Schema.Class("Packag
75
75
  * the component that failed. Encoding reconstructs the string from the
76
76
  * verbatim parts, so it is byte-identical to any input this codec accepts.
77
77
  */
78
- static FromString = Schema.String.pipe(Schema.decodeTo(Schema.instanceOf(PackageManagerRange), SchemaTransformation.transformOrFail({
78
+ static FromString = Schema.String.pipe(Schema.decodeTo(Schema.instanceOf(PackageManagerRange), SchemaTransformation.transformEffect({
79
79
  decode: (input) => {
80
80
  const at = input.indexOf("@");
81
81
  if (at === -1) return invalid(input, `Invalid packageManager format: "${input}"`);
package/Person.js CHANGED
@@ -83,7 +83,7 @@ var Person = class Person extends Schema.Class("Person")({
83
83
  * unknown keys into `rest` and flattening them back on encode so the on-disk
84
84
  * shape never carries a literal `rest` key.
85
85
  */
86
- static schema = Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.decodeTo(Schema.instanceOf(Person), SchemaTransformation.transformOrFail({
86
+ static schema = Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.decodeTo(Schema.instanceOf(Person), SchemaTransformation.transformEffect({
87
87
  decode: (raw) => decodePersonFields(raw).pipe(Effect.mapError((error) => error.issue), Effect.map((fields) => {
88
88
  const rest = restOf(raw);
89
89
  return rememberWire(Person.make({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/package-json",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "private": false,
5
5
  "description": "package.json parsing, editing, validation and file IO as Effect schemas.",
6
6
  "keywords": [
@@ -38,13 +38,13 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "dependencies": {
41
- "@effected/jsonc": "^0.9.0",
42
- "@effected/npm": "^0.13.0",
43
- "@effected/semver": "^0.6.0",
44
- "@effected/spdx": "^0.6.0"
41
+ "@effected/jsonc": "^0.11.0",
42
+ "@effected/npm": "^0.14.0",
43
+ "@effected/semver": "^0.7.0",
44
+ "@effected/spdx": "^0.7.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "effect": "4.0.0-rc.112"
47
+ "effect": "4.0.0-rc.115"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=24.11.0"
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.59.0"
8
+ "packageVersion": "7.59.1"
9
9
  }
10
10
  ]
11
11
  }