Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/extensions/first-party-import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,16 @@ describe("first-party extension imports", () => {
]),
true,
);

const denoMissingDependency = new Error(
`Import "@veryfront/ext-auth-jwt" not a dependency`,
);
assertEquals(
isMissingFirstPartyExtensionModule(denoMissingDependency, [
"@veryfront/ext-auth-jwt",
]),
true,
);
});

it("parses Bun relative, package, and object-shaped missing-module errors", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/first-party-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function reportedMissingSpecifier(message: string): string | undefined {
const pattern of [
/^Cannot find module\s+["']([^"']+)["']\nRequire stack:(?:\n- [^\r\n]+)+$/,
/^(?:Cannot find package|Cannot find module|Module not found)\s+["']([^"']+)["'](?:(?:\s+imported from\s+.+)|\.)?$/,
/^Import\s+["']([^"']+)["']\s+not a dependency and not in import map(?:\s+from\s+.+)?$/,
/^Import\s+["']([^"']+)["']\s+not a dependency(?: and not in import map)?(?:\s+from\s+.+)?$/,
/^Unable to resolve\s+["']([^"']+)["'](?:\s+from\s+.+)?$/,
]
) {
Expand Down