The filterEffect function enhances the filter functionality by allowing the integration of effects, thus enabling asynchronous or dynamic validation scenarios. This is particularly useful when validations need to perform operations that require side effects, such as network requests or database queries.
Example: Validating Usernames Asynchronously
import { Schema } from "@effect/schema";
import { Effect } from "effect";
async function validateUsername(username: string) {
return Promise.resolve(username === "gcanti");
}
#31632328e17 Thanks @gcanti! - Add pick and omit static functions to Struct interface, closes #3152.
pick
The pick static function available in each struct schema can be used to create a new Struct by selecting particular properties from an existing Struct.
The filterEffect function enhances the filter functionality by allowing the integration of effects, thus enabling asynchronous or dynamic validation scenarios. This is particularly useful when validations need to perform operations that require side effects, such as network requests or database queries.
Example: Validating Usernames Asynchronously
import { Schema } from "@effect/schema";
import { Effect } from "effect";
async function validateUsername(username: string) {
return Promise.resolve(username === "gcanti");
}
#31632328e17 Thanks @gcanti! - Add pick and omit static functions to Struct interface, closes #3152.
pick
The pick static function available in each struct schema can be used to create a new Struct by selecting particular properties from an existing Struct.
Bumps the production-dependencies group with 7 updates in the / directory:
0.36.40
0.37.3
0.55.5
0.58.20
0.51.5
0.53.19
0.33.24
0.33.40
0.33.24
0.33.40
0.67.18
0.68.17
3.2.8
3.4.7
Updates
@effect/cli
from 0.36.40 to 0.37.3Release notes
Sourced from
@effect/cli
's releases.... (truncated)
Changelog
Sourced from
@effect/cli
's changelog.... (truncated)
Commits
499b15e
Version Packages (#3170)d29e821
Version Packages (#3168)749b903
Ensure file selector prompts can traverse parent directories (#3167)ad51cbe
Version Packages (#3162)542baf7
Version Packages (#3154)51bb7d5
AddPrompt.file
to support path-based options in the CLI's--wizard
mode ...48e614e
Version Packages (#3140)53038f1
Version Packages (#3137)a4982f6
Version Packages (#3128)07be551
Version Packages (#3126)Updates
@effect/platform
from 0.55.5 to 0.58.20Release notes
Sourced from
@effect/platform
's releases.Changelog
Sourced from
@effect/platform
's changelog.... (truncated)
Commits
ad51cbe
Version Packages (#3162)48e614e
Version Packages (#3140)53038f1
Version Packages (#3137)7f8900a
support undefined in http request schema apis (#3136)a4982f6
Version Packages (#3128)8513d7e
README: Recommend using thestrict: true
option to get better error… (#3132)07be551
Version Packages (#3126)c004e11
Version Packages (#3118)baa90df
add HttpClient.followRedirects api (#3123)f7688bf
Version Packages (#3105)Updates
@effect/platform-node
from 0.51.5 to 0.53.19Release notes
Sourced from
@effect/platform-node
's releases.Changelog
Sourced from
@effect/platform-node
's changelog.... (truncated)
Commits
ad51cbe
Version Packages (#3162)48e614e
Version Packages (#3140)53038f1
Version Packages (#3137)a4982f6
Version Packages (#3128)07be551
Version Packages (#3126)c004e11
Version Packages (#3118)baa90df
add HttpClient.followRedirects api (#3123)f7688bf
Version Packages (#3105)6d2280e
fix assignability of HttpMiddleware in HttpRouter.use (#3109)c187493
Version Packages (#3100)Updates
@effect/printer
from 0.33.24 to 0.33.40Release notes
Sourced from
@effect/printer
's releases.Changelog
Sourced from
@effect/printer
's changelog.... (truncated)
Commits
499b15e
Version Packages (#3170)ad51cbe
Version Packages (#3162)a4982f6
Version Packages (#3128)c187493
Version Packages (#3100)e86211a
Version Packages (#3093)6b3bd87
Version Packages (#3081)a70705c
Version Packages (#3071)7ba763c
Version Packages (#3060)01075fb
Version Packages (#3034)276b394
Version Packages (#3013)Updates
@effect/printer-ansi
from 0.33.24 to 0.33.40Release notes
Sourced from
@effect/printer-ansi
's releases.Changelog
Sourced from
@effect/printer-ansi
's changelog.... (truncated)
Commits
499b15e
Version Packages (#3170)ad51cbe
Version Packages (#3162)51bb7d5
AddPrompt.file
to support path-based options in the CLI's--wizard
mode ...a4982f6
Version Packages (#3128)c187493
Version Packages (#3100)e86211a
Version Packages (#3093)6b3bd87
Version Packages (#3081)a70705c
Version Packages (#3071)7ba763c
Version Packages (#3060)01075fb
Version Packages (#3034)Updates
@effect/schema
from 0.67.18 to 0.68.17Release notes
Sourced from
@effect/schema
's releases.... (truncated)
Changelog
Sourced from
@effect/schema
's changelog.... (truncated)
Commits
ad51cbe
Version Packages (#3162)15967cf
AddfilterEffect
API, closes #3165 (#3166)2328e17
Addpick
andomit
members toStruct
interface, closes #3152 (#3163)64e1a16
suppress ajv warnings in tests (#3151)48e614e
Version Packages (#3140)cb22726
add PersistedCache module to /experimental (#3149)2530780
Add an example of a transformation where we need to use `Schema.typeS… (#3145)d006cec
Enhance JSON Schema Support for Refinements in Record Parameters (#3143)e911cfd
Optimize JSON Schema output for homogeneous tuples (such as non empty… (#3139)a4982f6
Version Packages (#3128)Updates
effect
from 3.2.8 to 3.4.7Release notes
Sourced from effect's releases.
... (truncated)
Changelog
Sourced from effect's changelog.
... (truncated)
Commits
ad51cbe
Version Packages (#3162)a5737d6
ensure PubSub.publishAll does not increase size while there are no subscriber...a4982f6
Version Packages (#3128)139d4b3
use Channel.acquireUseRelease for Channel.withSpan (#3134)33735b1
Support for the tacit usage of external handlers forMatch.tag
and `Match.t...5c0ceb0
Micro: renaming to align withEffect
module (#3096)489d20a
refactor vitest (#3122)c187493
Version Packages (#3100)a047af9
fix using unions with Match.withReturnType (#3099)e86211a
Version Packages (#3093)Dependabot will resolve any conflicts with th...
Description has been truncated