Skip to content
Closed
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
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/effect-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The Workers preset uses a custom flushable tracer + Effect logger — Workers do
```typescript
import * as MapleCloudflareSDK from "@maple-dev/effect-sdk/cloudflare"
import { Layer } from "effect"
import { HttpRouter } from "effect/unstable/http"
import { HttpRouter } from "effect/http"

const telemetry = MapleCloudflareSDK.make({
serviceName: "my-worker",
Expand Down
4 changes: 3 additions & 1 deletion packages/effect-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
},
"scripts": {
"build": "tsdown",
"prepack": "MAPLE_EFFECT_STABLE_PATHS=1 bun run build",
"postpack": "bun run build",
"typecheck": "tsc --noEmit",
"test": "vitest run"
},
Expand All @@ -72,6 +74,6 @@
"vitest": "catalog:"
},
"peerDependencies": {
"effect": ">=4.0.0-rc.113"
"effect": ">=4.0.0-rc.118"
Comment thread
maple-review-bot[bot] marked this conversation as resolved.
}
}
16 changes: 16 additions & 0 deletions packages/effect-sdk/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { defineConfig } from "tsdown"

// Effect rc.118 promoted `effect/unstable/{http,observability}` to
// `effect/{http,observability}` and dropped the old paths. The monorepo still
// builds against an earlier rc, so the source keeps the unstable paths and the
// published tarball (`prepack`) is built with them rewritten.
const stableEffectPaths = process.env.MAPLE_EFFECT_STABLE_PATHS === "1"

export default defineConfig({
entry: {
"index.server": "./src/index.server.ts",
Expand All @@ -18,4 +24,14 @@ export default defineConfig({
deps: {
neverBundle: ["effect"],
},
plugins: stableEffectPaths
? [
{
name: "maple:effect-stable-paths",
renderChunk(code) {
return code.replaceAll(/(["'])effect\/unstable\//g, "$1effect/")
},
},
]
: [],
})
Loading