@@ -244,12 +244,34 @@ const lazyDistShadowNpmInjectPath = () =>
244244
245245const lazyHomePath = ( ) => os . homedir ( )
246246
247+ const lazyMinimumVersionByAgent = ( ) =>
248+ new Map ( [
249+ // Bun >=1.1.39 supports the text-based lockfile.
250+ // https://bun.sh/blog/bun-lock-text-lockfile
251+ [ BUN , '1.1.39' ] ,
252+ // The npm version bundled with Node 18.
253+ // https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch
254+ [ NPM , '10.8.2' ] ,
255+ // 8.x is the earliest version to support Node 18.
256+ // https://pnpm.io/installation#compatibility
257+ // https://www.npmjs.com/package/pnpm?activeTab=versions
258+ [ PNPM , '8.15.9' ] ,
259+ // 4.x supports >= Node 18.12.0
260+ // https://github.com/yarnpkg/berry/blob/%40yarnpkg/core/4.1.0/CHANGELOG.md#400
261+ [ YARN_BERRY , '4.0.0' ] ,
262+ // Latest 1.x.
263+ // https://www.npmjs.com/package/yarn?activeTab=versions
264+ [ YARN_CLASSIC , '1.22.22' ] ,
265+ // vlt does not support overrides so we don't gate on it.
266+ [ VLT , '*' ]
267+ ] )
268+
247269const lazyNmBinPath = ( ) =>
248270 // Lazily access constants.rootPath.
249271 path . join ( constants . rootPath , `${ NODE_MODULES } /.bin` )
250272
251- // Redefine nodeHardenFlags to account for the INLINED_SOCKET_CLI_SENTRY_BUILD
252- // environment variable.
273+ // Redefine registryConstants. nodeHardenFlags to account for the
274+ // INLINED_SOCKET_CLI_SENTRY_BUILD environment variable.
253275const lazyNodeHardenFlags = ( ) =>
254276 // The '@rollup/plugin-replace' will replace "process.env[INLINED_SOCKET_CLI_SENTRY_BUILD]".
255277 // Lazily access constants.WIN32.
@@ -347,6 +369,7 @@ const constants = createConstantsObject(
347369 distShadowNpmBinPath : undefined ,
348370 distShadowNpmInjectPath : undefined ,
349371 homePath : undefined ,
372+ minimumVersionByAgent : undefined ,
350373 nmBinPath : undefined ,
351374 nodeHardenFlags : undefined ,
352375 rootBinPath : undefined ,
@@ -367,6 +390,7 @@ const constants = createConstantsObject(
367390 distShadowNpmBinPath : lazyDistShadowNpmBinPath ,
368391 distShadowNpmInjectPath : lazyDistShadowNpmInjectPath ,
369392 homePath : lazyHomePath ,
393+ minimumVersionByAgent : lazyMinimumVersionByAgent ,
370394 nmBinPath : lazyNmBinPath ,
371395 nodeHardenFlags : lazyNodeHardenFlags ,
372396 rootBinPath : lazyRootBinPath ,
0 commit comments