vite-node 2.0.3 → 2.0.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.
package/dist/cli.cjs CHANGED
@@ -20,7 +20,7 @@ require('node:url');
20
20
  require('node:vm');
21
21
  require('node:events');
22
22
 
23
- var version = "2.0.3";
23
+ var version = "2.0.4";
24
24
 
25
25
  const cli = cac("vite-node");
26
26
  cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
package/dist/cli.mjs CHANGED
@@ -18,7 +18,7 @@ import 'node:url';
18
18
  import 'node:vm';
19
19
  import 'node:events';
20
20
 
21
- var version = "2.0.3";
21
+ var version = "2.0.4";
22
22
 
23
23
  const cli = cac("vite-node");
24
24
  cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
package/dist/client.cjs CHANGED
@@ -129,7 +129,9 @@ class ModuleCacheMap extends Map {
129
129
  var _a;
130
130
  return (_a = mod.importers) == null ? void 0 : _a.has(id);
131
131
  }).map(([key]) => key);
132
- subIds.length && this.invalidateSubDepTree(subIds, invalidated);
132
+ if (subIds.length) {
133
+ this.invalidateSubDepTree(subIds, invalidated);
134
+ }
133
135
  super.delete(id);
134
136
  }
135
137
  return invalidated;
@@ -486,7 +488,7 @@ function exportAll(exports, sourceModule) {
486
488
  if (key !== "default") {
487
489
  try {
488
490
  defineExport(exports, key, () => sourceModule[key]);
489
- } catch (_err) {
491
+ } catch {
490
492
  }
491
493
  }
492
494
  }
package/dist/client.mjs CHANGED
@@ -127,7 +127,9 @@ class ModuleCacheMap extends Map {
127
127
  var _a;
128
128
  return (_a = mod.importers) == null ? void 0 : _a.has(id);
129
129
  }).map(([key]) => key);
130
- subIds.length && this.invalidateSubDepTree(subIds, invalidated);
130
+ if (subIds.length) {
131
+ this.invalidateSubDepTree(subIds, invalidated);
132
+ }
131
133
  super.delete(id);
132
134
  }
133
135
  return invalidated;
@@ -484,7 +486,7 @@ function exportAll(exports, sourceModule) {
484
486
  if (key !== "default") {
485
487
  try {
486
488
  defineExport(exports, key, () => sourceModule[key]);
487
- } catch (_err) {
489
+ } catch {
488
490
  }
489
491
  }
490
492
  }
@@ -605,7 +605,7 @@ retrieveFileHandlers.push((path2) => {
605
605
  if (fs.existsSync(path2)) {
606
606
  contents = fs.readFileSync(path2, "utf8");
607
607
  }
608
- } catch (er) {
608
+ } catch {
609
609
  }
610
610
  return fileContentsCache[path2] = contents;
611
611
  });
@@ -603,7 +603,7 @@ retrieveFileHandlers.push((path2) => {
603
603
  if (fs.existsSync(path2)) {
604
604
  contents = fs.readFileSync(path2, "utf8");
605
605
  }
606
- } catch (er) {
606
+ } catch {
607
607
  }
608
608
  return fileContentsCache[path2] = contents;
609
609
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vite-node",
3
3
  "type": "module",
4
- "version": "2.0.3",
4
+ "version": "2.0.4",
5
5
  "description": "Vite as Node.js runtime",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",