We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a682a99 commit f06b73fCopy full SHA for f06b73f
server/utils/npm.ts
@@ -1,9 +1,11 @@
1
import type { Packument, NpmSearchResponse } from '#shared/types'
2
import { encodePackageName, fetchLatestVersion } from '#shared/utils/npm'
3
import { maxSatisfying, prerelease } from 'semver'
4
-import { CACHE_MAX_AGE_FIVE_MINUTES, CACHE_MAX_AGE_ONE_DAY } from '#shared/utils/constants'
5
-
6
-const NPM_REGISTRY = 'https://registry.npmjs.org'
+import {
+ CACHE_MAX_AGE_FIVE_MINUTES,
+ CACHE_MAX_AGE_ONE_DAY,
7
+ NPM_REGISTRY,
8
+} from '#shared/utils/constants'
9
10
export const fetchNpmPackage = defineCachedFunction(
11
async (name: string): Promise<Packument> => {
0 commit comments