wuchale 0.22.1 → 0.22.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.
@@ -50,8 +50,8 @@ export const wuchale = (configPath, hmrDelayThreshold = 1000) => {
50
50
  }
51
51
  if (!changeInfo.sourceTriggered && changeInfo.invalidate.size > 0) {
52
52
  ctx.server.ws.send({ type: 'full-reload' });
53
- return [];
54
53
  }
54
+ return [];
55
55
  },
56
56
  transform: {
57
57
  order: 'pre',
package/dist/hub.js CHANGED
@@ -136,9 +136,12 @@ export class Hub {
136
136
  onFileChange = async (file, read) => {
137
137
  file = normalizeSep(file); // just to be sure
138
138
  if (this.#confUpdateFile === file) {
139
- const update = JSON.parse(await read());
140
- this.#log.info(`${logPrefix} config update received: ${update}`);
141
- this.#config.hmr = update.hmr;
139
+ const updateTxt = await read();
140
+ const update = JSON.parse(updateTxt);
141
+ this.#log.info(`${logPrefix} config update received: ${color.cyan(updateTxt)}`);
142
+ if (update.hmr !== undefined) {
143
+ this.#config.hmr = update.hmr;
144
+ }
142
145
  return ignoreChange;
143
146
  }
144
147
  if (!this.#config.hmr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wuchale",
3
- "version": "0.22.1",
3
+ "version": "0.22.3",
4
4
  "description": "Protobuf-like i18n from plain code",
5
5
  "scripts": {
6
6
  "dev": "tsc --watch",
@@ -89,7 +89,7 @@
89
89
  "chokidar": "^5.0.0",
90
90
  "magic-string": "^0.30.21",
91
91
  "path-to-regexp": "^8.3.0",
92
- "picomatch": "^4.0.3",
92
+ "picomatch": "^4.0.4",
93
93
  "pofile": "^1.1.4",
94
94
  "tinyglobby": "^0.2.15"
95
95
  },