-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: [email protected] <[email protected]> Co-authored-by: HiDeoo <[email protected]>
- Loading branch information
1 parent
795479d
commit b88d821
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
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,5 @@ | ||
--- | ||
'starlight-package-managers': patch | ||
--- | ||
|
||
Strips version from package names for the [`create`](https://starlight-package-managers.vercel.app/usage/#create) command type for the `yarn` package manager which [does not support](https://github.com/yarnpkg/yarn/issues/6587) versioned package names for this command type. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,11 +44,21 @@ describe('add', () => { | |
|
||
describe('create', () => { | ||
test("should generate the 'create' command for supported package managers", () => { | ||
expect(getCommands('create', 'astro', {})).toEqual(['npm create astro', 'yarn create astro', 'pnpm create astro']) | ||
}) | ||
|
||
test("should strip versions for the 'create' command with yarn", () => { | ||
expect(getCommands('create', 'astro@latest', {})).toEqual([ | ||
'npm create astro@latest', | ||
'yarn create astro@latest', | ||
'yarn create astro', | ||
'pnpm create astro@latest', | ||
]) | ||
|
||
expect(getCommands('create', '[email protected]', {})).toEqual([ | ||
'npm create [email protected]', | ||
'yarn create astro', | ||
'pnpm create [email protected]', | ||
]) | ||
}) | ||
|
||
test("should generate the 'create' command with additional arguments", () => { | ||
|