Fix undefined error when adding scoped package on yarn, npm or npx

This commit is contained in:
Sander Declerck 2025-08-16 19:45:51 +02:00
parent b57cc11157
commit 9e1c90a914
No known key found for this signature in database
7 changed files with 41 additions and 3 deletions

View file

@ -27,6 +27,14 @@ describe("standardPnpmArgumentParser", () => {
assert.deepEqual(result, [{ name: "axios", version: "latest" }]);
});
it("should return the package in the format @vercel/otel", () => {
const args = ["@vercel/otel"];
const result = parsePackagesFromArguments(args);
assert.deepEqual(result, [{ name: "@vercel/otel", version: "latest" }]);
});
it("should return the package with latest tag if the version is absent and package starts with @", () => {
const args = ["@aikidosec/package-name"];