Skip to content

Commit 94344d9

Browse files
committed
refactor: rename tempDir to getTempDir
1 parent 5c801bc commit 94344d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/applyPatch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ const PACKAGE_MANAGER_MAP = {
77
yarn: {
88
patch: 'yarn patch',
99
patchCommit: 'yarn patch-commit -s',
10-
tempDir: (tempDir: string) => tempDir.split('\n')[1].slice(49)
10+
getTempDir: (tempDir: string) => tempDir.split('\n')[1].slice(49)
1111
},
1212
pnpm: {
1313
prePatch: `node -e "fs.rmSync('node_modules/.pnpm_patches',{recursive:true,force:true})"`,
1414
patch: 'pnpm patch',
1515
patchCommit: 'pnpm patch-commit',
16-
tempDir: (tempDir: string) => tempDir.split('\n')[2].trim()
16+
getTempDir: (tempDir: string) => tempDir.split('\n')[2].trim()
1717
}
1818
}
1919

@@ -39,7 +39,7 @@ export default async function applyPatch_(packageName: string, patchMap: Record<
3939

4040
const patchOutput = run(`${pacakgeManagerPatcher.patch} ${packageName}`)
4141

42-
const tempDir = pacakgeManagerPatcher.tempDir(patchOutput)
42+
const tempDir = pacakgeManagerPatcher.getTempDir(patchOutput)
4343

4444
for (const [originalFile, patchPath] of Object.entries(patchMap)) {
4545
const fileToPatch = join(tempDir, originalFile)

0 commit comments

Comments
 (0)