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

ensure Redactable works with Console.log #4153

Draft
wants to merge 15 commits into
base: next-minor
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brave-apes-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Added encodeUriComponent/decodeUriComponent for both Encoding and Schema
5 changes: 5 additions & 0 deletions .changeset/eight-rocks-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Add Runtime.Runtime.Context type extractor
5 changes: 5 additions & 0 deletions .changeset/fifty-mice-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add non-traced overload to Effect.fn
5 changes: 5 additions & 0 deletions .changeset/four-ghosts-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Update fast-check to latest version
8 changes: 8 additions & 0 deletions .changeset/friendly-kiwis-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@effect/platform": minor
---

remove generics from HttpClient tag service

Instead you can now use `HttpClient.With<E, R>` to specify the error and
requirement types.
5 changes: 5 additions & 0 deletions .changeset/gold-squids-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add DateTimeUtcFromDate schema
19 changes: 19 additions & 0 deletions .changeset/hot-jeans-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
"@effect/vitest": patch
---

Allow passing fast-check parameters to prop function

```ts
it.effect.prop(
"adds context",
[realNumber],
([num]) =>
Effect.gen(function* () {
const foo = yield* Foo
expect(foo).toEqual("foo")
return num === num
}),
{ fastCheck: { numRuns: 200 } }
)
```
5 changes: 5 additions & 0 deletions .changeset/khaki-suns-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Added support for `second` granularity to `Cron`.
5 changes: 5 additions & 0 deletions .changeset/polite-trainers-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Added `Cron.unsafeParse` and allow passing the `Cron.parse` time zone parameter as `string`.
5 changes: 5 additions & 0 deletions .changeset/quiet-kings-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add Effect.fnUntraced - an untraced version of Effect.fn
5 changes: 5 additions & 0 deletions .changeset/rare-eagles-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Add Context.mergeAll to combine multiple Contexts into one.
6 changes: 6 additions & 0 deletions .changeset/rare-icons-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"effect": minor
"@effect/platform": patch
---

ensure Redactable works with Console.log
5 changes: 5 additions & 0 deletions .changeset/shiny-vans-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add span annotation to disable propagation to the tracer
5 changes: 5 additions & 0 deletions .changeset/violet-spoons-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Add Schema.headNonEmpty for Schema.NonEmptyArray
5 changes: 5 additions & 0 deletions .changeset/weak-pears-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

Carry both call-site and definition site in Effect.fn, auto-trace to anon
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-destructure-keys": "^2.0.0",
"fast-check": "^3.21.0",
"fast-check": "^3.23.1",
"glob": "^11.0.0",
"jscodeshift": "^0.16.1",
"madge": "^8.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/effect/dtslint/Runtime.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import type * as Runtime from "effect/Runtime"

// $ExpectType { foo: string; }
export type ContextOfRuntime = Runtime.Runtime.Context<Runtime.Runtime<{ foo: string }>>
2 changes: 1 addition & 1 deletion packages/effect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"zod": "^3.23.5"
},
"dependencies": {
"fast-check": "^3.21.0"
"fast-check": "^3.23.1"
}
}
30 changes: 30 additions & 0 deletions packages/effect/src/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,36 @@ export const merge: {
<Services, R1>(self: Context<Services>, that: Context<R1>): Context<Services | R1>
} = internal.merge

/**
* Merges any number of `Context`s, returning a new `Context` containing the services of all.
*
* @param ctxs - The `Context`s to merge.
*
* @example
* ```ts
* import { Context } from "effect"
*
* const Port = Context.GenericTag<{ PORT: number }>("Port")
* const Timeout = Context.GenericTag<{ TIMEOUT: number }>("Timeout")
* const Host = Context.GenericTag<{ HOST: string }>("Host")
*
* const firstContext = Context.make(Port, { PORT: 8080 })
* const secondContext = Context.make(Timeout, { TIMEOUT: 5000 })
* const thirdContext = Context.make(Host, { HOST: "localhost" })
*
* const Services = Context.mergeAll(firstContext, secondContext, thirdContext)
*
* assert.deepStrictEqual(Context.get(Services, Port), { PORT: 8080 })
* assert.deepStrictEqual(Context.get(Services, Timeout), { TIMEOUT: 5000 })
* assert.deepStrictEqual(Context.get(Services, Host), { HOST: "localhost" })
* ```
*
* @since 3.12.0
*/
export const mergeAll: <T extends Array<unknown>>(
...ctxs: [...{ [K in keyof T]: Context<T[K]> }]
) => Context<T[number]> = internal.mergeAll

/**
* Returns a new `Context` that contains only the specified services.
*
Expand Down
Loading
Loading