@bridgebrew/design-system 0.1.10-next.79 → 0.1.11-next.92
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/e2e.test.ts +8 -9
- package/package.json +3 -3
package/e2e.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// End-to-end in a real Bridge. Starts the host from Bridge's checkout (`BRIDGE_REPO`, else `bridge` beside this
|
|
2
2
|
// repository) on a temp root (no plugin watching), its `_host` serving this repository's Bridge UI plugin (research-112:
|
|
3
|
-
// a preset naming `packages/bridge-ui` in
|
|
3
|
+
// a preset naming `packages/bridge-ui` first in its `_host`), installs this
|
|
4
4
|
// folder, linked, in workspace `admin`, and drives Chromium with the Bridge repo's Playwright: every story renders with
|
|
5
5
|
// no console error and no page error on its screen (Design system, or its child Core, Layout, Composite), the URL's item picks the story (and survives a reload), the list search filters,
|
|
6
6
|
// and the interactive stories work. Run with a Node Bridge supports (>= 24.21): `pnpm e2e`. The temp root and the host
|
|
@@ -29,19 +29,18 @@ const [major = 0, minor = 0] = process.versions.node.split('.').map(Number);
|
|
|
29
29
|
if (major < 24 || (major === 24 && minor < 21)) throw new Error(`Bridge needs Node >= 24.21, this is ${process.version}`);
|
|
30
30
|
|
|
31
31
|
const root = mkdtempSync(join(tmpdir(), 'design-system-e2e-'));
|
|
32
|
-
// Bridge's preset, its `_host`
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
// Bridge's preset, its `_host` the one Bridge's own end-to-end tests compose (the `host` list of its `e2e/host.ts`: the
|
|
33
|
+
// shell and its companions, from the run's registry), the Bridge UI plugin above first. Bridge's preset names only the
|
|
34
|
+
// onboarding in its `_host` since bridgebrew/bridge#583: no kit, no shell to show a screen.
|
|
35
|
+
const presets = JSON.parse(readFileSync(join(bridge, 'packages/workspace-presets/preset.json'), 'utf8'));
|
|
36
|
+
const e2eHost = /const host = \[([^\]]*)\]\.map\(bridgebrew\)/.exec(readFileSync(join(bridge, 'e2e/host.ts'), 'utf8'))?.[1];
|
|
37
|
+
if (e2eHost === undefined) throw new Error(`${bridge}/e2e/host.ts: no \`const host = [...].map(bridgebrew)\`, the e2e hosts' _host`);
|
|
37
38
|
const preset = join(root, '..', `${basename(root)}-preset.json`);
|
|
38
39
|
writeFileSync(
|
|
39
40
|
preset,
|
|
40
41
|
JSON.stringify({
|
|
41
42
|
...presets,
|
|
42
|
-
...(
|
|
43
|
-
host: presets.host.map((entry) => (entry === '@bridgebrew/bridge-ui' ? uiPlugin : entry)),
|
|
44
|
-
}),
|
|
43
|
+
host: [uiPlugin, ...[...e2eHost.matchAll(/'([^']+)'/g)].map(([, name]) => `@bridgebrew/${name}`)],
|
|
45
44
|
}),
|
|
46
45
|
);
|
|
47
46
|
const env = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bridgebrew/design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11-next.92",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A storyboard of the @bridge/ui kit: every component's variants, sizes and states, live, in the page's theme.",
|
|
6
6
|
"keywords": [
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@bridge/ui": ">=0.1.
|
|
61
|
+
"@bridge/ui": ">=0.1.11-next.92",
|
|
62
62
|
"react": "19.3.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"shiki": "4.4.3"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@bridge/ui": "npm:@bridgebrew/ui@0.1.
|
|
68
|
+
"@bridge/ui": "npm:@bridgebrew/ui@0.1.11-next.92"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"test": "node --test model.test.ts",
|