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 #3738

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Version Packages #3738

merged 1 commit into from
Oct 7, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 6, 2024

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@3.9.0

Minor Changes

  • #3620 ff3d1aa Thanks @vinassefranche! - Adds HashMap.HashMap.Entry type helper

  • #3620 0ba66f2 Thanks @tim-smart! - add deno support to Inspectable

  • #3620 bf77f51 Thanks @KhraksMamtsov! - Latch implements Effect<void> with .await semantic

  • #3620 0779681 Thanks @KhraksMamtsov! - Effect.mapAccum & Array.mapAccum preserve non-emptiness

  • #3620 534129f Thanks @KhraksMamtsov! - Pool is now a subtype of Effect, equivalent to Pool.get

  • #3620 d75140c Thanks @mikearnaldi! - Support providing an array of layers via Effect.provide and Layer.provide

  • #3620 be0451c Thanks @leonitousconforti! - support ManagedRuntime in Effect.provide

  • #3620 be0451c Thanks @leonitousconforti! - ManagedRuntime<R, E> is subtype of Effect<Runtime<R>, E, never>

  • #3620 5b36494 Thanks @KhraksMamtsov! - Tuple.map transforms each element of tuple using the given function, treating tuple homomorphically

    import { pipe, Tuple } from "effect"
    
    const result = pipe(
      //  ^? [string, string, string]
      ["a", 1, false] as const,
      T.map((el) => {
        //^? "a" | 1 | false
        return el.toString().toUppercase()
      })
    )
    assert.deepStrictEqual(result, ["A", "1", "FALSE"])
  • #3620 c716adb Thanks @AlexGeb! - Add Array.pad function

  • #3620 4986391 Thanks @ianbollinger! - Add an isRegExp type guard

  • #3620 d75140c Thanks @mikearnaldi! - Implement Effect.Service as a Tag and Layer with Opaque Type.

    Namely the following is now possible:

    class Prefix extends Effect.Service<Prefix>()("Prefix", {
      sync: () => ({
        prefix: "PRE"
      })
    }) {}
    
    class Postfix extends Effect.Service<Postfix>()("Postfix", {
      sync: () => ({
        postfix: "POST"
      })
    }) {}
    
    const messages: Array<string> = []
    
    class Logger extends Effect.Service<Logger>()("Logger", {
      accessors: true,
      effect: Effect.gen(function* () {
        const { prefix } = yield* Prefix
        const { postfix } = yield* Postfix
        return {
          info: (message: string) =>
            Effect.sync(() => {
              messages.push(`[${prefix}][${message}][${postfix}]`)
            })
        }
      }),
      dependencies: [Prefix.Default, Postfix.Default]
    }) {}
    
    describe("Effect", () => {
      it.effect("Service correctly wires dependencies", () =>
        Effect.gen(function* () {
          const { _tag } = yield* Logger
          expect(_tag).toEqual("Logger")
          yield* Logger.info("Ok")
          expect(messages).toEqual(["[PRE][Ok][POST]"])
          const { prefix } = yield* Prefix
          expect(prefix).toEqual("PRE")
          const { postfix } = yield* Postfix
          expect(postfix).toEqual("POST")
        }).pipe(Effect.provide([Logger.Default, Prefix.Default, Postfix.Default]))
      )
    })
  • #3620 d1387ae Thanks @KhraksMamtsov! - Resource<A, E> is subtype of Effect<A, E>.
    ScopedRed<A> is subtype of Effect<A>.

Patch Changes

@effect/opentelemetry@0.38.0

Minor Changes

Patch Changes

  • #3737 6fc1e02 Thanks @tim-smart! - add Tracer.withSpanContext

    This api is useful for attaching a parent span to an Effect from an opentelemetry
    span outside of Effect.

    import { Effect } from "effect"
    import { Tracer } from "@effect/opentelemetry"
    import * as OtelApi from "@opentelemetry/api"
    
    await OtelApi.trace.getTracer("test").startActiveSpan(
      "otel-span",
      {
        root: true
      },
      async (span) => {
        try {
          await Effect.runPromise(
            Effect.log("inside otel parent span").pipe(
              Tracer.withSpanContext(span.spanContext())
            )
          )
        } finally {
          span.end()
        }
      }
    )
  • Updated dependencies [ff3d1aa, 0ba66f2, bf77f51, 016f9ad, 0779681, 534129f, d75140c, be0451c, 9237ac6, be0451c, 5b36494, c716adb, 4986391, d75140c, d1387ae]:

    • effect@3.9.0

@effect/platform@0.67.0

Minor Changes

Patch Changes

@effect/schema@0.75.0

Minor Changes

Patch Changes

@effect/cli@0.46.0

Patch Changes

@effect/cluster@0.11.0

Patch Changes

@effect/cluster-browser@0.9.0

Patch Changes

@effect/cluster-node@0.11.0

Patch Changes

@effect/cluster-workflow@0.10.0

Patch Changes

@effect/experimental@0.28.0

Patch Changes

@effect/platform-browser@0.46.0

Patch Changes

@effect/platform-bun@0.47.0

Patch Changes

@effect/platform-node@0.62.0

Patch Changes

@effect/platform-node-shared@0.17.0

Patch Changes

@effect/printer@0.37.0

Patch Changes

@effect/printer-ansi@0.37.0

Patch Changes

@effect/rpc@0.41.0

Patch Changes

@effect/rpc-http@0.39.0

Patch Changes

@effect/sql@0.15.0

Patch Changes

@effect/sql-d1@0.12.0

Patch Changes

@effect/sql-drizzle@0.13.0

Patch Changes

@effect/sql-kysely@0.10.0

Patch Changes

@effect/sql-libsql@0.3.0

Patch Changes

@effect/sql-mssql@0.15.0

Patch Changes

@effect/sql-mysql2@0.15.0

Patch Changes

@effect/sql-pg@0.15.0

Patch Changes

@effect/sql-sqlite-bun@0.15.0

Patch Changes

@effect/sql-sqlite-node@0.15.0

Patch Changes

@effect/sql-sqlite-react-native@0.17.0

Patch Changes

@effect/sql-sqlite-wasm@0.14.0

Patch Changes

@effect/typeclass@0.28.0

Patch Changes

@effect/vitest@0.11.0

Patch Changes

@tim-smart tim-smart merged commit b06f17d into main Oct 7, 2024
@tim-smart tim-smart deleted the changeset-release/main branch October 7, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant