@jsenv/core 27.3.1 → 27.3.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.
@@ -1,5 +1,6 @@
1
1
  import { u as uneval } from "./js/uneval.js";
2
2
  import { e as executeUsingDynamicImport } from "./js/execute_using_dynamic_import.js";
3
+ import "node:fs";
3
4
  import "node:inspector";
4
5
  import "node:perf_hooks";
5
6
 
@@ -1,6 +1,7 @@
1
1
  import { parentPort } from "node:worker_threads";
2
2
  import { u as uneval } from "./js/uneval.js";
3
3
  import { e as executeUsingDynamicImport } from "./js/execute_using_dynamic_import.js";
4
+ import "node:fs";
4
5
  import "node:inspector";
5
6
  import "node:perf_hooks";
6
7
 
@@ -1,3 +1,4 @@
1
+ import { writeFileSync } from "node:fs";
1
2
  import { Session } from "node:inspector";
2
3
  import { performance, PerformanceObserver } from "node:perf_hooks";
3
4
 
@@ -122,9 +123,10 @@ const executeUsingDynamicImport = async ({
122
123
  collectPerformance,
123
124
  coverageEnabled,
124
125
  coverageConfig,
125
- coverageMethodForNodeJs
126
+ coverageMethodForNodeJs,
127
+ coverageFileUrl
126
128
  }) => {
127
- let result = {};
129
+ const result = {};
128
130
  const afterImportCallbacks = [];
129
131
 
130
132
  if (coverageEnabled && coverageMethodForNodeJs === "Profiler") {
@@ -140,7 +142,7 @@ const executeUsingDynamicImport = async ({
140
142
  rootDirectoryUrl,
141
143
  coverageConfig
142
144
  });
143
- result.coverage = coverageLight;
145
+ writeFileSync(new URL(coverageFileUrl), JSON.stringify(coverageLight, null, " "));
144
146
  });
145
147
  }
146
148