From 4c64f9490afe99356e510c94a44becb3514cc48c Mon Sep 17 00:00:00 2001 From: Ori Cohen Date: Thu, 15 Aug 2024 23:24:27 +0300 Subject: [PATCH] Bump version to v2.0.0: upgrade target compatibility to ES2020 --- README.md | 6 ++- dist/delayed-async-task.js | 38 ++++++---------- dist/delayed-async-task.js.map | 2 +- dist/delayed-async-task.test.js | 69 ++++++++++++----------------- dist/delayed-async-task.test.js.map | 2 +- package-lock.json | 4 +- package.json | 5 ++- tsconfig.json | 2 +- 8 files changed, 54 insertions(+), 74 deletions(-) diff --git a/README.md b/README.md index 5be621f..a298308 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Unlike `setTimeout` in Node.js, where errors from rejected promises propagate to Ideally, a delayed task should handle its own errors and **avoid** throwing uncaught exceptions. -## Use-case Example +## Use-case Example :man_technologist: Consider a Background Updates Manager. For simplicity, we assume that updates occur only following an on-demand request by the admin, triggered by the execution of the `scheduleNextJob` method. Additionally, assume that only one future background update task can be scheduled at any given time. This means that scheduling a new task will abort any previously scheduled task that has not yet started. @@ -171,6 +171,10 @@ class BackgroundUpdatesManager { } ``` +## Breaking Change in Version 2.0.0 + +In version 2.0.0, the target compatibility has been upgraded from ES6 to ES2020. This change was made to leverage the widespread adoption of ES2020, in particular its native support for async/await. + ## License :scroll: [MIT](LICENSE) diff --git a/dist/delayed-async-task.js b/dist/delayed-async-task.js index cbfcc74..075e636 100644 --- a/dist/delayed-async-task.js +++ b/dist/delayed-async-task.js @@ -1,13 +1,4 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; Object.defineProperty(exports, "__esModule", { value: true }); exports.DelayedAsyncTask = void 0; /** @@ -150,23 +141,20 @@ class DelayedAsyncTask { * if no task was in progress. */ awaitCompletionIfCurrentlyExecuting() { - var _a; - return (_a = this._currentlyExecutingTaskPromise) !== null && _a !== void 0 ? _a : Promise.resolve(); + return this._currentlyExecutingTaskPromise ?? Promise.resolve(); } - _handleTaskExecution() { - return __awaiter(this, void 0, void 0, function* () { - try { - yield this._task(); - this._status = "COMPLETED_SUCCESSFULLY"; - } - catch (err) { - this._status = "FAILED_DUE_TO_UNCAUGHT_REJECTION"; - this._uncaughtRejection = err; - } - finally { - this._currentlyExecutingTaskPromise = undefined; - } - }); + async _handleTaskExecution() { + try { + await this._task(); + this._status = "COMPLETED_SUCCESSFULLY"; + } + catch (err) { + this._status = "FAILED_DUE_TO_UNCAUGHT_REJECTION"; + this._uncaughtRejection = err; + } + finally { + this._currentlyExecutingTaskPromise = undefined; + } } } exports.DelayedAsyncTask = DelayedAsyncTask; diff --git a/dist/delayed-async-task.js.map b/dist/delayed-async-task.js.map index b09799c..2bd8b11 100644 --- a/dist/delayed-async-task.js.map +++ b/dist/delayed-async-task.js.map @@ -1 +1 @@ -{"version":3,"file":"delayed-async-task.js","sourceRoot":"","sources":["../src/delayed-async-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,gBAAgB;IAQzB;;;;;;;OAOG;IACH,YAAY,IAAyB,EAAE,oBAA4B;QAf3D,YAAO,GAA2B,SAAS,CAAC;QAgBhD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,sFAAsF;QACtF,sGAAsG;QACtG,IAAI,CAAC,QAAQ,GAAG,UAAU,CACtB,GAAS,EAAE;YACP,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC1B,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;YAC3B,IAAI,CAAC,8BAA8B,GAAG,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AAC;gBACX,IAAI,CAAC,OAAO,GAAG,kCAAkC,CAAC;gBAClD,IAAI,CAAC,kBAAkB,GAAG,GAAG,CAAC;YAClC,CAAC;oBAAS,CAAC;gBACP,IAAI,CAAC,8BAA8B,GAAG,SAAS,CAAC;YACpD,CAAC;QACL,CAAC;KAAA;CACJ;AAjJD,4CAiJC"} \ No newline at end of file +{"version":3,"file":"delayed-async-task.js","sourceRoot":"","sources":["../src/delayed-async-task.ts"],"names":[],"mappings":";;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,gBAAgB;IAQzB;;;;;;;OAOG;IACH,YAAY,IAAyB,EAAE,oBAA4B;QAf3D,YAAO,GAA2B,SAAS,CAAC;QAgBhD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,sFAAsF;QACtF,sGAAsG;QACtG,IAAI,CAAC,QAAQ,GAAG,UAAU,CACtB,GAAS,EAAE;YACP,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC1B,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;YAC3B,IAAI,CAAC,8BAA8B,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACtE,CAAC,EACD,oBAAoB,CACvB,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,OAAO,KAAK,0BAA0B,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,OAAO,KAAK,wBAAwB,CAAC;IACrD,CAAC;IAED;;;;OAIG;IACH,IAAW,2BAA2B;QAClC,OAAO,IAAI,CAAC,OAAO,KAAK,kCAAkC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;OASG;IACH,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED;;;;;;;OAOG;IACI,QAAQ;QACX,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAC7B,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC1B,IAAI,CAAC,OAAO,GAAG,0BAA0B,CAAC;YAC1C,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACI,mCAAmC;QACtC,OAAO,IAAI,CAAC,8BAA8B,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IACpE,CAAC;IAEO,KAAK,CAAC,oBAAoB;QAC9B,IAAI,CAAC;YACD,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,wBAAwB,CAAC;QAC5C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,IAAI,CAAC,OAAO,GAAG,kCAAkC,CAAC;YAClD,IAAI,CAAC,kBAAkB,GAAG,GAAG,CAAC;QAClC,CAAC;gBAAS,CAAC;YACP,IAAI,CAAC,8BAA8B,GAAG,SAAS,CAAC;QACpD,CAAC;IACL,CAAC;CACJ;AAjJD,4CAiJC"} \ No newline at end of file diff --git a/dist/delayed-async-task.test.js b/dist/delayed-async-task.test.js index 452aa7a..64b7a23 100644 --- a/dist/delayed-async-task.test.js +++ b/dist/delayed-async-task.test.js @@ -1,13 +1,4 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; Object.defineProperty(exports, "__esModule", { value: true }); const delayed_async_task_1 = require("./delayed-async-task"); /** @@ -16,7 +7,7 @@ const delayed_async_task_1 = require("./delayed-async-task"); * The one-and-only purpose of this function, is triggerring an event-loop iteration. * It is relevant whenever a test needs to simulate tasks from the Node.js' micro-tasks queue. */ -const resolveFast = () => __awaiter(void 0, void 0, void 0, function* () { expect(14).toBeGreaterThan(3); }); +const resolveFast = async () => { expect(14).toBeGreaterThan(3); }; const MOCK_MS_DELAY_TILL_EXECUTION = 83564; describe('DelayedAsyncTask tests', () => { let setTimeoutSpy; @@ -29,18 +20,16 @@ describe('DelayedAsyncTask tests', () => { jest.useRealTimers(); }); describe('Happy path tests', () => { - test('should indicate correct state when task executes successfully', () => __awaiter(void 0, void 0, void 0, function* () { + test('should indicate correct state when task executes successfully', async () => { let taskCompletedSuccessfully = false; let completeTask; - const task = () => __awaiter(void 0, void 0, void 0, function* () { - return new Promise(res => { - completeTask = () => { - res(); - taskCompletedSuccessfully = true; - }; - // The task returns a promise in pending-state. It will be fulfilled - // only by manually invoking `completeTask`. - }); + const task = async () => new Promise(res => { + completeTask = () => { + res(); + taskCompletedSuccessfully = true; + }; + // The task returns a promise in pending-state. It will be fulfilled + // only by manually invoking `completeTask`. }); expect(setTimeoutSpy).toHaveBeenCalledTimes(0); const delayedTask = new delayed_async_task_1.DelayedAsyncTask(task, MOCK_MS_DELAY_TILL_EXECUTION); @@ -58,7 +47,7 @@ describe('DelayedAsyncTask tests', () => { // Trigger an event loop. Only `resolveFast` will be resolved as we haven't // decided to complete the task yet. const awaitCompletionPromise = delayedTask.awaitCompletionIfCurrentlyExecuting(); - yield Promise.race([ + await Promise.race([ awaitCompletionPromise, resolveFast() ]); @@ -73,7 +62,7 @@ describe('DelayedAsyncTask tests', () => { expect(taskCompletedSuccessfully).toBe(false); // Now, we simulate the task's completion (its promise will be fulfilled). completeTask(); - yield awaitCompletionPromise; + await awaitCompletionPromise; expect(taskCompletedSuccessfully).toBe(true); expect(delayedTask.isCompleted).toBe(true); // All other getters should be false. @@ -85,12 +74,12 @@ describe('DelayedAsyncTask tests', () => { // Remains unchanged: // A single DelayedAsyncTask instance triggers exactly 1 `setTimeout` call, in the c'tor. expect(setTimeoutSpy).toHaveBeenCalledTimes(1); - })); + }); }); describe('Negative path tests', () => { - test('should successfully abort execution when the abort attempt precedes the scheduled time', () => __awaiter(void 0, void 0, void 0, function* () { + test('should successfully abort execution when the abort attempt precedes the scheduled time', async () => { let didTaskExecute = false; - const task = () => __awaiter(void 0, void 0, void 0, function* () { didTaskExecute = true; }); + const task = async () => { didTaskExecute = true; }; expect(setTimeoutSpy).toHaveBeenCalledTimes(0); const delayedTask = new delayed_async_task_1.DelayedAsyncTask(task, MOCK_MS_DELAY_TILL_EXECUTION); expect(setTimeoutSpy).toHaveBeenCalledTimes(1); // Scheduled immediately on instantiation. @@ -105,7 +94,7 @@ describe('DelayedAsyncTask tests', () => { // No pending timer should exist, thus nothing should happen: jest.runOnlyPendingTimers(); // Should resolve immediately as no task is executing: - yield delayedTask.awaitCompletionIfCurrentlyExecuting(); + await delayedTask.awaitCompletionIfCurrentlyExecuting(); expect(didTaskExecute).toBe(false); expect(delayedTask.isAborted).toBe(true); // All other getters should be false. @@ -117,15 +106,13 @@ describe('DelayedAsyncTask tests', () => { // Remains unchanged: // A single DelayedAsyncTask instance triggers exactly 1 `setTimeout` call, in the c'tor. expect(setTimeoutSpy).toHaveBeenCalledTimes(1); - })); - test('should fail aborting task when execution is already ongoing', () => __awaiter(void 0, void 0, void 0, function* () { + }); + test('should fail aborting task when execution is already ongoing', async () => { let completeTask; - const task = () => __awaiter(void 0, void 0, void 0, function* () { - return new Promise(res => { - completeTask = res; - // The task returns a promise in pending-state. It will be fulfilled - // only by manually invoking `completeTask`. - }); + const task = async () => new Promise(res => { + completeTask = res; + // The task returns a promise in pending-state. It will be fulfilled + // only by manually invoking `completeTask`. }); expect(setTimeoutSpy).toHaveBeenCalledTimes(0); const delayedTask = new delayed_async_task_1.DelayedAsyncTask(task, MOCK_MS_DELAY_TILL_EXECUTION); @@ -135,14 +122,14 @@ describe('DelayedAsyncTask tests', () => { // Trigger an event loop, only `resolveFast` will resolved as we haven't // decided to complete the task yet. const awaitCompletionPromise = delayedTask.awaitCompletionIfCurrentlyExecuting(); - yield Promise.race([ + await Promise.race([ awaitCompletionPromise, resolveFast() ]); // Cannot abort a task which already began execution. expect(delayedTask.tryAbort()).toBe(false); completeTask(); - yield awaitCompletionPromise; + await awaitCompletionPromise; expect(delayedTask.isCompleted).toBe(true); // All other getters should be false. expect(delayedTask.isPending).toBe(false); @@ -153,10 +140,10 @@ describe('DelayedAsyncTask tests', () => { // Remains unchanged: // A single DelayedAsyncTask instance triggers exactly 1 `setTimeout` call, in the c'tor. expect(setTimeoutSpy).toHaveBeenCalledTimes(1); - })); - test('should capture uncaught exception when thrown during execution', () => __awaiter(void 0, void 0, void 0, function* () { + }); + test('should capture uncaught exception when thrown during execution', async () => { const error = new Error("בוקה ומבוקה! ולב נמס! ופק ברכיים"); - const task = () => __awaiter(void 0, void 0, void 0, function* () { throw error; }); + const task = async () => { throw error; }; expect(setTimeoutSpy).toHaveBeenCalledTimes(0); const delayedTask = new delayed_async_task_1.DelayedAsyncTask(task, MOCK_MS_DELAY_TILL_EXECUTION); expect(setTimeoutSpy).toHaveBeenCalledTimes(1); // Scheduled immediately on instantiation. @@ -168,7 +155,7 @@ describe('DelayedAsyncTask tests', () => { expect(delayedTask.isUncaughtRejectionOccurred).toBe(false); expect(delayedTask.uncaughtRejection).toBe(undefined); jest.runOnlyPendingTimers(); - yield delayedTask.awaitCompletionIfCurrentlyExecuting(); + await delayedTask.awaitCompletionIfCurrentlyExecuting(); expect(delayedTask.isUncaughtRejectionOccurred).toBe(true); expect(delayedTask.uncaughtRejection).toBe(error); // All other getters should be false. @@ -179,7 +166,7 @@ describe('DelayedAsyncTask tests', () => { // Remains unchanged: // A single DelayedAsyncTask instance triggers exactly 1 `setTimeout` call, in the c'tor. expect(setTimeoutSpy).toHaveBeenCalledTimes(1); - })); + }); }); }); //# sourceMappingURL=delayed-async-task.test.js.map \ No newline at end of file diff --git a/dist/delayed-async-task.test.js.map b/dist/delayed-async-task.test.js.map index 8ee62cc..828e90a 100644 --- a/dist/delayed-async-task.test.js.map +++ b/dist/delayed-async-task.test.js.map @@ -1 +1 @@ -{"version":3,"file":"delayed-async-task.test.js","sourceRoot":"","sources":["../src/delayed-async-task.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6DAAwD;AAIxD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,GAAS,EAAE,kDAAG,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC;AAEnE,MAAM,4BAA4B,GAAG,KAAK,CAAC;AAE3C,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACpC,IAAI,aAA+B,CAAC;IAEpC,UAAU,CAAC,GAAG,EAAE;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC9B,IAAI,CAAC,+DAA+D,EAAE,GAAS,EAAE;YAC7E,IAAI,yBAAyB,GAAG,KAAK,CAAC;YACtC,IAAI,YAAwB,CAAC;YAC7B,MAAM,IAAI,GAAG,GAAwB,EAAE;gBAAC,OAAA,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;oBACtD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C;YAE5C,qBAAqB;YACrB,yFAAyF;YACzF,MAAM,CAAC,aAAa,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACnD,CAAC,CAAA,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"delayed-async-task.test.js","sourceRoot":"","sources":["../src/delayed-async-task.test.ts"],"names":[],"mappings":";;AAAA,6DAAwD;AAIxD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnE,MAAM,4BAA4B,GAAG,KAAK,CAAC;AAE3C,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACpC,IAAI,aAA+B,CAAC;IAEpC,UAAU,CAAC,GAAG,EAAE;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC9B,IAAI,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;YAC7E,IAAI,yBAAyB,GAAG,KAAK,CAAC;YACtC,IAAI,YAAwB,CAAC;YAC7B,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;gBACtD,YAAY,GAAG,GAAS,EAAE;oBACtB,GAAG,EAAE,CAAC;oBACN,yBAAyB,GAAG,IAAI,CAAC;gBACrC,CAAC,CAAC;gBACF,oEAAoE;gBACpE,4CAA4C;YAChD,CAAC,CAAC,C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file diff --git a/package-lock.json b/package-lock.json index 155ad46..b5a3675 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "delayed-async-task", - "version": "1.0.2", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "delayed-async-task", - "version": "1.0.2", + "version": "2.0.0", "license": "MIT", "devDependencies": { "@types/jest": "^29.5.12", diff --git a/package.json b/package.json index f78a71c..f2faa4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "delayed-async-task", - "version": "1.0.2", + "version": "2.0.0", "description": "A modern `setTimeout` substitute tailored for asynchronous tasks, designed to schedule a single delayed execution. Features status getters to communicate the execution status, the ability to abort a pending execution, and the option to gracefully await the completion of an ongoing execution.", "repository": { "type": "git", @@ -38,7 +38,8 @@ "ts", "dangling-promise", "promise", - "nodejs" + "nodejs", + "ES2020" ], "engines": { "node": ">=14.5.0" diff --git a/tsconfig.json b/tsconfig.json index b877809..319fd6d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES6", + "target": "ES2020", "module": "CommonJS", "outDir": "dist", "sourceMap": true,