From 4aff4df06cab37656474d730eaca44881de3be4b Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 29 Sep 2023 16:56:31 +1300 Subject: [PATCH] update to effect package --- .changeset/green-cycles-complain.md | 5 + docs/modules/Options.ts.md | 2 +- examples/git.ts | 8 +- package.json | 20 ++-- pnpm-lock.yaml | 161 +++++++++++++--------------- src/Args.ts | 12 +-- src/BuiltInOption.ts | 2 +- src/CliApp.ts | 2 +- src/CliConfig.ts | 4 +- src/Command.ts | 14 +-- src/HelpDoc.ts | 2 +- src/Options.ts | 16 +-- src/Primitive.ts | 8 +- src/Usage.ts | 4 +- src/internal/args.ts | 16 +-- src/internal/builtInOption.ts | 2 +- src/internal/cliApp.ts | 10 +- src/internal/cliConfig.ts | 6 +- src/internal/command.ts | 20 ++-- src/internal/commandDirective.ts | 2 +- src/internal/helpDoc.ts | 4 +- src/internal/helpDoc/span.ts | 4 +- src/internal/options.ts | 20 ++-- src/internal/primitive.ts | 10 +- src/internal/usage.ts | 6 +- test/Command.ts | 6 +- test/Options.ts | 14 +-- test/utils/extend.ts | 22 ++-- test/utils/wc.ts | 4 +- 29 files changed, 197 insertions(+), 209 deletions(-) create mode 100644 .changeset/green-cycles-complain.md diff --git a/.changeset/green-cycles-complain.md b/.changeset/green-cycles-complain.md new file mode 100644 index 0000000..693a09b --- /dev/null +++ b/.changeset/green-cycles-complain.md @@ -0,0 +1,5 @@ +--- +"@effect/cli": minor +--- + +update to effect package diff --git a/docs/modules/Options.ts.md b/docs/modules/Options.ts.md index 0b95a27..4d63be9 100644 --- a/docs/modules/Options.ts.md +++ b/docs/modules/Options.ts.md @@ -297,7 +297,7 @@ export declare const choiceWithValue: =16.17.1'} hasBin: true peerDependencies: @@ -701,12 +694,12 @@ packages: dependencies: doctrine: 3.0.0 fs-extra: 11.1.1 - glob: 10.3.7 + glob: 10.3.10 markdown-toc: github.com/effect-ts/markdown-toc/4bfeb0f140105440ea0d12df2fa23199cc3ec1d5 prettier: 2.8.8 - rimraf: 5.0.4 + rimraf: 5.0.5 ts-morph: 19.0.0 - ts-node: 10.9.1(@types/node@20.7.0)(typescript@5.2.2) + ts-node: 10.9.1(@types/node@20.7.1)(typescript@5.2.2) tsconfck: 2.1.2(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -723,49 +716,37 @@ packages: diff: 5.1.0 dev: true - /@effect/io@0.41.0(@effect/data@0.18.6): - resolution: {integrity: sha512-gCjntDN3lbUh8wVQnwNoYlugNlWESZWsVkBFPfmOf2439EptHkvdEDNA47vR4OSB3lcqhH+J5jJHi2KWnEbRew==} - peerDependencies: - '@effect/data': ^0.18.5 - dependencies: - '@effect/data': 0.18.6 - dev: true - /@effect/language-service@0.0.21: resolution: {integrity: sha512-e8vfKbjnbYiyneBincEFS0tzXluopGK77OkVFbPRtUbNDS5tJfb+jiwOQEiqASDsadcZmd+9J9+Q6v/z7GuN2g==} dev: true - /@effect/printer-ansi@0.16.0(@effect/data@0.18.6)(@effect/io@0.41.0)(@effect/typeclass@0.5.0): - resolution: {integrity: sha512-KCQSLFt5/IW8sGRYo1VFJ2wxuLcM23C6MOzUu7MTa4F1IyWnJcARs5UF3S135xQcvC6PkrLqm7/MDy7irMnOkA==} + /@effect/printer-ansi@0.17.0(@effect/typeclass@0.6.0)(effect@2.0.0-next.37): + resolution: {integrity: sha512-4BJiklUfewqOFQxl2bVvsgY2w3P1fbd30/Uu9Xg4fq9WjimdDXssc+JPb5VS92yuEjM6I8XcF+skWFIiywNvww==} peerDependencies: - '@effect/data': ^0.18.6 - '@effect/io': ^0.41.0 - '@effect/typeclass': ^0.5.0 + '@effect/typeclass': ^0.6.0 + effect: 2.0.0-next.37 dependencies: - '@effect/data': 0.18.6 - '@effect/io': 0.41.0(@effect/data@0.18.6) - '@effect/printer': 0.16.0(@effect/data@0.18.6)(@effect/io@0.41.0)(@effect/typeclass@0.5.0) - '@effect/typeclass': 0.5.0(@effect/data@0.18.6) + '@effect/printer': 0.17.0(@effect/typeclass@0.6.0)(effect@2.0.0-next.37) + '@effect/typeclass': 0.6.0(effect@2.0.0-next.37) + effect: 2.0.0-next.37 dev: true - /@effect/printer@0.16.0(@effect/data@0.18.6)(@effect/io@0.41.0)(@effect/typeclass@0.5.0): - resolution: {integrity: sha512-M8wj9BgcICmE6DMa0O4yYv8eAN5RrH1SobQbTgUSzZ3g/8g5uR3WlfPbxruyT0fOjm61SMHmquUoLtMQfrDsMQ==} + /@effect/printer@0.17.0(@effect/typeclass@0.6.0)(effect@2.0.0-next.37): + resolution: {integrity: sha512-JA8ZSeRTB4AAEHu7NGUPohzVsf4BD8hUWEQvRaxxzQisuKYAoG9K5QIAQ+Jtlq6kcjnotx/X510GpvvvDxvzSw==} peerDependencies: - '@effect/data': ^0.18.6 - '@effect/io': ^0.41.0 - '@effect/typeclass': ^0.5.0 + '@effect/typeclass': ^0.6.0 + effect: 2.0.0-next.37 dependencies: - '@effect/data': 0.18.6 - '@effect/io': 0.41.0(@effect/data@0.18.6) - '@effect/typeclass': 0.5.0(@effect/data@0.18.6) + '@effect/typeclass': 0.6.0(effect@2.0.0-next.37) + effect: 2.0.0-next.37 dev: true - /@effect/typeclass@0.5.0(@effect/data@0.18.6): - resolution: {integrity: sha512-bhZg69c6yZcZChFtyTAsyn6Bzmbw4s1Vq/LBU8kVTtwFXz5J2kZSkI+e8LWW1xvtBOeGpNcPqPwfbItVYXe23A==} + /@effect/typeclass@0.6.0(effect@2.0.0-next.37): + resolution: {integrity: sha512-rVSKJUsI83s0mwi6Dv/ZdIS+CFoxY9ordb/Yl7WgXqX19In4Ew3graz1QfPG8wgQ1mlUx9EHoabJ15XT+9ZxBw==} peerDependencies: - '@effect/data': ^0.18.3 + effect: 2.0.0-next.37 dependencies: - '@effect/data': 0.18.6 + effect: 2.0.0-next.37 dev: true /@esbuild/android-arm64@0.18.20: @@ -1053,7 +1034,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 20.7.0 + '@types/node': 20.7.1 '@types/yargs': 15.0.15 chalk: 4.1.2 dev: true @@ -1255,8 +1236,8 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true - /@types/node@20.7.0: - resolution: {integrity: sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg==} + /@types/node@20.7.1: + resolution: {integrity: sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==} dev: true /@types/normalize-package-data@2.4.1: @@ -1495,7 +1476,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.23.0) '@types/babel__core': 7.20.2 react-refresh: 0.14.0 - vite: 4.4.9(@types/node@20.7.0) + vite: 4.4.9(@types/node@20.7.1) transitivePeerDependencies: - supports-color dev: true @@ -2417,6 +2398,10 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /effect@2.0.0-next.37: + resolution: {integrity: sha512-poONzql/x5pn9ZtsmabqiPPZPuiGJoMUoZccGMaCZWYY1DSD8klYNviQEker1BDU0szr+J7bmyFFjgdYT3BVfQ==} + dev: true + /electron-to-chromium@1.4.529: resolution: {integrity: sha512-6uyPyXTo8lkv8SWAmjKFbG42U073TXlzD4R8rW3EzuznhFS2olCIAfjjQtV2dV2ar/vRF55KUd3zQYnCB0dd3A==} dev: true @@ -2881,11 +2866,11 @@ packages: tmp: 0.0.33 dev: true - /fast-check@3.13.0: - resolution: {integrity: sha512-m6+3gZ/yTiCWTuV/1e/UuPPjyyyHdQ5gu0pMd84C6705VTDjAgAE6nqFT5jhgegFllCJ95yOzBpqvJSs2DZAxQ==} + /fast-check@3.13.1: + resolution: {integrity: sha512-Xp00tFuWd83i8rbG/4wU54qU+yINjQha7bXH2N4ARNTkyOimzHtUBJ5+htpdXk7RMaCOD/j2jxSjEt9u9ZPNeQ==} engines: {node: '>=8.0.0'} dependencies: - pure-rand: 6.0.3 + pure-rand: 6.0.4 dev: true /fast-deep-equal@3.1.3: @@ -3161,15 +3146,15 @@ packages: is-glob: 4.0.3 dev: true - /glob@10.3.7: - resolution: {integrity: sha512-wCMbE1m9Nx5yD9LYtgsVWq5VhHlk5WzJirw594qZR6AIvQYuHrdDtIktUVjQItalD53y7dqoedu9xP0u0WaxIQ==} + /glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} hasBin: true dependencies: foreground-child: 3.1.1 - jackspeak: 2.3.5 + jackspeak: 2.3.6 minimatch: 9.0.3 - minipass: 7.0.3 + minipass: 7.0.4 path-scurry: 1.10.1 dev: true @@ -3681,8 +3666,8 @@ packages: istanbul-lib-report: 3.0.1 dev: true - /jackspeak@2.3.5: - resolution: {integrity: sha512-Ratx+B8WeXLAtRJn26hrhY8S1+Jz6pxPMrkrdkgb/NstTNiqMhX0/oFVu5wX+g5n6JlEu2LPsDJmY8nRP4+alw==} + /jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} dependencies: '@isaacs/cliui': 8.0.2 @@ -4116,8 +4101,8 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true - /minipass@7.0.3: - resolution: {integrity: sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==} + /minipass@7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} engines: {node: '>=16 || 14 >=14.17'} dev: true @@ -4453,7 +4438,7 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dependencies: lru-cache: 10.0.1 - minipass: 7.0.3 + minipass: 7.0.4 dev: true /path-type@4.0.0: @@ -4645,8 +4630,8 @@ packages: engines: {node: '>=6'} dev: true - /pure-rand@6.0.3: - resolution: {integrity: sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==} + /pure-rand@6.0.4: + resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==} dev: true /queue-microtask@1.2.3: @@ -4877,12 +4862,12 @@ packages: glob: 7.2.3 dev: true - /rimraf@5.0.4: - resolution: {integrity: sha512-rizQI/o/YAMM1us0Zyax0uRfIK39XR52EAjjOi0fzMolpGp0onj6CWzBAXuOx6+6Xi9Rgi0d9tUZojhJerLUmQ==} + /rimraf@5.0.5: + resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} engines: {node: '>=14'} hasBin: true dependencies: - glob: 10.3.7 + glob: 10.3.10 dev: true /rollup@3.28.1: @@ -5399,7 +5384,7 @@ packages: code-block-writer: 12.0.0 dev: true - /ts-node@10.9.1(@types/node@20.7.0)(typescript@5.2.2): + /ts-node@10.9.1(@types/node@20.7.1)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -5418,7 +5403,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.7.0 + '@types/node': 20.7.1 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -5664,7 +5649,7 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node@0.34.5(@types/node@20.7.0): + /vite-node@0.34.5(@types/node@20.7.1): resolution: {integrity: sha512-RNZ+DwbCvDoI5CbCSQSyRyzDTfFvFauvMs6Yq4ObJROKlIKuat1KgSX/Ako5rlDMfVCyMcpMRMTkJBxd6z8YRA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -5674,7 +5659,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.9(@types/node@20.7.0) + vite: 4.4.9(@types/node@20.7.1) transitivePeerDependencies: - '@types/node' - less @@ -5686,7 +5671,7 @@ packages: - terser dev: true - /vite@4.4.9(@types/node@20.7.0): + /vite@4.4.9(@types/node@20.7.1): resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -5714,7 +5699,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.7.0 + '@types/node': 20.7.1 esbuild: 0.18.20 postcss: 8.4.29 rollup: 3.28.1 @@ -5755,7 +5740,7 @@ packages: dependencies: '@types/chai': 4.3.6 '@types/chai-subset': 1.3.3 - '@types/node': 20.7.0 + '@types/node': 20.7.1 '@vitest/expect': 0.34.5 '@vitest/runner': 0.34.5 '@vitest/snapshot': 0.34.5 @@ -5774,8 +5759,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.4.9(@types/node@20.7.0) - vite-node: 0.34.5(@types/node@20.7.0) + vite: 4.4.9(@types/node@20.7.1) + vite-node: 0.34.5(@types/node@20.7.1) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/Args.ts b/src/Args.ts index 37ca9d5..324dba9 100644 --- a/src/Args.ts +++ b/src/Args.ts @@ -5,12 +5,12 @@ import type { HelpDoc } from "@effect/cli/HelpDoc" import * as internal from "@effect/cli/internal/args" import type { Usage } from "@effect/cli/Usage" import type { ValidationError } from "@effect/cli/ValidationError" -import type { Chunk, NonEmptyChunk } from "@effect/data/Chunk" -import type { Either } from "@effect/data/Either" -import type { Option } from "@effect/data/Option" -import type { Pipeable } from "@effect/data/Pipeable" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" -import type { Effect } from "@effect/io/Effect" +import type { Chunk, NonEmptyChunk } from "effect/Chunk" +import type { Effect } from "effect/Effect" +import type { Either } from "effect/Either" +import type { Option } from "effect/Option" +import type { Pipeable } from "effect/Pipeable" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" /** * @since 1.0.0 diff --git a/src/BuiltInOption.ts b/src/BuiltInOption.ts index 694738e..1380e20 100644 --- a/src/BuiltInOption.ts +++ b/src/BuiltInOption.ts @@ -8,7 +8,7 @@ import * as internal from "@effect/cli/internal/builtInOption" import type { Options } from "@effect/cli/Options" import type { ShellType } from "@effect/cli/ShellType" import type { Usage } from "@effect/cli/Usage" -import type { Option } from "@effect/data/Option" +import type { Option } from "effect/Option" /** * @since 1.0.0 diff --git a/src/CliApp.ts b/src/CliApp.ts index fca3634..0c53eee 100644 --- a/src/CliApp.ts +++ b/src/CliApp.ts @@ -6,7 +6,7 @@ import type { HelpDoc } from "@effect/cli/HelpDoc" import type { Span } from "@effect/cli/HelpDoc/Span" import * as internal from "@effect/cli/internal/cliApp" import type { ValidationError } from "@effect/cli/ValidationError" -import type { Effect } from "@effect/io/Effect" +import type { Effect } from "effect/Effect" /** * A `CliApp` is a complete description of a command-line application. diff --git a/src/CliConfig.ts b/src/CliConfig.ts index b4fff2b..989600c 100644 --- a/src/CliConfig.ts +++ b/src/CliConfig.ts @@ -2,8 +2,8 @@ * @since 1.0.0 */ import * as internal from "@effect/cli/internal/cliConfig" -import type * as Context from "@effect/data/Context" -import type * as Layer from "@effect/io/Layer" +import type * as Context from "effect/Context" +import type * as Layer from "effect/Layer" /** * Represents how arguments from the command-line are to be parsed. diff --git a/src/Command.ts b/src/Command.ts index dc6e43a..500d1f0 100644 --- a/src/Command.ts +++ b/src/Command.ts @@ -9,13 +9,13 @@ import * as internal from "@effect/cli/internal/command" import type { Options } from "@effect/cli/Options" import type { Usage } from "@effect/cli/Usage" import type { ValidationError } from "@effect/cli/ValidationError" -import type { Either } from "@effect/data/Either" -import type { HashMap } from "@effect/data/HashMap" -import type { HashSet } from "@effect/data/HashSet" -import type { Option } from "@effect/data/Option" -import type { Pipeable } from "@effect/data/Pipeable" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" -import type { Effect } from "@effect/io/Effect" +import type { Effect } from "effect/Effect" +import type { Either } from "effect/Either" +import type { HashMap } from "effect/HashMap" +import type { HashSet } from "effect/HashSet" +import type { Option } from "effect/Option" +import type { Pipeable } from "effect/Pipeable" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" /** * @since 1.0.0 diff --git a/src/HelpDoc.ts b/src/HelpDoc.ts index 8aeb781..391f981 100644 --- a/src/HelpDoc.ts +++ b/src/HelpDoc.ts @@ -3,8 +3,8 @@ */ import type { Span } from "@effect/cli/HelpDoc/Span" import * as internal from "@effect/cli/internal/helpDoc" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" import type { AnsiDoc } from "@effect/printer-ansi/AnsiDoc" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" /** * A `HelpDoc` models the full documentation for a command-line application. diff --git a/src/Options.ts b/src/Options.ts index dca4fb2..45f2f24 100644 --- a/src/Options.ts +++ b/src/Options.ts @@ -6,13 +6,13 @@ import type { HelpDoc } from "@effect/cli/HelpDoc" import * as internal from "@effect/cli/internal/options" import type { Usage } from "@effect/cli/Usage" import type { ValidationError } from "@effect/cli/ValidationError" -import type { Chunk, NonEmptyChunk } from "@effect/data/Chunk" -import type { Either } from "@effect/data/Either" -import type { HashMap } from "@effect/data/HashMap" -import type { Option } from "@effect/data/Option" -import type { Pipeable } from "@effect/data/Pipeable" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" -import type { Effect } from "@effect/io/Effect" +import type { Chunk, NonEmptyChunk } from "effect/Chunk" +import type { Effect } from "effect/Effect" +import type { Either } from "effect/Either" +import type { HashMap } from "effect/HashMap" +import type { Option } from "effect/Option" +import type { Pipeable } from "effect/Pipeable" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" /** * @since 1.0.0 @@ -154,7 +154,7 @@ export const choice: >( * * @example * import * as Options from "@effect/cli/Options" - * import * as Data from "@effect/data/Data" + * import * as Data from "effect/Data" * * export type Animal = Dog | Cat * diff --git a/src/Primitive.ts b/src/Primitive.ts index c8e2f4f..fce1c97 100644 --- a/src/Primitive.ts +++ b/src/Primitive.ts @@ -3,10 +3,10 @@ */ import type { Span } from "@effect/cli/HelpDoc/Span" import * as internal from "@effect/cli/internal/primitive" -import type { Option } from "@effect/data/Option" -import type { Pipeable } from "@effect/data/Pipeable" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" -import type { Effect } from "@effect/io/Effect" +import type { Effect } from "effect/Effect" +import type { Option } from "effect/Option" +import type { Pipeable } from "effect/Pipeable" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" /** * @since 1.0.0 diff --git a/src/Usage.ts b/src/Usage.ts index c97dcd4..15fcca3 100644 --- a/src/Usage.ts +++ b/src/Usage.ts @@ -3,8 +3,8 @@ */ import type { HelpDoc } from "@effect/cli/HelpDoc" import * as internal from "@effect/cli/internal/usage" -import type { Chunk } from "@effect/data/Chunk" -import type { Option } from "@effect/data/Option" +import type { Chunk } from "effect/Chunk" +import type { Option } from "effect/Option" /** * @since 1.0.0 diff --git a/src/internal/args.ts b/src/internal/args.ts index 56e2bd5..07be590 100644 --- a/src/internal/args.ts +++ b/src/internal/args.ts @@ -8,14 +8,14 @@ import * as validationError from "@effect/cli/internal/validationError" import type * as Primitive from "@effect/cli/Primitive" import type * as Usage from "@effect/cli/Usage" import type * as ValidationError from "@effect/cli/ValidationError" -import * as Chunk from "@effect/data/Chunk" -import * as Either from "@effect/data/Either" -import { dual } from "@effect/data/Function" -import * as Option from "@effect/data/Option" -import { pipeArguments } from "@effect/data/Pipeable" -import * as ReadonlyArray from "@effect/data/ReadonlyArray" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" -import * as Effect from "@effect/io/Effect" +import * as Chunk from "effect/Chunk" +import * as Effect from "effect/Effect" +import * as Either from "effect/Either" +import { dual } from "effect/Function" +import * as Option from "effect/Option" +import { pipeArguments } from "effect/Pipeable" +import * as ReadonlyArray from "effect/ReadonlyArray" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" const ArgsSymbolKey = "@effect/cli/Args" diff --git a/src/internal/builtInOption.ts b/src/internal/builtInOption.ts index d9beba2..5db18b1 100644 --- a/src/internal/builtInOption.ts +++ b/src/internal/builtInOption.ts @@ -6,7 +6,7 @@ import * as _shellType from "@effect/cli/internal/shellType" import type * as Options from "@effect/cli/Options" import type * as ShellType from "@effect/cli/ShellType" import type * as Usage from "@effect/cli/Usage" -import * as Option from "@effect/data/Option" +import * as Option from "effect/Option" /** @internal */ export const showCompletions = (index: number, shellType: ShellType.ShellType): BuiltInOption.BuiltInOption => ({ diff --git a/src/internal/cliApp.ts b/src/internal/cliApp.ts index 64e12f0..999d1de 100644 --- a/src/internal/cliApp.ts +++ b/src/internal/cliApp.ts @@ -11,11 +11,11 @@ import * as span from "@effect/cli/internal/helpDoc/span" import * as _usage from "@effect/cli/internal/usage" import * as validationError from "@effect/cli/internal/validationError" import type * as ValidationError from "@effect/cli/ValidationError" -import * as Context from "@effect/data/Context" -import { dual, pipe } from "@effect/data/Function" -import * as Option from "@effect/data/Option" -import * as Console from "@effect/io/Console" -import * as Effect from "@effect/io/Effect" +import * as Console from "effect/Console" +import * as Context from "effect/Context" +import * as Effect from "effect/Effect" +import { dual, pipe } from "effect/Function" +import * as Option from "effect/Option" const defaultConfig = { summary: span.empty, diff --git a/src/internal/cliConfig.ts b/src/internal/cliConfig.ts index 5696c0d..540057a 100644 --- a/src/internal/cliConfig.ts +++ b/src/internal/cliConfig.ts @@ -1,7 +1,7 @@ import type * as CliConfig from "@effect/cli/CliConfig" -import * as Context from "@effect/data/Context" -import { dual } from "@effect/data/Function" -import * as Layer from "@effect/io/Layer" +import * as Context from "effect/Context" +import { dual } from "effect/Function" +import * as Layer from "effect/Layer" /** @internal */ export const make = (isCaseSensitive: boolean, autoCorrectLimit: number): CliConfig.CliConfig => ({ diff --git a/src/internal/command.ts b/src/internal/command.ts index 9bbcc8d..a3a0928 100644 --- a/src/internal/command.ts +++ b/src/internal/command.ts @@ -15,16 +15,16 @@ import * as validationError from "@effect/cli/internal/validationError" import type * as Options from "@effect/cli/Options" import type * as Usage from "@effect/cli/Usage" import type * as ValidationError from "@effect/cli/ValidationError" -import * as Chunk from "@effect/data/Chunk" -import * as Either from "@effect/data/Either" -import { dual, pipe } from "@effect/data/Function" -import * as HashMap from "@effect/data/HashMap" -import * as HashSet from "@effect/data/HashSet" -import * as Option from "@effect/data/Option" -import { pipeArguments } from "@effect/data/Pipeable" -import * as ReadonlyArray from "@effect/data/ReadonlyArray" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" -import * as Effect from "@effect/io/Effect" +import * as Chunk from "effect/Chunk" +import * as Effect from "effect/Effect" +import * as Either from "effect/Either" +import { dual, pipe } from "effect/Function" +import * as HashMap from "effect/HashMap" +import * as HashSet from "effect/HashSet" +import * as Option from "effect/Option" +import { pipeArguments } from "effect/Pipeable" +import * as ReadonlyArray from "effect/ReadonlyArray" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" const CommandSymbolKey = "@effect/cli/Command" diff --git a/src/internal/commandDirective.ts b/src/internal/commandDirective.ts index 29fe9a4..53d1932 100644 --- a/src/internal/commandDirective.ts +++ b/src/internal/commandDirective.ts @@ -1,6 +1,6 @@ import type * as BuiltInOption from "@effect/cli/BuiltInOption" import type * as CommandDirective from "@effect/cli/CommandDirective" -import { dual } from "@effect/data/Function" +import { dual } from "effect/Function" /** @internal */ export const builtIn = (option: BuiltInOption.BuiltInOption): CommandDirective.CommandDirective => ({ diff --git a/src/internal/helpDoc.ts b/src/internal/helpDoc.ts index 3551cb7..10095b8 100644 --- a/src/internal/helpDoc.ts +++ b/src/internal/helpDoc.ts @@ -1,13 +1,13 @@ import type * as HelpDoc from "@effect/cli/HelpDoc" import type * as Span from "@effect/cli/HelpDoc/Span" import * as span from "@effect/cli/internal/helpDoc/span" -import { dual } from "@effect/data/Function" -import * as RA from "@effect/data/ReadonlyArray" import type * as AnsiDoc from "@effect/printer-ansi/AnsiDoc" import * as AnsiRender from "@effect/printer-ansi/AnsiRender" import * as AnsiStyle from "@effect/printer-ansi/AnsiStyle" import * as Doc from "@effect/printer/Doc" import * as Optimize from "@effect/printer/Optimize" +import { dual } from "effect/Function" +import * as RA from "effect/ReadonlyArray" /** @internal */ export const isEmpty = (helpDoc: HelpDoc.HelpDoc): helpDoc is HelpDoc.Empty => helpDoc._tag === "Empty" diff --git a/src/internal/helpDoc/span.ts b/src/internal/helpDoc/span.ts index f1f47e1..84d4129 100644 --- a/src/internal/helpDoc/span.ts +++ b/src/internal/helpDoc/span.ts @@ -1,10 +1,10 @@ import type * as Span from "@effect/cli/HelpDoc/Span" -import { dual } from "@effect/data/Function" -import * as RA from "@effect/data/ReadonlyArray" import type * as AnsiDoc from "@effect/printer-ansi/AnsiDoc" import * as AnsiStyle from "@effect/printer-ansi/AnsiStyle" import * as Color from "@effect/printer-ansi/Color" import * as Doc from "@effect/printer/Doc" +import { dual } from "effect/Function" +import * as RA from "effect/ReadonlyArray" /** @internal */ export const text = (value: string): Span.Span => ({ diff --git a/src/internal/options.ts b/src/internal/options.ts index 96f4bf9..1626538 100644 --- a/src/internal/options.ts +++ b/src/internal/options.ts @@ -10,16 +10,16 @@ import type * as Options from "@effect/cli/Options" import type * as Primitive from "@effect/cli/Primitive" import type * as Usage from "@effect/cli/Usage" import type * as ValidationError from "@effect/cli/ValidationError" -import * as Chunk from "@effect/data/Chunk" -import * as Either from "@effect/data/Either" -import { dual, pipe } from "@effect/data/Function" -import * as HashMap from "@effect/data/HashMap" -import * as Option from "@effect/data/Option" -import * as Order from "@effect/data/Order" -import { pipeArguments } from "@effect/data/Pipeable" -import type { Predicate } from "@effect/data/Predicate" -import * as RA from "@effect/data/ReadonlyArray" -import * as Effect from "@effect/io/Effect" +import * as Chunk from "effect/Chunk" +import * as Effect from "effect/Effect" +import * as Either from "effect/Either" +import { dual, pipe } from "effect/Function" +import * as HashMap from "effect/HashMap" +import * as Option from "effect/Option" +import * as Order from "effect/Order" +import { pipeArguments } from "effect/Pipeable" +import type { Predicate } from "effect/Predicate" +import * as RA from "effect/ReadonlyArray" const OptionsSymbolKey = "@effect/cli/Options" diff --git a/src/internal/primitive.ts b/src/internal/primitive.ts index 03cee9e..052765c 100644 --- a/src/internal/primitive.ts +++ b/src/internal/primitive.ts @@ -1,11 +1,11 @@ import type * as Span from "@effect/cli/HelpDoc/Span" import * as span from "@effect/cli/internal/helpDoc/span" import type * as Primitive from "@effect/cli/Primitive" -import { dual, pipe } from "@effect/data/Function" -import * as Option from "@effect/data/Option" -import { pipeArguments } from "@effect/data/Pipeable" -import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray" -import * as Effect from "@effect/io/Effect" +import * as Effect from "effect/Effect" +import { dual, pipe } from "effect/Function" +import * as Option from "effect/Option" +import { pipeArguments } from "effect/Pipeable" +import type { NonEmptyReadonlyArray } from "effect/ReadonlyArray" const PrimitiveSymbolKey = "@effect/cli/Primitive" diff --git a/src/internal/usage.ts b/src/internal/usage.ts index 295be18..aa07c85 100644 --- a/src/internal/usage.ts +++ b/src/internal/usage.ts @@ -3,9 +3,9 @@ import type * as Span from "@effect/cli/HelpDoc/Span" import * as _helpDoc from "@effect/cli/internal/helpDoc" import * as span from "@effect/cli/internal/helpDoc/span" import type * as Usage from "@effect/cli/Usage" -import * as Chunk from "@effect/data/Chunk" -import { dual } from "@effect/data/Function" -import * as Option from "@effect/data/Option" +import * as Chunk from "effect/Chunk" +import { dual } from "effect/Function" +import * as Option from "effect/Option" /** @internal */ export const empty: Usage.Usage = { diff --git a/test/Command.ts b/test/Command.ts index 4f966f2..2bc42ec 100644 --- a/test/Command.ts +++ b/test/Command.ts @@ -10,9 +10,9 @@ import * as Grep from "@effect/cli/test/utils/grep" import * as Tail from "@effect/cli/test/utils/tail" import * as WC from "@effect/cli/test/utils/wc" import * as ValidationError from "@effect/cli/ValidationError" -import { pipe } from "@effect/data/Function" -import * as Option from "@effect/data/Option" -import * as Effect from "@effect/io/Effect" +import * as Effect from "effect/Effect" +import { pipe } from "effect/Function" +import * as Option from "effect/Option" import { describe, expect } from "vitest" describe.concurrent("Command", () => { diff --git a/test/Options.ts b/test/Options.ts index bb27227..453ea41 100644 --- a/test/Options.ts +++ b/test/Options.ts @@ -4,13 +4,13 @@ import * as Span from "@effect/cli/HelpDoc/Span" import * as Options from "@effect/cli/Options" import * as it from "@effect/cli/test/utils/extend" import * as ValidationError from "@effect/cli/ValidationError" -import * as Chunk from "@effect/data/Chunk" -import * as Data from "@effect/data/Data" -import * as Either from "@effect/data/Either" -import { pipe } from "@effect/data/Function" -import * as HashMap from "@effect/data/HashMap" -import * as Option from "@effect/data/Option" -import * as Effect from "@effect/io/Effect" +import * as Chunk from "effect/Chunk" +import * as Data from "effect/Data" +import * as Effect from "effect/Effect" +import * as Either from "effect/Either" +import { pipe } from "effect/Function" +import * as HashMap from "effect/HashMap" +import * as Option from "effect/Option" import { describe, expect } from "vitest" describe.concurrent("Options", () => { diff --git a/test/utils/extend.ts b/test/utils/extend.ts index 6e03c36..5fd6348 100644 --- a/test/utils/extend.ts +++ b/test/utils/extend.ts @@ -1,10 +1,10 @@ -import * as Duration from "@effect/data/Duration" -import { pipe } from "@effect/data/Function" -import * as Effect from "@effect/io/Effect" -import * as TestEnvironment from "@effect/io/internal/testing/testEnvironment" -import type * as TestServices from "@effect/io/internal/testing/testServices" -import * as Schedule from "@effect/io/Schedule" -import type * as Scope from "@effect/io/Scope" +import * as Duration from "effect/Duration" +import * as Effect from "effect/Effect" +import { pipe } from "effect/Function" +import * as Schedule from "effect/Schedule" +import type * as Scope from "effect/Scope" +import * as TestEnvironment from "effect/TestContext" +import type * as TestServices from "effect/TestServices" import type { TestAPI } from "vitest" import * as V from "vitest" @@ -23,7 +23,7 @@ export const effect = (() => { () => pipe( Effect.suspend(self), - Effect.provide(TestEnvironment.testContext()), + Effect.provide(TestEnvironment.TestContext), Effect.runPromise ), timeout @@ -40,7 +40,7 @@ export const effect = (() => { () => pipe( Effect.suspend(self), - Effect.provide(TestEnvironment.testContext()), + Effect.provide(TestEnvironment.TestContext), Effect.runPromise ), timeout @@ -56,7 +56,7 @@ export const effect = (() => { () => pipe( Effect.suspend(self), - Effect.provide(TestEnvironment.testContext()), + Effect.provide(TestEnvironment.TestContext), Effect.runPromise ), timeout @@ -109,7 +109,7 @@ export const scoped = ( pipe( Effect.suspend(self), Effect.scoped, - Effect.provide(TestEnvironment.testContext()), + Effect.provide(TestEnvironment.TestContext), Effect.runPromise ), timeout diff --git a/test/utils/wc.ts b/test/utils/wc.ts index 46090ef..43d82a3 100644 --- a/test/utils/wc.ts +++ b/test/utils/wc.ts @@ -1,8 +1,8 @@ import * as Args from "@effect/cli/Args" import * as Command from "@effect/cli/Command" import * as Options from "@effect/cli/Options" -import type { Chunk } from "@effect/data/Chunk" -import { pipe } from "@effect/data/Function" +import type { Chunk } from "effect/Chunk" +import { pipe } from "effect/Function" const bytesFlag = Options.boolean("c") const linesFlag = Options.boolean("l")