Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency effect to v3.12.0 #3165

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 23, 2024

This PR contains the following updates:

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

Release Notes

Effect-TS/effect (effect)

v3.12.0

Compare Source

Minor Changes
Patch Changes

v3.11.10

Compare Source

Patch Changes
  • #​4176 39457d4 Thanks @​mikearnaldi! - Fix Stream.scoped example

  • #​4181 a475cc2 Thanks @​gcanti! - Schema: Fix withDecodingDefault implementation to align with its signature (now removes undefined from the AST).

    Additionally, a new constraint has been added to the signature to prevent calling withDecodingDefault after withConstructorDefault, which previously led to the following issue:

    import { Schema } from "effect"
    
    const schema = Schema.Struct({
      a: Schema.optional(Schema.String).pipe(
        Schema.withConstructorDefault(() => undefined), // this is invalidated by the following call to `withDecodingDefault`
        Schema.withDecodingDefault(() => "")
      )
    })
  • #​4175 199214e Thanks @​gcanti! - Schema: refactor annotations:

    • Export internal Uint8 schema

    • Export internal NonNegativeInt schema

    • Remove title annotations that are identical to identifiers

    • Avoid setting a title annotation when applying branding

    • Add more title annotations to refinements

    • Improve toString output and provide more precise error messages for refinements:

      Before

      import { Schema } from "effect"
      
      const schema = Schema.Number.pipe(
        Schema.int({ identifier: "MyInt" }),
        Schema.positive()
      )
      
      console.log(String(schema))
      // Output: a positive number
      
      Schema.decodeUnknownSync(schema)(1.1)
      /*
      throws:
      ParseError: a positive number
      └─ From side refinement failure
        └─ MyInt
            └─ Predicate refinement failure
              └─ Expected MyInt, actual 1.1
      */

      After

      • toString now combines all refinements with " & " instead of showing only the last one.
      • The last message ("Expected ...") now uses the extended description to make the error message clearer.
      import { Schema } from "effect"
      
      const schema = Schema.Number.pipe(
        Schema.int({ identifier: "MyInt" }),
        Schema.positive()
      )
      
      console.log(String(schema))
      // Output: MyInt & positive // <= all the refinements
      
      Schema.decodeUnknownSync(schema)(1.1)
      /*
      throws:
      ParseError: MyInt & positive
      └─ From side refinement failure
        └─ MyInt
            └─ Predicate refinement failure
              └─ Expected an integer, actual 1.1 // <= extended description
      */
  • #​4182 b3c160d Thanks @​mikearnaldi! - Replace absolute imports with relative ones

v3.11.9

Compare Source

Patch Changes
  • #​4113 1c08a0b Thanks @​thewilkybarkid! - Schema: Support template literals in Schema.Config.

    Example

    import { Schema } from "effect"
    
    // const config: Config<`a${string}`>
    const config = Schema.Config(
      "A",
      Schema.TemplateLiteral(Schema.Literal("a"), Schema.String)
    )
  • #​4174 1ce703b Thanks @​gcanti! - Schema: Add support for TemplateLiteral parameters in TemplateLiteral, closes #​4166.

    This update also adds support for TemplateLiteral and TemplateLiteralParser parameters in TemplateLiteralParser.

    Before

    import { Schema } from "effect"
    
    const schema = Schema.TemplateLiteralParser(
      "<",
      Schema.TemplateLiteralParser("h", Schema.Literal(1, 2)),
      ">"
    )
    /*
    throws:
    Error: Unsupported template literal span
    schema (TemplateLiteral): `h${"1" | "2"}`
    */

    After

    import { Schema } from "effect"
    
    // Schema<readonly ["<", readonly ["h", 2 | 1], ">"], "<h2>" | "<h1>", never>
    const schema = Schema.TemplateLiteralParser(
      "<",
      Schema.TemplateLiteralParser("h", Schema.Literal(1, 2)),
      ">"
    )
    
    console.log(Schema.decodeUnknownSync(schema)("<h1>"))
    // Output: [ '<', [ 'h', 1 ], '>' ]
  • #​4174 1ce703b Thanks @​gcanti! - Schema: Fix bug in TemplateLiteralParser where unions of numeric literals were not coerced correctly.

    Before

    import { Schema } from "effect"
    
    const schema = Schema.TemplateLiteralParser("a", Schema.Literal(1, 2))
    
    console.log(Schema.decodeUnknownSync(schema)("a1"))
    /*
    throws:
    ParseError: (`a${"1" | "2"}` <-> readonly ["a", 1 | 2])
    └─ Type side transformation failure
       └─ readonly ["a", 1 | 2]
          └─ [1]
             └─ 1 | 2
                ├─ Expected 1, actual "1"
                └─ Expected 2, actual "1"
    */

    After

    import { Schema } from "effect"
    
    const schema = Schema.TemplateLiteralParser("a", Schema.Literal(1, 2))
    
    console.log(Schema.decodeUnknownSync(schema)("a1"))
    // Output: [ 'a', 1 ]
    
    console.log(Schema.decodeUnknownSync(schema)("a2"))
    // Output: [ 'a', 2 ]
    
    console.log(Schema.decodeUnknownSync(schema)("a3"))
    /*
    throws:
    ParseError: (`a${"1" | "2"}` <-> readonly ["a", 1 | 2])
    └─ Encoded side transformation failure
       └─ Expected `a${"1" | "2"}`, actual "a3"
    */

v3.11.8

Compare Source

Patch Changes

Configuration

📅 Schedule: Branch creation - "* 0-3 * * 1" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.

Copy link

vercel bot commented Dec 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ark-docs ✅ Ready (Inspect) Visit Preview Dec 23, 2024 2:07am

Copy link

pkg-pr-new bot commented Dec 23, 2024

Open in Stackblitz

npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/react@3165
npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/solid@3165
npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/svelte@3165
npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/vue@3165

commit: 4c0d2eb

@renovate renovate bot merged commit 7d769aa into main Dec 23, 2024
9 checks passed
@renovate renovate bot deleted the renovate/effect-3.x branch December 23, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants