Bot releases are hidden (Show)
Published by unional over 1 year ago
d0a68ba: Initial release.
In this release, the basic functionality are working,
except that dynamic dependencies are treated as static dependencies.
This means the required dynamic dependencies need to be provided before adding the dependent gizmo.
Published by unional over 1 year ago
@unional/gizmo
Published by unional over 1 year ago
Published by unional over 1 year ago
Published by unional over 1 year ago
Published by unional over 1 year ago
Published by unional almost 2 years ago
type-plus
Published by unional almost 2 years ago
Published by unional about 2 years ago
Published by unional about 2 years ago
5ac78c2: Fix extend()
to work with union types.
The problem is this type:
extend(context: AsyncContext.Transformer<CurrentContext, AdditionalContext>)
The CurrentContext
here overrides the generic resolution,
making the CurrentContext
becomes whatever the transformer request,
instead of the real current context.
Published by unional about 2 years ago
workspace:*
-> workspace:^
referencePublished by unional about 2 years ago
type-plus
and iso-error
Published by unional about 2 years ago
189343b: Restore the extend()
behavior in 2.0,
that it returns a new instance instead of itself.
The clone()
function is also removed as it is not necessary anymore.
The behavior introduced in 3.0 makes the async context mutable.
Which clone()
was added to mitigate that.
However, such design is architecturally unsound.
With this change, make sure you are updating or assigning the new instance after extend()
:
// from
const ctx = new AsyncContext()
ctx.extend(...)
// to
const ctx = new AsyncContext()
const extended = ctx.extend(...)
Published by unional about 2 years ago
189343b: Restore the extend()
behavior in 2.0,
that it returns a new instance instead of itself.
The clone()
function is also removed as it is not necessary anymore.
The behavior introduced in 3.0 makes the async context mutable.
Which clone()
was added to mitigate that.
However, such design is architecturally unsound.
With this change, make sure you are updating or assigning the new instance after extend()
:
// from
const ctx = new AsyncContext()
ctx.extend(...)
// to
const ctx = new AsyncContext()
const extended = ctx.extend(...)
Published by unional about 2 years ago
Published by unional about 2 years ago
Published by unional about 2 years ago
1091796: Supports calling extend()
after get()
.
This was supported in 2.0 implicitly because each extend()
creates a new context.
This is useful when different code using the context calls get()
and extend()
at their own rate.
The new extend()
will not affect the existing get()
result, which is expected.
If not, it will be very hard to reason and debug.
Published by unional about 2 years ago
Published by unional about 2 years ago
Published by unional about 2 years ago
0e14e94: Add clone()
to create a new context out of the original one.
Changing the extend()
function to return itself while keeping the name is an oversight in 3.0.
The naming is a bit confusing.
It will be renamed in 4.0.