Skip to content

Commit

Permalink
Merge Schema into Effect
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti authored and tim-smart committed Oct 13, 2024
1 parent 8475a2c commit 8162c1d
Show file tree
Hide file tree
Showing 435 changed files with 17,234 additions and 17,044 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-sloths-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/schema": minor
---

Re-export modules from `effect`
41 changes: 41 additions & 0 deletions .changeset/six-crabs-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
"effect": minor
---

Merge Schema into Effect.

Before

```ts
import {
Arbitrary,
ArrayFormatter,
AST,
Equivalence,
FastCheck,
JSONSchema,
ParseResult,
Pretty,
Schema,
Serializable,
TreeFormatter
} from "@effect/schema"
```

After

```ts
import {
Arbitrary,
SchemaArrayFormatter, // changed
SchemaAST, // changed
SchemaEquivalence, // changed
FastCheck,
JSONSchema,
ParseResult,
Pretty,
Schema,
Serializable,
SchemaTreeFormatter // changed
} from "effect"
```
2 changes: 1 addition & 1 deletion packages/cli/src/Args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import type { FileSystem } from "@effect/platform/FileSystem"
import type { Path } from "@effect/platform/Path"
import type { QuitException, Terminal } from "@effect/platform/Terminal"
import type { Schema } from "@effect/schema/Schema"
import type { NonEmptyArray } from "effect/Array"
import type { Config } from "effect/Config"
import type { Effect } from "effect/Effect"
import type { Option } from "effect/Option"
import type { Pipeable } from "effect/Pipeable"
import type { Redacted } from "effect/Redacted"
import type { Schema } from "effect/Schema"
import type { Secret } from "effect/Secret"
import type { CliConfig } from "./CliConfig.js"
import type { HelpDoc } from "./HelpDoc.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import type { FileSystem } from "@effect/platform/FileSystem"
import type { Path } from "@effect/platform/Path"
import type { QuitException, Terminal } from "@effect/platform/Terminal"
import type { Schema } from "@effect/schema/Schema"
import type { NonEmptyArray } from "effect/Array"
import type { Config } from "effect/Config"
import type { Effect } from "effect/Effect"
Expand All @@ -13,6 +12,7 @@ import type { HashMap } from "effect/HashMap"
import type { Option } from "effect/Option"
import type { Pipeable } from "effect/Pipeable"
import type { Redacted } from "effect/Redacted"
import type { Schema } from "effect/Schema"
import type { Secret } from "effect/Secret"
import type { CliConfig } from "./CliConfig.js"
import type { HelpDoc } from "./HelpDoc.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/internal/args.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type * as FileSystem from "@effect/platform/FileSystem"
import type * as Path from "@effect/platform/Path"
import type * as Terminal from "@effect/platform/Terminal"
import * as Schema from "@effect/schema/Schema"
import * as TreeFormatter from "@effect/schema/TreeFormatter"
import * as Arr from "effect/Array"
import type * as Config from "effect/Config"
import * as Console from "effect/Console"
Expand All @@ -13,6 +11,8 @@ import * as Option from "effect/Option"
import { pipeArguments } from "effect/Pipeable"
import type * as Redacted from "effect/Redacted"
import * as Ref from "effect/Ref"
import * as Schema from "effect/Schema"
import * as TreeFormatter from "effect/SchemaTreeFormatter"
import type * as Secret from "effect/Secret"
import type * as Args from "../Args.js"
import type * as CliConfig from "../CliConfig.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/internal/options.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type * as FileSystem from "@effect/platform/FileSystem"
import type * as Path from "@effect/platform/Path"
import type * as Terminal from "@effect/platform/Terminal"
import * as Schema from "@effect/schema/Schema"
import * as TreeFormatter from "@effect/schema/TreeFormatter"
import * as Arr from "effect/Array"
import * as Config from "effect/Config"
import * as Console from "effect/Console"
Expand All @@ -16,6 +14,8 @@ import { pipeArguments } from "effect/Pipeable"
import * as Predicate from "effect/Predicate"
import type * as Redacted from "effect/Redacted"
import * as Ref from "effect/Ref"
import * as Schema from "effect/Schema"
import * as TreeFormatter from "effect/SchemaTreeFormatter"
import type * as Secret from "effect/Secret"
import type * as CliConfig from "../CliConfig.js"
import type * as HelpDoc from "../HelpDoc.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/primitive.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as FileSystem from "@effect/platform/FileSystem"
import * as Schema from "@effect/schema/Schema"
import * as Arr from "effect/Array"
import * as Effect from "effect/Effect"
import { dual, pipe } from "effect/Function"
import * as Option from "effect/Option"
import { pipeArguments } from "effect/Pipeable"
import * as EffectRedacted from "effect/Redacted"
import * as Schema from "effect/Schema"
import * as EffectSecret from "effect/Secret"
import type * as CliConfig from "../CliConfig.js"
import type * as HelpDoc from "../HelpDoc.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/prompt/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as Terminal from "@effect/platform/Terminal"
import * as Ansi from "@effect/printer-ansi/Ansi"
import * as Doc from "@effect/printer-ansi/AnsiDoc"
import * as Optimize from "@effect/printer/Optimize"
import * as Schema from "@effect/schema/Schema"
import * as Arr from "effect/Array"
import * as Effect from "effect/Effect"
import * as EffectNumber from "effect/Number"
import * as Option from "effect/Option"
import * as Schema from "effect/Schema"
import type * as Prompt from "../../Prompt.js"
import * as InternalPrompt from "../prompt.js"
import { Action } from "./action.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/Args.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as HelpDoc from "@effect/cli/HelpDoc"
import * as ValidationError from "@effect/cli/ValidationError"
import { FileSystem, Path } from "@effect/platform"
import { NodeContext } from "@effect/platform-node"
import * as Schema from "@effect/schema/Schema"
import * as Array from "effect/Array"
import * as Effect from "effect/Effect"
import * as Option from "effect/Option"
import * as Schema from "effect/Schema"
import { describe, expect, it } from "vitest"

const runEffect = <E, A>(
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/Options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as ValidationError from "@effect/cli/ValidationError"
import * as NodeContext from "@effect/platform-node/NodeContext"
import * as FileSystem from "@effect/platform/FileSystem"
import * as Path from "@effect/platform/Path"
import * as Schema from "@effect/schema/Schema"
import { BigDecimal } from "effect"
import * as Array from "effect/Array"
import * as Data from "effect/Data"
Expand All @@ -14,6 +13,7 @@ import * as Either from "effect/Either"
import { identity } from "effect/Function"
import * as HashMap from "effect/HashMap"
import * as Option from "effect/Option"
import * as Schema from "effect/Schema"
import { assert, describe, expect, it } from "vitest"

const firstName = Options.text("firstName").pipe(Options.withAlias("f"))
Expand Down
4 changes: 2 additions & 2 deletions packages/cluster-browser/src/RpcBroadcastChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import type * as Rpc from "@effect/rpc/Rpc"
import * as RpcResolver from "@effect/rpc/RpcResolver"
import * as RpcRouter from "@effect/rpc/RpcRouter"
import * as Schema from "@effect/schema/Schema"
import type * as Serializable from "@effect/schema/Serializable"
import * as Effect from "effect/Effect"
import { pipe } from "effect/Function"
import * as Queue from "effect/Queue"
import type * as RequestResolver from "effect/RequestResolver"
import * as Schema from "effect/Schema"
import type * as Serializable from "effect/Serializable"
import * as Stream from "effect/Stream"

class ClientRequest extends Schema.TaggedClass<ClientRequest>()("ClientRequest", {
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-node/src/ShardManagerProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as Pod from "@effect/cluster/Pod"
import * as PodAddress from "@effect/cluster/PodAddress"
import * as ShardId from "@effect/cluster/ShardId"
import * as Schema from "@effect/schema/Schema"
import * as Schema from "effect/Schema"

/**
* @since 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-node/src/ShardingProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as SerializedEnvelope from "@effect/cluster/SerializedEnvelope"
import * as SerializedMessage from "@effect/cluster/SerializedMessage"
import * as ShardId from "@effect/cluster/ShardId"
import * as ShardingException from "@effect/cluster/ShardingException"
import * as Schema from "@effect/schema/Schema"
import * as Schema from "effect/Schema"

/**
* @since 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions packages/cluster-node/src/StorageFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import * as PodAddress from "@effect/cluster/PodAddress"
import * as ShardId from "@effect/cluster/ShardId"
import * as ShardingException from "@effect/cluster/ShardingException"
import * as Storage from "@effect/cluster/Storage"
import * as Schema from "@effect/schema/Schema"
import * as TreeFormatter from "@effect/schema/TreeFormatter"
import * as Effect from "effect/Effect"
import { pipe } from "effect/Function"
import * as HashMap from "effect/HashMap"
import * as Layer from "effect/Layer"
import type * as Option from "effect/Option"
import * as Queue from "effect/Queue"
import * as Schema from "effect/Schema"
import * as TreeFormatter from "effect/SchemaTreeFormatter"
import * as Stream from "effect/Stream"
import * as fs from "node:fs"

Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-workflow/src/Activity.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* @since 1.0.0
*/
import type * as Schema from "@effect/schema/Schema"
import * as Effect from "effect/Effect"
import type * as Exit from "effect/Exit"
import { pipe } from "effect/Function"
import * as Option from "effect/Option"
import type * as Schema from "effect/Schema"
import * as Stream from "effect/Stream"
import * as ActivityContext from "./ActivityContext.js"
import * as DurableExecutionEvent from "./DurableExecutionEvent.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-workflow/src/DurableExecutionEvent.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @since 1.0.0
*/
import * as Schema from "@effect/schema/Schema"
import type * as Exit from "effect/Exit"
import * as Schema from "effect/Schema"

const ATTEMPTED = "@effect/cluster-workflow/DurableExecutionEvent/Attempted"

Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-workflow/src/DurableExecutionJournal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* @since 1.0.0
*/
import * as DurableExecutionEvent from "@effect/cluster-workflow/DurableExecutionEvent"
import * as Schema from "@effect/schema/Schema"
import * as SqlClient from "@effect/sql/SqlClient"
import * as Context from "effect/Context"
import * as Effect from "effect/Effect"
import * as Layer from "effect/Layer"
import * as Schema from "effect/Schema"
import * as Stream from "effect/Stream"

const SymbolKey = "@effect/cluster-workflow/DurableExecutionJournal"
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-workflow/src/Workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* @since 1.0.0
*/
import type * as Message from "@effect/cluster/Message"
import * as Schema from "@effect/schema/Schema"
import * as Array from "effect/Array"
import * as Clock from "effect/Clock"
import * as Duration from "effect/Duration"
import * as Effect from "effect/Effect"
import { pipe } from "effect/Function"
import * as Option from "effect/Option"
import * as Schema from "effect/Schema"
import * as Activity from "./Activity.js"
import * as WorkflowContext from "./WorkflowContext.js"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import * as DurableExecutionEvent from "@effect/cluster-workflow/DurableExecutio
import * as DurableExecutionJournal from "@effect/cluster-workflow/DurableExecutionJournal"
import * as NodeFileSystem from "@effect/platform-node/NodeFileSystem"
import * as FileSystem from "@effect/platform/FileSystem"
import * as Schema from "@effect/schema/Schema"
import * as Sqlite from "@effect/sql-sqlite-node/SqliteClient"
import * as SqlClient from "@effect/sql/SqlClient"
import * as Chunk from "effect/Chunk"
import * as Effect from "effect/Effect"
import * as Layer from "effect/Layer"
import * as Schema from "effect/Schema"
import * as Stream from "effect/Stream"
import { describe, expect, it } from "vitest"

Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-workflow/test/Workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as utils from "@effect/cluster-workflow/test/utils"
import * as Workflow from "@effect/cluster-workflow/Workflow"
import * as WorkflowEngine from "@effect/cluster-workflow/WorkflowEngine"
import * as Message from "@effect/cluster/Message"
import * as Schema from "@effect/schema/Schema"
import * as Chunk from "effect/Chunk"
import * as Deferred from "effect/Deferred"
import * as Effect from "effect/Effect"
Expand All @@ -17,6 +16,7 @@ import { pipe } from "effect/Function"
import * as Logger from "effect/Logger"
import * as LogLevel from "effect/LogLevel"
import * as Ref from "effect/Ref"
import * as Schema from "effect/Schema"
import * as Stream from "effect/Stream"
import { describe, expect, it } from "vitest"

Expand Down
2 changes: 1 addition & 1 deletion packages/cluster-workflow/test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Activity from "@effect/cluster-workflow/Activity"
import type * as Schema from "@effect/schema/Schema"
import * as Effect from "effect/Effect"
import type * as Exit from "effect/Exit"
import { pipe } from "effect/Function"
import type * as Schema from "effect/Schema"
import { vi } from "vitest"
import type { Mock } from "vitest"

Expand Down
4 changes: 2 additions & 2 deletions packages/cluster/src/Message.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* @since 1.0.0
*/
import type * as Schema from "@effect/schema/Schema"
import type * as Serializable from "@effect/schema/Serializable"
import type * as Exit_ from "effect/Exit"
import type * as PrimaryKey from "effect/PrimaryKey"
import type * as Schema from "effect/Schema"
import type * as Serializable from "effect/Serializable"
import type * as Types from "effect/Types"
import * as internal from "./internal/message.js"

Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/src/MessageState.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @since 1.0.0
*/
import type * as Schema from "@effect/schema/Schema"
import type * as Effect from "effect/Effect"
import type * as Schema from "effect/Schema"
import * as internal from "./internal/messageState.js"

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/src/Pod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @since 1.0.0
*/
import * as Schema from "@effect/schema/Schema"
import * as Schema from "effect/Schema"
import { TypeIdSchema } from "./internal/utils.js"
import * as PodAddress from "./PodAddress.js"

Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/src/PodAddress.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @since 1.0.0
*/
import * as Schema from "@effect/schema/Schema"
import * as Schema from "effect/Schema"
import { TypeIdSchema } from "./internal/utils.js"

/** @internal */
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/src/PoisonPill.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* @since 1.0.0
*/
import * as Schema from "@effect/schema/Schema"
import * as Effect from "effect/Effect"
import { pipe } from "effect/Function"
import * as Queue from "effect/Queue"
import * as Schema from "effect/Schema"
import { TypeIdSchema } from "./internal/utils.js"

/** @internal */
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/src/RecipientAddress.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* @since 1.0.0
*/
import * as Schema from "@effect/schema/Schema"
import * as Equal from "effect/Equal"
import * as Hash from "effect/Hash"
import * as Schema from "effect/Schema"
import { TypeIdSchema } from "./internal/utils.js"

const RecipientAddressSymbolKey = "@effect/cluster/RecipientAddress"
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/src/RecipientType.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* @since 1.0.0
*/
import type * as Schema from "@effect/schema/Schema"
import * as Data from "effect/Data"
import * as Equal from "effect/Equal"
import * as Hash from "effect/Hash"
import type * as Schema from "effect/Schema"
import type * as Message from "./Message.js"
import * as ShardId from "./ShardId.js"

Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/src/Serialization.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* @since 1.0.0
*/
import type * as Schema from "@effect/schema/Schema"
import type * as Context from "effect/Context"
import type * as Effect from "effect/Effect"
import type * as Layer from "effect/Layer"
import type * as Schema from "effect/Schema"
import * as internal from "./internal/serialization.js"
import type * as SerializedMessage from "./SerializedMessage.js"
import type * as ShardingException from "./ShardingException.js"
Expand Down
Loading

0 comments on commit 8162c1d

Please sign in to comment.