-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Release: Prerelease 8.6.0-alpha.5 #30466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
13aedba
76c7352
09c659a
7885f22
b0e456e
11fd0f9
c0d96f2
72ce652
e2be313
1db0d6f
b8d9224
5c5a97e
d1f13a8
7bcb7f1
3fd17a7
a153358
aae5e7e
e9640be
8c78ed4
3dc8b62
2156f57
d40d389
bd014a0
7857919
44e440d
d30e471
3b0a4a5
00561e0
7e3280d
39bc8b5
3937383
7233010
bb8a422
3408a13
18a5ed9
6af7987
7fd05d3
175c1c6
641b542
01222b3
2f5b8ad
019e087
e875225
cdffa02
dd83e89
fcd17b3
f38d812
43be735
c219bde
ca7f203
63194f9
407e966
8a9ea3c
41bafd4
e150d66
043cf25
728d58d
d4a95e2
fb79db7
68f54e9
54c72d4
794a0db
c0bc879
3e5a24d
08796f6
4ec8ef3
16b964d
73d1191
e8bb156
8e405b4
bf7e1e8
387eafd
5865ae8
64ee46a
612a5db
f71793e
29169d6
8c64e8a
32afba5
9dcfacc
06e47d6
738f4c7
f0ca9bc
d262cd9
e952787
39d90ff
14b6243
fea7665
536b5ef
c23fd58
7f8ddee
ed2f780
b2d9219
2261621
8674bb9
af8d0e6
3995bf8
e338d6a
051138c
c5267ed
a6dcf83
0085a76
a8f6c64
082a29a
e96a7e4
3038c8b
03dacb4
7c2689d
20df700
2eaf7e7
e4bd8f7
3d13945
443243e
63a2958
746bd7b
c604bb9
9392597
20d41cc
520a8bb
6cfa85d
5691c7f
c4aa6ab
caf44e7
9cf7abb
a4941ca
d61a8d2
2f950e5
8656cd1
f9cd5ea
7c403d7
08907fe
dfbaa53
935793a
a562a75
c1179c8
a482f84
656a058
f100389
0f82d1e
af4da7e
5be6ddd
9778f36
f7f9430
d434dd8
ac3306f
0014145
c016ebb
2c7f5ab
e4b199b
a7117d5
49b756d
29d584b
ccbf651
0c9ba2c
b444ddb
6a2a3dc
90a5619
3ca2578
459f980
dd75176
7ee0fcb
057957e
b4e2f39
e11c1df
a1fe9e7
0c8ef0f
0d68f51
0e91a2d
13ede7f
51624b4
6c41bd8
962bdab
8c87f3d
29c1a1b
e023bfe
89d490d
f2b5cbb
3b8c2a9
8737633
833564c
346b41d
ff47e18
74b4a9d
1cf911d
5d055ea
438489f
7072832
4d737f5
21a617e
2715bd9
d61fe0c
c5529db
b94da42
32380e4
f7edae6
3af5961
b104c0d
6c09978
299f4a4
86b7a9f
7af8d9d
95beaea
66a8bf0
b7c4b0b
df59bc4
8557851
81268fe
2211751
52f8523
05b3fac
e82077b
9b1de99
1dcaa0f
3e489c7
3b73b65
02baa78
30a5263
b38ac98
374ee3d
53c996a
4762624
fc4af7d
0a67f88
51c02bc
057b10d
1cff206
f005af1
346d387
cdadf6c
244abbe
8926d6f
edff9f0
57a8edd
d5bd041
b1850a7
0c3c48a
fd05477
cfc2b59
6a325db
7440832
a1b216d
24038de
0dc0d0c
68f742a
329d5b6
c71d283
1d5017f
43f0399
856aeb4
9f70a39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ test-results | |
| .verdaccio-cache | ||
| .next | ||
| /.npmrc | ||
| tsconfig.vitest-temp.json | ||
|
|
||
| # Yarn stuff | ||
| /**/.yarn/* | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| /// <reference path="../typings.d.ts" /> | ||
| import { global } from '@storybook/global'; | ||
|
|
||
| import { UniversalStore } from '../shared/universal-store'; | ||
| import { Channel } from './main'; | ||
| import { PostMessageTransport } from './postmessage'; | ||
| import type { ChannelTransport, Config } from './types'; | ||
|
|
@@ -39,7 +40,14 @@ export function createBrowserChannel({ page, extraTransports = [] }: Options): C | |
| transports.push(new WebsocketTransport({ url: channelUrl, onError: () => {}, page })); | ||
| } | ||
|
|
||
| return new Channel({ transports }); | ||
| const channel = new Channel({ transports }); | ||
| // eslint-disable-next-line no-underscore-dangle | ||
| UniversalStore.__prepare( | ||
| channel, | ||
| page === 'manager' ? UniversalStore.Environment.MANAGER : UniversalStore.Environment.PREVIEW | ||
| ); | ||
|
Comment on lines
+43
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: The UniversalStore.__prepare call uses a private API (denoted by __) which could be unstable. Consider making this integration more explicit through a public API if possible. |
||
|
|
||
| return channel; | ||
| } | ||
|
|
||
| export type { Listener, ChannelEvent, ChannelTransport, ChannelHandler } from './types'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,8 @@ import { Channel, HEARTBEAT_INTERVAL } from '@storybook/core/channels'; | |
| import { isJSON, parse, stringify } from 'telejson'; | ||
| import WebSocket, { WebSocketServer } from 'ws'; | ||
|
|
||
| import { UniversalStore } from '../../shared/universal-store'; | ||
|
|
||
| type Server = NonNullable<NonNullable<ConstructorParameters<typeof WebSocketServer>[0]>['server']>; | ||
|
|
||
| /** | ||
|
|
@@ -72,7 +74,12 @@ export class ServerChannelTransport { | |
| export function getServerChannel(server: Server) { | ||
| const transports = [new ServerChannelTransport(server)]; | ||
|
|
||
| return new Channel({ transports, async: true }); | ||
| const channel = new Channel({ transports, async: true }); | ||
|
|
||
| // eslint-disable-next-line no-underscore-dangle | ||
| UniversalStore.__prepare(channel, UniversalStore.Environment.SERVER); | ||
|
Comment on lines
+79
to
+80
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Using internal __prepare method directly - consider making this part of the public API if it needs to be called from outside UniversalStore |
||
|
|
||
| return channel; | ||
| } | ||
|
|
||
| // for backwards compatibility | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: The UniversalStore preparation is not wrapped in a try-catch block, which could cause channel creation to fail if the store preparation fails