Détail du package

@effection/core

thefrontside29.9kMIT2.2.3

License: MIT Created by Frontside [![Chat on Discord](https://img.sh

readme

changelog

@effection/core

[2.2.3]

  • 96b0ce0 Add the cause property to all wrapped errors

[2.2.2]

  • 5d5a9ba use AbortController polyfill that works in the browser

[2.2.1]

[2.2.0]

  • Allow pass object with Symbol.operation as an operation
    • 3e7daa8 add changelog on 2022-01-26
    • c623a84 remove fetch and process packages from changes list on 2022-01-26

[2.1.0]

  • Extract AbortSignal from @effection/fetch to @effection/core as a resource
    • 8ac2e85 Add covector change file on 2021-11-18
    • b6d0e15 Patch for fetch and not minor on 2021-11-19

[2.0.1]

[2.0.0]

  • Release Effection 2.0.0

[2.0.0-beta.17]

  • Yielding to something which is not an operation no longer throws an internal error, but properly rejects the task.
    • a3ad19a Fix yielding non operation bug on 2021-10-07

[2.0.0-beta.16]

  • Fix a bug when using blockParent where the children are not getting halt on an explicit halt.
    • 1cd9803 Fix halting children for blockParent tasks on 2021-09-30

[2.0.0-beta.15]

    • 0248d79 Add package readmes on 2021-09-28
  • Remove operation resolutions entirely, use Future instead
    • 5f67d61 Add changeset on 2021-09-29

[2.0.0-beta.14]

  • Adjust the propagation of errors for resources to make it possible to catch errors from init
    • 75a7248 Catch errors thrown during resource init on 2021-09-21
  • Enable support for resources in higher order operations all, race and withTimeout.
    • bbe6cdc Enable resource support for higher order operations on 2021-09-09

[2.0.0-beta.13]

  • Add shortcuts to create resolved/rejected/halted futures via Future.resolve(123), etc...
    • 9599dde Add shortcuts for resolves/rejected/halted future on 2021-09-08

[2.0.0-beta.12]

  • Add @effection/fetch as a dependency and reexport it
    • 5ab5d06 Reexport @effection/fetch from effection package on 2021-08-26
  • Share internal run loop among task, task future and task controller. Prevents race conditions which cause internal errors.
    • 222d511 Share event loop among controller, task and future on 2021-09-01
  • Introduce task scope as an alternative to resources for being able to access the outer scope of an operation
    • 3ed11bd Make resource task accessible through init task on 2021-08-27
  • Add toString() method to task for nicely formatted rendering of task structure
    • 9a63928 Add toString output for tasks on 2021-08-31

[2.0.0-beta.11]

  • Change named import from a package.json file to default
    • 65a856a Change named import from a package.json file to default. (#490) on 2021-08-25

[2.0.0-beta.10]

  • Use Object.create to wrap error objects rather than copying properties
    • a56ae2a Use Object.create to create error object with trace on 2021-08-16

[2.0.0-beta.9]

  • add Task#spawn operation to spawn new task with a specific scope
    • a71d65b Add changefile on 2021-07-27

[2.0.0-beta.8]

  • remove eslint-plugin-treeshaking
    • 2779056 remove eslint-plugin-treeshaking (#472) on 2021-08-06
  • Add sideEffects field to package.json
    • 383141d Add sideEffects field to package.json (#470) on 2021-08-05

[2.0.0-beta.7]

  • The dist directory didn't contain the esm and cjs directory. We copy the package.json for reference into the dist, and this broke the files resolution. Switch to using dist-cjs and dist-esm which allows us to avoid copying package.json.
    • 63fbcfb fix: @effection/core to ship dist/esm and dist/cjs on 2021-08-03
    • 7788e24 fix: @effection/core to ship dist-esm and dist-cjs on 2021-08-03
    • 6923a0f update change file with everything patched on 2021-08-03

[2.0.0-beta.6]

  • Add esm builds

[2.0.0-beta.5]

  • Deprecate Future#resolve in favour of Future#produce.
    • 7b8ce8e Depreacte Future#resolve in favour of Future#produce (#437) on 2021-07-22
    • 63f6424 Replace covector files and delete changesets to trigger publish on 2021-07-23
    • 1bb643c Re-add covector change file on 2021-07-23
  • Upgrade typescript to 4.3.5 and replace tsdx with tsc
    • 121bd40 Add change file for typescript bump on 2021-07-23

2.0.0-beta.4

Patch Changes

  • e297c86: rename Task.spawn() -> Task.run()

2.0.0-beta.3

Patch Changes

  • 5d95e6d: label the "suspend" operation that is created with a bare yield statement;
  • 9700b45: function operations can now also return function operations, and not just value operations

2.0.0-beta.2

Minor Changes

  • 19414f0: Add label to root task
  • 26a86cb: Increase max listeners on task
  • 9c76cc5: Add yieldingTo property to task
  • ac7c1ce: Add toJSON method to Task

Patch Changes

  • f7e3344: Name in interface should be yieldingTo and not subTask

2.0.0-beta.1

Patch Changes

  • 0c6e263: release 2.0.0-beta

2.0.0-preview.12

Minor Changes

  • 9998088: Spawn operation can accept task options
  • 2bce454: Simplify EventEmitter types on Controls.
  • 1981b35: Collect trace of effection operations and propagate them along with the raised error
  • 88dc59a: Improve error output by including an Effection trace

2.0.0-preview.11

Minor Changes

  • 88eca21: Add type to task
  • 8bb4514: Add support for labels
  • 44c354d: Make task options public

Patch Changes

  • ae8d090: Sleeping for zero milliseconds should not suspend indefinitely

2.0.0-preview.10

Minor Changes

  • 625b521: Sleep operation can suspend indefinitely when called without duration
  • a06c679: Add spawn as an operation via resources
  • 4d04159: add race() combinator
  • 625b521: Add ensure, timeout and withTimeout combinators

2.0.0-preview.9

Minor Changes

  • 110a2cd: Add ignoreError option to prevent a task from propagating its errors to the parent
  • e2545b2: Remove delay on starting iterator/generator
  • 2b92370: Prevent race condition in promise controller if promise resolves in the same tick as halt signal
  • 00562fd: Fix race condition when halting a task while in between yield points
  • 110a2cd: When yielded to an asynchronously halting task, wait for the task to be fully halted before proceeding
  • 110a2cd: The sub task created by iterators is now linked to the parent task
  • 02446ad: Add Resource to create an option for spawning tasks in the background in an operation
  • da86a9c: Convert controllers into functions

2.0.0-preview.8

Minor Changes

  • a13987f: make operation resolution an interface. Make operation iterators an operation.

2.0.0-preview.7

Minor Changes

  • 2bad074: Run destructors in reverse order and in series

2.0.0-preview.6

Patch Changes

  • 1222756: Use strict dependency requirements for internal dependencies while in prerelease mode

2.0.0-preview.5

Minor Changes

  • 70c358f: Store root in a global variable

2.0.0-preview.4

Minor Changes

  • 72f743c: Add halt method on Effection to halt root task

2.0.0-preview.3

Patch Changes

  • bdedf68: Simplify sleep method
  • 2bf5ef4: Make iterator controllers reentrant so they can e.g. halt themselves

2.0.0-preview.2

Patch Changes

  • 93ec0d6: Include CHANGELOGS and src with all packages

2.0.0-preview.1

Patch Changes

  • 80143d5: Fix packaging