@ultimat3/cli 22.3.5 → 22.3.6

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 +28 -28
  2. package/src/test-shards.ts +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/cli",
3
- "version": "22.3.5",
3
+ "version": "22.3.6",
4
4
  "description": "The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,33 +38,33 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@babel/core": "^8.0.1",
41
- "@ultimat3/action": "22.3.5",
42
- "@ultimat3/admin": "22.3.5",
43
- "@ultimat3/ai": "22.3.5",
44
- "@ultimat3/auth": "22.3.5",
45
- "@ultimat3/cache": "22.3.5",
46
- "@ultimat3/core": "22.3.5",
47
- "@ultimat3/db": "22.3.5",
48
- "@ultimat3/entity": "22.3.5",
49
- "@ultimat3/flags": "22.3.5",
50
- "@ultimat3/http": "22.3.5",
51
- "@ultimat3/i18n": "22.3.5",
52
- "@ultimat3/jobs": "22.3.5",
53
- "@ultimat3/mail": "22.3.5",
54
- "@ultimat3/manifest": "22.3.5",
55
- "@ultimat3/mcp": "22.3.5",
56
- "@ultimat3/money": "22.3.5",
57
- "@ultimat3/notify": "22.3.5",
58
- "@ultimat3/policy": "22.3.5",
59
- "@ultimat3/pwa": "22.3.5",
60
- "@ultimat3/query": "22.3.5",
61
- "@ultimat3/realtime": "22.3.5",
62
- "@ultimat3/render": "22.3.5",
63
- "@ultimat3/schema": "22.3.5",
64
- "@ultimat3/seo": "22.3.5",
65
- "@ultimat3/storage": "22.3.5",
66
- "@ultimat3/testing": "22.3.5",
67
- "@ultimat3/time": "22.3.5",
41
+ "@ultimat3/action": "22.3.6",
42
+ "@ultimat3/admin": "22.3.6",
43
+ "@ultimat3/ai": "22.3.6",
44
+ "@ultimat3/auth": "22.3.6",
45
+ "@ultimat3/cache": "22.3.6",
46
+ "@ultimat3/core": "22.3.6",
47
+ "@ultimat3/db": "22.3.6",
48
+ "@ultimat3/entity": "22.3.6",
49
+ "@ultimat3/flags": "22.3.6",
50
+ "@ultimat3/http": "22.3.6",
51
+ "@ultimat3/i18n": "22.3.6",
52
+ "@ultimat3/jobs": "22.3.6",
53
+ "@ultimat3/mail": "22.3.6",
54
+ "@ultimat3/manifest": "22.3.6",
55
+ "@ultimat3/mcp": "22.3.6",
56
+ "@ultimat3/money": "22.3.6",
57
+ "@ultimat3/notify": "22.3.6",
58
+ "@ultimat3/policy": "22.3.6",
59
+ "@ultimat3/pwa": "22.3.6",
60
+ "@ultimat3/query": "22.3.6",
61
+ "@ultimat3/realtime": "22.3.6",
62
+ "@ultimat3/render": "22.3.6",
63
+ "@ultimat3/schema": "22.3.6",
64
+ "@ultimat3/seo": "22.3.6",
65
+ "@ultimat3/storage": "22.3.6",
66
+ "@ultimat3/testing": "22.3.6",
67
+ "@ultimat3/time": "22.3.6",
68
68
  "babel-preset-solid": "^1.9.15"
69
69
  }
70
70
  }
@@ -27,7 +27,10 @@
27
27
  // in the gate would notice had gone stale.
28
28
  //
29
29
  // TWO THINGS THE OLD SPLIT OWNED AND BUN NOW OWNS. `--parallel` implies `--isolate`, so the
30
- // per-FILE module registry that made an arbitrary partition safe at all is unchanged. And the
30
+ // per-FILE module registry that made an arbitrary partition safe at all is unchanged. Isolation is
31
+ // not per-file MEMORY, though: on Bun 1.4.0 a finished file's global object is never freed while
32
+ // any `Bun.plugin` handler is registered, so every child gets `ULTIMATE_TEST_ISOLATED=1` and
33
+ // `@ultimat3/testing`'s preload clears the plugins after each file (`isolated-plugins.ts`). And the
31
34
  // per-WORKER database survives untouched: `@ultimat3/testing`'s `workerId` already read
32
35
  // `BUN_TEST_WORKER_ID` as its second key, which is exactly what Bun sets, 1..N, one per real
33
36
  // process (probed on 1.4.0). `ULTIMATE_TEST_WORKER` stays the first key and is what `--worker`
@@ -41,6 +44,10 @@ import { msg } from './messages';
41
44
  import type { CommandResult, Finding, JsonValue, StepResult } from './output';
42
45
  import { quoteArg } from './shell-quote';
43
46
  import { testEnvOverrides } from './test-dotenv';
47
+
48
+ /** `@ultimat3/testing`'s `ISOLATED_ENV`, restated: `cli → testing` is a runtime edge, kept to fixtures. */
49
+ export const ISOLATED_TEST_ENV = 'ULTIMATE_TEST_ISOLATED';
50
+
44
51
  import { testPasses } from './test-passes';
45
52
  import type { TestFile } from './test-select';
46
53
  import type { TestType } from './verify-tests';
@@ -231,6 +238,8 @@ export async function runShards(options: RunShardsOptions): Promise<CommandResul
231
238
  // same parent env, so the leaked-key set cannot differ pass to pass.
232
239
  const envOverrides: Record<string, string | undefined> = {
233
240
  ...testEnvOverrides(options.root, options.env ?? Bun.env),
241
+ // Every run this spawns is isolated (`--parallel` or `--isolate`) unless the caller opted out.
242
+ ...((options.passthrough ?? []).includes('--no-isolate') ? {} : { [ISOLATED_TEST_ENV]: '1' }),
234
243
  };
235
244
  const passes = testPasses({
236
245
  files: options.files,