Skip to content

Commit f4db4d2

Browse files
committed
refactor(dlx): improve parameter ordering in ensurePackageInstalled
Reordered function parameters to place packageName before packageSpec for better semantic clarity and consistency. The package name is the primary identifier, while the spec is a constraint.
1 parent 1cc523c commit f4db4d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/dlx-package.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ function parsePackageSpec(spec: string): {
130130
* Protected by process lock to prevent concurrent installation corruption.
131131
*/
132132
async function ensurePackageInstalled(
133-
packageSpec: string,
134133
packageName: string,
134+
packageSpec: string,
135135
force: boolean,
136136
): Promise<{ installed: boolean; packageDir: string }> {
137137
const cacheKey = generateCacheKey(packageSpec)
@@ -294,8 +294,8 @@ export async function downloadPackage(
294294

295295
// Ensure package is installed.
296296
const { installed, packageDir } = await ensurePackageInstalled(
297-
fullPackageSpec,
298297
packageName,
298+
fullPackageSpec,
299299
force,
300300
)
301301

0 commit comments

Comments
 (0)