Skip to content

Commit dac6ada

Browse files
committed
Fix dependency alias detecting
Fixes detection in case there is a folder with a name with only numbers in the root of the dependency
1 parent b28d853 commit dac6ada

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/app/src/sandbox/eval/utils/get-dependency-name.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function getDependencyName(path: string) {
55
if (path.startsWith('@')) {
66
dependencyName += `/${dependencyParts.shift()}`;
77
}
8-
if (dependencyParts[0] && /^\d/.test(dependencyParts[0])) {
8+
if (dependencyParts[0] && /^\d+\.\d+\.\d+$/.test(dependencyParts[0])) {
99
// Make sure to include the aliased version if it's part of it
1010
dependencyName += `/${dependencyParts.shift()}`;
1111
}

0 commit comments

Comments
 (0)