@tramvai/module-render 2.143.1 → 2.145.0

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.
@@ -37,7 +37,7 @@ class HtmlWritable extends Writable {
37
37
  styles.forEach((s) => {
38
38
  html.push(`<link rel="stylesheet" href="${genHref(s)}" crossorigin="anonymous" data-critical="true" />`);
39
39
  });
40
- // synchronius script, we can't use async here, will lead to hydration missmatch
40
+ // synchronous script, we can't use async here, will lead to hydration mismatch
41
41
  scripts.forEach((s) => {
42
42
  html.push(`<script src="${genHref(s)}" charset="utf-8" crossorigin="anonymous" data-critical="true"></script>`);
43
43
  });
@@ -46,11 +46,10 @@ class HtmlWritable extends Writable {
46
46
  });
47
47
  });
48
48
  }
49
- const html = chunk.toString('utf-8');
50
49
  // delay writing HTML to response stream
51
50
  // @todo some priorities, to prevent conflicts with deferred actions scripts?
52
51
  this.responseTaskManager.push(async () => {
53
- this.responseStream.push(html);
52
+ this.responseStream.push(chunk);
54
53
  });
55
54
  callback();
56
55
  }
@@ -45,7 +45,7 @@ class HtmlWritable extends stream.Writable {
45
45
  styles.forEach((s) => {
46
46
  html.push(`<link rel="stylesheet" href="${genHref(s)}" crossorigin="anonymous" data-critical="true" />`);
47
47
  });
48
- // synchronius script, we can't use async here, will lead to hydration missmatch
48
+ // synchronous script, we can't use async here, will lead to hydration mismatch
49
49
  scripts.forEach((s) => {
50
50
  html.push(`<script src="${genHref(s)}" charset="utf-8" crossorigin="anonymous" data-critical="true"></script>`);
51
51
  });
@@ -54,11 +54,10 @@ class HtmlWritable extends stream.Writable {
54
54
  });
55
55
  });
56
56
  }
57
- const html = chunk.toString('utf-8');
58
57
  // delay writing HTML to response stream
59
58
  // @todo some priorities, to prevent conflicts with deferred actions scripts?
60
59
  this.responseTaskManager.push(async () => {
61
- this.responseStream.push(html);
60
+ this.responseStream.push(chunk);
62
61
  });
63
62
  callback();
64
63
  }
package/lib/server.es.js CHANGED
@@ -209,7 +209,7 @@ Page Error Boundary will be rendered for the client`,
209
209
  customRender: { token: CUSTOM_RENDER, optional: true },
210
210
  extendRender: { token: EXTEND_RENDER, optional: true },
211
211
  di: DI_TOKEN,
212
- renderMode: { token: REACT_SERVER_RENDER_MODE, optional: true },
212
+ renderMode: optional(REACT_SERVER_RENDER_MODE),
213
213
  logger: LOGGER_TOKEN,
214
214
  responseTaskManager: SERVER_RESPONSE_TASK_MANAGER,
215
215
  responseStream: SERVER_RESPONSE_STREAM,
package/lib/server.js CHANGED
@@ -210,7 +210,7 @@ Page Error Boundary will be rendered for the client`,
210
210
  customRender: { token: tokensRender.CUSTOM_RENDER, optional: true },
211
211
  extendRender: { token: tokensRender.EXTEND_RENDER, optional: true },
212
212
  di: core.DI_TOKEN,
213
- renderMode: { token: tokensRender.REACT_SERVER_RENDER_MODE, optional: true },
213
+ renderMode: dippy.optional(tokensRender.REACT_SERVER_RENDER_MODE),
214
214
  logger: tokensCommon.LOGGER_TOKEN,
215
215
  responseTaskManager: tokensServerPrivate.SERVER_RESPONSE_TASK_MANAGER,
216
216
  responseStream: tokensServerPrivate.SERVER_RESPONSE_STREAM,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-render",
3
- "version": "2.143.1",
3
+ "version": "2.145.0",
4
4
  "description": "",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -26,13 +26,13 @@
26
26
  "@tinkoff/layout-factory": "0.3.8",
27
27
  "@tinkoff/errors": "0.3.8",
28
28
  "@tinkoff/url": "0.8.6",
29
- "@tinkoff/user-agent": "0.4.417",
30
- "@tramvai/module-client-hints": "2.143.1",
31
- "@tramvai/module-router": "2.143.1",
32
- "@tramvai/react": "2.143.1",
33
- "@tramvai/safe-strings": "0.5.11",
34
- "@tramvai/tokens-render": "2.143.1",
35
- "@tramvai/experiments": "2.143.1",
29
+ "@tinkoff/user-agent": "0.4.422",
30
+ "@tramvai/module-client-hints": "2.145.0",
31
+ "@tramvai/module-router": "2.145.0",
32
+ "@tramvai/react": "2.145.0",
33
+ "@tramvai/safe-strings": "0.5.12",
34
+ "@tramvai/tokens-render": "2.145.0",
35
+ "@tramvai/experiments": "2.145.0",
36
36
  "@types/loadable__server": "^5.12.6",
37
37
  "node-fetch": "^2.6.1"
38
38
  },
@@ -40,14 +40,14 @@
40
40
  "@tinkoff/dippy": "0.8.15",
41
41
  "@tinkoff/utils": "^2.1.2",
42
42
  "@tinkoff/react-hooks": "0.1.6",
43
- "@tramvai/cli": "2.143.1",
44
- "@tramvai/core": "2.143.1",
45
- "@tramvai/module-common": "2.143.1",
46
- "@tramvai/state": "2.143.1",
47
- "@tramvai/test-helpers": "2.143.1",
48
- "@tramvai/tokens-common": "2.143.1",
49
- "@tramvai/tokens-router": "2.143.1",
50
- "@tramvai/tokens-server-private": "2.143.1",
43
+ "@tramvai/cli": "2.145.0",
44
+ "@tramvai/core": "2.145.0",
45
+ "@tramvai/module-common": "2.145.0",
46
+ "@tramvai/state": "2.145.0",
47
+ "@tramvai/test-helpers": "2.145.0",
48
+ "@tramvai/tokens-common": "2.145.0",
49
+ "@tramvai/tokens-router": "2.145.0",
50
+ "@tramvai/tokens-server-private": "2.145.0",
51
51
  "express": "^4.17.1",
52
52
  "prop-types": "^15.6.2",
53
53
  "react": ">=16.14.0",