@storybook/react-native 10.2.2 → 10.2.3

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.
@@ -493,6 +493,8 @@ function createChannelServer({
493
493
  res.end(JSON.stringify({ error: "Not found" }));
494
494
  });
495
495
  const wss = new import_ws.WebSocketServer({ server: httpServer });
496
+ wss.on("error", () => {
497
+ });
496
498
  setInterval(function ping() {
497
499
  wss.clients.forEach(function each(client) {
498
500
  if (client.readyState === import_ws.WebSocket.OPEN) {
@@ -512,6 +514,15 @@ function createChannelServer({
512
514
  }
513
515
  });
514
516
  });
517
+ httpServer.on("error", (error) => {
518
+ if (error.code === "EADDRINUSE") {
519
+ console.warn(
520
+ `[Storybook] Port ${port} is already in use. The channel server will not start. Another instance may already be running.`
521
+ );
522
+ } else {
523
+ console.error(`[Storybook] Channel server error:`, error);
524
+ }
525
+ });
515
526
  httpServer.listen(port, host, () => {
516
527
  console.log(`WebSocket server listening on ${host ?? "localhost"}:${port}`);
517
528
  });
package/dist/node.js CHANGED
@@ -284,6 +284,8 @@ function createChannelServer({
284
284
  res.end(JSON.stringify({ error: "Not found" }));
285
285
  });
286
286
  const wss = new import_ws.WebSocketServer({ server: httpServer });
287
+ wss.on("error", () => {
288
+ });
287
289
  setInterval(function ping() {
288
290
  wss.clients.forEach(function each(client) {
289
291
  if (client.readyState === import_ws.WebSocket.OPEN) {
@@ -303,6 +305,15 @@ function createChannelServer({
303
305
  }
304
306
  });
305
307
  });
308
+ httpServer.on("error", (error) => {
309
+ if (error.code === "EADDRINUSE") {
310
+ console.warn(
311
+ `[Storybook] Port ${port} is already in use. The channel server will not start. Another instance may already be running.`
312
+ );
313
+ } else {
314
+ console.error(`[Storybook] Channel server error:`, error);
315
+ }
316
+ });
306
317
  httpServer.listen(port, host, () => {
307
318
  console.log(`WebSocket server listening on ${host ?? "localhost"}:${port}`);
308
319
  });
@@ -491,6 +491,8 @@ function createChannelServer({
491
491
  res.end(JSON.stringify({ error: "Not found" }));
492
492
  });
493
493
  const wss = new import_ws.WebSocketServer({ server: httpServer });
494
+ wss.on("error", () => {
495
+ });
494
496
  setInterval(function ping() {
495
497
  wss.clients.forEach(function each(client) {
496
498
  if (client.readyState === import_ws.WebSocket.OPEN) {
@@ -510,6 +512,15 @@ function createChannelServer({
510
512
  }
511
513
  });
512
514
  });
515
+ httpServer.on("error", (error) => {
516
+ if (error.code === "EADDRINUSE") {
517
+ console.warn(
518
+ `[Storybook] Port ${port} is already in use. The channel server will not start. Another instance may already be running.`
519
+ );
520
+ } else {
521
+ console.error(`[Storybook] Channel server error:`, error);
522
+ }
523
+ });
513
524
  httpServer.listen(port, host, () => {
514
525
  console.log(`WebSocket server listening on ${host ?? "localhost"}:${port}`);
515
526
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native",
3
- "version": "10.2.2",
3
+ "version": "10.2.3",
4
4
  "description": "A better way to develop React Native Components for your app",
5
5
  "keywords": [
6
6
  "react",
@@ -42,10 +42,10 @@
42
42
  "metro/**/*"
43
43
  ],
44
44
  "dependencies": {
45
- "@storybook/react": "^10.2.2",
46
- "@storybook/react-native-theming": "^10.2.2",
47
- "@storybook/react-native-ui": "^10.2.2",
48
- "@storybook/react-native-ui-common": "^10.2.2",
45
+ "@storybook/react": "^10.2.3",
46
+ "@storybook/react-native-theming": "^10.2.3",
47
+ "@storybook/react-native-ui": "^10.2.3",
48
+ "@storybook/react-native-ui-common": "^10.2.3",
49
49
  "commander": "^14.0.2",
50
50
  "dedent": "^1.7.0",
51
51
  "deepmerge": "^4.3.1",
@@ -65,7 +65,7 @@
65
65
  "jotai": "^2.17.1",
66
66
  "react": "19.1.0",
67
67
  "react-native": "0.81.5",
68
- "storybook": "^10.2.2",
68
+ "storybook": "^10.2.3",
69
69
  "test-renderer": "^0.14.0",
70
70
  "tsup": "^8.5.0",
71
71
  "typescript": "~5.9.3"