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 driver adapters directory (minor) #4843

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 27, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@cloudflare/workers-types 4.20240405.0 -> 4.20240919.0 age adoption passing confidence
@effect/schema (source) 0.64.20 -> 0.73.4 age adoption passing confidence
@types/node (source) 20.12.7 -> 20.16.5 age adoption passing confidence
esbuild 0.20.2 -> 0.24.0 age adoption passing confidence
ts-pattern 5.1.1 -> 5.3.1 age adoption passing confidence
tsup (source) 8.0.2 -> 8.3.0 age adoption passing confidence
tsx (source) 4.7.2 -> 4.19.1 age adoption passing confidence
typescript (source) 5.4.5 -> 5.6.2 age adoption passing confidence
undici (source) 6.13.0 -> 6.19.8 age adoption passing confidence
wrangler (source) 3.50.0 -> 3.78.7 age adoption passing confidence

Release Notes

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

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.73.4

Compare Source

Patch Changes

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 "@​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

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

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

v0.71.3

Compare Source

Patch Changes

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 "@​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]:

v0.70.4

Compare Source

Patch Changes

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]:

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 "@​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, f566fd1]:

v0.69.2

Compare Source

Patch Changes

v0.69.1

Compare Source

Patch Changes

v0.69.0

Compare Source

Minor Changes
  • #​3227 20807a4 Thanks @​gcanti! - ## Codemod

    For some of the breking changes, a code-mod has been released to make migration as easy as possible.

    You can run it by executing:

    npx @&#8203;effect/codemod schema-0.69 src/**/*

    It might not be perfect - if you encounter issues, let us know! Also make sure you commit any changes before running it, in case you need to revert anything.

v0.68.27

Compare Source

Patch Changes

v0.68.26

Compare Source

Patch Changes
  • #​3287 f0285d3 Thanks @​gcanti! - JSON Schema: change default behavior for property signatures containing undefined

    Changed the default behavior when encountering a required property signature whose type contains undefined. Instead of raising an exception, undefined is now pruned and the field is set as optional.

    Before

    import { JSONSchema, Schema } from "@&#8203;effect/schema";
    
    const schema = Schema.Struct({
      a: Schema.NullishOr(Schema.Number),
    });
    
    const jsonSchema = JSONSchema.make(schema);
    console.log(JSON.stringify(jsonSchema, null, 2));
    /*
    throws
    Error: Missing annotation
    at path: ["a"]
    details: Generating a JSON Schema for this schema requires a "jsonSchema" annotation
    schema (UndefinedKeyword): undefined
    */

    Now

    import { JSONSchema, Schema } from "@&#8203;effect/schema";
    
    const schema = Schema.Struct({
      a: Schema.NullishOr(Schema.Number),
    });
    
    const jsonSchema = JSONSchema.make(schema);
    console.log(JSON.stringify(jsonSchema, null, 2));
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "required": [], // <=== empty
      "properties": {
        "a": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "$ref": "#/$defs/null"
            }
          ]
        }
      },
      "additionalProperties": false,
      "$defs": {
        "null": {
          "const": null
        }
      }
    }
    */
  • #​3291 8ec4955 Thanks @​gcanti! - remove type-level error message from optional signature, closes #​3290

    This fix eliminates the type-level error message from the optional function signature, which was causing issues in generic contexts.

  • #​3284 3ac2d76 Thanks @​gcanti! - Fix: Correct Handling of JSON Schema Annotations in Refinements

    Fixes an issue where the JSON schema annotation set by a refinement after a transformation was mistakenly interpreted as an override annotation. This caused the output to be incorrect, as the annotations were not applied as intended.

    Before

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

    Now

    import { JSONSchema, Schema } from "@&#8203;effect/schema";
    
    const schema = Schema.Trim.pipe(Schema.nonEmpty());
    
    const jsonSchema = JSONSchema.make(schema);
    console.log(JSON.stringify(jsonSchema, null, 2));
    /*
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "string"
    }
    */
  • Updated dependencies [cc327a1, 4bfe4fb, 2b14d18]:

v0.68.25

Compare Source

Patch Changes

v0.68.24

Compare Source

Patch Changes

v0.68.23

Compare Source

Patch Changes

v0.68.22

Compare Source

Patch Changes

v0.68.21

Compare Source

Patch Changes

v0.68.20

Compare Source

Patch Changes

v0.68.19

Compare Source

Patch Changes

v0.68.18

Compare Source

Patch Changes
  • #​3192 5d5cc6c Thanks @​KhraksMamtsov! - Support Capitalize Uncapitalize filters and schemas

  • #​3148 359ff8a Thanks @​gcanti! - add Serializable.Serializable.Type and Serializable.Serializable.Encoded

  • #​3198 f7534b9 Thanks @​gcanti! - Add toString to AST.PropertySignature and AST.IndexSignature and fix type display for IndexSignature.

    Before the Change

    Previously, when a type mismatch occurred in Schema.decodeUnknownSync, the error message displayed for IndexSignature was not accurately representing the type used. For example:

    import { Schema } from "@&#8203;effect/schema";
    
    const schema = Schema.Record(Schema.Char, Schema.String);
    
    Schema.decodeUnknownSync(schema)({ a: 1 });
    /*
    throws
    ParseError: { readonly [x: string]: string }
    └─ ["a"]
       └─ Expected string, actual 1
    */

    This output incorrectly indicated [x: string] when the actual index type was Char.

    After the Change

    The toString implementation now correctly reflects the type used in IndexSignature, providing more accurate and informative error messages:

    import { Schema } from "@&#8203;effect/schema";
    
    const schema = Schema.Record(Schema.Char, Schema.String);
    
    Schema.decodeUnknownSync(schema)({ a: 1 });
    /*
    throws
    ParseError: { readonly [x: Char]: string }
    └─ ["a"]
       └─ Expected string, actual 1
    */

    The updated output now correctly displays { readonly [x: Char]: string }, aligning the error messages with the actual data types used in the schema.

  • Updated dependencies [a435e0f, b5554db, a9c4fb3]:

v0.68.17

Compare Source

Patch Changes
  • #​3166 15967cf Thanks @​gcanti! - Add filterEffect API, closes #​3165

    The filterEffect function enhances the filter functionality by allowing the integration of effects, t


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 April 27, 2024 00:34
@renovate renovate bot requested review from Weakky and removed request for a team April 27, 2024 00:34
Copy link
Contributor

github-actions bot commented Apr 27, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.708MiB 2.708MiB 0.000B
Postgres (gzip) 1.036MiB 1.036MiB -2.000B
Mysql 2.035MiB 2.035MiB 0.000B
Mysql (gzip) 812.542KiB 812.539KiB 3.000B
Sqlite 1.928MiB 1.928MiB 0.000B
Sqlite (gzip) 770.436KiB 770.435KiB 1.000B

Copy link

codspeed-hq bot commented Apr 27, 2024

CodSpeed Performance Report

Merging #4843 will not alter performance

Comparing renovate/driver-adapters-directory (49b4701) with main (031f4d3)

Summary

✅ 11 untouched benchmarks

@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 3 times, most recently from e4212fb to c2ec744 Compare May 4, 2024 10:17
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 3 times, most recently from abeac44 to 643a2d0 Compare May 11, 2024 16:40
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 6 times, most recently from f99c786 to 88278b1 Compare May 25, 2024 01:55
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 3 times, most recently from 6ab5024 to ddf81f6 Compare June 1, 2024 04:31
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 2 times, most recently from d609578 to 9a831ee Compare June 9, 2024 23:00
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 8 times, most recently from 5833286 to b92a7e9 Compare June 22, 2024 01:38
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 4 times, most recently from 71fd82e to 62d0844 Compare July 6, 2024 00:22
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 5 times, most recently from 9276070 to 35f36cf Compare July 13, 2024 01:49
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 2 times, most recently from 2881533 to 129874b Compare July 27, 2024 00:14
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 2 times, most recently from 628cfbc to 66fe404 Compare August 3, 2024 00:21
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 2 times, most recently from 650751b to 8f764df Compare August 10, 2024 01:25
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 3 times, most recently from cfa1e38 to 0a42437 Compare August 18, 2024 23:01
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 2 times, most recently from 8d30e02 to 89c8b11 Compare August 25, 2024 10:08
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 2 times, most recently from 702cc88 to e46c684 Compare August 31, 2024 19:17
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 3 times, most recently from 8e0243f to 9064ec6 Compare September 14, 2024 01:20
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch 2 times, most recently from d668b49 to e803304 Compare September 21, 2024 00:07
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch from e803304 to 26588b6 Compare September 28, 2024 01:21
@renovate renovate bot force-pushed the renovate/driver-adapters-directory branch from 26588b6 to 49b4701 Compare September 29, 2024 03:08
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