async-fp

Asynchronous Functional Programming Utilities

Downloads
668
Stars
2
Committers
5

Bot releases are hidden (Show)

async-fp - @unional/[email protected]

Published by unional over 1 year ago

Major Changes

  • 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.

async-fp - [email protected]

Published by unional over 1 year ago

Major Changes

  • d0a68ba: Release as Node ESM module

Minor Changes

  • d0a68ba: Add @unional/gizmo

Patch Changes

async-fp - [email protected]

Published by unional over 1 year ago

Patch Changes

  • f6ee884: Fix support of async asserter
  • Updated dependencies [41af4c1]
async-fp - @unional/[email protected]

Published by unional over 1 year ago

Patch Changes

  • 41af4c1: Adjust import type syntax
async-fp - @unional/[email protected]

Published by unional over 1 year ago

async-fp - [email protected]

Published by unional over 1 year ago

Minor Changes

  • dfdb419: Add asyncAssert().

Patch Changes

async-fp - @unional/[email protected]

Published by unional almost 2 years ago

Patch Changes

  • 593f104: Update type-plus
async-fp - [email protected]

Published by unional almost 2 years ago

Patch Changes

async-fp - [email protected]

Published by unional about 2 years ago

Patch Changes

async-fp - @unional/[email protected]

Published by unional about 2 years ago

Patch Changes

  • 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.

async-fp - [email protected]

Published by unional about 2 years ago

Patch Changes

  • 51517d9: Fix workspace:* -> workspace:^ reference
  • Updated dependencies [9c1ecfb]
async-fp - @unional/[email protected]

Published by unional about 2 years ago

Patch Changes

  • 9c1ecfb: Update type-plus and iso-error
async-fp - @unional/[email protected]

Published by unional about 2 years ago

Major Changes

  • 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(...)
    
async-fp - [email protected]

Published by unional about 2 years ago

Major Changes

  • 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(...)
    

Patch Changes

async-fp - [email protected]

Published by unional about 2 years ago

Patch Changes

async-fp - @unional/[email protected]

Published by unional about 2 years ago

Minor Changes

  • 66b9fc8: Detect blocking get calls
async-fp - @unional/[email protected]

Published by unional about 2 years ago

Patch Changes

  • 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.

async-fp - [email protected]

Published by unional about 2 years ago

Patch Changes

async-fp - [email protected]

Published by unional about 2 years ago

Patch Changes

async-fp - @unional/[email protected]

Published by unional about 2 years ago

Minor Changes

  • 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.