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

add Micro module #2884

Merged
merged 79 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
399294b
add Smol data type - a lightweight Effect
tim-smart May 2, 2024
77294c4
wip
tim-smart May 2, 2024
30823a0
tests
tim-smart May 2, 2024
81c5c90
add gen
tim-smart May 2, 2024
fcd3eed
scope / forEach
tim-smart May 3, 2024
cbe2cd7
fix tap & async
tim-smart May 3, 2024
5d60123
forEach stack safety
tim-smart May 3, 2024
b9937d0
revert core changes
tim-smart May 16, 2024
90c962b
rename to Micro
tim-smart May 16, 2024
eadd4f6
add tests back
tim-smart May 16, 2024
bc9202a
integrate Micro with the fiber runtime
tim-smart May 16, 2024
03c893d
remove sub-types
tim-smart May 16, 2024
5aa7113
micro scope
tim-smart May 16, 2024
481a7f0
use Result type
tim-smart May 17, 2024
ebb17b7
seperate env module
tim-smart May 17, 2024
a1252cb
codegen
tim-smart May 17, 2024
e42bbde
make Micro.gen stack safe
tim-smart May 21, 2024
cb462d0
wip
tim-smart May 21, 2024
92fc28e
update jsdoc tags
tim-smart May 22, 2024
8a1d48d
add TODO
tim-smart May 22, 2024
a999ba4
raceAll & raceAllFirst
tim-smart May 22, 2024
6b92011
change test suite name
tim-smart May 22, 2024
84bce49
timeout
tim-smart May 30, 2024
44bed03
more apis
tim-smart May 30, 2024
f4a0690
mapError
tim-smart May 30, 2024
603bc79
filter apis
tim-smart May 31, 2024
a086cf0
fix runtime integration
tim-smart May 31, 2024
51c4e4a
wip
tim-smart May 31, 2024
b180ad6
yieldable errors
tim-smart Jun 1, 2024
8bbdb96
move MicroEnv into Micro
tim-smart Jun 1, 2024
135c53e
fix fork semantics
tim-smart Jun 1, 2024
12b6f2d
wrap env refs with globalValue
tim-smart Jun 1, 2024
9c54676
refactor effect integration
tim-smart Jun 3, 2024
c29bb0a
docs & withTrace
tim-smart Jun 4, 2024
0aecfec
more docs
tim-smart Jun 4, 2024
c3d9cfe
improve failure rendering
tim-smart Jun 4, 2024
65744a0
fix .withTrace
tim-smart Jun 4, 2024
c8955bb
wip
tim-smart Jun 4, 2024
8edc89b
fix withConcurrency example
tim-smart Jun 4, 2024
0f202ef
fix Failure types
tim-smart Jun 4, 2024
9606450
fix EnvRef initial
tim-smart Jun 4, 2024
498a554
drop Duration
tim-smart Jun 4, 2024
bfca9ca
fix tests
tim-smart Jun 4, 2024
a149d54
tweak async abort
tim-smart Jun 4, 2024
5a11824
fix example
tim-smart Jun 4, 2024
c3f3066
asSome returns Option
tim-smart Jun 5, 2024
bf083db
improve Failure rendering
tim-smart Jun 6, 2024
4b008af
more interruption tests
tim-smart Jun 8, 2024
6fa8e70
wip
tim-smart Jun 8, 2024
478c302
fix types
tim-smart Jun 8, 2024
c058dfb
changeset
tim-smart Jun 8, 2024
634e0aa
codegen
tim-smart Jun 8, 2024
75999a3
forkScoped
tim-smart Jun 9, 2024
63cb531
expose YieldableError
tim-smart Jun 9, 2024
93a7011
ensure aborted signal isn't passed to .async
tim-smart Jun 10, 2024
f02e0d8
multiline errors
tim-smart Jun 12, 2024
5443f58
do notation
tim-smart Jun 12, 2024
9369d5a
stack safety
tim-smart Jun 16, 2024
966c19b
wip
tim-smart Jun 16, 2024
964d93e
wip
tim-smart Jun 16, 2024
e47c26d
add @experimental to Micro apis
tim-smart Jun 16, 2024
83ceb63
codegen
tim-smart Jun 17, 2024
c3ed83a
bundle size improvements
tim-smart Jun 17, 2024
1add3a1
finalization tests
tim-smart Jun 17, 2024
237e453
remove unused files
tim-smart Jun 18, 2024
da19c4c
use less bundle for fiberRuntime integration
tim-smart Jun 18, 2024
d4d916b
consolidate .when
tim-smart Jun 19, 2024
45f6289
clean up imports
tim-smart Jun 19, 2024
6e5973b
make test less flaky
tim-smart Jun 19, 2024
52ed343
use Stream.VarianceStruct in YieldableError
tim-smart Jun 19, 2024
cd90a0a
add note about bundle size to changeset
tim-smart Jun 19, 2024
8cb29c4
filterMap
tim-smart Jun 19, 2024
044b86b
renaming
tim-smart Jun 19, 2024
74e6440
error handling wip
tim-smart Jun 20, 2024
db168a1
update jsdoc
tim-smart Jun 20, 2024
31c2322
onResultIf and onInterrupt -> onAbort
tim-smart Jun 20, 2024
9f689c6
succeedSome / None
tim-smart Jun 20, 2024
7f399ec
doc category changes
tim-smart Jun 20, 2024
dd7a5f6
Failure wip
tim-smart Jun 20, 2024
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
10 changes: 10 additions & 0 deletions .changeset/swift-ties-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"effect": minor
---

add Micro module

A lightweight alternative to Effect, for when bundle size really matters.

At a minimum, Micro adds 5kb gzipped to your bundle, and scales with the amount
of features you use.
2 changes: 1 addition & 1 deletion packages/effect/src/Cause.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export interface CauseReducer<in C, in E, in out Z> {
*/
export interface YieldableError extends Pipeable, Inspectable, Readonly<Error> {
readonly [Effect.EffectTypeId]: Effect.Effect.VarianceStruct<never, this, never>
readonly [Stream.StreamTypeId]: Effect.Effect.VarianceStruct<never, this, never>
readonly [Stream.StreamTypeId]: Stream.Stream.VarianceStruct<never, this, never>
readonly [Sink.SinkTypeId]: Sink.Sink.VarianceStruct<never, unknown, never, this, never>
readonly [Channel.ChannelTypeId]: Channel.Channel.VarianceStruct<never, unknown, this, unknown, never, unknown, never>
[Symbol.iterator](): Effect.EffectGenerator<Effect.Effect<never, this, never>>
Expand Down
Loading