Commit Graph
1979 Commits
Author SHA1 Message Date
Giulio Canti 3b31e66916 add link helper (#101)
* align SchemaIssue.isIssue with the standard

* move serialization to annotations

* add link helper

* chore

* Refactor issue classes in SchemaIssue to extend a Base class for consistent TypeId handling
2025-05-06 12:29:13 +02:00
Giulio Canti bd83de3501 add isIssue function to SchemaIssue (#100) 2025-05-06 08:16:34 +02:00
Giulio Canti 6872ace1a5 refactor ReadonlyTuple to use array for elements and add test for element access (#99) 2025-05-06 08:09:30 +02:00
Giulio Canti e1409d056a add TemplateLiteral + optimize bundle (#96)
* add TemplateLiteral

* test methods as compiler fragments

* format

* TupleType.parser

* Union

* typeAST + flip

* remove SchemaAST.format from makeUnsafe

* parser
2025-05-05 22:11:10 +02:00
Maxwell Brown 38083499e4 fix snapshot algorithm (#97) 2025-05-05 16:10:12 -04:00
Giulio Canti 5fa4056aa9 Schema v4 (#92)
* improve Declaration annotations type

* remove useless Encoding class

* redefine declarations

* Opaque docs

* error pattern

* add extend, pick, omit

* better error definitions

* move extend, pick, omit out of the struct interface

* add asCheck / asCheckEncoded

* add tag

* flip Transformation type parameters

* renaming

* flip SchemaParser type parameters

* align Link constructor to encodeTo / decodeTo APIs

* add json transformation and UnknownFromJsonString

* align node version to effect repo

* add compose* APIs

* add transformOrFail

* move json default serialization to its own namespace to allow more defaults

* refactor: rename SchemaToSerializer to SchemaSerializerJson and update references

* remove Class APIs

* replace encodeTo API interface with decodeTo

* remove IntrinsicContext

* add schema decoding / encoding APIs
2025-05-05 16:10:30 +02:00
Tim f0bb61c465 add HttpClient tests (#95) 2025-05-05 11:07:02 +12:00
Tim c9ce64ff90 add HttpClient (#94) 2025-05-04 21:56:04 +12:00
Tim 182489aec3 add NodeStream module (#93) 2025-05-03 21:14:23 +12:00
Giulio Canti 6a99b36e25 move schema v4 code to monorepo (#91) 2025-05-02 09:51:05 +02:00
Tim d058283103 add Logger.toFile (#90)
* add Logger.toFile

* update example

* update docgen config

* fix

* relax no-console
2025-05-02 17:11:23 +12:00
Tim 5bda4a30a5 bundle-comment wip 2025-05-02 17:06:00 +12:00
Tim 134a7729f3 bundle-comment wip 2025-05-02 16:57:59 +12:00
Tim d4c55a9ee4 add Path (#89)
* add Path

* add Path module

* fix

* try fix bundle-comment
2025-05-02 15:53:42 +12:00
Eli 5eb047744f ci: allow commenting on prs from forks (#88) 2025-05-02 15:28:46 +12:00
Tim 02e295ed87 remove File semaphore (#87) 2025-05-02 14:34:33 +12:00
Tim b7bd66318d add FileSystem (#86) 2025-05-02 14:11:26 +12:00
Tim 4db1e23b84 monorepo (#85) 2025-05-02 12:21:06 +12:00
Maxwell Brown 8f27e69b9c add test for summary metric when first chunk overshoots quantile (#83) 2025-04-27 12:55:57 -04:00
Maxwell Brown 683306b068 Rename LogLevel.Warning to LogLevel.Warn (#82)
* rename LogLevel.Warning to LogLevel.Warn

* add missing log level methods
2025-04-14 11:04:48 -04:00
Maxwell BrownandMichael Arnaldi 8ca5ebf423 Introduce the Metric data type along with default fiber runtime metrics (#74)
* test package metrics action

* fix metrics step

* wip metrics

* use context directly

* avoid circular deps

* revert github action

* sketch out default metrics

* add constructors for other metric types

* rename default metrics to FiberRuntimeMetrics

* run codegen

* make metric registry a reference

* fix example

* support metric dumps

* add tests for metric tracking

* add runtime metrics

* small optimization to avoid import from core

* separate metric initialization by subtype

* refine the metric tracking apis and move to the effect module

* add instance and layer for runtime metrics service

* fix doc string

* Use reference and allow disable combinators (#81)

* fix type signature in docstring

---------

Co-authored-by: Michael Arnaldi <michael.arnaldi@effectful.co>
2025-04-14 10:04:44 -04:00
Tim 4434346261 add Stream.addEventListener (#76) 2025-04-01 15:25:45 +13:00
Giulio Canti 9788ad7730 Effect: add result API (#73) 2025-03-27 16:12:24 +01:00
Giulio Canti 5e33c4ec1c Effect: add fromResult API (#72) 2025-03-27 15:43:03 +01:00
Giulio Canti bfb3d2a36f add docgen + re-import unchanged modules from v3 (#71) 2025-03-26 17:34:08 +01:00
Giulio Canti 07b615081b Add Result (#70) 2025-03-26 14:33:49 +01:00
Maxwell Brown b6b166b887 Fix naming of CronParseError (#69)
* fix naming of CronParseError

* update dev dependencies
2025-03-25 06:56:49 -04:00
Tim adfa56d73b add RcMap & LayerMap (#68) 2025-03-21 14:20:00 +01:00
Michael Arnaldi 07688cb530 fix retry and repeat considering schedule with an error (#67)
* fix retry and repeat considering schedule with an error

* fix
2025-03-16 16:38:41 +01:00
Tim 18714818ae Queue capacity 0 wip 2025-03-16 12:35:05 +01:00
Tim 4928ba6d00 fix Queue unsafeTake with capacity 0 2025-03-16 12:29:41 +01:00
Michael Arnaldi ff4dedf9b3 add examples, rename async to callback in stream and channel (#65)
* silence rollup warning related to fast-check

* remove cjs build

* add examples, update Stream.async naming
2025-03-16 12:08:12 +01:00
Michael Arnaldi 9ecea17ac0 Re-export tracing refs (#64) 2025-03-15 22:09:35 +01:00
Michael Arnaldi faad354e1f avoid pulling in the tracer and native span unless needed (#63) 2025-03-15 13:18:58 +01:00
Michael Arnaldi b584b83ecc Fix tracer context and cache (#61)
* fix stm bundle

* remove leftover

* add unsafeEnd

* remove trace middleware

* cache span
2025-03-15 12:58:55 +01:00
Giulio Canti 39c42c4bfb update schema to latest (#62) 2025-03-15 09:32:41 +01:00
Michael Arnaldi ca3b06a0bd Add executionMode to scheduler, give access to scheduler in callback, rename async to callback (#60) 2025-03-14 12:47:21 +01:00
Michael Arnaldi 9e04f5d956 Remove GlobalValue and Structural Region (#59) 2025-03-14 11:16:44 +01:00
Michael ArnaldiandTim a526493f67 Examples & forEach perf fix (#58)
* Improve batching example

* perf fixes

* remove setInterval from batch.ts

* improve layer example

* use bench utility in batch example

---------

Co-authored-by: Tim <hello@timsmart.co>
2025-03-14 10:43:22 +01:00
Michael Arnaldi 97223b3dc1 Remove provideServiceScoped (#56) 2025-03-13 13:14:45 +01:00
Michael ArnaldiandGiulio Canti d7d0758837 add schema (step 1) (#45)
* add schema

* add zod example

* rename ParseResult to SchemaResult

---------

Co-authored-by: Giulio Canti <giulio.canti@gmail.com>
2025-03-13 13:14:34 +01:00
Michael Arnaldi 64c60cbc38 Revert to explicit Scope (#55) 2025-03-13 13:02:25 +01:00
Michael Arnaldi 948ae599d6 Fix withFiber type, remove withFiberUnknown (#54) 2025-03-11 09:17:25 +01:00
Michael ArnaldiandTim 3a03c16f84 Experiment making STM a plain Effect (#50)
* Experiment making STM a plain Effect

* improve naming and structure

* commit only on clean exit

* improve

* make nested tx compose

* move retry to defects

* improve naming, handle interruption on awaitPendingTxJournal

* unify import

* use async return instead of onInterrupt

* schedule individual pending

* avoid intermediate array

* improve example

* add concurrency to example

* separate journaled and transaction

* add docs, improve naming, switch to interrupt for retry

* unify atomic and transaction

* fix return

* add bundle test

* use forkScoped in bundle test

* avoid unnecessary boxing

* improve perf

* fix jsdoc

* make tag more unique

* transaction play (#51)

---------

Co-authored-by: Tim <hello@timsmart.co>
2025-03-11 08:26:25 +01:00
Tim de964a2035 enforce stream chunks are non-empty (#52) 2025-03-07 17:11:19 +13:00
Tim 97c8311d51 improve fork autocomplete 2025-02-14 09:59:16 +13:00
Mattia Manzati 425ea6cba8 update eslint plugin effect (#47) 2025-02-07 20:09:21 +13:00
Tim 730e65cca4 smaller subscribe and fiberInterruptAll (#48)
* smaller subscribe and fiberInterruptAll

* wip
2025-02-06 20:17:42 +13:00
Giulio Canti 066ee0da9e expose internal Effect.either (#46) 2025-02-05 14:32:38 +01:00
Michael Arnaldi 8bdb19b5e8 Fix forkIn when scope is empty (#44) 2025-01-30 12:22:10 +01:00