Skip to content

2.0.0#4

Draft
cr0cK wants to merge 20 commits intomainfrom
feature/feature-add-fns-labels
Draft

2.0.0#4
cr0cK wants to merge 20 commits intomainfrom
feature/feature-add-fns-labels

Conversation

@cr0cK
Copy link
Member

@cr0cK cr0cK commented Jan 16, 2023

Description of the Change

Implements #5

v2.0.0

Added

  • ⚠️ [breaking-change] Add an identifier for each function registration. When using the same identifier, the new registered function(s) replace(s) the previous one(s).

  • ⚠️ [breaking-change] Add an identifier for predicates functions to mimic to the same behavior as functions registrations. Several predicate functions can now be passed in a single if() with a defined identifier. In the same way, if another if() predicate is set with the same identifier, it will override the previous one.

  • Add deleteFunctionsWhenJobsStarted option allowing the deletion of registered functions when the jobs are started.

  • Add debug.logFunctionRegistrations and debug.logFunctionExecutions options allowing functions registrations and executions logs. Don't forget to set DEBUG=AsyncProcess:* as an environment variable or in your browser's local storage.

  • Keep errors thrown by jobs as is.

    Example: If the job is a fetch query and if the response is a 404, the err object will be a Response object.

  • AsyncProcess instances now accept two more generics, results (R) and an error (E), allowing to enforce typings of jobs results and jobs exceptions.

Benefits

Possible Drawbacks

Testing Instructions

Checklist

  • Tests added

It allows having unique fns indexed by identifiers.
@cr0cK cr0cK force-pushed the feature/feature-add-fns-labels branch from d6b0ea2 to 43680fa Compare January 16, 2023 12:51
@cr0cK cr0cK changed the title Allow adding identifiers of each fns additions. 1.3.0 Jan 20, 2023
@cr0cK cr0cK marked this pull request as ready for review January 20, 2023 10:46
@cr0cK cr0cK force-pushed the feature/feature-add-fns-labels branch from c3eba7c to 45c45c7 Compare January 20, 2023 12:10
@cr0cK cr0cK changed the title 1.3.0 2.0.0 Jan 20, 2023
Copy link

@MuaDDuB MuaDDuB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Small comments to better understand 😄

@cr0cK cr0cK marked this pull request as draft January 26, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments