gt-react 11.1.1 → 11.1.4

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/package.json +26 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # gt-react
2
2
 
3
+ ## 11.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`bd961d1`](https://github.com/generaltranslation/gt/commit/bd961d1474547f7c6d470583c1b1190dce0112ca)]:
8
+ - generaltranslation@9.1.0
9
+ - gt-i18n@1.0.10
10
+ - @generaltranslation/react-core@11.1.4
11
+
12
+ ## 11.1.3
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies []:
17
+ - @generaltranslation/react-core@11.1.3
18
+
19
+ ## 11.1.2
20
+
21
+ ### Patch Changes
22
+
23
+ - [#1998](https://github.com/generaltranslation/gt/pull/1998) [`06fbf97`](https://github.com/generaltranslation/gt/commit/06fbf97731178d9892ab0e02b81acb62df8e38c5) Thanks [@pompa](https://github.com/pompa)! - Resolve the server build on worker runtimes. The `.` export listed `browser` ahead of `import`, and Node's exports algorithm lets the target's own key order decide which condition wins, so worker runtimes — whose condition sets include `browser`, such as Cloudflare's `["workerd", "worker", "module", "browser"]` — loaded the browser build during SSR. `gt-tanstack-start` crashed with `ReferenceError: document is not defined` when `initializeGT()` read `document.cookie`; `gt-react` silently handed back `BrowserGTProvider` and `initializeGTSRAClient`, so SSR ran on the isolate-global `BrowserConditionStore` shared across concurrent requests instead of the request-scoped store.
24
+
25
+ Both packages now list `workerd` and `worker` ahead of `browser` and resolve them to the server build. In `gt-react` they sit after `react-server`, so RSC runtimes on workerd keep the RSC build. Browsers still match `browser` and Node SSR still falls through to `import`, so no existing consumer changes.
26
+
27
+ - Updated dependencies []:
28
+ - @generaltranslation/react-core@11.1.2
29
+
3
30
  ## 11.1.1
4
31
 
5
32
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gt-react",
3
- "version": "11.1.1",
3
+ "version": "11.1.4",
4
4
  "description": "A React library for automatic internationalization.",
5
5
  "main": "./dist/index.server.cjs",
6
6
  "module": "./dist/index.server.mjs",
@@ -17,9 +17,9 @@
17
17
  "react-dom": ">=18.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "generaltranslation": "9.0.5",
21
- "@generaltranslation/react-core": "11.1.1",
22
- "gt-i18n": "1.0.9"
20
+ "generaltranslation": "9.1.0",
21
+ "@generaltranslation/react-core": "11.1.4",
22
+ "gt-i18n": "1.0.10"
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
@@ -51,6 +51,28 @@
51
51
  },
52
52
  "default": "./dist/index.rsc.mjs"
53
53
  },
54
+ "workerd": {
55
+ "require": {
56
+ "types": "./dist/index.types.d.cts",
57
+ "default": "./dist/index.server.cjs"
58
+ },
59
+ "import": {
60
+ "types": "./dist/index.types.d.mts",
61
+ "default": "./dist/index.server.mjs"
62
+ },
63
+ "default": "./dist/index.server.mjs"
64
+ },
65
+ "worker": {
66
+ "require": {
67
+ "types": "./dist/index.types.d.cts",
68
+ "default": "./dist/index.server.cjs"
69
+ },
70
+ "import": {
71
+ "types": "./dist/index.types.d.mts",
72
+ "default": "./dist/index.server.mjs"
73
+ },
74
+ "default": "./dist/index.server.mjs"
75
+ },
54
76
  "browser": {
55
77
  "require": {
56
78
  "types": "./dist/index.types.d.cts",