@jsenv/core 27.0.1 → 27.0.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/main.js
CHANGED
|
@@ -19850,7 +19850,7 @@ const rollupPluginJsenv = ({
|
|
|
19850
19850
|
outputOptions: outputOptions => {
|
|
19851
19851
|
// const sourcemapFile = buildDirectoryUrl
|
|
19852
19852
|
Object.assign(outputOptions, {
|
|
19853
|
-
format: "esm",
|
|
19853
|
+
format: jsModuleUrlInfos.some(jsModuleUrlInfo => jsModuleUrlInfo.filename.endsWith(".cjs")) ? "cjs" : "esm",
|
|
19854
19854
|
dir: fileUrlConverter.asFilePath(buildDirectoryUrl),
|
|
19855
19855
|
sourcemap: sourcemaps === "file" || sourcemaps === "inline",
|
|
19856
19856
|
// sourcemapFile,
|
|
@@ -25478,6 +25478,7 @@ const executePlan = async (plan, {
|
|
|
25478
25478
|
});
|
|
25479
25479
|
|
|
25480
25480
|
if (!keepRunning) {
|
|
25481
|
+
logger.debug("stopAfterAllSignal.notify()");
|
|
25481
25482
|
await stopAfterAllSignal.notify();
|
|
25482
25483
|
}
|
|
25483
25484
|
|
|
@@ -25888,7 +25889,7 @@ const createRuntimeFromPlaywright = ({
|
|
|
25888
25889
|
|
|
25889
25890
|
runtime.run = async ({
|
|
25890
25891
|
signal = new AbortController().signal,
|
|
25891
|
-
|
|
25892
|
+
logger,
|
|
25892
25893
|
rootDirectoryUrl,
|
|
25893
25894
|
fileRelativeUrl,
|
|
25894
25895
|
server,
|
|
@@ -25947,10 +25948,10 @@ const createRuntimeFromPlaywright = ({
|
|
|
25947
25948
|
};
|
|
25948
25949
|
|
|
25949
25950
|
browser.on("disconnected", disconnectedCallback);
|
|
25950
|
-
}) : Promise.resolve(); // for some reason without this
|
|
25951
|
+
}) : Promise.resolve(); // for some reason without this 150ms timeout
|
|
25951
25952
|
// browser.close() never resolves (playwright does not like something)
|
|
25952
25953
|
|
|
25953
|
-
await new Promise(resolve => setTimeout(resolve,
|
|
25954
|
+
await new Promise(resolve => setTimeout(resolve, 150));
|
|
25954
25955
|
|
|
25955
25956
|
try {
|
|
25956
25957
|
await browser.close();
|
|
@@ -26148,6 +26149,7 @@ const createRuntimeFromPlaywright = ({
|
|
|
26148
26149
|
stopAfterAllSignal.notify = async () => {
|
|
26149
26150
|
await notifyPrevious();
|
|
26150
26151
|
browser.removeListener("disconnected", disconnectedCallback);
|
|
26152
|
+
logger.debug(`stopAfterAllSignal notified -> closing ${browserName}`);
|
|
26151
26153
|
await closeBrowser();
|
|
26152
26154
|
};
|
|
26153
26155
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "27.0.
|
|
3
|
+
"version": "27.0.2",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"eslint": "npx eslint . --ext=.js,.mjs,.cjs,.html",
|
|
44
44
|
"dev": "node --conditions=development ./scripts/dev/dev.mjs",
|
|
45
45
|
"test": "node --conditions=development ./scripts/test/test.mjs",
|
|
46
|
-
"test
|
|
46
|
+
"test:coverage": "npm run test -- --coverage",
|
|
47
47
|
"build": "node --conditions=development ./scripts/build/build.mjs",
|
|
48
|
-
"
|
|
49
|
-
"workspace
|
|
50
|
-
"workspace
|
|
48
|
+
"workspace:test": "npm run test --workspaces --if-present -- --workspace",
|
|
49
|
+
"workspace:versions": "node ./scripts/publish/workspace_versions.mjs",
|
|
50
|
+
"workspace:publish": "node ./scripts/publish/workspace_publish.mjs",
|
|
51
51
|
"performances": "node --expose-gc ./scripts/performance/generate_performance_report.mjs --log --once",
|
|
52
52
|
"file-size": "node ./scripts/file_size/file_size.mjs --log",
|
|
53
|
+
"start_file_server": "node ./scripts/dev/start_file_server.mjs",
|
|
53
54
|
"prettier": "prettier --write .",
|
|
54
55
|
"playwright-install": "npx playwright install-deps && npx playwright install",
|
|
55
56
|
"certificate-install": "node ./scripts/dev/install_certificate_authority.mjs",
|
|
56
|
-
"test-with-coverage": "npm run test -- --coverage",
|
|
57
57
|
"prepublishOnly": "npm run build"
|
|
58
58
|
},
|
|
59
59
|
"optionalDependencies": {
|
|
@@ -30,7 +30,7 @@ export const createRuntimeFromPlaywright = ({
|
|
|
30
30
|
let browserAndContextPromise
|
|
31
31
|
runtime.run = async ({
|
|
32
32
|
signal = new AbortController().signal,
|
|
33
|
-
|
|
33
|
+
logger,
|
|
34
34
|
rootDirectoryUrl,
|
|
35
35
|
fileRelativeUrl,
|
|
36
36
|
server,
|
|
@@ -82,9 +82,9 @@ export const createRuntimeFromPlaywright = ({
|
|
|
82
82
|
browser.on("disconnected", disconnectedCallback)
|
|
83
83
|
})
|
|
84
84
|
: Promise.resolve()
|
|
85
|
-
// for some reason without this
|
|
85
|
+
// for some reason without this 150ms timeout
|
|
86
86
|
// browser.close() never resolves (playwright does not like something)
|
|
87
|
-
await new Promise((resolve) => setTimeout(resolve,
|
|
87
|
+
await new Promise((resolve) => setTimeout(resolve, 150))
|
|
88
88
|
try {
|
|
89
89
|
await browser.close()
|
|
90
90
|
} catch (e) {
|
|
@@ -275,6 +275,9 @@ export const createRuntimeFromPlaywright = ({
|
|
|
275
275
|
stopAfterAllSignal.notify = async () => {
|
|
276
276
|
await notifyPrevious()
|
|
277
277
|
browser.removeListener("disconnected", disconnectedCallback)
|
|
278
|
+
logger.debug(
|
|
279
|
+
`stopAfterAllSignal notified -> closing ${browserName}`,
|
|
280
|
+
)
|
|
278
281
|
await closeBrowser()
|
|
279
282
|
}
|
|
280
283
|
}
|
|
@@ -147,7 +147,11 @@ const rollupPluginJsenv = ({
|
|
|
147
147
|
outputOptions: (outputOptions) => {
|
|
148
148
|
// const sourcemapFile = buildDirectoryUrl
|
|
149
149
|
Object.assign(outputOptions, {
|
|
150
|
-
format:
|
|
150
|
+
format: jsModuleUrlInfos.some((jsModuleUrlInfo) =>
|
|
151
|
+
jsModuleUrlInfo.filename.endsWith(".cjs"),
|
|
152
|
+
)
|
|
153
|
+
? "cjs"
|
|
154
|
+
: "esm",
|
|
151
155
|
dir: fileUrlConverter.asFilePath(buildDirectoryUrl),
|
|
152
156
|
sourcemap: sourcemaps === "file" || sourcemaps === "inline",
|
|
153
157
|
// sourcemapFile,
|