@ultimat3/core 26.1.1 → 27.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/core",
3
- "version": "26.1.1",
3
+ "version": "27.1.0",
4
4
  "description": "Ultimate's foundation: errors, context, env, config, clock, ids, logging, telemetry, lifecycle",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,6 +37,6 @@
37
37
  "test": "bun test"
38
38
  },
39
39
  "dependencies": {
40
- "@ultimat3/schema": "26.1.1"
40
+ "@ultimat3/schema": "27.1.0"
41
41
  }
42
42
  }
@@ -13,6 +13,13 @@ export interface AsyncContext<T> {
13
13
  get(): T | undefined;
14
14
  /** Run `fn` with `value` in flight. `X_ASYNC_CONTEXT_UNAVAILABLE` where that is impossible. */
15
15
  run<R>(value: T, fn: () => R): R;
16
+ /**
17
+ * Run `fn` with NO value in flight, whatever scope the caller is in — and everything `fn` starts
18
+ * (its timers, its promise chains) inherits that absence. For a long-lived loop begun inside a
19
+ * scope it must not carry: a job worker started inside a transaction handed every job it ever
20
+ * ran that transaction. Where there is no async context, `fn` simply runs.
21
+ */
22
+ exit<R>(fn: () => R): R;
16
23
  }
17
24
 
18
25
  /**
@@ -75,5 +82,9 @@ export function asyncContext<T>(subject: string): AsyncContext<T> {
75
82
  }
76
83
  return store.run(value, fn);
77
84
  },
85
+ exit<R>(fn: () => R): R {
86
+ const store = open();
87
+ return store === undefined ? fn() : store.exit(fn);
88
+ },
78
89
  };
79
90
  }
package/src/config-pwa.ts CHANGED
@@ -295,7 +295,7 @@ export function pwaPushIssues(pwa: PwaConfig, issues: string[]): boolean {
295
295
  return issues.length > before;
296
296
  }
297
297
  // `push: true` with no `vapid` at all booted on 26.0.0, where the key wired nothing — so in 26.x
298
- // it still boots, with push left unwired (`pushWired`) and the boot saying so. 27.0.0 refuses it.
298
+ // it still boots, with push left unwired (`pushWired`) and the boot saying so. A later major refuses it.
299
299
  if (vapid === undefined) return false;
300
300
  const subject: unknown =
301
301
  vapid !== null && typeof vapid === 'object' ? (vapid as { subject?: unknown }).subject : vapid;