@@ -244,12 +244,34 @@ const lazyDistShadowNpmInjectPath = () =>
244
244
245
245
const lazyHomePath = ( ) => os . homedir ( )
246
246
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
+
247
269
const lazyNmBinPath = ( ) =>
248
270
// Lazily access constants.rootPath.
249
271
path . join ( constants . rootPath , `${ NODE_MODULES } /.bin` )
250
272
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.
253
275
const lazyNodeHardenFlags = ( ) =>
254
276
// The '@rollup/plugin-replace' will replace "process.env[INLINED_SOCKET_CLI_SENTRY_BUILD]".
255
277
// Lazily access constants.WIN32.
@@ -347,6 +369,7 @@ const constants = createConstantsObject(
347
369
distShadowNpmBinPath : undefined ,
348
370
distShadowNpmInjectPath : undefined ,
349
371
homePath : undefined ,
372
+ minimumVersionByAgent : undefined ,
350
373
nmBinPath : undefined ,
351
374
nodeHardenFlags : undefined ,
352
375
rootBinPath : undefined ,
@@ -367,6 +390,7 @@ const constants = createConstantsObject(
367
390
distShadowNpmBinPath : lazyDistShadowNpmBinPath ,
368
391
distShadowNpmInjectPath : lazyDistShadowNpmInjectPath ,
369
392
homePath : lazyHomePath ,
393
+ minimumVersionByAgent : lazyMinimumVersionByAgent ,
370
394
nmBinPath : lazyNmBinPath ,
371
395
nodeHardenFlags : lazyNodeHardenFlags ,
372
396
rootBinPath : lazyRootBinPath ,
0 commit comments