Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay-Karia committed Sep 5, 2024
1 parent 071194f commit 6973111
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ import { convert, convertMultiple } from 'npm-to-yarn'
convert('npm install squirrelly', 'yarn')
// yarn add squirrelly

// npx conversions
convert('npx create-next-app', 'yarn')
// yarn dlx create-next-app

// one to many conversions
convertMultiple("npm i next", ["pnpm", "bun"])
// ["pnpm add next", "bun add next"]
Expand All @@ -50,10 +54,6 @@ convertMultiple(["bun add rollup", "npm i express"], ["yarn", "pnpm"])
]
*/

// npx conversions

convert('npx create-next-app', 'yarn')
// yarn dlx create-next-app
```

`npm-to-yarn` exposes a UMD build, so you can also install it with a CDN (it exposes global variable `n2y`)
Expand Down
2 changes: 1 addition & 1 deletion dist/npm-to-yarn.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/npm-to-yarn.umd.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ type Command = 'npm' | 'yarn' | 'pnpm' | 'bun'
*/

export function convert (str: string, to: 'npm' | 'yarn' | 'pnpm' | 'bun'): string {
if (to === 'npm') {

export default function convert (str: string, to: 'npm' | 'yarn' | 'pnpm' | 'bun'): string {
if (
str.includes('npx') ||
str.includes('yarn dlx') ||
Expand Down
3 changes: 3 additions & 0 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ describe("Multiple Convert Tests", () => {
describe("Many to Many", () => {
it.each(manyToManyTests)('%s', (test) => {
expect(convertMultiple(test.command, test.managers)).toEqual(test.result)
})
})
})

describe('to yarn dlx tests', () => {
const tests: [npm: string, yarn: string][] = [
Expand Down

0 comments on commit 6973111

Please sign in to comment.