Skip to content

Commit

Permalink
refactor: remove unused parameters (#8593)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Oct 1, 2024
1 parent c433860 commit 807f2de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg-manager/plugin-commands-installation/src/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ For options that may be used with `-r`, see "pnpm help recursive"',
// This way we avoid the confusion about whether "pnpm r" means remove, run, or recursive.
export const commandNames = ['remove', 'uninstall', 'rm', 'un', 'uni']

export const completion: CompletionFunc = async (cliOpts, params) => {
export const completion: CompletionFunc = async (cliOpts) => {
return readDepNameCompletions(cliOpts.dir as string)
}

Expand Down
4 changes: 2 additions & 2 deletions pnpm/dev/pd.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const pnpmPackageJson = JSON.parse(fs.readFileSync(pathLib.join(__dirname, 'pack
name: 'spnpmImports',
setup: (build) => {
// E.g. @pnpm/config -> /<some_dir>/pnpm/packages/config/src/index.ts
build.onResolve({ filter: /@pnpm\// }, ({ path, resolveDir }) => {
build.onResolve({ filter: /@pnpm\// }, ({ path }) => {
// Bail if the package isn't present locally
if (!localPackages.includes(path)) {
return
Expand All @@ -36,7 +36,7 @@ const pnpmPackageJson = JSON.parse(fs.readFileSync(pathLib.join(__dirname, 'pack
}
})

build.onResolve({filter: /js-yaml/}, ({ path, resolveDir, ...rest }) => {
build.onResolve({filter: /js-yaml/}, ({ path, resolveDir }) => {
if (path === 'js-yaml' && resolveDir.includes('lockfile/fs')) {
// Force esbuild to use the resolved js-yaml from within lockfile-file,
// since it seems to pick the wrong one otherwise.
Expand Down
2 changes: 1 addition & 1 deletion pnpm/test/utils/retryLoadJsonFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function retryLoadJsonFile<T> (filePath: string): Promise<T> {
const operation = retry.operation({})

return new Promise<T>((resolve, reject) => {
operation.attempt(async (currentAttempt) => {
operation.attempt(async () => {
try {
resolve(await loadJsonFile<T>(filePath))
} catch (err: any) { // eslint-disable-line
Expand Down
4 changes: 2 additions & 2 deletions worker/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async function handleMessage (
}
}

function addTarballToStore ({ buffer, cafsDir, integrity, filesIndexFile, pkg, readManifest }: TarballExtractMessage) {
function addTarballToStore ({ buffer, cafsDir, integrity, filesIndexFile }: TarballExtractMessage) {
if (integrity) {
const [, algo, integrityHash] = integrity.match(INTEGRITY_REGEX)!
// Compensate for the possibility of non-uniform Base64 padding
Expand Down Expand Up @@ -161,7 +161,7 @@ interface AddFilesFromDirResult {
}
}

function addFilesFromDir ({ dir, cafsDir, filesIndexFile, sideEffectsCacheKey, pkg, readManifest, files }: AddDirToStoreMessage): AddFilesFromDirResult {
function addFilesFromDir ({ dir, cafsDir, filesIndexFile, sideEffectsCacheKey, files }: AddDirToStoreMessage): AddFilesFromDirResult {
if (!cafsCache.has(cafsDir)) {
cafsCache.set(cafsDir, createCafs(cafsDir))
}
Expand Down

0 comments on commit 807f2de

Please sign in to comment.