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

fix(deps): update driver adapters directory (minor) #5071

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 1, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@cloudflare/workers-types 4.20240405.0 -> 4.20241205.0 age adoption passing confidence
@effect/schema (source) 0.64.20 -> 0.75.5 age adoption passing confidence
@types/node (source) 20.12.7 -> 20.17.10 age adoption passing confidence
esbuild 0.20.2 -> 0.24.0 age adoption passing confidence
ts-pattern 5.1.1 -> 5.5.0 age adoption passing confidence
tsup (source) 8.0.2 -> 8.3.5 age adoption passing confidence
tsx (source) 4.7.2 -> 4.19.2 age adoption passing confidence
typescript (source) 5.4.5 -> 5.7.2 age adoption passing confidence
undici (source) 6.13.0 -> 6.21.0 age adoption passing confidence
wrangler (source) 3.50.0 -> 3.95.0 age adoption passing confidence
ws 8.16.0 -> 8.18.0 age adoption passing confidence

Release Notes

cloudflare/workerd (@​cloudflare/workers-types)

v4.20241205.0

Compare Source

v4.20241202.0

Compare Source

v4.20241127.0

Compare Source

v4.20241112.0

Compare Source

v4.20241106.0

Compare Source

v4.20241022.0

Compare Source

v4.20241018.0

Compare Source

v4.20241011.0

Compare Source

v4.20241004.0

Compare Source

v4.20240925.0

Compare Source

v4.20240924.0

Compare Source

v4.20240919.0

Compare Source

v4.20240909.0

Compare Source

v4.20240903.0

Compare Source

v4.20240821.1

Compare Source

v4.20240815.0

Compare Source

v4.20240806.0

Compare Source

v4.20240729.0

Compare Source

v4.20240725.0

Compare Source

v4.20240722.0

Compare Source

v4.20240718.0

Compare Source

v4.20240712.0

Compare Source

v4.20240701.0

Compare Source

v4.20240620.0

Compare Source

v4.20240614.0

Compare Source

v4.20240605.0

Compare Source

v4.20240603.0

Compare Source

v4.20240529.0

Compare Source

v4.20240524.0

Compare Source

v4.20240512.0

Compare Source

v4.20240502.0

Compare Source

v4.20240423.0

Compare Source

v4.20240419.0

Compare Source

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

v0.75.5

Compare Source

Patch Changes
  • #​3792 382556f Thanks @​gcanti! - resolve parse error when using pick with union of class schemas, closes #​3751

  • #​3790 97cb014 Thanks @​gcanti! - Equivalence: Fixed a bug related to discriminated tuples.

    Example:

    The following equivalence check was incorrectly returning false:

    import * as E from "@​effect/schema/Equivalence"
    import * as S from "@​effect/schema/Schema"
    
    // Union of discriminated tuples
    const schema = S.Union(
      S.Tuple(S.Literal("a"), S.String),
      S.Tuple(S.Literal("b"), S.Number)
    )
    
    const equivalence = E.make(schema)
    
    console.log(equivalence(["a", "x"], ["a", "x"]))
    // false

v0.75.4

Compare Source

Patch Changes
  • Updated dependencies [61a99b2]:
    • effect@3.9.2

v0.75.3

Compare Source

Patch Changes
  • #​3761 360ec14 Thanks @​gcanti! - Allow Schema.Either to support Schema.Never without type errors, closes #​3755.

    • Updated the type parameters of format to extend Schema.All instead of Schema<A, I, R>.
    • Updated the type parameters of Schema.EitherFromSelf to extend Schema.All instead of Schema.Any.
    • Updated the type parameters of Schema.Either to extend Schema.All instead of Schema.Any.
    • Updated the type parameters of Schema.EitherFromUnion to extend Schema.All instead of Schema.Any.

v0.75.2

Compare Source

Patch Changes
  • #​3753 f02b354 Thanks @​gcanti! - Enhanced Error Reporting for Discriminated Union Tuple Schemas, closes #​3752

    Previously, irrelevant error messages were generated for each member of the union. Now, when a discriminator is present in the input, only the relevant member will trigger an error.

    Before

    import * as Schema from "@&#8203;effect/schema/Schema"
    
    const schema = Schema.Union(
      Schema.Tuple(Schema.Literal("a"), Schema.String),
      Schema.Tuple(Schema.Literal("b"), Schema.Number)
    ).annotations({ identifier: "MyUnion" })
    
    console.log(Schema.decodeUnknownSync(schema)(["a", 0]))
    /*
    throws:
    ParseError: MyUnion
    ├─ readonly ["a", string]
    │  └─ [1]
    │     └─ Expected string, actual 0
    └─ readonly ["b", number]
       └─ [0]
          └─ Expected "b", actual "a"
    */

    After

    import * as Schema from "@&#8203;effect/schema/Schema"
    
    const schema = Schema.Union(
      Schema.Tuple(Schema.Literal("a"), Schema.String),
      Schema.Tuple(Schema.Literal("b"), Schema.Number)
    ).annotations({ identifier: "MyUnion" })
    
    console.log(Schema.decodeUnknownSync(schema)(["a", 0]))
    /*
    throws:
    ParseError: MyUnion
    └─ readonly ["a", string]
       └─ [1]
          └─ Expected string, actual 0
    */

v0.75.1

Compare Source

Patch Changes

v0.75.0

Compare Source

Minor Changes
Patch Changes

v0.74.2

Compare Source

Patch Changes

v0.74.1

Compare Source

Patch Changes
  • #​3669 734eae6 Thanks @​gcanti! - Add description annotation to the encoded part of NumberFromString.

    Before

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.NumberFromString
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string"
    }
    */

    After

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.NumberFromString
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string",
      "description": "a string that will be parsed into a number"
    }
    */
  • #​3667 fd83d0e Thanks @​gcanti! - Remove default json schema annotations from string, number and boolean.

    Before

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.String.annotations({ examples: ["a", "b"] })
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string",
      "description": "a string",
      "title": "string",
      "examples": [
        "a",
        "b"
      ]
    }
    */

    After

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.String.annotations({ examples: ["a", "b"] })
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string",
      "examples": [
        "a",
        "b"
      ]
    }
    */
  • #​3673 ad7e1de Thanks @​gcanti! - Add more description annotations.

  • #​3672 090e41c Thanks @​gcanti! - JSON Schema: handle refinements where the 'from' part includes a transformation, closes #​3662

    Before

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.Date
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    throws
    Error: Missing annotation
    details: Generating a JSON Schema for this schema requires a "jsonSchema" annotation
    schema (Refinement): Date
    */

    After

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.Date
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string",
      "description": "a string that will be parsed into a Date"
    }
    */
  • #​3672 090e41c Thanks @​gcanti! - Add description annotation to the encoded part of DateFromString.

    Before

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.DateFromString
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string"
    }
    */

    After

    import { JSONSchema, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.DateFromString
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string",
      "description": "a string that will be parsed into a Date"
    }
    */
  • Updated dependencies [4509656]:

    • effect@3.8.4

v0.74.0

Compare Source

Minor Changes

v0.73.4

Compare Source

Patch Changes
  • Updated dependencies [bb5ec6b]:
    • effect@3.8.3

v0.73.3

Compare Source

Patch Changes
  • #​3635 e6440a7 Thanks @​gcanti! - Stable filters such as minItems, maxItems, and itemsCount now generate multiple errors when the 'errors' option is set to 'all', closes #​3633

    Example:

    import { ArrayFormatter, Schema } from "@&#8203;effect/schema"
    
    const schema = Schema.Struct({
      tags: Schema.Array(Schema.String.pipe(Schema.minLength(2))).pipe(
        Schema.minItems(3)
      )
    })
    
    const invalidData = { tags: ["AB", "B"] }
    
    const either = Schema.decodeUnknownEither(schema, { errors: "all" })(
      invalidData
    )
    if (either._tag === "Left") {
      console.log(ArrayFormatter.formatErrorSync(either.left))
      /*
      Output:
      [
        {
          _tag: 'Type',
          path: [ 'tags', 1 ],
          message: 'Expected a string at least 2 character(s) long, actual "B"'
        },
        {
          _tag: 'Type',
          path: [ 'tags' ],
          message: 'Expected an array of at least 3 items, actual ["AB","B"]'
        }
      ]
      */
    }

    Previously, only the issue related to the [ 'tags', 1 ] path was reported.

v0.73.2

Compare Source

Patch Changes
  • Updated dependencies [f0d8ef1]:
    • effect@3.8.2

v0.73.1

Compare Source

Patch Changes

v0.73.0

Compare Source

Minor Changes
  • #​3589 7fdf9d9 Thanks @​gcanti! - Updates the constraints for members within a union from the more restrictive Schema.Any to the more inclusive Schema.All, closes #​3587.

    Affected APIs include:

    • Schema.Union
    • Schema.UndefinedOr
    • Schema.NullOr
    • Schema.NullishOr
    • Schema.optional
    • AST.Union.make now retains duplicate members and no longer eliminates the neverKeyword.
Patch Changes

v0.72.4

Compare Source

Patch Changes
  • Updated dependencies [35a0f81]:
    • effect@3.7.3

v0.72.3

Compare Source

Patch Changes

v0.72.2

Compare Source

Patch Changes

v0.72.1

Compare Source

Patch Changes

v0.72.0

Compare Source

Patch Changes

v0.71.4

Compare Source

Patch Changes
  • Updated dependencies [e809286]:
    • effect@3.6.8

v0.71.3

Compare Source

Patch Changes
  • Updated dependencies [50ec889]:
    • effect@3.6.7

v0.71.2

Compare Source

Patch Changes

v0.71.1

Compare Source

Patch Changes

v0.71.0

Compare Source

Minor Changes
  • #​3433 c1987e2 Thanks @​gcanti! - Make json schema output more compatible with Open AI structured output, closes #​3432.

    JSONSchema

    • remove oneOf in favour of anyOf (e.g. in JsonSchema7object, JsonSchema7empty, JsonSchema7Enums)
    • remove const in favour of enum (e.g. in JsonSchema7Enums)
    • remove JsonSchema7Const type
    • remove JsonSchema7OneOf type

    AST

    • remove identifier annotation from Schema.Null
    • remove identifier annotation from Schema.Object
Patch Changes
  • #​3448 1ceed14 Thanks @​tim-smart! - add Schema.ArrayEnsure & Schema.NonEmptyArrayEnsure

    These schemas can be used to ensure that a value is an array, from a value that may be an array or a single value.

    import { Schema } from "@&#8203;effect/schema";
    
    const schema = Schema.ArrayEnsure(Schema.String);
    
    Schema.decodeUnknownSync(schema)("hello");
    // => ["hello"]
    
    Schema.decodeUnknownSync(schema)(["a", "b", "c"]);
    // => ["a", "b", "c"]
  • #​3450 0e42a8f Thanks @​tim-smart! - update dependencies

  • Updated dependencies [8295281, c940df6, 00b6c6d, f8d95a6]:

    • effect@3.6.4

v0.70.4

Compare Source

Patch Changes
  • Updated dependencies [04adcac]:
    • effect@3.6.3

v0.70.3

Compare Source

Patch Changes
  • #​3430 99ad841 Thanks @​gcanti! - Fix return types for attachPropertySignature function.

    This commit addresses an inconsistency in the return types between the curried and non-curried versions of the attachPropertySignature function. Previously, the curried version returned a Schema, while the non-curried version returned a SchemaClass.

  • Updated dependencies [fd4b2f6]:

    • effect@3.6.2

v0.70.2

Compare Source

Patch Changes

v0.70.1

Compare Source

Patch Changes
  • #​3347 3dce357 Thanks @​gcanti! - Enhanced Parsing with TemplateLiteralParser, closes #​3307

    In this update we've introduced a sophisticated API for more refined string parsing: TemplateLiteralParser. This enhancement stems from recognizing limitations in the Schema.TemplateLiteral and Schema.pattern functionalities, which effectively validate string formats without extracting structured data.

    Overview of Existing Limitations

    The Schema.TemplateLiteral function, while useful as a simple validator, only verifies that an input conforms to a specific string pattern by converting template literal definitions into regular expressions. Similarly, Schema.pattern employs regular expressions directly for the same purpose. Post-validation, both methods require additional manual parsing to convert the validated string into a usable data format.

    Introducing TemplateLiteralParser

    To address these limitations and eliminate the need for manual post-validation parsing, the new TemplateLiteralParser API has been developed. It not only validates the input format but also automatically parses it into a more structured and type-safe output, specifically into a tuple format.

    This new approach enhances developer productivity by reducing boilerplate code and simplifying the process of working with complex string inputs.

    Example (string based schemas)

    import { Schema } from "@&#8203;effect/schema";
    
    // const schema: Schema.Schema<readonly [number, "a", string], `${string}a${string}`, never>
    const schema = Schema.TemplateLiteralParser(
      Schema.NumberFromString,
      "a",
      Schema.NonEmptyString,
    );
    
    console.log(Schema.decodeEither(schema)("100ab"));
    // { _id: 'Either', _tag: 'Right', right: [ 100, 'a', 'b' ] }
    
    console.log(Schema.encode(schema)([100, "a", "b"]));
    // { _id: 'Either', _tag: 'Right', right: '100ab' }

    Example (number based schemas)

    import { Schema } from "@&#8203;effect/schema";
    
    // const schema: Schema.Schema<readonly [number, "a"], `${number}a`, never>
    const schema = Schema.TemplateLiteralParser(Schema.Int, "a");
    
    console.log(Schema.decodeEither(schema)("1a"));
    // { _id: 'Either', _tag: 'Right', right: [ 1, 'a' ] }
    
    console.log(Schema.encode(schema)([1, "a"]));
    // { _id: 'Either', _tag: 'Right', right: '1a' }
  • #​3346 657fc48 Thanks @​gcanti! - Implement DecodingFallbackAnnotation to manage decoding errors.

    export type DecodingFallbackAnnotation<A> = (
      issue: ParseIssue,
    ) => Effect<A, ParseIssue>;

    This update introduces a decodingFallback annotation, enabling custom handling of decoding failures in schemas. This feature allows developers to specify fallback behaviors when decoding operations encounter issues.

    Example

    import { Schema } from "@&#8203;effect/schema";
    import { Effect, Either } from "effect";
    
    // Basic Fallback
    
    const schema = Schema.String.annotations({
      decodingFallback: () => Either.right("<fallback>"),
    });
    
    console.log(Schema.decodeUnknownSync(schema)("valid input")); // Output: valid input
    console.log(Schema.decodeUnknownSync(schema)(null)); // Output: <fallback value>
    
    // Advanced Fallback with Logging
    
    const schemaWithLog = Schema.String.annotations({
      decodingFallback: (issue) =>
        Effect.gen(function* () {
          yield* Effect.log(issue._tag);
          yield* Effect.sleep(10);
          return yield* Effect.succeed("<fallback2>");
        }),
    });
    
    Effect.runPromise(Schema.decodeUnknown(schemaWithLog)(null)).then(
      console.log,
    );
    /*
    Output:
    timestamp=2024-07-25T13:22:37.706Z level=INFO fiber=#&#8203;0 message=Type
    <fallback2>
    */

v0.70.0

Compare Source

Patch Changes

v0.69.3

Compare Source

Patch Changes
  • #​3359 7c0da50 Thanks @​gcanti! - Add Context field to Schema interface, closes #​3356

  • #​3363 2fc0ff4 Thanks @​gcanti! - export isPropertySignature guard

  • #​3357 f262665 Thanks @​gcanti! - Improve annotation retrieval from Class APIs, closes #​3348.

    Previously, accessing annotations such as identifier and title required explicit casting of the ast field to AST.Transformation.
    This update refines the type definitions to reflect that ast is always an AST.Transformation, eliminating the need for casting and simplifying client code.

    import { AST, Schema } from "@&#8203;effect/schema";
    
    class Person extends Schema.Class<Person>("Person")(
      {
        name: Schema.String,
        age: Schema.Number,
      },
      { description: "my description" },
    ) {}
    
    console.log(AST.getDescriptionAnnotation(Person.ast.to));
    // { _id: 'Option', _tag: 'Some', value: 'my description' }
  • #​3343 9bbe7a6 Thanks @​gcanti! - - add NonEmptyTrimmedString

    Example

    import { Schema } from "@&#8203;effect/schema";
    
    console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)("")); // Option.none()
    console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)(" a ")); // Option.none()
    console.log(Schema.decodeOption(Schema.NonEmptyTrimmedString)("a")); // Option.some("a")
    • add OptionFromNonEmptyTrimmedString, closes #​3335

      Example

      import { Schema } from "@&#8203;effect/schema";
      
      console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)("")); // Option.none()
      console.log(
        Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)(" a "),
      ); // Option.some("a")
      console.log(Schema.decodeSync(Schema.OptionFromNonEmptyTrimmedString)("a")); // Option.some("a")
  • Updated dependencies [6359644, [7f41e42](https://redirect


Configuration

📅 Schedule: Branch creation - "every weekend" (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.

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


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

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

@renovate renovate bot requested a review from a team as a code owner December 1, 2024 21:22
@renovate renovate bot requested review from jacek-prisma and removed request for a team December 1, 2024 21:22
Copy link
Contributor

github-actions bot commented Dec 1, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.084MiB 2.084MiB 0.000B
Postgres (gzip) 837.766KiB 837.766KiB 0.000B
Mysql 2.049MiB 2.049MiB 0.000B
Mysql (gzip) 824.669KiB 824.670KiB -1.000B
Sqlite 1.962MiB 1.962MiB 0.000B
Sqlite (gzip) 788.647KiB 788.648KiB -1.000B

Copy link

codspeed-hq bot commented Dec 1, 2024

CodSpeed Performance Report

Merging #5071 will not alter performance

Comparing renovate/driver-adapters-directory (073d41b) with main (cc0167b)

Summary

✅ 11 untouched benchmarks

@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch from 17ce574 to 421f7ec Compare December 7, 2024 00:46
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch from 421f7ec to 4362f15 Compare December 14, 2024 01:48
@renovate renovate bot changed the title chore(deps): update driver adapters directory (minor) fix(deps): update driver adapters directory (minor) Dec 14, 2024
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch from 4362f15 to 073d41b Compare December 21, 2024 01:30
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.

0 participants