Skip to content

Commit

Permalink
chore: rafactor files and add new conversions functions
Browse files Browse the repository at this point in the history
The logic for new conversions is remaining
  • Loading branch information
Jay-Karia committed Aug 19, 2024
1 parent 16dee1e commit 0c38668
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 6 deletions.
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.

4 changes: 4 additions & 0 deletions dist/types/toBun.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export declare const bunCLICommands: readonly ["init", "run", "add", "pm", "help", "install", "remove", "upgrade", "version"];
export declare function npmToBun(_m: string, command: string): string;
export declare function yarnToBun(): string;
export declare function pnpmToBun(): string;
3 changes: 3 additions & 0 deletions dist/types/toNpm.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare function yarnToNPM(_m: string, command: string): string;
export declare function pnpmToNpm(): string;
export declare function bunToNpm(): string;
3 changes: 3 additions & 0 deletions dist/types/toPnpm.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare function npmToPnpm(_m: string, command: string): string;
export declare function yarnToPnpm(): string;
export declare function bunToPnpm(): string;
3 changes: 3 additions & 0 deletions dist/types/toYarn.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare function npmToYarn(_m: string, command: string): string;
export declare function pnpmToYarn(): string;
export declare function bunToYarn(): string;
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { yarnToNPM } from './yarnToNpm'
import { npmToYarn } from './npmToYarn'
import { npmToPnpm } from './npmToPnpm'
import { npmToBun } from './npmToBun'
import { yarnToNPM, pnpmToNpm, bunToNpm } from './toNpm'

Check warning on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'pnpmToNpm' is defined but never used

Check warning on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'bunToNpm' is defined but never used

Check warning on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'pnpmToNpm' is defined but never used

Check warning on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'bunToNpm' is defined but never used

Check warning on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'pnpmToNpm' is defined but never used

Check warning on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'bunToNpm' is defined but never used
import { npmToYarn, pnpmToYarn, bunToYarn } from './toYarn'

Check warning on line 2 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'pnpmToYarn' is defined but never used

Check warning on line 2 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'bunToYarn' is defined but never used

Check warning on line 2 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'pnpmToYarn' is defined but never used

Check warning on line 2 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'bunToYarn' is defined but never used

Check warning on line 2 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'pnpmToYarn' is defined but never used

Check warning on line 2 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'bunToYarn' is defined but never used
import { npmToPnpm, yarnToPnpm, bunToPnpm } from './toPnpm'

Check warning on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'yarnToPnpm' is defined but never used

Check warning on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'bunToPnpm' is defined but never used

Check warning on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'yarnToPnpm' is defined but never used

Check warning on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'bunToPnpm' is defined but never used

Check warning on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'yarnToPnpm' is defined but never used

Check warning on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'bunToPnpm' is defined but never used
import { npmToBun, yarnToBun, pnpmToBun } from './toBun'

Check warning on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'yarnToBun' is defined but never used

Check warning on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'pnpmToBun' is defined but never used

Check warning on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'yarnToBun' is defined but never used

Check warning on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'pnpmToBun' is defined but never used

Check warning on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'yarnToBun' is defined but never used

Check warning on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'pnpmToBun' is defined but never used

import { getManager, isOtherManagerCommand } from './lib'

Check warning on line 6 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'getManager' is defined but never used

Check warning on line 6 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (14.x)

'isOtherManagerCommand' is defined but never used

Check warning on line 6 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'getManager' is defined but never used

Check warning on line 6 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (16.x)

'isOtherManagerCommand' is defined but never used

Check warning on line 6 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'getManager' is defined but never used

Check warning on line 6 in src/index.ts

View workflow job for this annotation

GitHub Actions / Build (18.x)

'isOtherManagerCommand' is defined but never used

Expand Down
8 changes: 8 additions & 0 deletions src/npmToBun.ts → src/toBun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,11 @@ export function npmToBun (_m: string, command: string): string {
cmd === 'npm' ? "\n# couldn't auto-convert command" : ''
}`.replace('=', ' ')
}

export function yarnToBun() {
return 'yarn to bun'
}

export function pnpmToBun() {
return 'pnpm to bun'
}
8 changes: 8 additions & 0 deletions src/yarnToNpm.ts → src/toNpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,11 @@ export function yarnToNPM (_m: string, command: string): string {
return 'npm ' + command + "\n# couldn't auto-convert command"
}
}

export function pnpmToNpm () {
return 'pnpm to npm'
}

export function bunToNpm () {
return 'bun to npm'
}
8 changes: 8 additions & 0 deletions src/npmToPnpm.ts → src/toPnpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,11 @@ export function npmToPnpm (_m: string, command: string): string {
return 'npm ' + command + "\n# couldn't auto-convert command"
}
}

export function yarnToPnpm () {
return 'yarn to pnpm'
}

export function bunToPnpm () {
return 'bun to pnpm'
}
8 changes: 8 additions & 0 deletions src/npmToYarn.ts → src/toYarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,11 @@ export function npmToYarn (_m: string, command: string): string {
return 'npm ' + command + "\n# couldn't auto-convert command"
}
}

export function pnpmToYarn() {
return 'pnpm to yarn'
}

export function bunToYarn() {
return 'bun to yarn'
}

0 comments on commit 0c38668

Please sign in to comment.