Previously, accessing annotations such as identifier and title required explicit casting of the ast field to AST.Transformation.
This update refines the type definitions to reflect that ast is always an AST.Transformation, eliminating the need for casting and simplifying client code.
import { AST, Schema } from "@effect/schema";
class Person extends Schema.Class<Person>("Person")(
{
name: Schema.String,
age: Schema.Number,
},
{ description: "my description" },
) {}
Previously, accessing annotations such as identifier and title required explicit casting of the ast field to AST.Transformation.
This update refines the type definitions to reflect that ast is always an AST.Transformation, eliminating the need for casting and simplifying client code.
import { AST, Schema } from "@effect/schema";
class Person extends Schema.Class<Person>("Person")(
{
name: Schema.String,
age: Schema.Number,
},
{ description: "my description" },
) {}
The DateTime module provides functionality for working with time, including
support for time zones and daylight saving time.
It has two main data types: DateTime.Utc and DateTime.Zoned.
A DateTime.Utc represents a time in Coordinated Universal Time (UTC), and
a DateTime.Zoned contains both a UTC timestamp and a time zone.
There is also a CurrentTimeZone service, for setting a time zone contextually.
import { DateTime, Effect } from "effect";
Effect.gen(function* () {
// Get the current time in the current time zone
const now = yield* DateTime.nowInCurrentZone;
// Math functions are included
const tomorrow = DateTime.add(now, 1, "day");
// Convert to a different time zone
// The UTC portion of the DateTime is preserved and only the time zone is
// changed
const sydneyTime = tomorrow.pipe(
DateTime.unsafeSetZoneNamed("Australia/Sydney"),
);
}).pipe(DateTime.withCurrentZoneNamed("America/New_York"));
This api creates a stream from an external push-based resource.
You can use the emit helper to emit values to the stream. You can also use
the emit helper to signal the end of the stream by using apis such as
emit.end or emit.fail.
By default it uses an "unbounded" buffer size.
You can customize the buffer size and strategy by passing an object as the
second argument with the bufferSize and strategy fields.
The DateTime module provides functionality for working with time, including
support for time zones and daylight saving time.
It has two main data types: DateTime.Utc and DateTime.Zoned.
A DateTime.Utc represents a time in Coordinated Universal Time (UTC), and
a DateTime.Zoned contains both a UTC timestamp and a time zone.
There is also a CurrentTimeZone service, for setting a time zone contextually.
import { DateTime, Effect } from "effect";
Effect.gen(function* () {
// Get the current time in the current time zone
const now = yield* DateTime.nowInCurrentZone;
// Math functions are included
const tomorrow = DateTime.add(now, 1, "day");
// Convert to a different time zone
// The UTC portion of the DateTime is preserved and only the time zone is
// changed
const sydneyTime = tomorrow.pipe(
DateTime.unsafeSetZoneNamed("Australia/Sydney"),
);
}).pipe(DateTime.withCurrentZoneNamed("America/New_York"));
This api creates a stream from an external push-based resource.
You can use the emit helper to emit values to the stream. You can also use
the emit helper to signal the end of the stream by using apis such as
emit.end or emit.fail.
By default it uses an "unbounded" buffer size.
You can customize the buffer size and strategy by passing an object as the
second argument with the bufferSize and strategy fields.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the production-dependencies group with 7 updates:
0.39.2
0.40.0
0.60.2
0.61.0
0.55.2
0.56.0
0.33.51
0.34.0
0.33.51
0.34.0
0.69.2
0.70.0
3.5.8
3.6.0
Updates
@effect/cli
from 0.39.2 to 0.40.0Release notes
Sourced from
@effect/cli
's releases.Changelog
Sourced from
@effect/cli
's changelog.Commits
85a374a
Version Packages (#3378)7d02174
adjusted various function signatures to returnArray
(#3340)3eb8c47
Revert "Release queue: minor" (#3379)9c058c9
Release queue: minor (#3248)d12ec65
Version Packages (#3358)Updates
@effect/platform
from 0.60.2 to 0.61.0Release notes
Sourced from
@effect/platform
's releases.Changelog
Sourced from
@effect/platform
's changelog.Commits
85a374a
Version Packages (#3378)7d02174
adjusted various function signatures to returnArray
(#3340)3eb8c47
Revert "Release queue: minor" (#3379)9c058c9
Release queue: minor (#3248)d12ec65
Version Packages (#3358)Updates
@effect/platform-node
from 0.55.2 to 0.56.0Release notes
Sourced from
@effect/platform-node
's releases.Changelog
Sourced from
@effect/platform-node
's changelog.Commits
85a374a
Version Packages (#3378)d12ec65
Version Packages (#3358)Updates
@effect/printer
from 0.33.51 to 0.34.0Release notes
Sourced from
@effect/printer
's releases.Changelog
Sourced from
@effect/printer
's changelog.Commits
85a374a
Version Packages (#3378)d12ec65
Version Packages (#3358)Updates
@effect/printer-ansi
from 0.33.51 to 0.34.0Release notes
Sourced from
@effect/printer-ansi
's releases.Changelog
Sourced from
@effect/printer-ansi
's changelog.Commits
85a374a
Version Packages (#3378)d12ec65
Version Packages (#3358)Updates
@effect/schema
from 0.69.2 to 0.70.0Release notes
Sourced from
@effect/schema
's releases.... (truncated)
Changelog
Sourced from
@effect/schema
's changelog.... (truncated)
Commits
85a374a
Version Packages (#3378)8135294
add DateTime module (#3296)3eb8c47
Revert "Release queue: minor" (#3379)9c058c9
Release queue: minor (#3248)d12ec65
Version Packages (#3358)1234fcf
Make the usage of annotations to customize the output of TreeFormatte… (#3374)727ce89
schema: add userland tests (#3370)2fc0ff4
exportisPropertySignature
guard (#3363)9bbe7a6
addNonEmptyTrimmedString
,OptionFromNonEmptyTrimmedString
, close… (#3343)7c0da50
AddContext
field toSchema
interface, closes #3356 (#3359)Updates
effect
from 3.5.8 to 3.6.0Release notes
Sourced from effect's releases.
... (truncated)
Changelog
Sourced from effect's changelog.
... (truncated)
Commits
85a374a
Version Packages (#3378)4ddbff0
SupportRefinement
inPreficate.tuple
andPredicate.struct
(#3366)8135294
add DateTime module (#3296)4bce5a0
feat: add onlyEffect option to Effect.tap (#3292)2d09078
addRandom.choice
(#3314)7d02174
adjusted various function signatures to returnArray
(#3340)1e0fe80
make List.Cons extend NonEmptyIterable (#3350)e74cc38
feat(Stream): onEnd (#3303)cd255a4
add Stream.asyncPush api (#3277)bb069b4
add Stream.onStart api (#3302)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show