inngest 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/helpers/promises.d.ts.map +1 -1
- package/helpers/promises.js +21 -1
- package/helpers/promises.js.map +1 -1
- package/landing.d.ts +1 -1
- package/landing.d.ts.map +1 -1
- package/landing.js +1 -1
- package/landing.js.map +1 -1
- package/package.json +4 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promises.d.ts","sourceRoot":"","sources":["../../src/helpers/promises.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"promises.d.ts","sourceRoot":"","sources":["../../src/helpers/promises.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,QAAO,QAAQ,OAAO,CAErD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAO,QAAQ,IAAI,CA2BlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,QAAO,QAAQ,IAAI,CAE9C,CAAC"}
|
package/helpers/promises.js
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.resolveNextTick = exports.resolveAfterPending = exports.createFrozenPromise = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Some environments don't allow access to the global queueMicrotask(). While we
|
|
9
|
+
* had assumed this was only true for those powered by earlier versions of Node
|
|
10
|
+
* (<14) that we don't officially support, Vercel's Edge Functions also obscure
|
|
11
|
+
* the function, even though the platform it's based on (Cloudflare Workers)
|
|
12
|
+
* appropriately exposes it.
|
|
13
|
+
*
|
|
14
|
+
* Therefore, we can fall back to a reasonable alternative of
|
|
15
|
+
* `Promise.resolve().then(fn)` instead. This will be slightly slower, but at
|
|
16
|
+
* least we can still work in these environments.
|
|
17
|
+
*
|
|
18
|
+
* This package does exactly that, enabling us to use `queueMicrotask()` in all
|
|
19
|
+
* modern JS engines.
|
|
20
|
+
*
|
|
21
|
+
* See {@link https://www.npmjs.com/package/queue-microtask}.
|
|
22
|
+
*/
|
|
23
|
+
const queue_microtask_1 = __importDefault(require("queue-microtask"));
|
|
4
24
|
/**
|
|
5
25
|
* A helper function to create a `Promise` that will never settle.
|
|
6
26
|
*
|
|
@@ -34,7 +54,7 @@ const resolveAfterPending = () => {
|
|
|
34
54
|
return new Promise((resolve) => {
|
|
35
55
|
let i = 0;
|
|
36
56
|
const iterate = () => {
|
|
37
|
-
|
|
57
|
+
(0, queue_microtask_1.default)(() => {
|
|
38
58
|
if (i++ > 1000) {
|
|
39
59
|
return resolve();
|
|
40
60
|
}
|
package/helpers/promises.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promises.js","sourceRoot":"","sources":["../../src/helpers/promises.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"promises.js","sourceRoot":"","sources":["../../src/helpers/promises.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,sEAA6C;AAE7C;;;;;;;;;GASG;AACI,MAAM,mBAAmB,GAAG,GAAqB,EAAE;IACxD,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AACtC,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF;;;GAGG;AACI,MAAM,mBAAmB,GAAG,GAAkB,EAAE;IACrD;;;;;;;;;;OAUG;IACH,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,IAAA,yBAAc,EAAC,GAAG,EAAE;gBAClB,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE;oBACd,OAAO,OAAO,EAAE,CAAC;iBAClB;gBAED,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AA3BW,QAAA,mBAAmB,uBA2B9B;AAEF;;GAEG;AACI,MAAM,eAAe,GAAG,GAAkB,EAAE;IACjD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B"}
|