Skip to content

Update Effect-ts

Renovate Bot requested to merge renovate/effect-ts into main

This MR contains the following updates:

Package Type Update Change
@effect/cli (source) devDependencies patch 0.56.6 -> 0.56.7
@effect/experimental (source) peerDependencies patch 0.41.6 -> 0.41.7
@effect/experimental (source) devDependencies patch 0.41.6 -> 0.41.7
@effect/platform (source) peerDependencies patch 0.77.6 -> 0.77.7
@effect/platform (source) devDependencies patch 0.77.6 -> 0.77.7
@effect/platform-node (source) peerDependencies patch 0.73.6 -> 0.73.7
@effect/platform-node (source) devDependencies patch 0.73.6 -> 0.73.7
@effect/printer (source) devDependencies patch 0.41.6 -> 0.41.7
@effect/printer-ansi (source) devDependencies patch 0.41.6 -> 0.41.7
@effect/typeclass (source) devDependencies patch 0.32.6 -> 0.32.7
@effect/vitest (source) devDependencies patch 0.19.4 -> 0.19.5
effect (source) peerDependencies patch 3.13.6 -> 3.13.7
effect (source) devDependencies patch 3.13.6 -> 3.13.7

Release Notes

Effect-TS/effect (@​effect/cli)

v0.56.7

Compare Source

Patch Changes
Effect-TS/effect (@​effect/experimental)

v0.41.7

Compare Source

Patch Changes
Effect-TS/effect (@​effect/platform)

v0.77.7

Compare Source

Patch Changes
  • #​4540 840cc73 Thanks @​gcanti! - Add additionalPropertiesStrategy option to OpenApi.fromApi, closes #​4531.

    This update introduces the additionalPropertiesStrategy option in OpenApi.fromApi, allowing control over how additional properties are handled in the generated OpenAPI schema.

    • When "strict" (default), additional properties are disallowed ("additionalProperties": false).
    • When "allow", additional properties are allowed ("additionalProperties": true), making APIs more flexible.

    The additionalPropertiesStrategy option has also been added to:

    • JSONSchema.fromAST
    • OpenApiJsonSchema.makeWithDefs

    Example

    import {
      HttpApi,
      HttpApiEndpoint,
      HttpApiGroup,
      OpenApi
    } from "@​effect/platform"
    import { Schema } from "effect"
    
    const api = HttpApi.make("api").add(
      HttpApiGroup.make("group").add(
        HttpApiEndpoint.get("get", "/").addSuccess(
          Schema.Struct({ a: Schema.String })
        )
      )
    )
    
    const schema = OpenApi.fromApi(api, {
      additionalPropertiesStrategy: "allow"
    })
    
    console.log(JSON.stringify(schema, null, 2))
    /*
    {
      "openapi": "3.1.0",
      "info": {
        "title": "Api",
        "version": "0.0.1"
      },
      "paths": {
        "/": {
          "get": {
            "tags": [
              "group"
            ],
            "operationId": "group.get",
            "parameters": [],
            "security": [],
            "responses": {
              "200": {
                "description": "Success",
                "content": {
                  "application/json": {
                    "schema": {
                      "type": "object",
                      "required": [
                        "a"
                      ],
                      "properties": {
                        "a": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  }
                }
              },
              "400": {
                "description": "The request did not match the expected schema",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "components": {
        "schemas": {
          "HttpApiDecodeError": {
            "type": "object",
            "required": [
              "issues",
              "message",
              "_tag"
            ],
            "properties": {
              "issues": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Issue"
                }
              },
              "message": {
                "type": "string"
              },
              "_tag": {
                "type": "string",
                "enum": [
                  "HttpApiDecodeError"
                ]
              }
            },
            "additionalProperties": true,
            "description": "The request did not match the expected schema"
          },
          "Issue": {
            "type": "object",
            "required": [
              "_tag",
              "path",
              "message"
            ],
            "properties": {
              "_tag": {
                "type": "string",
                "enum": [
                  "Pointer",
                  "Unexpected",
                  "Missing",
                  "Composite",
                  "Refinement",
                  "Transformation",
                  "Type",
                  "Forbidden"
                ],
                "description": "The tag identifying the type of parse issue"
              },
              "path": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PropertyKey"
                },
                "description": "The path to the property where the issue occurred"
              },
              "message": {
                "type": "string",
                "description": "A descriptive message explaining the issue"
              }
            },
            "additionalProperties": true,
            "description": "Represents an error encountered while parsing a value to match the schema"
          },
          "PropertyKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "required": [
                  "_tag",
                  "key"
                ],
                "properties": {
                  "_tag": {
                    "type": "string",
                    "enum": [
                      "symbol"
                    ]
                  },
                  "key": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "description": "an object to be decoded into a globally shared symbol"
              }
            ]
          }
        },
        "securitySchemes": {}
      },
      "security": [],
      "tags": [
        {
          "name": "group"
        }
      ]
    }
    */
  • #​4541 9bf8a74 Thanks @​fubhy! - Disallowed excess properties for various function options

  • #​4559 f910880 Thanks @​tim-smart! - add additional properties options to HttpApiBuilder.middlewareOpenApi

  • #​4493 0d01480 Thanks @​leonitousconforti! - FetchHttpClient merge headers from request and requestInit

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:

    • effect@3.13.7
Effect-TS/effect (@​effect/platform-node)

v0.73.7

Compare Source

Patch Changes
Effect-TS/effect (@​effect/printer)

v0.41.7

Compare Source

Patch Changes
Effect-TS/effect (@​effect/printer-ansi)

v0.41.7

Compare Source

Patch Changes
Effect-TS/effect (@​effect/typeclass)

v0.32.7

Compare Source

Patch Changes
Effect-TS/effect (@​effect/vitest)

v0.19.5

Compare Source

Patch Changes
Effect-TS/effect (effect)

v3.13.7

Compare Source

Patch Changes
  • #​4540 840cc73 Thanks @​gcanti! - Add additionalPropertiesStrategy option to OpenApi.fromApi, closes #​4531.

    This update introduces the additionalPropertiesStrategy option in OpenApi.fromApi, allowing control over how additional properties are handled in the generated OpenAPI schema.

    • When "strict" (default), additional properties are disallowed ("additionalProperties": false).
    • When "allow", additional properties are allowed ("additionalProperties": true), making APIs more flexible.

    The additionalPropertiesStrategy option has also been added to:

    • JSONSchema.fromAST
    • OpenApiJsonSchema.makeWithDefs

    Example

    import {
      HttpApi,
      HttpApiEndpoint,
      HttpApiGroup,
      OpenApi
    } from "@​effect/platform"
    import { Schema } from "effect"
    
    const api = HttpApi.make("api").add(
      HttpApiGroup.make("group").add(
        HttpApiEndpoint.get("get", "/").addSuccess(
          Schema.Struct({ a: Schema.String })
        )
      )
    )
    
    const schema = OpenApi.fromApi(api, {
      additionalPropertiesStrategy: "allow"
    })
    
    console.log(JSON.stringify(schema, null, 2))
    /*
    {
      "openapi": "3.1.0",
      "info": {
        "title": "Api",
        "version": "0.0.1"
      },
      "paths": {
        "/": {
          "get": {
            "tags": [
              "group"
            ],
            "operationId": "group.get",
            "parameters": [],
            "security": [],
            "responses": {
              "200": {
                "description": "Success",
                "content": {
                  "application/json": {
                    "schema": {
                      "type": "object",
                      "required": [
                        "a"
                      ],
                      "properties": {
                        "a": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  }
                }
              },
              "400": {
                "description": "The request did not match the expected schema",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "components": {
        "schemas": {
          "HttpApiDecodeError": {
            "type": "object",
            "required": [
              "issues",
              "message",
              "_tag"
            ],
            "properties": {
              "issues": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Issue"
                }
              },
              "message": {
                "type": "string"
              },
              "_tag": {
                "type": "string",
                "enum": [
                  "HttpApiDecodeError"
                ]
              }
            },
            "additionalProperties": true,
            "description": "The request did not match the expected schema"
          },
          "Issue": {
            "type": "object",
            "required": [
              "_tag",
              "path",
              "message"
            ],
            "properties": {
              "_tag": {
                "type": "string",
                "enum": [
                  "Pointer",
                  "Unexpected",
                  "Missing",
                  "Composite",
                  "Refinement",
                  "Transformation",
                  "Type",
                  "Forbidden"
                ],
                "description": "The tag identifying the type of parse issue"
              },
              "path": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PropertyKey"
                },
                "description": "The path to the property where the issue occurred"
              },
              "message": {
                "type": "string",
                "description": "A descriptive message explaining the issue"
              }
            },
            "additionalProperties": true,
            "description": "Represents an error encountered while parsing a value to match the schema"
          },
          "PropertyKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "required": [
                  "_tag",
                  "key"
                ],
                "properties": {
                  "_tag": {
                    "type": "string",
                    "enum": [
                      "symbol"
                    ]
                  },
                  "key": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "description": "an object to be decoded into a globally shared symbol"
              }
            ]
          }
        },
        "securitySchemes": {}
      },
      "security": [],
      "tags": [
        {
          "name": "group"
        }
      ]
    }
    */
  • #​4541 9bf8a74 Thanks @​fubhy! - Disallowed excess properties for various function options

  • #​4554 87ba23c Thanks @​gcanti! - ConfigProvider: fromEnv: add missing Partial modifier.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

♻️ Rebasing: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This MR will be recreated if closed unmerged. Get config help if that's undesired.


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

This MR has been generated by Renovate Bot.

Merge request reports

Loading