@ultimat3/testing 27.13.2 → 27.14.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.
Files changed (2) hide show
  1. package/package.json +16 -16
  2. package/src/preload.ts +10 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/testing",
3
- "version": "27.13.2",
3
+ "version": "27.14.1",
4
4
  "description": "Test harness: cloned template DBs per worker, frozen clock, sealed network, 6 test types",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,20 +36,20 @@
36
36
  "test": "bun test"
37
37
  },
38
38
  "dependencies": {
39
- "@ultimat3/action": "27.13.2",
40
- "@ultimat3/cache": "27.13.2",
41
- "@ultimat3/core": "27.13.2",
42
- "@ultimat3/db": "27.13.2",
43
- "@ultimat3/entity": "27.13.2",
44
- "@ultimat3/http": "27.13.2",
45
- "@ultimat3/i18n": "27.13.2",
46
- "@ultimat3/jobs": "27.13.2",
47
- "@ultimat3/mail": "27.13.2",
48
- "@ultimat3/policy": "27.13.2",
49
- "@ultimat3/pwa": "27.13.2",
50
- "@ultimat3/query": "27.13.2",
51
- "@ultimat3/realtime": "27.13.2",
52
- "@ultimat3/render": "27.13.2",
53
- "@ultimat3/time": "27.13.2"
39
+ "@ultimat3/action": "27.14.1",
40
+ "@ultimat3/cache": "27.14.1",
41
+ "@ultimat3/core": "27.14.1",
42
+ "@ultimat3/db": "27.14.1",
43
+ "@ultimat3/entity": "27.14.1",
44
+ "@ultimat3/http": "27.14.1",
45
+ "@ultimat3/i18n": "27.14.1",
46
+ "@ultimat3/jobs": "27.14.1",
47
+ "@ultimat3/mail": "27.14.1",
48
+ "@ultimat3/policy": "27.14.1",
49
+ "@ultimat3/pwa": "27.14.1",
50
+ "@ultimat3/query": "27.14.1",
51
+ "@ultimat3/realtime": "27.14.1",
52
+ "@ultimat3/render": "27.14.1",
53
+ "@ultimat3/time": "27.14.1"
54
54
  }
55
55
  }
package/src/preload.ts CHANGED
@@ -62,13 +62,19 @@ if (Bun.env[ISOLATED_ENV] !== '1') {
62
62
  onFileBoundary(resetRateLimitStore);
63
63
  }
64
64
 
65
+ // Isolated runs only (`x test` says so): Bun keeps every finished file alive while a plugin is
66
+ // registered. See `isolated-plugins.ts`.
67
+ //
68
+ // BEFORE the loader install below, and that order is the fix: registering the release first lets it
69
+ // clear the loader's handler at the first file's boundary, where the module graph it retains is
70
+ // released with it. Installed the other way round, the release still fires but the graph the loader
71
+ // already built is what is held, and every finished file stays resident — measured on Bun 1.4.0,
72
+ // 8 files, 1 -> 8 live global objects (this file's own leak fixture).
73
+ releasePluginsAfterIsolatedFile();
74
+
65
75
  // An app's `.tsx` compiles with the app's JSX factory on the first file, never cached classic.
66
76
  await installAppJsxLoader();
67
77
 
68
- // Isolated runs only (`x test` says so): Bun 1.4.0 keeps every finished file alive while a plugin
69
- // is registered. See `isolated-plugins.ts`.
70
- releasePluginsAfterIsolatedFile();
71
-
72
78
  // Opt-out exists for one case: a test that deliberately exercises a real integration in a job the
73
79
  // team runs on purpose. It is an env var, not an API, so it cannot be set from inside a test file.
74
80
  if (Bun.env['ULTIMATE_TEST_ALLOW_NET'] !== '1') sealNetwork();