Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 25, 2025

This PR contains the following updates:

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

Release Notes

Effect-TS/effect (effect)

v3.14.2

Compare Source

Patch Changes
  • #​4646 f87991b Thanks @​gcanti! - SchemaAST: add missing getSchemaIdAnnotation API

  • #​4646 f87991b Thanks @​gcanti! - Arbitrary: fix bug where annotations were ignored.

    Before

    import { Arbitrary, Schema } from "effect"
    
    const schema = Schema.Int.annotations({
      arbitrary: (_, ctx) => (fc) => {
        console.log("context: ", ctx)
        return fc.integer()
      }
    }).pipe(Schema.greaterThan(0), Schema.lessThan(10))
    
    Arbitrary.make(schema)
    // No output ❌

    After

    import { Arbitrary, Schema } from "effect"
    
    const schema = Schema.Int.annotations({
      arbitrary: (_, ctx) => (fc) => {
        console.log("context: ", ctx)
        return fc.integer()
      }
    }).pipe(Schema.greaterThan(0), Schema.lessThan(10))
    
    Arbitrary.make(schema)
    /*
    context:  {
      maxDepth: 2,
      constraints: {
        _tag: 'NumberConstraints',
        constraints: { min: 0, minExcluded: true, max: 10, maxExcluded: true },
        isInteger: true
      }
    }
    */
  • #​4648 0a3e3e1 Thanks @​gcanti! - Schema: standardSchemaV1 now includes the schema, closes #​4494.

    This update fixes an issue where passing Schema.standardSchemaV1(...) directly to JSONSchema.make would throw a TypeError. The schema was missing from the returned object, causing the JSON schema generation to fail.

    Now standardSchemaV1 includes the schema itself, so it can be used with JSONSchema.make without issues.

    Example

    import { JSONSchema, Schema } from "effect"
    
    const Person = Schema.Struct({
      name: Schema.optionalWith(Schema.NonEmptyString, { exact: true })
    })
    
    const standardSchema = Schema.standardSchemaV1(Person)
    
    console.log(JSONSchema.make(standardSchema))
    /*
    {
      '$schema': 'http://json-schema.org/draft-07/schema#',
      '$defs': {
        NonEmptyString: {
          type: 'string',
          description: 'a non empty string',
          title: 'nonEmptyString',
          minLength: 1
        }
      },
      type: 'object',
      required: [],
      properties: { name: { '$ref': '#/$defs/NonEmptyString' } },
      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.2 fix(deps): update dependency effect to v3.14.2 Mar 25, 2025
@jpb06 jpb06 merged commit fa30038 into main Mar 25, 2025
5 checks passed
@jpb06 jpb06 deleted the renovate/effect-3.x branch March 25, 2025 17:49
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