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

Version Packages #4322

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

Version Packages #4322

wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 22, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

[email protected]

Patch Changes

  • #4341 766113c Thanks @fubhy! - Improve Duration.decode Handling of High-Resolution Time

    • Ensured Immutability: Added the readonly modifier to [seconds: number, nanos: number] in DurationInput to prevent accidental modifications.
    • Better Edge Case Handling: Now correctly processes special values like -Infinity and NaN when they appear in the tuple representation of duration.
  • #4333 712277f Thanks @gcanti! - Cron: unsafeParse now throws a more informative error instead of a generic one

  • #4351 430c846 Thanks @tim-smart! - fix Layer.scope types to correctly use the Scope tag identifier

  • #4344 7b03057 Thanks @IMax153! - Expose Schedule.isSchedule

  • #4313 a9c94c8 Thanks @gcanti! - Schema: Update Duration Encoding to a Tagged Union Format.

    This changeset fixes the Duration schema to support all possible duration types, including finite, infinite, and nanosecond durations. The encoding format has been updated from a tuple (readonly [seconds: number, nanos: number]) to a tagged union.

    This update introduces a change to the encoding format. The previous tuple representation is replaced with a more expressive tagged union, which accommodates all duration types:

    type DurationEncoded =
      | {
          readonly _tag: "Millis"
          readonly millis: number
        }
      | {
          readonly _tag: "Nanos"
          readonly nanos: string
        }
      | {
          readonly _tag: "Infinity"
        }

    Rationale

    The Duration schema is primarily used to encode durations for transmission. The new tagged union format ensures clear and precise encoding for:

    • Finite durations, such as milliseconds.
    • Infinite durations, such as Duration.infinity.
    • Nanosecond durations.

    Example

    import { Duration, Schema } from "effect"
    
    // Encoding a finite duration in milliseconds
    console.log(Schema.encodeSync(Schema.Duration)(Duration.millis(1000)))
    // Output: { _tag: 'Millis', millis: 1000 }
    
    // Encoding an infinite duration
    console.log(Schema.encodeSync(Schema.Duration)(Duration.infinity))
    // Output: { _tag: 'Infinity' }
    
    // Encoding a duration in nanoseconds
    console.log(Schema.encodeSync(Schema.Duration)(Duration.nanos(1000n)))
    // Output: { _tag: 'Nanos', nanos: '1000' }
  • #4331 107e6f0 Thanks @gcanti! - Schema: Improve encoding in Defect and add test for array-based defects.

  • #4329 65c11b9 Thanks @gcanti! - Schema: Update itemsCount to allow 0 as a valid argument, closes From Discord: Error with Schema.itemsCount(0) in version 3.12.7 #4328.

  • #4330 e386d2f Thanks @gcanti! - Add missing overload for Option.as.

  • #4352 9172efb Thanks @tim-smart! - optimize Stream.toReadableStream

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@github-actions github-actions bot force-pushed the changeset-release/main branch 19 times, most recently from b043cb2 to 7d50dd9 Compare January 29, 2025 04:26
@github-actions github-actions bot force-pushed the changeset-release/main branch 5 times, most recently from 831d3da to dbd0385 Compare January 30, 2025 18:31
@github-actions github-actions bot force-pushed the changeset-release/main branch from dbd0385 to 8c8de10 Compare January 30, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Discussion Ongoing
Development

Successfully merging this pull request may close these issues.

From Discord: Error with Schema.itemsCount(0) in version 3.12.7
0 participants