File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 abbreviateCommitHash ,
1414 extractOwnerAndRepo ,
1515 extractRepository ,
16+ installCommands ,
1617} from "@pkg-pr-new/utils" ;
1718import { glob } from "tinyglobby" ;
1819import ignore from "ignore" ;
@@ -549,7 +550,7 @@ const main = defineCommand({
549550 return `${ packageName } :
550551- sha: ${ shasums [ packageName ] }
551552- publint: ${ publintUrl }
552- - npm: npm i ${ url } ` ;
553+ - ${ packMethod } : ${ installCommands [ packMethod ] } ${ url } ` ;
553554 } )
554555 . join ( "\n\n" ) ;
555556
Original file line number Diff line number Diff line change @@ -37,6 +37,13 @@ export function isPullRequest(ref: string) {
3737export type Comment = "off" | "create" | "update" ;
3838export type PackageManager = "npm" | "pnpm" | "yarn" | "bun" ;
3939
40+ export const installCommands : Record < PackageManager , string > = {
41+ npm : "npm i" ,
42+ pnpm : "pnpm add" ,
43+ yarn : "yarn add" ,
44+ bun : "bun add" ,
45+ } ;
46+
4047const whitelist =
4148 "https://raw.githubusercontent.com/stackblitz-labs/pkg.pr.new/main/.whitelist" ;
4249
You can’t perform that action at this time.
0 commit comments