bakit 2.0.0-alpha.30 → 2.0.0-alpha.32
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.js +2 -2
- package/dist/index.js +3 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -71,7 +71,7 @@ program.command("dev").action(async () => {
|
|
|
71
71
|
}).start();
|
|
72
72
|
});
|
|
73
73
|
function getEntryFile(entryDirectory) {
|
|
74
|
-
let index = join(entryDirectory, "index");
|
|
75
|
-
return existsSync(
|
|
74
|
+
let index = join(entryDirectory, "index"), tsPath = index + ".ts";
|
|
75
|
+
return existsSync(tsPath) ? tsPath : index + ".js";
|
|
76
76
|
}
|
|
77
77
|
program.parse();
|
package/dist/index.js
CHANGED
|
@@ -384,10 +384,7 @@ function isImportedBy(path, matcher) {
|
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
function onDependencyAdd(data) {
|
|
387
|
-
let { url, parentURL } = data, path = fileURLToPath(url), parentPath = fileURLToPath(parentURL);
|
|
388
|
-
if (parentPath.includes("/node_modules/"))
|
|
389
|
-
return;
|
|
390
|
-
let reverseEntry = reverseDependencyGraph.get(path);
|
|
387
|
+
let { url, parentURL } = data, path = fileURLToPath(url), parentPath = fileURLToPath(parentURL), reverseEntry = reverseDependencyGraph.get(path);
|
|
391
388
|
reverseEntry || (reverseEntry = /* @__PURE__ */ new Set(), reverseDependencyGraph.set(path, reverseEntry)), reverseEntry.add(parentPath);
|
|
392
389
|
let forwardEntry = forwardDependencyGraph.get(parentPath);
|
|
393
390
|
forwardEntry || (forwardEntry = /* @__PURE__ */ new Set(), forwardDependencyGraph.set(parentPath, forwardEntry)), forwardEntry.add(path);
|
|
@@ -415,6 +412,8 @@ function restartProcess() {
|
|
|
415
412
|
processRPC?.send("restart");
|
|
416
413
|
}
|
|
417
414
|
async function unloadModule(path, reload = false) {
|
|
415
|
+
if (path.includes("/node_modules/"))
|
|
416
|
+
return;
|
|
418
417
|
let topLevel = getTopLevelDirectory(path, getEntryDirectory());
|
|
419
418
|
if (!topLevel)
|
|
420
419
|
return;
|