We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3126195 commit 7703963Copy full SHA for 7703963
1 file changed
packages/host/src/node/path-utils.ts
@@ -202,10 +202,11 @@ export function transformPackageName(
202
return "";
203
} else if (packageName.startsWith("@")) {
204
const [first, ...rest] = packageName.split("/");
205
+ assert(rest.length > 0, `Invalid scoped package name (${packageName})`);
206
if (strategy === "strip") {
207
return escapePath(rest.join("/"));
208
} else {
- // Stripping away the @ and using double underscore to separate scope and name is common practice other projects (like DefinitelyTyped)
209
+ // Stripping away the @ and using double underscore to separate scope and name is common practice in other projects (like DefinitelyTyped)
210
return escapePath(`${first.replace(/^@/, "")}__${rest.join("/")}`);
211
}
212
0 commit comments