Skip to content

Commit

Permalink
chore: upgrade Effect deps
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS committed May 20, 2024
1 parent 4c433dc commit a96ca73
Show file tree
Hide file tree
Showing 34 changed files with 449 additions and 385 deletions.
21 changes: 21 additions & 0 deletions .changeset/strange-bottles-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@typed/environment": minor
"@typed/async-data": minor
"@typed/navigation": minor
"@typed/storybook": minor
"@typed/template": minor
"@typed/context": minor
"@typed/decoder": minor
"@typed/router": minor
"@typed/server": minor
"@typed/guard": minor
"@typed/route": minor
"@typed/core": minor
"@typed/path": minor
"@typed/dom": minor
"@typed/fx": minor
"@typed/id": minor
"@typed/ui": minor
---

Upgrade Effect deps
2 changes: 1 addition & 1 deletion examples/counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@typed/dom": "workspace:*",
"@typed/fx": "workspace:*",
"@typed/template": "workspace:*",
"effect": "3.1.5"
"effect": "3.2.0"
},
"devDependencies": {
"vite": "^5.2.11",
Expand Down
4 changes: 2 additions & 2 deletions examples/fx-tracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/opentelemetry": "^0.34.5",
"@effect/opentelemetry": "^0.34.7",
"@opentelemetry/exporter-trace-otlp-http": "^0.51.1",
"@opentelemetry/otlp-exporter-base": "^0.51.1",
"@opentelemetry/sdk-node": "^0.51.1",
"@opentelemetry/sdk-trace-base": "^1.24.1",
"@typed/context": "workspace:*",
"@typed/dom": "workspace:*",
"@typed/fx": "workspace:*",
"effect": "3.1.5"
"effect": "3.2.0"
}
}
21 changes: 11 additions & 10 deletions examples/realworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/opentelemetry": "^0.34.5",
"@effect/platform": "^0.53.8",
"@effect/platform-node": "^0.49.8",
"@effect/schema": "0.67.5",
"@effect/sql": "^0.2.10",
"@effect/sql-pg": "^0.2.10",
"@effect/opentelemetry": "^0.34.7",
"@effect/platform": "^0.53.10",
"@effect/platform-node": "^0.49.10",
"@effect/schema": "0.67.7",
"@effect/sql": "^0.2.12",
"@effect/sql-pg": "^0.2.12",
"@opentelemetry/exporter-trace-otlp-http": "^0.51.1",
"@opentelemetry/sdk-trace-base": "^1.24.1",
"@typed/async-data": "workspace:*",
Expand All @@ -48,9 +48,10 @@
"@types/source-map-support": "^0.5.10",
"bcrypt": "^5.1.1",
"date-fns": "^3.6.0",
"effect": "3.1.5",
"effect-http": "^0.66.0",
"effect-http-node": "^0.13.0",
"effect": "3.2.0",
"effect-http": "^0.67.0",
"effect-http-node": "^0.13.1",
"effect-http-security": "^0.1.0",
"effect-log": "^0.31.2",
"jsonwebtoken": "^9.0.2",
"path-to-regexp": "^6.2.2",
Expand All @@ -66,7 +67,7 @@
"rollup-plugin-visualizer": "^5.12.0",
"schema-openapi": "^0.38.1",
"terser": "^5.31.0",
"tsx": "^4.10.3",
"tsx": "^4.10.5",
"vavite": "^4.1.1",
"vite": "^5.2.11",
"vite-plugin-compression": "^0.5.1",
Expand Down
12 changes: 6 additions & 6 deletions examples/realworld/src/api/common/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Unauthorized, Unprocessable } from "@typed/realworld/services/errors"
import { ServerError } from "@typed/server"
import { HttpError } from "@typed/server"
import { Effect } from "effect"

export const STATUS_200 = { status: 200, body: undefined } as const
Expand All @@ -8,31 +8,31 @@ export function catchUnauthorized<R, E, A>(
effect: Effect.Effect<R, E | Unauthorized, A>
): Effect.Effect<
R,
Exclude<E, { readonly _tag: "Unauthorized" }> | ServerError.ServerError,
Exclude<E, { readonly _tag: "Unauthorized" }> | HttpError.HttpError,
A
> {
return Effect.catchTag(effect, "Unauthorized", () => ServerError.unauthorizedError(undefined))
return Effect.catchTag(effect, "Unauthorized", () => HttpError.unauthorizedError(undefined))
}

export function catchUnprocessable<A, E, R>(
effect: Effect.Effect<A, E | Unprocessable, R>
): Effect.Effect<
A,
Exclude<E, { readonly _tag: "Unprocessable" }> | ServerError.ServerError,
Exclude<E, { readonly _tag: "Unprocessable" }> | HttpError.HttpError,
R
> {
return Effect.catchTag(
effect,
"Unprocessable",
(e) => ServerError.makeJson(422, { errors: (e as Unprocessable).errors } as const)
(e) => HttpError.make(422, { errors: (e as Unprocessable).errors } as const)
)
}

export function catchUnauthorizedAndUnprocessable<R, E, A>(
effect: Effect.Effect<R, E | Unauthorized | Unprocessable, A>
): Effect.Effect<
R,
Exclude<Exclude<E, { readonly _tag: "Unprocessable" }>, { readonly _tag: "Unauthorized" }> | ServerError.ServerError,
Exclude<Exclude<E, { readonly _tag: "Unprocessable" }>, { readonly _tag: "Unauthorized" }> | HttpError.HttpError,
A
> {
return catchUnauthorized(catchUnprocessable(effect))
Expand Down
2 changes: 1 addition & 1 deletion examples/realworld/src/ui/pages/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const main = (
({ params, tab }) => {
const input: GetArticlesInput = {
...defaultGetArticlesInput,
tag: Option.fromNullable(params.tag).pipe(Option.map((t) => ArticleTag.make(t))),
tag: Option.fromNullable(params.tag).pipe(Option.map(ArticleTag.make)),
limit: Option.some(pageSize),
offset: Option.some(pageSize * (params.page ?? 1 - 1))
}
Expand Down
8 changes: 4 additions & 4 deletions examples/simple-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/platform": "^0.53.8",
"@effect/platform-node": "^0.49.8",
"@effect/platform": "^0.53.10",
"@effect/platform-node": "^0.49.10",
"@typed/fx": "workspace:*",
"@typed/template": "workspace:*",
"effect": "3.1.5"
"effect": "3.2.0"
},
"devDependencies": {
"tsx": "^4.10.3"
"tsx": "^4.10.5"
}
}
12 changes: 6 additions & 6 deletions examples/todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/platform": "^0.53.8",
"@effect/platform-browser": "^0.33.23",
"@effect/platform-node": "^0.49.8",
"@effect/schema": "0.67.5",
"@effect/platform": "^0.53.10",
"@effect/platform-browser": "^0.33.25",
"@effect/platform-node": "^0.49.10",
"@effect/schema": "0.67.7",
"@typed/context": "workspace:*",
"@typed/core": "workspace:*",
"@typed/dom": "workspace:*",
Expand All @@ -31,7 +31,7 @@
"@typed/router": "workspace:*",
"@typed/template": "workspace:*",
"@typed/ui": "workspace:*",
"effect": "3.1.5",
"effect": "3.2.0",
"todomvc-app-css": "^2.4.3",
"todomvc-common": "^1.0.5"
},
Expand All @@ -40,7 +40,7 @@
"mock-storage": "^1.1.0",
"rollup-plugin-visualizer": "^5.12.0",
"terser": "^5.31.0",
"tsx": "^4.10.3",
"tsx": "^4.10.5",
"vite": "^5.2.11",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.2",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@babel/preset-env": "^7.24.5",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@changesets/cli": "^2.27.2",
"@effect/babel-plugin": "^0.2.0",
"@effect/build-utils": "^0.7.6",
"@effect/codemod": "^0.0.15",
Expand All @@ -58,7 +58,7 @@
"babel-plugin-annotate-pure-calls": "^0.4.0",
"cac": "^6.7.14",
"concurrently": "^8.2.2",
"effect": "^3.1.5",
"effect": "^3.2.0",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-codegen": "0.28.0",
Expand All @@ -71,7 +71,7 @@
"shx": "^0.3.4",
"syncpack": "12.3.2",
"ts-node": "^10.9.2",
"tsx": "^4.10.3",
"tsx": "^4.10.5",
"typescript": "^5.4.5",
"ultra-runner": "^3.10.5",
"vite": "^5.2.11",
Expand All @@ -80,6 +80,6 @@
"zx": "^8.1.0"
},
"dependencies": {
"@effect/vitest": "^0.4.4"
"@effect/vitest": "^0.5.0"
}
}
4 changes: 2 additions & 2 deletions packages/async-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/schema": "^0.67.5",
"effect": "^3.1.5",
"@effect/schema": "^0.67.7",
"effect": "^3.2.0",
"fast-check": "^3.18.0"
}
}
2 changes: 1 addition & 1 deletion packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"effect": "^3.1.5"
"effect": "^3.2.0"
},
"peerDependencies": {
"effect": "^2.4.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/platform": "^0.53.8",
"@effect/platform-node": "^0.49.8",
"@effect/schema": "^0.67.5",
"@effect/platform": "^0.53.10",
"@effect/platform-node": "^0.49.10",
"@effect/schema": "^0.67.7",
"@typed/async-data": "workspace:*",
"@typed/context": "workspace:*",
"@typed/decoder": "workspace:*",
Expand All @@ -60,7 +60,7 @@
"@typed/ui": "workspace:*",
"@typed/vite-plugin": "workspace:*",
"@typed/vite-plugin-types": "workspace:*",
"effect": "^3.1.5",
"effect": "^3.2.0",
"vavite": "^4.1.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/decoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/schema": "^0.67.5",
"effect": "^3.1.5"
"@effect/schema": "^0.67.7",
"effect": "^3.2.0"
}
}
4 changes: 2 additions & 2 deletions packages/dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/schema": "^0.67.5",
"@effect/schema": "^0.67.7",
"@typed/context": "workspace:*",
"effect": "^3.1.5",
"effect": "^3.2.0",
"typed-query-selector": "^2.11.2"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/environment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"sideEffects": [],
"dependencies": {
"@typed/context": "workspace:*",
"effect": "^3.1.5"
"effect": "^3.2.0"
}
}
6 changes: 3 additions & 3 deletions packages/fx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/schema": "^0.67.5",
"@effect/typeclass": "0.24.14",
"@effect/schema": "^0.67.7",
"@effect/typeclass": "0.24.16",
"@typed/async-data": "workspace:*",
"@typed/context": "workspace:*",
"@typed/guard": "workspace:*",
"effect": "^3.1.5",
"effect": "^3.2.0",
"fast-check": "^3.18.0",
"fast-deep-equal": "^3.1.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/guard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/schema": "^0.67.5",
"effect": "^3.1.5"
"@effect/schema": "^0.67.7",
"effect": "^3.2.0"
}
}
4 changes: 2 additions & 2 deletions packages/id/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/schema": "^0.67.5",
"@effect/schema": "^0.67.7",
"@typed/context": "workspace:*",
"effect": "^3.1.5",
"effect": "^3.2.0",
"fast-check": "^3.18.0"
}
}
8 changes: 4 additions & 4 deletions packages/navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/platform": "^0.53.8",
"@effect/schema": "^0.67.5",
"@effect/platform": "^0.53.10",
"@effect/schema": "^0.67.7",
"@typed/context": "workspace:*",
"@typed/dom": "workspace:*",
"@typed/fx": "workspace:*",
"@typed/id": "workspace:*",
"effect": "^3.1.5"
"effect": "^3.2.0"
},
"optionalPeerDependencies": {
"@virtualstate/navigation": "1.0.1-alpha.199"
},
"devDependencies": {
"@effect/platform-node": "^0.49.8",
"@effect/platform-node": "^0.49.10",
"@virtualstate/navigation": "1.0.1-alpha.203",
"happy-dom": "14.11.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/path/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/platform": "^0.53.8",
"@effect/schema": "^0.67.5",
"effect": "^3.1.5",
"@effect/platform": "^0.53.10",
"@effect/schema": "^0.67.7",
"effect": "^3.2.0",
"ts-toolbelt": "^9.6.0"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/route/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
"license": "MIT",
"sideEffects": [],
"dependencies": {
"@effect/schema": "^0.67.5",
"@effect/schema": "^0.67.7",
"@typed/decoder": "workspace:*",
"@typed/guard": "workspace:*",
"@typed/id": "workspace:*",
"@typed/path": "workspace:*",
"effect": "^3.1.5",
"effect": "^3.2.0",
"ts-toolbelt": "^9.6.0"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit a96ca73

Please sign in to comment.