@nxtedition/yield 1.0.2 → 1.0.3

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/lib/index.d.ts CHANGED
@@ -2,6 +2,6 @@ type Dispatcher = (callback: () => void) => void;
2
2
  export declare function setYieldDispatcher(schedule: Dispatcher | null): void;
3
3
  export declare function setYieldTimeout(timeout: number): void;
4
4
  export declare function shouldYield(timeout?: number): boolean;
5
- export declare function maybeYield<T>(callback?: (opaque: T | undefined) => void, opaque?: T, timeout?: number | undefined): Promise<null> | null;
5
+ export declare function maybeYield<T>(callback?: (opaque: T | undefined) => void, opaque?: T, timeout?: number): Promise<null> | null;
6
6
  export declare function doYield<T>(callback?: (opaque: T | undefined) => void, opaque?: T): Promise<null> | null;
7
7
  export {};
package/lib/index.js CHANGED
@@ -37,7 +37,7 @@ export function shouldYield(timeout ) {
37
37
  export function maybeYield (
38
38
  callback ,
39
39
  opaque ,
40
- timeout ,
40
+ timeout ,
41
41
  ) {
42
42
  if (callback != null && typeof callback !== 'function') {
43
43
  throw new TypeError('callback must be a function')
@@ -88,7 +88,7 @@ function dispatchYield() {
88
88
  yieldQueue[yieldIndex] = null
89
89
  yieldIndex += 1
90
90
 
91
- const opaque = yieldQueue[yieldIndex]
91
+ const opaque = yieldQueue[yieldIndex]
92
92
  yieldQueue[yieldIndex] = null
93
93
  yieldIndex += 1
94
94
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/yield",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -12,12 +12,13 @@
12
12
  "build": "rimraf lib && tsc && amaroc ./src/index.ts && mv src/index.js lib/",
13
13
  "prepublishOnly": "yarn build",
14
14
  "typecheck": "tsc --noEmit",
15
- "test": "node --test"
15
+ "test": "node --test",
16
+ "test:ci": "node --test"
16
17
  },
17
18
  "devDependencies": {
18
19
  "amaroc": "^1.0.1",
19
20
  "rimraf": "^6.1.2",
20
21
  "typescript": "^5.9.3"
21
22
  },
22
- "gitHead": "727983babcccdfa27c29de0153c3373945770660"
23
+ "gitHead": "0f407ebce03f670f13a733240af2a733ca56eefc"
23
24
  }