Skip to content

fix(deps): update dependency effect to v3.14.13#321

Merged
jpb06 merged 1 commit intomainfrom
renovate/effect-3.x
Apr 23, 2025
Merged

fix(deps): update dependency effect to v3.14.13#321
jpb06 merged 1 commit intomainfrom
renovate/effect-3.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 23, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
effect (source) 3.14.12 -> 3.14.13 age adoption passing confidence

Release Notes

Effect-TS/effect (effect)

v3.14.13

Compare Source

Patch Changes
  • #​4777 ee77788 Thanks @​gcanti! - JSONSchema: apply encodeOption to each example and retain successful results.

    Example

    import { JSONSchema, Schema } from "effect"
    
    const schema = Schema.Struct({
      a: Schema.propertySignature(Schema.BigInt).annotations({
        examples: [1n, 2n]
      })
    })
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "$defs": {
        "BigInt": {
          "type": "string",
          "description": "a string to be decoded into a bigint"
        }
      },
      "type": "object",
      "required": [
        "a"
      ],
      "properties": {
        "a": {
          "$ref": "#/$defs/BigInt",
          "examples": [
            "1",
            "2"
          ]
        }
      },
      "additionalProperties": false
    }
    */
    
  • #​4701 5fce6ba Thanks @​gcanti! - Fix JSONSchema.make for Exit schemas.

    Before

    import { JSONSchema, Schema } from "effect"
    
    const schema = Schema.Exit({
      failure: Schema.String,
      success: Schema.Number,
      defect: Schema.Defect
    })
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    throws
    Error: Missing annotation
    at path: ["cause"]["left"]
    details: Generating a JSON Schema for this schema requires an "identifier" annotation
    schema (Suspend): CauseEncoded<string>
    */
    

    After

    import { JSONSchema, Schema } from "effect"
    
    const schema = Schema.Exit({
      failure: Schema.String,
      success: Schema.Number,
      defect: Schema.Defect
    })
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    Output:
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "$defs": {
        "CauseEncoded0": {
          "anyOf": [
            {
              "type": "object",
              "required": [
                "_tag"
              ],
              "properties": {
                "_tag": {
                  "type": "string",
                  "enum": [
                    "Empty"
                  ]
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "_tag",
                "error"
              ],
              "properties": {
                "_tag": {
                  "type": "string",
                  "enum": [
                    "Fail"
                  ]
                },
                "error": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "_tag",
                "defect"
              ],
              "properties": {
                "_tag": {
                  "type": "string",
                  "enum": [
                    "Die"
                  ]
                },
                "defect": {
                  "$ref": "#/$defs/Defect"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "_tag",
                "fiberId"
              ],
              "properties": {
                "_tag": {
                  "type": "string",
                  "enum": [
                    "Interrupt"
                  ]
                },
                "fiberId": {
                  "$ref": "#/$defs/FiberIdEncoded"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "_tag",
                "left",
                "right"
              ],
              "properties": {
                "_tag": {
                  "type": "string",
                  "enum": [
                    "Sequential"
                  ]
                },
                "left": {
                  "$ref": "#/$defs/CauseEncoded0"
                },
                "right": {
                  "$ref": "#/$defs/CauseEncoded0"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "_tag",
                "left",
                "right"
              ],
              "properties": {
                "_tag": {
                  "type": "string",
                  "enum": [
                    "Parallel"
                  ]
                },
                "left": {
                  "$ref": "#/$defs/CauseEncoded0"
                },
                "right": {
                  "$ref": "#/$defs/CauseEncoded0"
                }
              },
              "additionalProperties": false
            }
          ],
          "title": "CauseEncoded<string>"
        },
        "Defect": {
          "$id": "/schemas/unknown",
          "title": "unknown"
        },
        "FiberIdEncoded": {
          "anyOf": [
            {
              "$ref": "#/$defs/FiberIdNoneEncoded"
            },
            {
              "$ref": "#/$defs/FiberIdRuntimeEncoded"
            },
            {
              "$ref": "#/$defs/FiberIdCompositeEncoded"
            }
          ]
        },
        "FiberIdNoneEncoded": {
          "type": "object",
          "required": [
            "_tag"
          ],
          "properties": {
            "_tag": {
              "type": "string",
              "enum": [
                "None"
              ]
            }
          },
          "additionalProperties": false
        },
        "FiberIdRuntimeEncoded": {
          "type": "object",
          "required": [
            "_tag",
            "id",
            "startTimeMillis"
          ],
          "properties": {
            "_tag": {
              "type": "string",
              "enum": [
                "Runtime"
              ]
            },
            "id": {
              "$ref": "#/$defs/Int"
            },
            "startTimeMillis": {
              "$ref": "#/$defs/Int"
            }
          },
          "additionalProperties": false
        },
        "Int": {
          "type": "integer",
          "description": "an integer",
          "title": "int"
        },
        "FiberIdCompositeEncoded": {
          "type": "object",
          "required": [
            "_tag",
            "left",
            "right"
          ],
          "properties": {
            "_tag": {
              "type": "string",
              "enum": [
                "Composite"
              ]
            },
            "left": {
              "$ref": "#/$defs/FiberIdEncoded"
            },
            "right": {
              "$ref": "#/$defs/FiberIdEncoded"
            }
          },
          "additionalProperties": false
        }
      },
      "anyOf": [
        {
          "type": "object",
          "required": [
            "_tag",
            "cause"
          ],
          "properties": {
            "_tag": {
              "type": "string",
              "enum": [
                "Failure"
              ]
            },
            "cause": {
              "$ref": "#/$defs/CauseEncoded0"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "_tag",
            "value"
          ],
          "properties": {
            "_tag": {
              "type": "string",
              "enum": [
                "Success"
              ]
            },
            "value": {
              "type": "number"
            }
          },
          "additionalProperties": false
        }
      ],
      "title": "ExitEncoded<number, string, Defect>"
    }
    */
    
  • #​4775 570e45f Thanks @​gcanti! - JSONSchema: preserve original key name when using fromKey followed by annotations, closes #​4774.

    Before:

    import { JSONSchema, Schema } from "effect"
    
    const schema = Schema.Struct({
      a: Schema.propertySignature(Schema.String)
        .pipe(Schema.fromKey("b"))
        .annotations({})
    })
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "required": [
        "a"
      ],
      "properties": {
        "a": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
    */
    

    After:

    import { JSONSchema, Schema } from "effect"
    
    const schema = Schema.Struct({
      a: Schema.propertySignature(Schema.String)
        .pipe(Schema.fromKey("b"))
        .annotations({})
    })
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "required": [
        "b"
      ],
      "properties": {
        "b": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
    */
    

Configuration

📅 Schedule: Branch creation - "after 6am and before 6pm" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@sonarqubecloud
Copy link

@jpb06 jpb06 changed the title chore(deps): update dependency effect to v3.14.13 fix(deps): update dependency effect to v3.14.13 Apr 23, 2025
@jpb06 jpb06 merged commit 841b544 into main Apr 23, 2025
5 checks passed
@jpb06 jpb06 deleted the renovate/effect-3.x branch April 23, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant