Skip to content

Commit 88c68fd

Browse files
committed
style(packages): reorder getFetcher per sort-source-methods
oxlint autofix moved getFetcher into alphanumeric order within its visibility group (after findPackageExtensions). No behavior change.
1 parent 1d83472 commit 88c68fd

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/packages/operations.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,6 @@ const pacoteCachePath = getPacoteCachePath()
5858
// helper (e.g. `pkgNameToSlug`). Bundlers that stub npm-pack then crash at
5959
// module load. A memoized getter defers the cost to the first fetcher use.
6060
let _fetcher: ReturnType<typeof makeFetchHappen.defaults> | undefined
61-
export function getFetcher(): ReturnType<typeof makeFetchHappen.defaults> {
62-
if (_fetcher === undefined) {
63-
_fetcher = makeFetchHappen.defaults({
64-
cachePath: pacoteCachePath,
65-
// Prefer-offline: Staleness checks for cached data will be bypassed, but
66-
// missing data will be requested from the server.
67-
// https://github.com/npm/make-fetch-happen?tab=readme-ov-file#--optscache
68-
cache: 'force-cache',
69-
})
70-
}
71-
return _fetcher
72-
}
73-
7461
/**
7562
* Extract a package to a destination directory.
7663
*
@@ -161,6 +148,19 @@ export function findPackageExtensions(
161148
return result
162149
}
163150

151+
export function getFetcher(): ReturnType<typeof makeFetchHappen.defaults> {
152+
if (_fetcher === undefined) {
153+
_fetcher = makeFetchHappen.defaults({
154+
cachePath: pacoteCachePath,
155+
// Prefer-offline: Staleness checks for cached data will be bypassed, but
156+
// missing data will be requested from the server.
157+
// https://github.com/npm/make-fetch-happen?tab=readme-ov-file#--optscache
158+
cache: 'force-cache',
159+
})
160+
}
161+
return _fetcher
162+
}
163+
164164
/**
165165
* Get the release tag for a version.
166166
*

0 commit comments

Comments
 (0)