Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 2a3fcf7

Browse files
committed
to reproduce: $ OPTIC__BUILD_SKIP__UI=yes task postpull $ yarn workspace @useoptic/ui-v2 test
1 parent 588a76e commit 2a3fcf7

5 files changed

Lines changed: 39 additions & 11 deletions

File tree

Cargo.lock

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workspaces/diff-engine-wasm/engine/Cargo.lock

Lines changed: 16 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workspaces/diff-engine-wasm/engine/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ wasm-logger = "0.2.0"
2121
uuid = { version = "0.8.2", features = ["v4", "wasm-bindgen"] }
2222

2323
[dependencies.getrandom]
24+
git = "https://github.com/rust-random/getrandom"
25+
branch = "detect"
2426
features = ["js"]
2527

2628
[dependencies.optic_diff_engine]

workspaces/diff-engine/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ tokio-util = { version = "0.6.3", features = ["codec"], optional = true }
3434
tokio-stream = { version= "0.1.2", features = ["fs", "io-util"], optional = true }
3535
uuid = { version = "0.8.2", features = ["v4", "wasm-bindgen"] }
3636

37+
[dependencies.getrandom]
38+
git = "https://github.com/rust-random/getrandom"
39+
branch = "detect"
40+
features = ["js"]
41+
3742
[dev-dependencies]
3843
insta = "0.16.1"
3944
petgraph-evcxr = "*"

workspaces/ui-v2/src/lib/__tests/diff-helpers/universes/makeCurrentSpecContext.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ import { newDeterministicIdGenerator } from '<src>/lib/domain-id-generator';
1212
import * as opticEngine from '@useoptic/diff-engine-wasm/engine/build';
1313
import { AllPathsQuery } from '<src>/optic-components/hooks/usePathsHook';
1414

15-
//@GOTCHA: for some reason, probably because of jest, our wasm code thinks it is running in the browser even though it is running in node because of the presence of global.self:
16-
//@REF: https://github.com/rust-random/getrandom/issues/214
17-
//@ts-ignore
18-
delete global.self;
19-
2015
export async function makeCurrentSpecContext(
2116
events: any[],
2217
query: (spectacleInput: SpectacleInput<any>) => Promise<any>
@@ -52,7 +47,7 @@ export async function makeCurrentSpecContext(
5247
currentSpecResponses: responses,
5348
currentSpecRequests: requests,
5449
domainIds: newDeterministicIdGenerator(),
55-
idGeneratorStrategy: 'sequential',
50+
idGeneratorStrategy: 'random',
5651
opticEngine,
5752
};
5853
}

0 commit comments

Comments
 (0)