File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/commandkit/src/cli Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ function detectPackageManager() {
85
85
'package-lock.json' : 'npm' ,
86
86
'bun.lock' : 'bun' ,
87
87
'bun.lockb' : 'bun' ,
88
+ 'deno.lock' : 'deno' ,
88
89
} ;
89
90
90
91
for ( const [ lockfile , manager ] of Object . entries ( lockfiles ) ) {
@@ -114,8 +115,8 @@ export async function loadTypeScript(e?: string) {
114
115
if ( e instanceof Error && 'code' in e && e . code === 'MODULE_NOT_FOUND' ) {
115
116
try {
116
117
const packageManager = detectPackageManager ( ) ;
117
-
118
- execSync ( `${ packageManager } add typescript` , {
118
+ const prefix = packageManager === 'deno' ? 'npm:' : '' ;
119
+ execSync ( `${ packageManager } add -D ${ prefix } typescript` , {
119
120
stdio : 'inherit' ,
120
121
cwd : process . cwd ( ) ,
121
122
} ) ;
You can’t perform that action at this time.
0 commit comments