@gjsify/timers 0.26.0 → 0.27.0

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.
Files changed (2) hide show
  1. package/globals.mjs +4 -4
  2. package/package.json +4 -4
package/globals.mjs CHANGED
@@ -41,19 +41,19 @@ const _hasNativeImmediate = typeof globalThis.setImmediate === 'function';
41
41
 
42
42
  export const setImmediate = _hasNativeImmediate
43
43
  ? globalThis.setImmediate.bind(globalThis)
44
- : ((cb, ...args) => {
44
+ : (cb, ...args) => {
45
45
  const handle = { __cancelled: false };
46
46
  Promise.resolve().then(() => {
47
47
  if (!handle.__cancelled) cb(...args);
48
48
  });
49
49
  return handle;
50
- });
50
+ };
51
51
 
52
52
  export const clearImmediate = _hasNativeImmediate
53
53
  ? globalThis.clearImmediate.bind(globalThis)
54
- : ((handle) => {
54
+ : (handle) => {
55
55
  if (handle && typeof handle === 'object') handle.__cancelled = true;
56
- });
56
+ };
57
57
 
58
58
  // Default-export shape — every named timer exported as a property so
59
59
  // `import timers from '@gjsify/timers'; timers.setTimeout(...)` resolves.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/timers",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Node.js timers module for Gjs",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -21,7 +21,7 @@
21
21
  "globals.mjs"
22
22
  ],
23
23
  "scripts": {
24
- "clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
24
+ "clear": "gjsify clear lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs",
25
25
  "check": "gjsify tsc --noEmit",
26
26
  "build": "gjsify run build:gjsify && gjsify run build:types",
27
27
  "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
@@ -40,8 +40,8 @@
40
40
  "timers"
41
41
  ],
42
42
  "devDependencies": {
43
- "@gjsify/cli": "^0.26.0",
44
- "@gjsify/unit": "^0.26.0",
43
+ "@gjsify/cli": "^0.27.0",
44
+ "@gjsify/unit": "^0.27.0",
45
45
  "@types/node": "^25.9.2",
46
46
  "typescript": "^6.0.3"
47
47
  },