@jsenv/core 23.8.15 → 23.8.19
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "23.8.
|
|
3
|
+
"version": "23.8.19",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@jsenv/importmap": "1.2.0",
|
|
71
71
|
"@jsenv/log": "1.4.0",
|
|
72
72
|
"@jsenv/logger": "4.0.1",
|
|
73
|
-
"@jsenv/server": "10.1.
|
|
73
|
+
"@jsenv/server": "10.1.5",
|
|
74
74
|
"@jsenv/uneval": "1.6.0",
|
|
75
75
|
"@rollup/plugin-commonjs": "21.0.0",
|
|
76
76
|
"@rollup/plugin-json": "4.1.0",
|
package/src/buildProject.js
CHANGED
|
@@ -160,8 +160,8 @@ export const buildProject = async ({
|
|
|
160
160
|
// + some more differences like import.meta.dev
|
|
161
161
|
outDirectoryName: "build",
|
|
162
162
|
importDefaultExtension,
|
|
163
|
-
moduleOutFormat: "esmodule", // rollup will transform into
|
|
164
|
-
importMetaFormat:
|
|
163
|
+
moduleOutFormat: "esmodule", // rollup or jsenv rollup plugin will transform into the right format
|
|
164
|
+
importMetaFormat: "esmodule", // rollup or jsenv rollup plugin will transform into the right format
|
|
165
165
|
|
|
166
166
|
compileServerProtocol,
|
|
167
167
|
compileServerPrivateKey,
|
|
@@ -279,7 +279,7 @@ export const startCompileServer = async ({
|
|
|
279
279
|
jsenvDirectoryClean,
|
|
280
280
|
compileServerMetaFileInfo,
|
|
281
281
|
})
|
|
282
|
-
writeFile(
|
|
282
|
+
await writeFile(
|
|
283
283
|
compileServerMetaFileInfo.url,
|
|
284
284
|
JSON.stringify(compileServerMetaFileInfo.data, null, " "),
|
|
285
285
|
)
|
|
@@ -470,10 +470,20 @@ const cleanOutDirectoryIfNeeded = async ({
|
|
|
470
470
|
let previousCompileServerMeta
|
|
471
471
|
try {
|
|
472
472
|
const source = await readFile(compileServerMetaFileInfo.url)
|
|
473
|
-
|
|
473
|
+
if (source === "") {
|
|
474
|
+
previousCompileServerMeta = null
|
|
475
|
+
logger.debug(
|
|
476
|
+
`compiler server meta file is empty ${compileServerMetaFileInfo.url}`,
|
|
477
|
+
)
|
|
478
|
+
} else {
|
|
479
|
+
previousCompileServerMeta = JSON.parse(source)
|
|
480
|
+
}
|
|
474
481
|
} catch (e) {
|
|
475
482
|
if (e.code === "ENOENT") {
|
|
476
483
|
previousCompileServerMeta = null
|
|
484
|
+
} else if (e.name === "SyntaxError") {
|
|
485
|
+
previousCompileServerMeta = null
|
|
486
|
+
logger.warn(`Syntax error while parsing ${compileServerMetaFileInfo.url}`)
|
|
477
487
|
} else {
|
|
478
488
|
throw e
|
|
479
489
|
}
|