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

Release queue: minor #2207

Merged
merged 24 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2305a12
Fix ConfigError `_tag` (#2206)
mikearnaldi Feb 24, 2024
e8ccb76
Changing the `HaltStrategy.match` function signature (#2202)
KhraksMamtsov Feb 27, 2024
a185cef
`Cache`, `ScopedCache` swap type parameters [another try] (#2239)
KhraksMamtsov Mar 2, 2024
d52ddb7
Either: fix `getEquivalence` parameter order from `Either.getEquivale…
gcanti Mar 8, 2024
64d8a87
swap type parameters for /platform data types (#2376)
vecerek Mar 20, 2024
8ca563c
add preregisteredWords options to frequency metric key type (#2377)
tim-smart Mar 20, 2024
3f4c8e9
Bump TypeScript min requirement to version 5.4
gcanti Mar 22, 2024
054d074
Replace custom `NoInfer` type with the native `NoInfer` type from Typ…
gcanti Mar 22, 2024
2a349dd
Schema: remove the custom `Simplify` type that was previously introd……
gcanti Mar 22, 2024
42a986d
use LazyArg for Effect.if branches (#2451)
tim-smart Mar 31, 2024
a16cebb
support variadic arguments in Effect.log (#2452)
tim-smart Apr 2, 2024
250b214
fix rpc HttpRouterNoStream return types
tim-smart Apr 2, 2024
a049e33
use ts NoInfer in Iterable module
tim-smart Apr 2, 2024
2b5c4a6
add unique identifier to Tracer.ParentSpan tag (#2459)
tim-smart Apr 2, 2024
50ad3fe
move fetch options to a FiberRef (#2467)
tim-smart Apr 4, 2024
97cdfb1
properly handle multiple ports in SharedWorker (#2468)
tim-smart Apr 4, 2024
2b20cfc
replace use of `unit` terminology with `void` (#2476)
tim-smart Apr 5, 2024
437ccac
fix PlatformConfigProvider test
tim-smart Apr 9, 2024
6a33396
make Http.middleware.withTracerDisabledWhen a Layer api (#2491)
tim-smart Apr 9, 2024
a469f4b
fix platform dual predicate
tim-smart Apr 16, 2024
cb9817d
add FiberHandle module, for holding a reference to a running fiber (#…
tim-smart Apr 16, 2024
5ec8f62
Add Effect 3.0 changeset (#2526)
tim-smart Apr 16, 2024
c571bde
replace unit with void in @effect/sql
tim-smart Apr 16, 2024
e417e41
add sql to 3.0 changeset
tim-smart Apr 16, 2024
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
7 changes: 7 additions & 0 deletions .changeset/brave-eggs-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"effect": minor
---

close FiberHandle/FiberSet/FiberMap when it is released

When they are closed, fibers can no longer be added to them.
16 changes: 16 additions & 0 deletions .changeset/breezy-countries-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"effect": minor
---

add preregisteredWords option to frequency metric key type

You can use this to register a list of words to pre-populate the value of the
metric.

```ts
import { Metric } from "effect";

const counts = Metric.frequency("counts", {
preregisteredWords: ["a", "b", "c"],
}).register();
```
5 changes: 5 additions & 0 deletions .changeset/breezy-jobs-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/schema": patch
---

Removed the custom `Simplify` type that was previously introduced to address a bug in TypeScript 5.0
5 changes: 5 additions & 0 deletions .changeset/cyan-pianos-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Bump TypeScript min requirement to version 5.4
5 changes: 5 additions & 0 deletions .changeset/dirty-pumpkins-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/platform-node": patch
---

allow specifying undici options through a fiber ref
8 changes: 8 additions & 0 deletions .changeset/eight-birds-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@effect/platform-browser": patch
"@effect/platform-node": patch
"@effect/platform-bun": patch
"@effect/platform": patch
---

properly handle multiple ports in SharedWorker
21 changes: 21 additions & 0 deletions .changeset/grumpy-pens-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@effect/platform": minor
---

make Http.middleware.withTracerDisabledWhen a Layer api

And add Http.middleware.withTracerDisabledWhenEffect to operate on Effect's.

Usage is now:

```ts
import * as Http from "@effect/platform/HttpServer";

Http.router.empty.pipe(
Http.router.get("/health"),
Http.server.serve(),
Http.middleware.withTracerDisabledWhen(
(request) => request.url === "/no-tracing",
),
);
```
17 changes: 17 additions & 0 deletions .changeset/healthy-trees-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@effect/platform": patch
---

add Http.middleware.withTracerDisabledForUrls

Allows you to disable the http server tracer for the given urls:

```ts
import * as Http from "@effect/platform/HttpServer";

Http.router.empty.pipe(
Http.router.get("/health"),
Http.server.serve(),
Http.middleware.withTracerDisabledForUrls(["/health"])
);
```
5 changes: 5 additions & 0 deletions .changeset/many-frogs-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add unique identifier to Tracer.ParentSpan tag
15 changes: 15 additions & 0 deletions .changeset/mighty-trees-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@effect/platform": minor
"@effect/platform-browser": minor
"@effect/platform-bun": minor
"@effect/platform-node": minor
"@effect/platform-node-shared": minor
---

Swap type parameters in /platform data types

A codemod has been released to make migration easier:

```
npx @effect/codemod platform-0.49 src/**/*
```
5 changes: 5 additions & 0 deletions .changeset/odd-ears-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

add FiberMap.has/unsafeHas api
5 changes: 5 additions & 0 deletions .changeset/real-kangaroos-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

The signatures of the `HaltStrategy.match` `StreamHaltStrategy.match` functions have been changed to the generally accepted ones
5 changes: 5 additions & 0 deletions .changeset/rotten-mirrors-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/platform": minor
---

rename auto-scoped ClientResponse apis from *Effect to *Scoped
11 changes: 11 additions & 0 deletions .changeset/selfish-bottles-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"effect": minor
---

support variadic arguments in Effect.log

This makes Effect.log more similar to console.log:

```ts
Effect.log("hello", { foo: "bar" }, Cause.fail("error"));
```
5 changes: 5 additions & 0 deletions .changeset/sharp-bears-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Fix ConfigError `_tag`, with the previous implementation catching the `ConfigError` with `Effect.catchTag` would show `And`, `Or`, etc.
29 changes: 29 additions & 0 deletions .changeset/six-ears-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@effect/platform-node-shared": minor
"@effect/platform-browser": minor
"@effect/opentelemetry": minor
"@effect/platform-node": minor
"@effect/experimental": minor
"@effect/platform-bun": minor
"@effect/typeclass": minor
"@effect/platform": minor
"effect": minor
"@effect/schema": minor
"@effect/cli": minor
"@effect/printer": minor
"@effect/printer-ansi": minor
"@effect/rpc": minor
"@effect/rpc-http": minor
"@effect/vitest": minor
---

replace use of `unit` terminology with `void`

For all the data types.

```ts
Effect.unit; // => Effect.void
Stream.unit; // => Stream.void

// etc
```
20 changes: 20 additions & 0 deletions .changeset/stale-gorillas-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@effect/platform": minor
"@effect/rpc-http": minor
---

move fetch options to a FiberRef

This change makes adjusting options to fetch more composable. You can now do:

```ts
import { pipe } from "effect";
import * as Http from "@effect/platform/HttpClient";

pipe(
Http.request.get("https://example.com"),
Http.client.fetchOk,
Http.client.withFetchOptions({ credentials: "include" }),
Http.response.text
);
```
5 changes: 5 additions & 0 deletions .changeset/strong-falcons-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Either: fix `getEquivalence` parameter order from `Either.getEquivalence(left, right)` to `Either.getEquivalence({ left, right })`
24 changes: 24 additions & 0 deletions .changeset/sweet-apples-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"effect": patch
---

add FiberHandle module, for holding a reference to a running fiber

```ts
import { Effect, FiberHandle } from "effect"

Effect.gen(function* (_) {
const handle = yield* _(FiberHandle.make())

// run some effects
yield* _(FiberHandle.run(handle, Effect.never))
// this will interrupt the previous fiber
yield* _(FiberHandle.run(handle, Effect.never))
// this will not run, as a fiber is already running
yield* _(FiberHandle.run(handle, Effect.never, { onlyIfMissing: true }))

yield* _(Effect.sleep(1000))
}).pipe(
Effect.scoped // The fiber will be interrupted when the scope is closed
)
```
28 changes: 28 additions & 0 deletions .changeset/thin-lamps-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
"effect": major
"@effect/platform-node-shared": minor
"@effect/platform-browser": minor
"@effect/opentelemetry": minor
"@effect/platform-node": minor
"@effect/experimental": minor
"@effect/platform-bun": minor
"@effect/typeclass": minor
"@effect/platform": minor
"@effect/rpc-http": minor
"@effect/schema": minor
"@effect/cli": minor
"@effect/printer": minor
"@effect/printer-ansi": minor
"@effect/rpc": minor
"@effect/vitest": minor
"@effect/sql-sqlite-react-native": minor
"@effect/sql-sqlite-node": minor
"@effect/sql-sqlite-wasm": minor
"@effect/sql-sqlite-bun": minor
"@effect/sql-mysql2": minor
"@effect/sql-mssql": minor
"@effect/sql-pg": minor
"@effect/sql": minor
---

Release Effect 3.0 🎉
23 changes: 23 additions & 0 deletions .changeset/three-poems-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
"effect": minor
---

use LazyArg for Effect.if branches

Instead of:

```ts
Effect.if(true, {
onTrue: Effect.succeed("true"),
onFalse: Effect.succeed("false"),
});
```

You should now write:

```ts
Effect.if(true, {
onTrue: () => Effect.succeed("true"),
onFalse: () => Effect.succeed("false"),
});
```
5 changes: 5 additions & 0 deletions .changeset/tidy-news-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Replaced custom `NoInfer` type with the native `NoInfer` type from TypeScript 5.4
7 changes: 7 additions & 0 deletions .changeset/tough-jeans-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"effect": minor
---

`Cache<Key, Error, Value>` has been changed to `Cache<Key, Value, Error = never>`.
`ScopedCache<Key, Error, Value>` has been changed to `ScopedCache<Key, Value, Error = never>`.
`Lookup<Key, Environment, Error, Value>` has been changed to `Lookup<Key, Value, Error = never, Environment = never>`
2 changes: 1 addition & 1 deletion .github/workflows/release-queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
- uses: tim-smart/next-release-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
packages: effect
packages: effect,@effect/schema,@effect/platform
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome to Effect, a powerful TypeScript framework that provides a fully-fledged

# Requirements

- TypeScript 5.0 or newer
- TypeScript 5.4 or newer
- The `strict` flag enabled in your `tsconfig.json` file

```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@edge-runtime/vm": "^3.2.0",
"@effect/build-utils": "^0.7.6",
"@effect/docgen": "^0.3.8",
"@effect/dtslint": "^0.0.5",
"@effect/dtslint": "^0.1.0",
"@effect/eslint-plugin": "^0.1.2",
"@effect/language-service": "^0.1.0",
"@types/node": "^20.11.30",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/cliApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const handleBuiltInOption = <R, E, A>(
)
return shouldRunCommand
? Console.log().pipe(Effect.zipRight(run(self, finalArgs, execute)))
: Effect.unit
: Effect.void
}))
),
Effect.catchAll((e) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ const parseInternal = (
> => {
switch (self._tag) {
case "Empty": {
return Effect.unit
return Effect.void
}
case "Single": {
const singleNames = ReadonlyArray.filterMap(getNames(self), (name) => HashMap.get(args, name))
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/internal/primitive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ const validatePathExistence = (
if (shouldPathExist === "yes" && !pathExists) {
return Effect.fail(`Path '${path}' must exist`)
}
return Effect.unit
return Effect.void
}

const validatePathType = (
Expand All @@ -499,7 +499,7 @@ const validatePathType = (
)
return Effect.fail(`Expected path '${path}' to be a regular file`).pipe(
Effect.unlessEffect(checkIsFile),
Effect.asUnit
Effect.asVoid
)
}
case "directory": {
Expand All @@ -509,11 +509,11 @@ const validatePathType = (
)
return Effect.fail(`Expected path '${path}' to be a directory`).pipe(
Effect.unlessEffect(checkIsDirectory),
Effect.asUnit
Effect.asVoid
)
}
case "either": {
return Effect.unit
return Effect.void
}
}
}
Expand Down
Loading