Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .changeset/effect-main-rc-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"effect-app": patch
"@effect-app/cli": patch
---

Adapt to unpublished Effect main (pkg.pr.new `addeaea`, still versioned `4.0.0-rc.112`).

npm `rc` remains `4.0.0-rc.112`; this pin consumes Effect main until the next RC publishes. Breaking API updates:

- PascalCase Config/CLI constructors (`Config.String`, `Flag.File`, `Config.NonEmptyString`, `Config.Redacted`, `Config.Literal`)
- `Config.Record` now returns a Config
- Schema `toArbitrary` (fast-check) replaced by native `effect/unstable/arbitrary`
- `Fiber.currentSpan` moved to `fiber.cache.span`
- HTTP server addresses are `InetAddressV4`/`InetAddressV6` instead of `TcpAddress`
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
"@effect-app/infra": "workspace:*",
"@effect/language-service": "0.86.2",
"@effect/tsgo": "^0.31.0",
"@effect/platform-node": "4.0.0-rc.112",
"@effect/vitest": "4.0.0-rc.112",
"@effect/platform-node": "https://pkg.pr.new/Effect-TS/effect/@effect/platform-node@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"@effect/vitest": "https://pkg.pr.new/Effect-TS/effect/@effect/vitest@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"@tsconfig/strictest": "^2.0.8",
"@types/node": "25.9.1",
"@typescript-eslint/eslint-plugin": "8.60.0",
"@typescript-eslint/parser": "8.60.0",
"@typescript/native-preview": "7.0.0-dev.20260626.1",
"dprint": "^0.54.0",
"effect": "4.0.0-rc.112",
"effect": "https://pkg.pr.new/Effect-TS/effect/effect@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"effect-app": "workspace:*",
"eslint": "^10.4.1",
"json5": "^2.2.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"effect-app-cli": "./bin.js"
},
"dependencies": {
"@effect/platform-node": "4.0.0-rc.112",
"effect": "4.0.0-rc.112",
"@effect/platform-node": "https://pkg.pr.new/Effect-TS/effect/@effect/platform-node@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"effect": "https://pkg.pr.new/Effect-TS/effect/effect@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"js-yaml": "4.2.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/gist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,9 @@ export class GistHandler extends Context.Service<GistHandler>()("GistHandler", {
handler: Effect.fn("effa-cli.gist.GistHandler")(function*({ YAMLPath }: { YAMLPath: string }) {
// load company and environment from environment variables
const CONFIG = yield* Config.all({
company: Config.string("COMPANY"),
env: Config.string("ENV").pipe(Config.withDefault("local-dev")),
gistCacheId: Config.nonEmptyString("EFFA_GIST_CACHE_ID")
company: Config.String("COMPANY"),
env: Config.String("ENV").pipe(Config.withDefault("local-dev")),
gistCacheId: Config.NonEmptyString("EFFA_GIST_CACHE_ID")
})

yield* Effect.logInfo(`Company: ${CONFIG.company}, ENV: ${CONFIG.env}`)
Expand All @@ -576,7 +576,7 @@ export class GistHandler extends Context.Service<GistHandler>()("GistHandler", {
)

// load GitHub token securely from environment variable
const redactedToken = yield* Config.redacted(configFromYaml.settings.token_env)
const redactedToken = yield* Config.Redacted(configFromYaml.settings.token_env)

yield* Effect.logInfo(`Using GitHub token from environment variable: ${configFromYaml.settings.token_env}`)
yield* Effect.logInfo(`Token loaded: ${redactedToken}`) // this will show <redacted> in logs
Expand Down
40 changes: 20 additions & 20 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ NodeRuntime.runMain(
* CLI
*/

const WrapAsOption = Flag.string("wrap").pipe(
const WrapAsOption = Flag.String("wrap").pipe(
Flag.withAlias("w"),
Flag.optional,
Flag.withDescription(
Expand All @@ -413,7 +413,7 @@ NodeRuntime.runMain(

// has prio over WrapAsOption
const WrapAsArg = Argument
.string("wrap")
.String("wrap")
.pipe(
Argument.atLeast(1),
Argument.optional,
Expand Down Expand Up @@ -473,7 +473,7 @@ NodeRuntime.runMain(
)

const EffectAppLibsPath = Argument
.directory("effect-app-libs-path", { mustExist: true })
.Directory("effect-app-libs-path", { mustExist: true })
.pipe(
Argument.withDefault("../../effect-app/libs"),
Argument.withDescription("Path to the effect-app-libs directory")
Expand Down Expand Up @@ -506,7 +506,7 @@ NodeRuntime.runMain(
Effect.fn("effa-cli.ue")(function*({}) {
yield* Effect.logInfo("Update effect-app and/or effect packages")

const prompted = yield* Prompt.select({
const prompted = yield* Prompt.Select({
choices: [
{
title: "effect-app",
Expand Down Expand Up @@ -665,7 +665,7 @@ NodeRuntime.runMain(
.make(
"gist",
{
config: Flag.file("config").pipe(
config: Flag.File("config").pipe(
Flag.withDefault("gists.yaml"),
Flag.withDescription("Path to YAML configuration file")
)
Expand All @@ -683,10 +683,10 @@ NodeRuntime.runMain(
.make(
"nuke",
{
dryRun: Flag.boolean("dry-run").pipe(
dryRun: Flag.Boolean("dry-run").pipe(
Flag.withDescription("Show what would be done without making changes")
),
storePrune: Flag.boolean("store-prune").pipe(
storePrune: Flag.Boolean("store-prune").pipe(
Flag.withDescription("Prune the package manager store")
)
},
Expand Down Expand Up @@ -718,18 +718,18 @@ NodeRuntime.runMain(
.make(
"sync-effect",
{
manifests: Flag.string("manifests").pipe(
manifests: Flag.String("manifests").pipe(
Flag.withAlias("m"),
Flag.optional,
Flag.withDescription(
"Comma-separated list of package.json paths to scan (default: package.json)"
)
),
prefix: Flag.string("prefix").pipe(
prefix: Flag.String("prefix").pipe(
Flag.optional,
Flag.withDescription("Subtree prefix (default: repos/effect)")
),
url: Flag.string("url").pipe(
url: Flag.String("url").pipe(
Flag.optional,
Flag.withDescription(
"Git repository URL (default: https://github.com/Effect-TS/effect.git)"
Expand All @@ -753,24 +753,24 @@ NodeRuntime.runMain(
.make(
"sync-effect-app",
{
manifests: Flag.string("manifests").pipe(
manifests: Flag.String("manifests").pipe(
Flag.withAlias("m"),
Flag.optional,
Flag.withDescription(
"Comma-separated list of package.json paths to scan (default: package.json)"
)
),
prefix: Flag.string("prefix").pipe(
prefix: Flag.String("prefix").pipe(
Flag.optional,
Flag.withDescription("Subtree prefix (default: repos/libs)")
),
url: Flag.string("url").pipe(
url: Flag.String("url").pipe(
Flag.optional,
Flag.withDescription(
"Git repository URL (default: https://github.com/effect-app/libs.git)"
)
),
ref: Flag.string("ref").pipe(
ref: Flag.String("ref").pipe(
Flag.optional,
Flag.withDescription("Ref escape hatch (branch/tag/sha/latest); latest means main")
)
Expand All @@ -792,7 +792,7 @@ NodeRuntime.runMain(
)
.pipe(Command.withDescription("Sync the Effect App libs subtree to the version pinned in package.json"))

const SharedLockfileFlag = Flag.file("lockfile").pipe(
const SharedLockfileFlag = Flag.File("lockfile").pipe(
Flag.optional,
Flag.withDescription("Path to lockfile (default: .shared.json)")
)
Expand All @@ -802,10 +802,10 @@ NodeRuntime.runMain(
"sync",
{
lockfile: SharedLockfileFlag,
update: Flag.boolean("update").pipe(
update: Flag.Boolean("update").pipe(
Flag.withDescription("Bump the pinned ref to the latest sha before syncing")
),
ref: Flag.string("ref").pipe(
ref: Flag.String("ref").pipe(
Flag.optional,
Flag.withDescription("Ref (branch/tag/sha) to update to; default: remote default branch HEAD")
)
Expand Down Expand Up @@ -839,16 +839,16 @@ NodeRuntime.runMain(
"sync-push",
{
lockfile: SharedLockfileFlag,
message: Flag.string("message").pipe(
message: Flag.String("message").pipe(
Flag.withAlias("m"),
Flag.optional,
Flag.withDescription("Commit message for the push")
),
branch: Flag.string("branch").pipe(
branch: Flag.String("branch").pipe(
Flag.optional,
Flag.withDescription("Branch name in shared repo (default: auto-generated)")
),
pr: Flag.boolean("pr").pipe(
pr: Flag.Boolean("pr").pipe(
Flag.withDescription("Open a PR via `gh pr create` after pushing")
)
},
Expand Down
8 changes: 4 additions & 4 deletions packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"effect-app": "workspace:*"
},
"devDependencies": {
"@effect/atom-vue": "^4.0.0-rc.112",
"@effect/platform-node": "4.0.0-rc.112",
"@effect/vitest": "4.0.0-rc.112",
"@effect/atom-vue": "https://pkg.pr.new/Effect-TS/effect/@effect/atom-vue@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"@effect/platform-node": "https://pkg.pr.new/Effect-TS/effect/@effect/platform-node@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"@effect/vitest": "https://pkg.pr.new/Effect-TS/effect/@effect/vitest@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"@tanstack/vue-query": "5.96.2",
"@types/node": "25.9.1",
"@vitejs/plugin-vue": "^6.0.7",
"effect": "^4.0.0-rc.112",
"effect": "https://pkg.pr.new/Effect-TS/effect/effect@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"typescript": "~6.0.3",
"vitest": "^4.1.7",
"vue": "^3.5.35"
Expand Down
7 changes: 5 additions & 2 deletions packages/e2e/test/repoInvalidation.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as ManagedRuntime from "effect/ManagedRuntime"
import * as Option from "effect/Option"
import * as Scope from "effect/Scope"
import { FetchHttpClient } from "effect/unstable/http"
import * as NetAddress from "effect/unstable/net/NetAddress"
import * as Reactivity from "effect/unstable/reactivity/Reactivity"
import { RpcSerialization } from "effect/unstable/rpc"
import { createServer } from "http"
Expand Down Expand Up @@ -143,8 +144,10 @@ const ClientLayer = Layer
Effect.gen(function*() {
const server = yield* HttpServer.HttpServer
const addr = server.address
if (addr._tag !== "TcpAddress") return yield* Effect.die(new Error("expected TcpAddress"))
const host = addr.hostname === "0.0.0.0" ? "127.0.0.1" : addr.hostname
if (NetAddress.isUnixPathAddress(addr)) {
return yield* Effect.die(new Error("expected inet address"))
}
const host = NetAddress.isUnspecified(addr.address) ? "127.0.0.1" : NetAddress.formatUrlHost(addr.address)
return ApiClientFactory
.layer({ url: `http://${host}:${addr.port}`, headers: Option.none() })
.pipe(Layer.provide(FetchHttpClient.layer))
Expand Down
1 change: 1 addition & 0 deletions packages/effect-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"validator": "^13.15.35"
},
"devDependencies": {
"effect": "https://pkg.pr.new/Effect-TS/effect/effect@addeaea0b0abe0dc24ca1d4d0fd194a0e458be70",
"@faker-js/faker": "^8.4.1",
"@types/node": "25.9.1",
"@types/validator": "^13.15.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/effect-app/src/Config/SecretURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ export const value: (self: SecretURL) => string = internal.value
export const unsafeWipe: (self: SecretURL) => void = internal.unsafeWipe

export const secretURL = (name?: string): Config.Config<SecretURL> => {
return Config.map(Config.nonEmptyString(name), fromString)
return Config.map(Config.NonEmptyString(name), fromString)
}
Loading
Loading