@socketsecurity/cli-with-sentry 0.14.86 → 0.14.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -2
- package/dist/instrument-with-sentry.js +2 -2
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/module-sync/cli.js +58 -50
- package/dist/module-sync/cli.js.map +1 -1
- package/dist/module-sync/shadow-npm-inject.js +14 -7
- package/dist/module-sync/shadow-npm-inject.js.map +1 -1
- package/dist/require/cli.js +58 -50
- package/dist/require/cli.js.map +1 -1
- package/package.json +1 -1
- package/dist/module-sync/fs.d.ts +0 -61
package/dist/constants.d.ts
CHANGED
|
@@ -44,8 +44,6 @@ type IPC = Readonly<{
|
|
|
44
44
|
SOCKET_CLI_SAFE_PROGRESS?: boolean | undefined
|
|
45
45
|
}>
|
|
46
46
|
declare const constants: {
|
|
47
|
-
readonly NODE_ENV: 'NODE_ENV'
|
|
48
|
-
readonly kInternalsSymbol: unique symbol
|
|
49
47
|
readonly [kInternalsSymbol]: registryConstants.Internals
|
|
50
48
|
readonly AT_LATEST: '@latest'
|
|
51
49
|
readonly BIOME_JSON: 'biome.json'
|
|
@@ -71,6 +69,7 @@ declare const constants: {
|
|
|
71
69
|
readonly MANIFEST_JSON: 'manifest.json'
|
|
72
70
|
readonly MIT: 'MIT'
|
|
73
71
|
readonly NODE_AUTH_TOKEN: 'NODE_AUTH_TOKEN'
|
|
72
|
+
readonly NODE_ENV: 'NODE_ENV'
|
|
74
73
|
readonly NODE_MODULES: 'node_modules'
|
|
75
74
|
readonly NODE_MODULES_GLOB_RECURSIVE: '**/node_modules'
|
|
76
75
|
readonly NODE_WORKSPACES: 'node_workspaces'
|
|
@@ -153,6 +152,7 @@ declare const constants: {
|
|
|
153
152
|
'**/*.tsbuildinfo',
|
|
154
153
|
'**/Thumbs.db'
|
|
155
154
|
]
|
|
155
|
+
readonly kInternalsSymbol: unique symbol
|
|
156
156
|
readonly lifecycleScriptNames: ReadonlySet<string>
|
|
157
157
|
readonly maintainedNodeVersions: Readonly<MaintainedNodeVersions>
|
|
158
158
|
readonly nodeHardenFlags: readonly string[] & string[]
|
|
@@ -41,7 +41,7 @@ const relConstantsPath = './constants'
|
|
|
41
41
|
Sentry.setTag(
|
|
42
42
|
'version',
|
|
43
43
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
|
|
44
|
-
'0.14.
|
|
44
|
+
'0.14.87:0330c30:e39f7589:pub'
|
|
45
45
|
)
|
|
46
46
|
const constants = require(relConstantsPath)
|
|
47
47
|
if (constants.ENV.SOCKET_CLI_DEBUG) {
|
|
@@ -56,5 +56,5 @@ const relConstantsPath = './constants'
|
|
|
56
56
|
} = constants
|
|
57
57
|
setSentry(Sentry)
|
|
58
58
|
}
|
|
59
|
-
//# debugId=
|
|
59
|
+
//# debugId=7462b6a0-0ec4-4dd2-9b42-785f00a71795
|
|
60
60
|
//# sourceMappingURL=instrument-with-sentry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument-with-sentry.js","sources":["../../src/instrument-with-sentry.ts"],"sourcesContent":["// This should ONLY be included in the special Sentry build!\n// Otherwise the Sentry dependency won't even be present in the manifest.\n\nimport { logger } from '@socketsecurity/registry/lib/logger'\n\n// Require constants with require(relConstantsPath) instead of require('./constants')\n// so Rollup doesn't generate a constants2.js chunk.\nconst relConstantsPath = './constants'\n// The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']\".\nif (process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']) {\n const Sentry = require('@sentry/node')\n Sentry.init({\n onFatalError(error: Error) {\n // Defer module loads until after Sentry.init is called.\n if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.fail('[DEBUG] [Sentry onFatalError]:', error)\n }\n },\n dsn: 'https://66736701db8e4ffac046bd09fa6aaced@o555220.ingest.us.sentry.io/4508846967619585',\n enabled: true,\n integrations: []\n })\n Sentry.setTag(\n 'environment',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\".\n process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\n ? 'pub'\n : // The NODE_ENV convention is used by apps to define the runtime environment.\n // https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production\n process.env['NODE_ENV']\n )\n Sentry.setTag(\n 'version',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION_HASH']\".\n process.env['INLINED_SOCKET_CLI_VERSION_HASH']\n )\n const constants = require(relConstantsPath)\n if (constants.ENV.SOCKET_CLI_DEBUG) {\n Sentry.setTag('debugging', true)\n logger.log('[DEBUG] Set up Sentry.')\n } else {\n Sentry.setTag('debugging', false)\n }\n const {\n kInternalsSymbol,\n [kInternalsSymbol as unknown as 'Symbol(kInternalsSymbol)']: { setSentry }\n } = constants\n setSentry(Sentry)\n} else if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.log('[DEBUG] Sentry disabled explicitly.')\n}\n"],"names":["logger","dsn","enabled","integrations","process","Sentry","setSentry"],"mappings":";;;;;;;;;;;;;AAAA;AACA;;;AAIA;AACA;AACA;AACA;AACoD;AAClD;;;AAGI;;AAEEA;AACF;;AAEFC;AACAC;AACAC;AACF;;AAGE;AACAC;;AAQA;AACAA;AAEF;AACA;AACEC;AACAL;AACF;AACEK;AACF;;;AAGE;AAA+DC;AAAU;AAC3E;;AAEF","debugId":"
|
|
1
|
+
{"version":3,"file":"instrument-with-sentry.js","sources":["../../src/instrument-with-sentry.ts"],"sourcesContent":["// This should ONLY be included in the special Sentry build!\n// Otherwise the Sentry dependency won't even be present in the manifest.\n\nimport { logger } from '@socketsecurity/registry/lib/logger'\n\n// Require constants with require(relConstantsPath) instead of require('./constants')\n// so Rollup doesn't generate a constants2.js chunk.\nconst relConstantsPath = './constants'\n// The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']\".\nif (process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']) {\n const Sentry = require('@sentry/node')\n Sentry.init({\n onFatalError(error: Error) {\n // Defer module loads until after Sentry.init is called.\n if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.fail('[DEBUG] [Sentry onFatalError]:', error)\n }\n },\n dsn: 'https://66736701db8e4ffac046bd09fa6aaced@o555220.ingest.us.sentry.io/4508846967619585',\n enabled: true,\n integrations: []\n })\n Sentry.setTag(\n 'environment',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\".\n process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\n ? 'pub'\n : // The NODE_ENV convention is used by apps to define the runtime environment.\n // https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production\n process.env['NODE_ENV']\n )\n Sentry.setTag(\n 'version',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION_HASH']\".\n process.env['INLINED_SOCKET_CLI_VERSION_HASH']\n )\n const constants = require(relConstantsPath)\n if (constants.ENV.SOCKET_CLI_DEBUG) {\n Sentry.setTag('debugging', true)\n logger.log('[DEBUG] Set up Sentry.')\n } else {\n Sentry.setTag('debugging', false)\n }\n const {\n kInternalsSymbol,\n [kInternalsSymbol as unknown as 'Symbol(kInternalsSymbol)']: { setSentry }\n } = constants\n setSentry(Sentry)\n} else if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.log('[DEBUG] Sentry disabled explicitly.')\n}\n"],"names":["logger","dsn","enabled","integrations","process","Sentry","setSentry"],"mappings":";;;;;;;;;;;;;AAAA;AACA;;;AAIA;AACA;AACA;AACA;AACoD;AAClD;;;AAGI;;AAEEA;AACF;;AAEFC;AACAC;AACAC;AACF;;AAGE;AACAC;;AAQA;AACAA;AAEF;AACA;AACEC;AACAL;AACF;AACEK;AACF;;;AAGE;AAA+DC;AAAU;AAC3E;;AAEF","debugId":"7462b6a0-0ec4-4dd2-9b42-785f00a71795"}
|
package/dist/module-sync/cli.js
CHANGED
|
@@ -915,7 +915,7 @@ function emitBanner(name) {
|
|
|
915
915
|
logger.logger.error(getAsciiHeader(name))
|
|
916
916
|
}
|
|
917
917
|
function getAsciiHeader(command) {
|
|
918
|
-
const cliVersion = '0.14.
|
|
918
|
+
const cliVersion = '0.14.87:0330c30:e39f7589:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
|
|
919
919
|
const nodeVersion = process$1.version
|
|
920
920
|
const apiToken = shadowNpmInject.getDefaultToken()
|
|
921
921
|
const shownToken = apiToken ? getLastFiveOfApiToken(apiToken) : 'no'
|
|
@@ -3903,7 +3903,6 @@ async function npmFix(
|
|
|
3903
3903
|
const editablePkgJson = await packages.readPackageJson(cwd, {
|
|
3904
3904
|
editable: true
|
|
3905
3905
|
})
|
|
3906
|
-
const { content: pkgJson } = editablePkgJson
|
|
3907
3906
|
await arb.buildIdealTree()
|
|
3908
3907
|
for (const { 0: name, 1: infos } of infoByPkg) {
|
|
3909
3908
|
const hasUpgrade = !!registry.getManifestData(NPM$f, name)
|
|
@@ -3955,19 +3954,20 @@ async function npmFix(
|
|
|
3955
3954
|
targetVersion = node.package.version
|
|
3956
3955
|
const fixSpec = `${name}@^${targetVersion}`
|
|
3957
3956
|
const revertData = {
|
|
3958
|
-
...(
|
|
3957
|
+
...(editablePkgJson.content.dependencies
|
|
3959
3958
|
? {
|
|
3960
|
-
dependencies:
|
|
3959
|
+
dependencies: editablePkgJson.content.dependencies
|
|
3961
3960
|
}
|
|
3962
3961
|
: undefined),
|
|
3963
|
-
...(
|
|
3962
|
+
...(editablePkgJson.content.optionalDependencies
|
|
3964
3963
|
? {
|
|
3965
|
-
optionalDependencies:
|
|
3964
|
+
optionalDependencies:
|
|
3965
|
+
editablePkgJson.content.optionalDependencies
|
|
3966
3966
|
}
|
|
3967
3967
|
: undefined),
|
|
3968
|
-
...(
|
|
3968
|
+
...(editablePkgJson.content.peerDependencies
|
|
3969
3969
|
? {
|
|
3970
|
-
peerDependencies:
|
|
3970
|
+
peerDependencies: editablePkgJson.content.peerDependencies
|
|
3971
3971
|
}
|
|
3972
3972
|
: undefined)
|
|
3973
3973
|
}
|
|
@@ -3977,6 +3977,7 @@ async function npmFix(
|
|
|
3977
3977
|
editablePkgJson,
|
|
3978
3978
|
arb.idealTree,
|
|
3979
3979
|
node,
|
|
3980
|
+
targetVersion,
|
|
3980
3981
|
rangeStyle
|
|
3981
3982
|
)
|
|
3982
3983
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -4298,7 +4299,6 @@ async function pnpmFix(
|
|
|
4298
4299
|
const editablePkgJson = await packages.readPackageJson(cwd, {
|
|
4299
4300
|
editable: true
|
|
4300
4301
|
})
|
|
4301
|
-
const { content: pkgJson } = editablePkgJson
|
|
4302
4302
|
let actualTree = await getActualTree(cwd)
|
|
4303
4303
|
for (const { 0: name, 1: infos } of infoByPkg) {
|
|
4304
4304
|
if (registry.getManifestData(NPM$c, name)) {
|
|
@@ -4348,14 +4348,18 @@ async function pnpmFix(
|
|
|
4348
4348
|
let installed = false
|
|
4349
4349
|
let saved = false
|
|
4350
4350
|
if (targetVersion && targetPackument) {
|
|
4351
|
-
const oldPnpm =
|
|
4352
|
-
const
|
|
4351
|
+
const oldPnpm = editablePkgJson.content[PNPM$9]
|
|
4352
|
+
const oldPnpmKeyCount = oldPnpm ? Object.keys(oldPnpm).length : 0
|
|
4353
4353
|
const oldOverrides = oldPnpm?.[OVERRIDES$2]
|
|
4354
|
-
const
|
|
4354
|
+
const oldOverridesCount = oldOverrides
|
|
4355
4355
|
? Object.keys(oldOverrides).length
|
|
4356
4356
|
: 0
|
|
4357
4357
|
const overrideKey = `${node.name}@${vulnerableVersionRange}`
|
|
4358
|
-
const overrideRange =
|
|
4358
|
+
const overrideRange = shadowNpmInject.applyRange(
|
|
4359
|
+
oldOverrides?.[overrideKey] ?? targetVersion,
|
|
4360
|
+
targetVersion,
|
|
4361
|
+
rangeStyle
|
|
4362
|
+
)
|
|
4359
4363
|
const fixSpec = `${name}@${overrideRange}`
|
|
4360
4364
|
const updateData = {
|
|
4361
4365
|
[PNPM$9]: {
|
|
@@ -4367,11 +4371,11 @@ async function pnpmFix(
|
|
|
4367
4371
|
}
|
|
4368
4372
|
}
|
|
4369
4373
|
const revertData = {
|
|
4370
|
-
[PNPM$9]:
|
|
4374
|
+
[PNPM$9]: oldPnpmKeyCount
|
|
4371
4375
|
? {
|
|
4372
4376
|
...oldPnpm,
|
|
4373
4377
|
[OVERRIDES$2]:
|
|
4374
|
-
|
|
4378
|
+
oldOverridesCount === 1
|
|
4375
4379
|
? undefined
|
|
4376
4380
|
: {
|
|
4377
4381
|
[overrideKey]: undefined,
|
|
@@ -4379,19 +4383,20 @@ async function pnpmFix(
|
|
|
4379
4383
|
}
|
|
4380
4384
|
}
|
|
4381
4385
|
: undefined,
|
|
4382
|
-
...(
|
|
4386
|
+
...(editablePkgJson.content.dependencies
|
|
4383
4387
|
? {
|
|
4384
|
-
dependencies:
|
|
4388
|
+
dependencies: editablePkgJson.content.dependencies
|
|
4385
4389
|
}
|
|
4386
4390
|
: undefined),
|
|
4387
|
-
...(
|
|
4391
|
+
...(editablePkgJson.content.optionalDependencies
|
|
4388
4392
|
? {
|
|
4389
|
-
optionalDependencies:
|
|
4393
|
+
optionalDependencies:
|
|
4394
|
+
editablePkgJson.content.optionalDependencies
|
|
4390
4395
|
}
|
|
4391
4396
|
: undefined),
|
|
4392
|
-
...(
|
|
4397
|
+
...(editablePkgJson.content.peerDependencies
|
|
4393
4398
|
? {
|
|
4394
|
-
peerDependencies:
|
|
4399
|
+
peerDependencies: editablePkgJson.content.peerDependencies
|
|
4395
4400
|
}
|
|
4396
4401
|
: undefined)
|
|
4397
4402
|
}
|
|
@@ -4402,6 +4407,7 @@ async function pnpmFix(
|
|
|
4402
4407
|
editablePkgJson,
|
|
4403
4408
|
actualTree,
|
|
4404
4409
|
node,
|
|
4410
|
+
targetVersion,
|
|
4405
4411
|
rangeStyle
|
|
4406
4412
|
)
|
|
4407
4413
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -6400,13 +6406,13 @@ const depsIncludesByAgent = new Map([
|
|
|
6400
6406
|
[YARN_CLASSIC$5, matchLsCmdViewHumanStdout]
|
|
6401
6407
|
])
|
|
6402
6408
|
|
|
6403
|
-
function getDependencyEntries(
|
|
6409
|
+
function getDependencyEntries(editablePkgJson) {
|
|
6404
6410
|
const {
|
|
6405
6411
|
dependencies,
|
|
6406
6412
|
devDependencies,
|
|
6407
6413
|
optionalDependencies,
|
|
6408
6414
|
peerDependencies
|
|
6409
|
-
} =
|
|
6415
|
+
} = editablePkgJson.content
|
|
6410
6416
|
return [
|
|
6411
6417
|
[
|
|
6412
6418
|
'dependencies',
|
|
@@ -6457,8 +6463,8 @@ const {
|
|
|
6457
6463
|
YARN_BERRY: YARN_BERRY$3,
|
|
6458
6464
|
YARN_CLASSIC: YARN_CLASSIC$4
|
|
6459
6465
|
} = constants
|
|
6460
|
-
function getOverridesDataBun(
|
|
6461
|
-
const overrides =
|
|
6466
|
+
function getOverridesDataBun(editablePkgJson) {
|
|
6467
|
+
const overrides = editablePkgJson.content?.[RESOLUTIONS$1] ?? {}
|
|
6462
6468
|
return {
|
|
6463
6469
|
type: YARN_BERRY$3,
|
|
6464
6470
|
overrides
|
|
@@ -6467,8 +6473,8 @@ function getOverridesDataBun(pkgJson) {
|
|
|
6467
6473
|
|
|
6468
6474
|
// npm overrides documentation:
|
|
6469
6475
|
// https://docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides
|
|
6470
|
-
function getOverridesDataNpm(
|
|
6471
|
-
const overrides =
|
|
6476
|
+
function getOverridesDataNpm(editablePkgJson) {
|
|
6477
|
+
const overrides = editablePkgJson.content?.[OVERRIDES$1] ?? {}
|
|
6472
6478
|
return {
|
|
6473
6479
|
type: NPM$5,
|
|
6474
6480
|
overrides
|
|
@@ -6477,15 +6483,15 @@ function getOverridesDataNpm(pkgJson) {
|
|
|
6477
6483
|
|
|
6478
6484
|
// pnpm overrides documentation:
|
|
6479
6485
|
// https://pnpm.io/package_json#pnpmoverrides
|
|
6480
|
-
function getOverridesDataPnpm(
|
|
6481
|
-
const overrides =
|
|
6486
|
+
function getOverridesDataPnpm(editablePkgJson) {
|
|
6487
|
+
const overrides = editablePkgJson.content?.[PNPM$5]?.[OVERRIDES$1] ?? {}
|
|
6482
6488
|
return {
|
|
6483
6489
|
type: PNPM$5,
|
|
6484
6490
|
overrides
|
|
6485
6491
|
}
|
|
6486
6492
|
}
|
|
6487
|
-
function getOverridesDataVlt(
|
|
6488
|
-
const overrides =
|
|
6493
|
+
function getOverridesDataVlt(editablePkgJson) {
|
|
6494
|
+
const overrides = editablePkgJson.content?.[OVERRIDES$1] ?? {}
|
|
6489
6495
|
return {
|
|
6490
6496
|
type: VLT$3,
|
|
6491
6497
|
overrides
|
|
@@ -6494,8 +6500,8 @@ function getOverridesDataVlt(pkgJson) {
|
|
|
6494
6500
|
|
|
6495
6501
|
// Yarn resolutions documentation:
|
|
6496
6502
|
// https://yarnpkg.com/configuration/manifest#resolutions
|
|
6497
|
-
function getOverridesDataYarn(
|
|
6498
|
-
const overrides =
|
|
6503
|
+
function getOverridesDataYarn(editablePkgJson) {
|
|
6504
|
+
const overrides = editablePkgJson.content?.[RESOLUTIONS$1] ?? {}
|
|
6499
6505
|
return {
|
|
6500
6506
|
type: YARN_BERRY$3,
|
|
6501
6507
|
overrides
|
|
@@ -6504,8 +6510,8 @@ function getOverridesDataYarn(pkgJson) {
|
|
|
6504
6510
|
|
|
6505
6511
|
// Yarn resolutions documentation:
|
|
6506
6512
|
// https://classic.yarnpkg.com/en/docs/selective-version-resolutions
|
|
6507
|
-
function
|
|
6508
|
-
const overrides =
|
|
6513
|
+
function getOverridesDataYarnClassic(editablePkgJson) {
|
|
6514
|
+
const overrides = editablePkgJson.content?.[RESOLUTIONS$1] ?? {}
|
|
6509
6515
|
return {
|
|
6510
6516
|
type: YARN_CLASSIC$4,
|
|
6511
6517
|
overrides
|
|
@@ -6517,12 +6523,12 @@ const overridesDataByAgent = new Map([
|
|
|
6517
6523
|
[PNPM$5, getOverridesDataPnpm],
|
|
6518
6524
|
[VLT$3, getOverridesDataVlt],
|
|
6519
6525
|
[YARN_BERRY$3, getOverridesDataYarn],
|
|
6520
|
-
[YARN_CLASSIC$4,
|
|
6526
|
+
[YARN_CLASSIC$4, getOverridesDataYarnClassic]
|
|
6521
6527
|
])
|
|
6522
6528
|
|
|
6523
6529
|
const { PNPM: PNPM$4 } = constants
|
|
6524
6530
|
const PNPM_WORKSPACE = `${PNPM$4}-workspace`
|
|
6525
|
-
async function getWorkspaceGlobs(agent, pkgPath,
|
|
6531
|
+
async function getWorkspaceGlobs(agent, pkgPath, editablePkgJson) {
|
|
6526
6532
|
let workspacePatterns
|
|
6527
6533
|
if (agent === PNPM$4) {
|
|
6528
6534
|
for (const workspacePath of [
|
|
@@ -6541,7 +6547,7 @@ async function getWorkspaceGlobs(agent, pkgPath, pkgJson) {
|
|
|
6541
6547
|
}
|
|
6542
6548
|
}
|
|
6543
6549
|
} else {
|
|
6544
|
-
workspacePatterns =
|
|
6550
|
+
workspacePatterns = editablePkgJson.content['workspaces']
|
|
6545
6551
|
}
|
|
6546
6552
|
return Array.isArray(workspacePatterns)
|
|
6547
6553
|
? workspacePatterns
|
|
@@ -6814,8 +6820,7 @@ function getHighestEntryIndex(entries, keys) {
|
|
|
6814
6820
|
return getEntryIndexes(entries, keys).at(-1) ?? -1
|
|
6815
6821
|
}
|
|
6816
6822
|
function updatePkgJsonField(editablePkgJson, field, value) {
|
|
6817
|
-
const
|
|
6818
|
-
const oldValue = pkgJson[field]
|
|
6823
|
+
const oldValue = editablePkgJson.content[field]
|
|
6819
6824
|
if (oldValue) {
|
|
6820
6825
|
// The field already exists so we simply update the field value.
|
|
6821
6826
|
if (field === PNPM$1) {
|
|
@@ -6866,7 +6871,7 @@ function updatePkgJsonField(editablePkgJson, field, value) {
|
|
|
6866
6871
|
// Since the field doesn't exist we want to insert it into the package.json
|
|
6867
6872
|
// in a place that makes sense, e.g. close to the "dependencies" field. If
|
|
6868
6873
|
// we can't find a place to insert the field we'll add it to the bottom.
|
|
6869
|
-
const entries = Object.entries(
|
|
6874
|
+
const entries = Object.entries(editablePkgJson.content)
|
|
6870
6875
|
let insertIndex = -1
|
|
6871
6876
|
let isPlacingHigher = false
|
|
6872
6877
|
if (field === OVERRIDES) {
|
|
@@ -6965,9 +6970,12 @@ async function addOverrides(pkgPath, pkgEnvDetails, options) {
|
|
|
6965
6970
|
editable: true
|
|
6966
6971
|
})
|
|
6967
6972
|
}
|
|
6968
|
-
const { content: pkgJson } = editablePkgJson
|
|
6969
6973
|
const workspaceName = path$1.relative(rootPath, pkgPath)
|
|
6970
|
-
const workspaceGlobs = await getWorkspaceGlobs(
|
|
6974
|
+
const workspaceGlobs = await getWorkspaceGlobs(
|
|
6975
|
+
agent,
|
|
6976
|
+
pkgPath,
|
|
6977
|
+
editablePkgJson
|
|
6978
|
+
)
|
|
6971
6979
|
const isRoot = pkgPath === rootPath
|
|
6972
6980
|
const isLockScanned = isRoot && !prod
|
|
6973
6981
|
const isWorkspace = !!workspaceGlobs
|
|
@@ -6987,19 +6995,19 @@ async function addOverrides(pkgPath, pkgEnvDetails, options) {
|
|
|
6987
6995
|
)
|
|
6988
6996
|
}
|
|
6989
6997
|
const overridesDataObjects = []
|
|
6990
|
-
if (
|
|
6991
|
-
overridesDataObjects.push(overridesDataByAgent.get(agent)(
|
|
6998
|
+
if (editablePkgJson.content['private'] || isWorkspace) {
|
|
6999
|
+
overridesDataObjects.push(overridesDataByAgent.get(agent)(editablePkgJson))
|
|
6992
7000
|
} else {
|
|
6993
7001
|
overridesDataObjects.push(
|
|
6994
|
-
overridesDataByAgent.get(NPM$1)(
|
|
6995
|
-
overridesDataByAgent.get(YARN_CLASSIC)(
|
|
7002
|
+
overridesDataByAgent.get(NPM$1)(editablePkgJson),
|
|
7003
|
+
overridesDataByAgent.get(YARN_CLASSIC)(editablePkgJson)
|
|
6996
7004
|
)
|
|
6997
7005
|
}
|
|
6998
7006
|
spinner?.setText(
|
|
6999
7007
|
`Adding overrides${workspaceName ? ` to ${workspaceName}` : ''}...`
|
|
7000
7008
|
)
|
|
7001
7009
|
const depAliasMap = new Map()
|
|
7002
|
-
const depEntries = getDependencyEntries(
|
|
7010
|
+
const depEntries = getDependencyEntries(editablePkgJson)
|
|
7003
7011
|
const manifestEntries = manifestNpmOverrides.filter(({ 1: data }) =>
|
|
7004
7012
|
semver.satisfies(
|
|
7005
7013
|
// Roughly check Node range as semver.coerce will strip leading
|
|
@@ -11342,7 +11350,7 @@ void (async () => {
|
|
|
11342
11350
|
await updateNotifier({
|
|
11343
11351
|
name: SOCKET_CLI_BIN_NAME,
|
|
11344
11352
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
11345
|
-
version: '0.14.
|
|
11353
|
+
version: '0.14.87',
|
|
11346
11354
|
ttl: 86_400_000 /* 24 hours in milliseconds */
|
|
11347
11355
|
})
|
|
11348
11356
|
try {
|
|
@@ -11410,5 +11418,5 @@ void (async () => {
|
|
|
11410
11418
|
await shadowNpmInject.captureException(e)
|
|
11411
11419
|
}
|
|
11412
11420
|
})()
|
|
11413
|
-
//# debugId=
|
|
11421
|
+
//# debugId=f5888d1f-c1df-495c-8ef8-bcef09e18680
|
|
11414
11422
|
//# sourceMappingURL=cli.js.map
|