wuchale 0.22.5 → 0.22.7

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.
@@ -251,7 +251,8 @@ export class AdapterHandler {
251
251
  let getRuntimePlain = getRuntimeVars.plain;
252
252
  let getRuntimeReactive = getRuntimeVars.reactive;
253
253
  if (hmrData != null) {
254
- head.push(`const ${varNames.hmrUpdate} = ${JSON.stringify(hmrData)}`);
254
+ const hmrDataStr = JSON.stringify(hmrData).replaceAll('</script>', '\\x3C/script>');
255
+ head.push(`const ${varNames.hmrUpdate} = ${hmrDataStr}`);
255
256
  getRuntimePlain += 'hmr_';
256
257
  getRuntimeReactive += 'hmr_';
257
258
  head.push(this.#hmrUpdateFunc(getRuntimeVars.plain, getRuntimePlain), this.#hmrUpdateFunc(getRuntimeVars.reactive, getRuntimeReactive));
@@ -444,7 +445,7 @@ export class AdapterHandler {
444
445
  }
445
446
  const [hmrKeys, updatedItems] = await this.handleMessages(msgs, filename);
446
447
  updated = updatedItems;
447
- if (msgs.length && hmrVersion >= 0) {
448
+ if (!forServer && msgs.length > 0 && hmrVersion >= 0) {
448
449
  hmrData = { version: hmrVersion, data: {} };
449
450
  for (const loc of this.#config.locales) {
450
451
  hmrData.data[loc] =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wuchale",
3
- "version": "0.22.5",
3
+ "version": "0.22.7",
4
4
  "description": "Protobuf-like i18n from plain code",
5
5
  "scripts": {
6
6
  "dev": "tsc --watch",
@@ -88,7 +88,7 @@
88
88
  "acorn": "^8.16.0",
89
89
  "chokidar": "^5.0.0",
90
90
  "magic-string": "^0.30.21",
91
- "path-to-regexp": "^8.3.0",
91
+ "path-to-regexp": "^8.4.0",
92
92
  "picomatch": "^4.0.4",
93
93
  "pofile": "^1.1.4",
94
94
  "tinyglobby": "^0.2.15"
@@ -96,7 +96,7 @@
96
96
  "devDependencies": {
97
97
  "@types/node": "~24.12.0",
98
98
  "@types/picomatch": "^4.0.1",
99
- "typescript": "^5.9.3"
99
+ "typescript": "^6.0.2"
100
100
  },
101
101
  "funding": "https://github.com/sponsors/wuchalejs",
102
102
  "type": "module"