rwsdk 1.5.0 → 1.5.2
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/dist/use-synced-state/hibernation/__tests__/client-core.test.js +117 -30
- package/dist/use-synced-state/hibernation/__tests__/server.test.mjs +231 -41
- package/dist/use-synced-state/hibernation/client-core.d.ts +1 -1
- package/dist/use-synced-state/hibernation/client-core.js +2 -2
- package/dist/use-synced-state/hibernation/connection/connection.js +5 -5
- package/dist/use-synced-state/hibernation/connection/messages.js +5 -0
- package/dist/use-synced-state/hibernation/connection/timer.d.ts +3 -3
- package/dist/use-synced-state/hibernation/connection/timer.js +25 -25
- package/dist/use-synced-state/hibernation/connection/types.d.ts +1 -1
- package/dist/use-synced-state/hibernation/identity.d.mts +3 -0
- package/dist/use-synced-state/hibernation/identity.mjs +21 -2
- package/dist/use-synced-state/hibernation/server.d.mts +1 -1
- package/dist/use-synced-state/hibernation/server.mjs +87 -140
- package/dist/use-synced-state/hibernation/state/clientFactory.js +28 -13
- package/dist/use-synced-state/hibernation/state/clientManager.js +6 -4
- package/dist/use-synced-state/hibernation/worker.mjs +25 -7
- package/dist/vite/configPlugin.mjs +8 -4
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clie
|
|
|
12
12
|
// context(justinvdm, 2026-05-06): Only set a sourcemap default if the user
|
|
13
13
|
// hasn't already configured it in their vite config. This lets users opt in
|
|
14
14
|
// or out explicitly while still providing a sensible mode-aware default.
|
|
15
|
-
const sourcemap = config.build?.sourcemap ??
|
|
15
|
+
const sourcemap = config.build?.sourcemap ?? mode === "development";
|
|
16
16
|
const workerConfig = {
|
|
17
17
|
resolve: {
|
|
18
18
|
conditions: [
|
|
@@ -47,6 +47,8 @@ export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clie
|
|
|
47
47
|
"rwsdk/realtime/worker",
|
|
48
48
|
"rwsdk/router",
|
|
49
49
|
"rwsdk/worker",
|
|
50
|
+
"rwsdk/use-synced-state/worker",
|
|
51
|
+
"rwsdk/use-synced-state/hibernation/worker",
|
|
50
52
|
],
|
|
51
53
|
exclude: [],
|
|
52
54
|
entries: [workerEntryPathname],
|
|
@@ -55,7 +57,7 @@ export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clie
|
|
|
55
57
|
jsx: "react-jsx",
|
|
56
58
|
define: {
|
|
57
59
|
"process.env.NODE_ENV": JSON.stringify(mode),
|
|
58
|
-
|
|
60
|
+
__webpack_require__: "globalThis.__webpack_require__",
|
|
59
61
|
},
|
|
60
62
|
},
|
|
61
63
|
},
|
|
@@ -108,6 +110,7 @@ export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clie
|
|
|
108
110
|
"rwsdk/router",
|
|
109
111
|
"rwsdk/turnstile",
|
|
110
112
|
"rwsdk/use-synced-state/client",
|
|
113
|
+
"rwsdk/use-synced-state/hibernation/client",
|
|
111
114
|
],
|
|
112
115
|
entries: [],
|
|
113
116
|
rolldownOptions: {
|
|
@@ -115,7 +118,7 @@ export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clie
|
|
|
115
118
|
jsx: "react-jsx",
|
|
116
119
|
define: {
|
|
117
120
|
"process.env.NODE_ENV": JSON.stringify(mode),
|
|
118
|
-
|
|
121
|
+
__webpack_require__: "globalThis.__webpack_require__",
|
|
119
122
|
},
|
|
120
123
|
},
|
|
121
124
|
},
|
|
@@ -148,13 +151,14 @@ export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clie
|
|
|
148
151
|
"rwsdk/realtime/durableObject",
|
|
149
152
|
"rwsdk/realtime/worker",
|
|
150
153
|
"rwsdk/use-synced-state/client",
|
|
154
|
+
"rwsdk/use-synced-state/hibernation/client",
|
|
151
155
|
],
|
|
152
156
|
rolldownOptions: {
|
|
153
157
|
transform: {
|
|
154
158
|
jsx: "react-jsx",
|
|
155
159
|
define: {
|
|
156
160
|
"process.env.NODE_ENV": JSON.stringify(mode),
|
|
157
|
-
|
|
161
|
+
__webpack_require__: "globalThis.__webpack_require__",
|
|
158
162
|
},
|
|
159
163
|
},
|
|
160
164
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rwsdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"semver": "~7.7.4",
|
|
238
238
|
"tsx": "~4.21.0",
|
|
239
239
|
"typescript": "~6.0.3",
|
|
240
|
-
"vite": "~8.0
|
|
240
|
+
"vite": "~8.1.0",
|
|
241
241
|
"vitest": "~4.1.5",
|
|
242
242
|
"ws": "^8.21.0"
|
|
243
243
|
}
|