Skip to content

Commit

Permalink
Support for narn info
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning committed Jan 15, 2021
1 parent 7b49806 commit c1ebdb3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/narn-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ exports.getNpmArgs = (narnArgs, isPnpm = false) => {
}
});
break;
case "info":
npmTarget = "info";
npmArgs = narnArgs.slice(1);
break;
default:
npmTarget = "run";
if (narnArgs.length > 1) {
Expand Down
7 changes: 7 additions & 0 deletions test/info.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { getNpmArgs } = require("../lib/narn-lib");

describe("narn info", () => {
it("can lookup package info", () => {
expect(getNpmArgs(["info", "single-spa"])).toEqual(["info", "single-spa"]);
});
});
1 change: 1 addition & 0 deletions test/publish.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe("narn publish", () => {
});

it("runs np", () => {
delete process.env.NARN_PUBLISH;
const expected = [];
expected.command = "np";
expect(getNpmArgs(["publish"])).toEqual(expected);
Expand Down

0 comments on commit c1ebdb3

Please sign in to comment.