@@ -4186,23 +4186,23 @@ export async function installDependenciesOnly(packages: string[], installPath?:
4186
4186
// Try different ways to find the package in pantry
4187
4187
// For PHP, we need to check php.net specifically
4188
4188
let packageKey : string | undefined
4189
-
4189
+
4190
4190
// First, try exact matches
4191
4191
packageKey = Object . keys ( pantry ) . find ( key => key === domain || key === packageName )
4192
-
4192
+
4193
4193
// Handle PHP special case - check phpnet specifically
4194
4194
if ( ! packageKey && packageName === 'php' ) {
4195
4195
packageKey = Object . keys ( pantry ) . find ( key => key === 'phpnet' )
4196
4196
}
4197
-
4197
+
4198
4198
// Fallback to partial matches only if no exact match found
4199
4199
if ( ! packageKey ) {
4200
- packageKey = Object . keys ( pantry ) . find ( key =>
4200
+ packageKey = Object . keys ( pantry ) . find ( key =>
4201
4201
key . includes ( packageName ) || key . includes ( domain . split ( '.' ) [ 0 ] )
4202
4202
)
4203
4203
}
4204
4204
4205
- const packageSpec = packageKey ? pantry [ packageKey ] : null
4205
+ const packageSpec = packageKey ? pantry [ packageKey as keyof typeof pantry ] : null
4206
4206
4207
4207
if ( ! packageSpec || ! packageSpec . dependencies ) {
4208
4208
console . warn ( `⚠️ Package ${ packageName } not found in pantry or has no dependencies` )
@@ -4214,11 +4214,11 @@ export async function installDependenciesOnly(packages: string[], installPath?:
4214
4214
}
4215
4215
4216
4216
// Filter out problematic dependencies - these are now included since source builds don't exist
4217
- const skipPatterns = [
4217
+ const skipPatterns : string [ ] = [
4218
4218
// Only skip dependencies that are truly problematic or incompatible
4219
4219
]
4220
4220
4221
- const filteredDeps = packageSpec . dependencies . filter ( dep =>
4221
+ const filteredDeps = packageSpec . dependencies . filter ( ( dep : string ) =>
4222
4222
! skipPatterns . some ( pattern => dep . includes ( pattern ) ) ,
4223
4223
)
4224
4224
@@ -4228,19 +4228,19 @@ export async function installDependenciesOnly(packages: string[], installPath?:
4228
4228
}
4229
4229
4230
4230
// Filter out already installed dependencies and the main package itself
4231
- const depsToInstall = filteredDeps . filter ( ( dep ) => {
4231
+ const depsToInstall = filteredDeps . filter ( ( dep : string ) => {
4232
4232
const depDomain = dep . split ( / [ < > = ~ ^ ] / ) [ 0 ]
4233
-
4233
+
4234
4234
// Skip if this dependency is the same as the main package we're installing deps for
4235
- if ( depDomain === domain || depDomain === packageName ||
4235
+ if ( depDomain === domain || depDomain === packageName ||
4236
4236
( packageName === 'php' && depDomain === 'php.net' ) ||
4237
4237
( domain === 'php.net' && depDomain === 'php.net' ) ) {
4238
4238
if ( config . verbose ) {
4239
4239
console . log ( `⏭️ Skipping ${ dep } (this is the main package, not a dependency)` )
4240
4240
}
4241
4241
return false
4242
4242
}
4243
-
4243
+
4244
4244
const depInstallPath = path . join ( targetPath , depDomain )
4245
4245
const alreadyInstalled = fs . existsSync ( depInstallPath )
4246
4246
if ( alreadyInstalled ) {
0 commit comments