Skip to content
Merged
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/open-cows-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"stack-effect": patch
---

upgrade to effect@v4-beta.80 and use the new Crypto module
12 changes: 6 additions & 6 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
"clean": "git clean -xdf .cache .turbo dist node_modules"
},
"devDependencies": {
"@effect/platform-bun": "4.0.0-beta.67",
"@effect/platform-node": "4.0.0-beta.67",
"@effect/vitest": "4.0.0-beta.67",
"@effect/platform-bun": "4.0.0-beta.80",
"@effect/platform-node": "4.0.0-beta.80",
"@effect/vitest": "4.0.0-beta.80",
"@repo/catalog": "workspace:*",
"@repo/config-typescript": "workspace:*",
"@repo/domain": "workspace:*",
"@repo/scaffold": "workspace:*",
"@repo/tui": "workspace:*",
"@types/bun": "1.3.14",
"effect": "4.0.0-beta.67",
"effect-boxes": "^0.15.2",
"vitest": "^4.1.6"
"effect": "4.0.0-beta.80",
"effect-boxes": "^0.16.1",
"vitest": "^4.1.8"
}
}
4 changes: 2 additions & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
Expand All @@ -18,7 +18,7 @@
"includes": ["*", "!.agents/**"],
"enabled": true,
"rules": {
"recommended": true,
"preset": "recommended",
"suspicious": {
"noShadowRestrictedNames": "off",
"noUnknownAtRules": "off"
Expand Down
250 changes: 60 additions & 190 deletions bun.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"complexity": "bun run scripts/complexity-report.ts"
},
"devDependencies": {
"@biomejs/biome": "2.4.15",
"@biomejs/biome": "2.5.0",
"@changesets/changelog-github": "^0.7.0",
"@changesets/cli": "^2.31.0",
"@effect/language-service": "^0.86.1",
"@effect/platform-bun": "4.0.0-beta.67",
"@effect/language-service": "^0.86.2",
"@effect/platform-bun": "4.0.0-beta.80",
"@types/bun": "^1.3.14",
"effect": "4.0.0-beta.67",
"turbo": "^2.9.14",
"effect": "4.0.0-beta.80",
"turbo": "^2.9.18",
"typescript": "6.0.3",
"vitest": "^4.1.6"
"vitest": "^4.1.8"
},
"engines": {
"node": ">=24"
Expand Down
8 changes: 4 additions & 4 deletions packages/catalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
},
"dependencies": {
"@repo/domain": "workspace:*",
"effect": "4.0.0-beta.67"
"effect": "4.0.0-beta.80"
},
"devDependencies": {
"@effect/vitest": "4.0.0-beta.67",
"@types/node": "^25.9.0",
"@effect/vitest": "4.0.0-beta.80",
"@types/node": "^25.9.3",
"@repo/config-typescript": "workspace:*",
"vitest": "^4.1.6"
"vitest": "^4.1.8"
}
}
4 changes: 2 additions & 2 deletions packages/catalog/src/registry/content/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const cliPackageJsonContents = `{
},
"scripts": {},
"dependencies": {
"@effect/platform-bun": "4.0.0-beta.67",
"effect": "4.0.0-beta.67"
"@effect/platform-bun": "4.0.0-beta.80",
"effect": "4.0.0-beta.80"
},
"devDependencies": {
"@effect/language-service": "^0.85.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/catalog/src/registry/content/client-foldkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export const foldkitPackageJsonContents = `{
"type": "module",
"scripts": {},
"dependencies": {
"@effect/platform-browser": "4.0.0-beta.67",
"@effect/platform-browser": "4.0.0-beta.80",
"@fontsource-variable/jetbrains-mono": "^5.2.5",
"effect": "4.0.0-beta.67",
"effect": "4.0.0-beta.80",
"foldkit": "^0.101.0",
"shadcn": "^4.1.0",
"tailwindcss": "^4.1.13",
Expand Down
4 changes: 2 additions & 2 deletions packages/catalog/src/registry/content/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export const clientPackageJsonContents = `{
"scripts": {},
"dependencies": {
"@base-ui/react": "^1.3.0",
"@effect/atom-react": "4.0.0-beta.67",
"@effect/atom-react": "4.0.0-beta.80",
"@fontsource-variable/jetbrains-mono": "^5.2.5",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"effect": "4.0.0-beta.67",
"effect": "4.0.0-beta.80",
"lucide-react": "^1.0.1",
"react": "^19.2.0",
"react-dom": "^19.2.0",
Expand Down
15 changes: 9 additions & 6 deletions packages/catalog/src/registry/content/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ export * from "./services/PresenceService";
`;

export const presenceClientGeneratorContents = `import { ClientId } from "@repo/domain/WebSocket";
import { Context, Effect, Layer, Random } from "effect";
import { Context, Crypto, Effect, Layer } from "effect";

export class ClientGenerator extends Context.Service<ClientGenerator>()(
"ClientGenerator",
{
make: Effect.succeed({
generateClientId: Effect.fn("generateClientId")(function* () {
const uuid = yield* Random.nextUUIDv4;
return ClientId.make(uuid);
}),
make: Effect.gen(function* () {
const crypto = yield* Crypto.Crypto;
return {
generateClientId: Effect.fn("generateClientId")(function* () {
const uuid = yield* crypto.randomUUIDv4.pipe(Effect.orDie);
return ClientId.make(uuid);
}),
};
}),
},
) {
Expand Down
4 changes: 2 additions & 2 deletions packages/catalog/src/registry/content/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export const serverPackageJsonContents = `{
"type": "module",
"scripts": {},
"dependencies": {
"@effect/platform-bun": "4.0.0-beta.67",
"effect": "4.0.0-beta.67"
"@effect/platform-bun": "4.0.0-beta.80",
"effect": "4.0.0-beta.80"
},
"devDependencies": {
"@effect/language-service": "^0.85.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/catalog/src/registry/content/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const packagePackageJsonContents = `{
"type": "module",
"scripts": {},
"dependencies": {
"effect": "4.0.0-beta.67"
"effect": "4.0.0-beta.80"
},
"devDependencies": {
"@effect/language-service": "^0.85.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/catalog/src/registry/modules/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export const clientModules: ReadonlyArray<typeof ModuleDefinition.Type> = [
path: "{{targetPath}}/package.json",
field: "dependencies",
name: "@effect/platform-browser",
value: "4.0.0-beta.67",
value: "4.0.0-beta.80",
},
{
_tag: "jsx-slot",
Expand Down
6 changes: 3 additions & 3 deletions packages/catalog/src/registry/modules/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ export const packageModules: ReadonlyArray<typeof ModuleDefinition.Type> = [
path: "{{targetPath}}/package.json",
field: "dependencies",
name: "@effect/ai-anthropic",
value: "4.0.0-beta.67",
value: "4.0.0-beta.80",
},
{
_tag: "pkg-json-entry",
path: "{{targetPath}}/package.json",
field: "dependencies",
name: "effect",
value: "4.0.0-beta.67",
value: "4.0.0-beta.80",
},
{
_tag: "pkg-json-entry",
Expand Down Expand Up @@ -299,7 +299,7 @@ export const packageModules: ReadonlyArray<typeof ModuleDefinition.Type> = [
path: "{{targetPath}}/package.json",
field: "dependencies",
name: "effect",
value: "4.0.0-beta.67",
value: "4.0.0-beta.80",
},
{
_tag: "pkg-json-entry",
Expand Down
2 changes: 1 addition & 1 deletion packages/domain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"clean": "git clean -xdf .cache .turbo dist node_modules tsconfig.tsbuildinfo"
},
"dependencies": {
"effect": "4.0.0-beta.67"
"effect": "4.0.0-beta.80"
},
"devDependencies": {
"@repo/config-typescript": "workspace:*"
Expand Down
4 changes: 2 additions & 2 deletions packages/domain/src/Plan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe("@repo/domain Plan", () => {
});

it("allows planned file outcomes to be decoded independently", () => {
const outcome = Schema.decodeUnknownSync(Plan.fields.outcomes.schema)({
const outcome = Schema.decodeUnknownSync(Plan.fields.outcomes.value)({
_tag: "complete",
path: "packages/domain/tsconfig.json",
classification: "create",
Expand All @@ -79,7 +79,7 @@ describe("@repo/domain Plan", () => {
});

it("allows conflicts to be decoded independently", () => {
const conflict = Schema.decodeUnknownSync(Plan.fields.conflicts.schema)({
const conflict = Schema.decodeUnknownSync(Plan.fields.conflicts.value)({
_tag: "completeFile",
path: "package.json",
});
Expand Down
10 changes: 5 additions & 5 deletions packages/scaffold/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
"dependencies": {
"@repo/domain": "workspace:*",
"@repo/catalog": "workspace:*",
"effect": "4.0.0-beta.67",
"effect-boxes": "^0.15.2",
"effect": "4.0.0-beta.80",
"effect-boxes": "^0.16.1",
"ts-morph": "^28.0.0"
},
"devDependencies": {
"@effect/vitest": "4.0.0-beta.67",
"@types/node": "^25.9.0",
"@effect/vitest": "4.0.0-beta.80",
"@types/node": "^25.9.3",
"@repo/config-typescript": "workspace:*",
"vitest": "^4.1.6"
"vitest": "^4.1.8"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type ResolutionState = {
>;
readonly edges: HashMap.HashMap<
string,
typeof Blueprint.fields.edges.schema.Type
typeof Blueprint.fields.edges.value.Type
>;
};

Expand Down
4 changes: 2 additions & 2 deletions packages/scaffold/src/service/plan/PlanAssessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ function assessPlanningPath({
snapshotPath,
}: {
planningPath: PlanningIntentPath;
snapshotPath: typeof RepoSnapshot.fields.paths.schema.Type | undefined;
snapshotPath: typeof RepoSnapshot.fields.paths.value.Type | undefined;
}): PathAssessment {
const hasContents = planningPath.contents !== undefined;
const hasPackageJsonFields =
Expand Down Expand Up @@ -340,7 +340,7 @@ export function collectAncestorPaths(path: string): ReadonlyArray<string> {

// --- Internal helpers ---

type SnapshotPath = typeof RepoSnapshot.fields.paths.schema.Type | undefined;
type SnapshotPath = typeof RepoSnapshot.fields.paths.value.Type | undefined;

const createPathAssessment = ({
classification,
Expand Down
6 changes: 3 additions & 3 deletions packages/scaffold/src/service/plan/RepoSnapshotService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ export class RepoSnapshotService extends Context.Service<RepoSnapshotService>()(
return {
_tag: "missing",
path: snapshotPath,
} satisfies typeof RepoSnapshot.fields.paths.schema.Type;
} satisfies typeof RepoSnapshot.fields.paths.value.Type;
}

if (pathStat.type === "Directory") {
return {
_tag: "directory",
path: snapshotPath,
} satisfies typeof RepoSnapshot.fields.paths.schema.Type;
} satisfies typeof RepoSnapshot.fields.paths.value.Type;
}

const contents = yield* fileSystem
Expand All @@ -76,7 +76,7 @@ export class RepoSnapshotService extends Context.Service<RepoSnapshotService>()(
_tag: "file",
path: snapshotPath,
contents,
} satisfies typeof RepoSnapshot.fields.paths.schema.Type;
} satisfies typeof RepoSnapshot.fields.paths.value.Type;
}),
),
);
Expand Down
10 changes: 5 additions & 5 deletions packages/tui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
},
"dependencies": {
"@repo/domain": "workspace:*",
"effect": "4.0.0-beta.67",
"effect-boxes": "^0.15.2"
"effect": "4.0.0-beta.80",
"effect-boxes": "^0.16.1"
},
"devDependencies": {
"@effect/vitest": "4.0.0-beta.67",
"@types/node": "^25.9.0",
"@effect/vitest": "4.0.0-beta.80",
"@types/node": "^25.9.3",
"@repo/config-typescript": "workspace:*",
"vitest": "^4.1.6"
"vitest": "^4.1.8"
}
}
Loading