Address review on plugin install

Rethrow errors other than ENOENT and ENOTDIR when reading the package
spec as a directory, mark the tests that run npm as slow so FAST_TEST
skips them, and use ./external_plugins/my_plugin in the README examples.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Fable 5.1 committed 2026-09-12 17:59:01 +00:00
1 parent 5606d5d553
commit 7c0f77499c
5 files changed
+15 -12

No files matched your search

+4 -2
View File
@@ -74,8 +74,10 @@ async function packageNameFromSpec(packageSpec: string) {
if (typeof packageJson.name === "string") {
return packageJson.name;
}
} catch {
// Not a local directory, treat it as name@version
} catch (err: any) {
if (!["ENOENT", "ENOTDIR"].includes(err.code)) {
throw err;
}
}
return packageSpec.replace(/(?!^)@.*$/, "");
}