Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release queue: major #3196

Open
wants to merge 17 commits into
base: next-minor
Choose a base branch
from
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brave-apes-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Added encodeUriComponent/decodeUriComponent for both Encoding and Schema
5 changes: 5 additions & 0 deletions .changeset/brown-peas-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": major
---

make Logger.prettyLogger the default logger
24 changes: 24 additions & 0 deletions .changeset/chilled-ducks-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"effect": major
---

Use object options for Stream.async apis

Instead of:

```ts
Stream.async((emit) => {
//...
}, 16);
```

You can now write:

```ts
Stream.async(
(emit) => {
//...
},
{ bufferSize: 16 },
);
```
5 changes: 5 additions & 0 deletions .changeset/eight-rocks-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Add Runtime.Runtime.Context type extractor
5 changes: 5 additions & 0 deletions .changeset/fifty-mice-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add non-traced overload to Effect.fn
5 changes: 5 additions & 0 deletions .changeset/four-ghosts-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Update fast-check to latest version
8 changes: 8 additions & 0 deletions .changeset/friendly-kiwis-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@effect/platform": minor
---

remove generics from HttpClient tag service

Instead you can now use `HttpClient.With<E, R>` to specify the error and
requirement types.
5 changes: 5 additions & 0 deletions .changeset/gold-squids-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add DateTimeUtcFromDate schema
6 changes: 6 additions & 0 deletions .changeset/happy-jeans-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"effect": major
---

For `Data.TaggedEnum` added capitalized constructor naming convention.
Helper functions `$is` and `$match` have been renamed to `is` and `match`.
19 changes: 19 additions & 0 deletions .changeset/hot-jeans-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
"@effect/vitest": patch
---

Allow passing fast-check parameters to prop function

```ts
it.effect.prop(
"adds context",
[realNumber],
([num]) =>
Effect.gen(function* () {
const foo = yield* Foo
expect(foo).toEqual("foo")
return num === num
}),
{ fastCheck: { numRuns: 200 } }
)
```
5 changes: 5 additions & 0 deletions .changeset/khaki-suns-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Added support for `second` granularity to `Cron`.
5 changes: 5 additions & 0 deletions .changeset/polite-trainers-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Added `Cron.unsafeParse` and allow passing the `Cron.parse` time zone parameter as `string`.
5 changes: 5 additions & 0 deletions .changeset/poor-tools-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add Logger.string Layer, for setting the logger to Logger.stringLogger
5 changes: 5 additions & 0 deletions .changeset/quiet-kings-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add Effect.fnUntraced - an untraced version of Effect.fn
5 changes: 5 additions & 0 deletions .changeset/rare-eagles-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Add Context.mergeAll to combine multiple Contexts into one.
5 changes: 5 additions & 0 deletions .changeset/shiny-vans-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

add span annotation to disable propagation to the tracer
5 changes: 5 additions & 0 deletions .changeset/violet-spoons-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Add Schema.headNonEmpty for Schema.NonEmptyArray
5 changes: 5 additions & 0 deletions .changeset/weak-pears-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

Carry both call-site and definition site in Effect.fn, auto-trace to anon
7 changes: 7 additions & 0 deletions .changeset/young-knives-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"effect": major
"@effect/platform-node-shared": minor
"@effect/cli": minor
---

depreciate Secret module in favour of the Redacted module
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-destructure-keys": "^2.0.0",
"fast-check": "^3.21.0",
"fast-check": "^3.23.1",
"glob": "^11.0.0",
"jscodeshift": "^0.16.1",
"madge": "^8.0.0",
Expand Down
11 changes: 0 additions & 11 deletions packages/cli/src/Args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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"
import * as InternalArgs from "./internal/args.js"
Expand Down Expand Up @@ -387,16 +386,6 @@ export const repeated: <A>(self: Args<A>) => Args<Array<A>> = InternalArgs.repea
*/
export const redacted: (config?: Args.BaseArgsConfig) => Args<Redacted> = InternalArgs.redacted

/**
* Creates a text argument.
*
* Can optionally provide a custom argument name (defaults to `"secret"`).
*
* @since 1.0.0
* @category constructors
*/
export const secret: (config?: Args.BaseArgsConfig) => Args<Secret> = InternalArgs.secret

/**
* Creates a text argument.
*
Expand Down
8 changes: 0 additions & 8 deletions packages/cli/src/Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ 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"
import * as InternalOptions from "./internal/options.js"
Expand Down Expand Up @@ -319,13 +318,6 @@ export const none: Options<void> = InternalOptions.none
*/
export const redacted: (name: string) => Options<Redacted> = InternalOptions.redacted

/**
* @since 1.0.0
* @category constructors
* @deprecated
*/
export const secret: (name: string) => Options<Secret> = InternalOptions.secret

/**
* @since 1.0.0
* @category constructors
Expand Down
6 changes: 0 additions & 6 deletions packages/cli/src/internal/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { pipeArguments } from "effect/Pipeable"
import type * as Redacted from "effect/Redacted"
import * as Ref from "effect/Ref"
import type * as Schema from "effect/Schema"
import type * as Secret from "effect/Secret"
import type * as Args from "../Args.js"
import type * as CliConfig from "../CliConfig.js"
import type * as HelpDoc from "../HelpDoc.js"
Expand Down Expand Up @@ -272,11 +271,6 @@ export const redacted = (
config?: Args.Args.BaseArgsConfig
): Args.Args<Redacted.Redacted> => makeSingle(Option.fromNullable(config?.name), InternalPrimitive.redacted)

/** @internal */
export const secret = (
config?: Args.Args.BaseArgsConfig
): Args.Args<Secret.Secret> => makeSingle(Option.fromNullable(config?.name), InternalPrimitive.secret)

/** @internal */
export const text = (config?: Args.Args.BaseArgsConfig): Args.Args<string> =>
makeSingle(Option.fromNullable(config?.name), InternalPrimitive.text)
Expand Down
5 changes: 0 additions & 5 deletions packages/cli/src/internal/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as Predicate from "effect/Predicate"
import type * as Redacted from "effect/Redacted"
import * as Ref from "effect/Ref"
import type * as Schema from "effect/Schema"
import type * as Secret from "effect/Secret"
import type * as CliConfig from "../CliConfig.js"
import type * as HelpDoc from "../HelpDoc.js"
import type * as Options from "../Options.js"
Expand Down Expand Up @@ -386,10 +385,6 @@ export const none: Options.Options<void> = (() => {
export const redacted = (name: string): Options.Options<Redacted.Redacted> =>
makeSingle(name, Arr.empty(), InternalPrimitive.redacted)

/** @internal */
export const secret = (name: string): Options.Options<Secret.Secret> =>
makeSingle(name, Arr.empty(), InternalPrimitive.secret)

/** @internal */
export const text = (name: string): Options.Options<string> => makeSingle(name, Arr.empty(), InternalPrimitive.text)

Expand Down
35 changes: 0 additions & 35 deletions packages/cli/src/internal/primitive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ 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"
import type * as Span from "../HelpDoc/Span.js"
Expand Down Expand Up @@ -52,7 +51,6 @@ export type Instruction =
| Float
| Integer
| Path
| Secret
| Redacted
| Text

Expand Down Expand Up @@ -90,9 +88,6 @@ export interface Path extends
/** @internal */
export interface Redacted extends Op<"Redacted", {}> {}

/** @internal */
export interface Secret extends Op<"Secret", {}> {}

/** @internal */
export interface Text extends Op<"Text", {}> {}

Expand Down Expand Up @@ -125,9 +120,6 @@ export const isIntegerType = (self: Instruction): self is Integer => self._tag =
/** @internal */
export const isPathType = (self: Instruction): self is Path => self._tag === "Path"

/** @internal */
export const isSecretType = (self: Instruction): self is Path => self._tag === "Path"

/** @internal */
export const isTextType = (self: Instruction): self is Text => self._tag === "Text"

Expand Down Expand Up @@ -205,13 +197,6 @@ export const redacted: Primitive.Primitive<EffectRedacted.Redacted> = (() => {
return op
})()

/** @internal */
export const secret: Primitive.Primitive<EffectSecret.Secret> = (() => {
const op = Object.create(proto)
op._tag = "Secret"
return op
})()

/** @internal */
export const text: Primitive.Primitive<string> = (() => {
const op = Object.create(proto)
Expand Down Expand Up @@ -283,7 +268,6 @@ const getChoicesInternal = (self: Instruction): Option.Option<string> => {
case "Integer":
case "Path":
case "Redacted":
case "Secret":
case "Text": {
return Option.none()
}
Expand Down Expand Up @@ -346,7 +330,6 @@ const getHelpInternal = (self: Instruction): Span.Span => {
`('${self.pathType}') and path existence ('${self.pathExists}')`
)
}
case "Secret":
case "Redacted": {
return InternalSpan.text("A user-defined piece of text that is confidential.")
}
Expand Down Expand Up @@ -382,9 +365,6 @@ const getTypeNameInternal = (self: Instruction): string => {
case "Redacted": {
return "redacted"
}
case "Secret": {
return "secret"
}
case "Text": {
return "text"
}
Expand Down Expand Up @@ -467,11 +447,6 @@ const validateInternal = (
Effect.map((value) => EffectRedacted.make(value))
)
}
case "Secret": {
return attempt(value, getTypeNameInternal(self), Schema.decodeUnknown(Schema.String)).pipe(
Effect.map((value) => EffectSecret.fromString(value))
)
}
case "Text": {
return attempt(value, getTypeNameInternal(self), Schema.decodeUnknown(Schema.String))
}
Expand Down Expand Up @@ -601,13 +576,6 @@ const wizardInternal = (self: Instruction, help: HelpDoc.HelpDoc): Prompt.Prompt
message: InternalHelpDoc.toAnsiText(message).trimEnd()
})
}
case "Secret": {
const primitiveHelp = InternalHelpDoc.p("Enter some text (value will be redacted)")
const message = InternalHelpDoc.sequence(help, primitiveHelp)
return InternalTextPrompt.hidden({
message: InternalHelpDoc.toAnsiText(message).trimEnd()
})
}
case "Text": {
const primitiveHelp = InternalHelpDoc.p("Enter some text")
const message = InternalHelpDoc.sequence(help, primitiveHelp)
Expand All @@ -631,7 +599,6 @@ export const getBashCompletions = (self: Instruction): string => {
case "DateTime":
case "Float":
case "Integer":
case "Secret":
case "Redacted":
case "Text": {
return "$(compgen -f \"${cur}\")"
Expand Down Expand Up @@ -675,7 +642,6 @@ export const getFishCompletions = (self: Instruction): Array<string> => {
case "Float":
case "Integer":
case "Redacted":
case "Secret":
case "Text": {
return Arr.make("-r", "-f")
}
Expand Down Expand Up @@ -755,7 +721,6 @@ export const getZshCompletions = (self: Instruction): string => {
}
}
case "Redacted":
case "Secret":
case "Text": {
return ""
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/prompt/confirm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function renderSubmission(value: boolean, options: Options) {

function handleRender(options: Options) {
return (_: State, action: Prompt.Prompt.Action<State, boolean>) => {
return Action.$match(action, {
return Action.match(action, {
Beep: () => Effect.succeed(renderBeep),
NextFrame: ({ state }) => renderNextFrame(state, options),
Submit: ({ value }) => renderSubmission(value, options)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/prompt/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const defaultLocales: Prompt.Prompt.DateOptions["locales"] = {

function handleRender(options: DateOptions) {
return (state: State, action: Prompt.Prompt.Action<State, globalThis.Date>) => {
return Action.$match(action, {
return Action.match(action, {
Beep: () => Effect.succeed(renderBeep),
NextFrame: ({ state }) => renderNextFrame(state, options),
Submit: () => renderSubmission(state, options)
Expand Down
Loading
Loading