Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1866 from intuit/private-lerna-packages
don't include private packages in canary install list
- Loading branch information
Showing
3 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
packages/core/src/utils/__tests__/get-lerna-packages.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import endent from "endent"; | ||
import execPromise from "../exec-promise"; | ||
import getLernaPackages from "../get-lerna-packages"; | ||
|
||
const exec = jest.fn(); | ||
jest.mock("../exec-promise"); | ||
// @ts-ignore | ||
execPromise.mockImplementation(exec); | ||
|
||
test("it shouldn't included private packages", async () => { | ||
exec.mockReturnValue(endent` | ||
/dir/a:a:0.3.0--canary.32.d54a0c4.0 | ||
/dir/b:b:MISSING:PRIVATE | ||
`); | ||
expect(await getLernaPackages()).toStrictEqual([ | ||
{ | ||
name: "a", | ||
path: "/dir/a", | ||
version: "0.3.0--canary.32.d54a0c4.0", | ||
}, | ||
]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters