mirror of
https://github.com/Effect-TS/effect.git
synced 2026-11-26 02:16:04 +08:00
112 lines
5.9 KiB
YAML
112 lines
5.9 KiB
YAML
"effect/Config#all":
|
|
replacement: "Config.all"
|
|
note: "Combine an iterable or record of Config values. A wholly absent product can use Config.withDefault or Config.option, while a partially supplied product fails."
|
|
"effect/Config#array":
|
|
replacement: "Config.schema(Config.Array(valueSchema), path)"
|
|
note: "Array parsing is schema-based in v4; rebuild the element Config as a Schema and pass the optional path to Config.schema."
|
|
"effect/Config#boolean":
|
|
replacement: "Config.boolean"
|
|
note: "Unchanged."
|
|
"effect/Config#branded":
|
|
replacement: "Config.schema(schema.pipe(Schema.brand(brand)), path)"
|
|
note: "Brand validation moved to Schema; define the branded schema and construct the Config with Config.schema."
|
|
"effect/Config#chunk":
|
|
replacement: "Config.schema(Schema.Chunk(valueSchema), path)"
|
|
note: "Collection parsing is schema-based in v4; use Schema.Chunk when a Chunk result is still required."
|
|
"effect/Config#Config":
|
|
replacement: "Config.Config"
|
|
note: "The model remains a yieldable Effect and exposes parse(provider). Compose logical lookup paths with Config.schema(..., path) and Config.nested; parsing no longer accepts a public path prefix."
|
|
"effect/Config#Config.IsPlainObject":
|
|
replacement: "none"
|
|
note: "This private conditional helper is no longer exposed; use Config.Wrap for the public recursive wrapping contract."
|
|
"effect/Config#Config.Primitive":
|
|
replacement: "Schema.Constraint"
|
|
note: "Primitive descriptions and parsers were replaced by Schema codecs consumed through Config.schema."
|
|
"effect/Config#Config.Variance":
|
|
replacement: "none"
|
|
note: "Config now carries its result type directly through Effect and has no public variance interface."
|
|
"effect/Config#ConfigTypeId":
|
|
replacement: "Config.isConfig"
|
|
note: "The Config marker is private in v4; use the public guard for runtime narrowing."
|
|
"effect/Config#date":
|
|
replacement: "Config.date"
|
|
note: "Unchanged."
|
|
"effect/Config#duration":
|
|
replacement: "Config.duration"
|
|
note: "Unchanged."
|
|
"effect/Config#fail":
|
|
replacement: "Config.fail"
|
|
note: "The v4 constructor takes a ConfigProvider.SourceError or Schema.SchemaError instead of a message; wrap the failure in the appropriate cause."
|
|
"effect/Config#hashMap":
|
|
replacement: "Config.schema(Schema.HashMap(Schema.String, valueSchema), path)"
|
|
note: "HashMap parsing is schema-based in v4; replace the child Config with its value Schema."
|
|
"effect/Config#hashSet":
|
|
replacement: "Config.schema(Schema.HashSet(valueSchema), path)"
|
|
note: "HashSet parsing is schema-based in v4; replace the child Config with its value Schema."
|
|
"effect/Config#integer":
|
|
replacement: "Config.int"
|
|
note: "Renamed to the shorter v4 integer constructor."
|
|
"effect/Config#literal":
|
|
replacement: "Config.literals(literals, path)"
|
|
note: "The v3 curried variadic constructor became Config.literals with an array and inline path; use Config.literal for one value."
|
|
"effect/Config#LiteralValue":
|
|
replacement: "SchemaAST.LiteralValue"
|
|
note: "Use the literal value type shared by v4 Schema constructors."
|
|
"effect/Config#logLevel":
|
|
replacement: "Config.logLevel"
|
|
note: "Unchanged."
|
|
"effect/Config#mapAttempt":
|
|
replacement: "Config.mapOrFail"
|
|
note: "Catch exceptions explicitly and return an Effect failure containing Config.ConfigError; mapOrFail is Effect-based in v4."
|
|
"effect/Config#nonEmptyString":
|
|
replacement: "Config.nonEmptyString"
|
|
note: "Unchanged."
|
|
"effect/Config#number":
|
|
replacement: "Config.number"
|
|
note: "Unchanged; use Config.finite when NaN and infinities must be rejected."
|
|
"effect/Config#orElseIf":
|
|
replacement: "Config.orElse"
|
|
note: "The fallback now receives Config.ConfigError; test it in the callback and re-fail with Config.fail(error.cause) when the predicate is false."
|
|
"effect/Config#port":
|
|
replacement: "Config.port"
|
|
note: "Unchanged."
|
|
"effect/Config#primitive":
|
|
replacement: "Config.schema(customSchema, path)"
|
|
note: "Custom primitive parsing moved to Schema codecs; express decoding and diagnostics in a Schema, then pass it to Config.schema. Its canonical StringTree encoding must expose a concrete shape; opaque encodings such as Schema.Any or Schema.Unknown are not supported."
|
|
"effect/Config#redacted":
|
|
replacement: "Config.redacted"
|
|
note: "The string/path overload remains; replace the v3 Config argument overload with Config.map(config, Redacted.make)."
|
|
"effect/Config#repeat":
|
|
replacement: "Config.schema(Config.Array(valueSchema), path)"
|
|
note: "Repeated values are represented by an array Schema in v4; Config.Array also accepts flat separated input."
|
|
"effect/Config#secret":
|
|
replacement: "Config.redacted"
|
|
note: "Secret was removed in favor of Redacted; this constructor already returns Redacted<string>."
|
|
"effect/Config#string":
|
|
replacement: "Config.string"
|
|
note: "Unchanged."
|
|
"effect/Config#succeed":
|
|
replacement: "Config.succeed"
|
|
note: "Unchanged."
|
|
"effect/Config#suspend":
|
|
replacement: "Config.schema(Schema.suspend(schemaThunk), path)"
|
|
note: "General Config suspension was removed; model recursive parsing with a suspended Schema before constructing the Config."
|
|
"effect/Config#sync":
|
|
replacement: "Config.succeed(undefined).pipe(Config.map(() => thunk()))"
|
|
note: "The dedicated lazy constant constructor was removed; mapping a constant Config preserves evaluation at parse time."
|
|
"effect/Config#url":
|
|
replacement: "Config.url"
|
|
note: "Unchanged."
|
|
"effect/Config#validate":
|
|
replacement: "Config.schema(schema.check(check), path)"
|
|
note: "Validation moved to Schema checks; attach the predicate and message to the Schema used by Config.schema."
|
|
"effect/Config#withDescription":
|
|
replacement: "Config.schema(schema.annotate({ description }), path)"
|
|
note: "Config descriptions moved to Schema annotations in v4."
|
|
"effect/Config#zip":
|
|
replacement: "Config.all([self, that])"
|
|
note: "Use the tuple overload of Config.all."
|
|
"effect/Config#zipWith":
|
|
replacement: "Config.all([self, that]).pipe(Config.map(([a, b]) => f(a, b)))"
|
|
note: "Combine both configs with Config.all, then map the tuple."
|