socket 0.14.114 → 0.14.115
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/module-sync/cli.js +25 -33
- package/dist/module-sync/cli.js.map +1 -1
- package/dist/module-sync/fs.d.ts +63 -0
- package/dist/module-sync/shadow-npm-inject.js +244 -7
- package/dist/module-sync/shadow-npm-inject.js.map +1 -1
- package/dist/module-sync/shadow-npm-paths.d.ts +0 -23
- package/dist/module-sync/shadow-npm-paths.js +4 -227
- package/dist/module-sync/shadow-npm-paths.js.map +1 -1
- package/dist/module-sync/vendor.js +20283 -20282
- package/dist/module-sync/vendor.js.map +1 -1
- package/dist/require/cli.js +25 -33
- package/dist/require/cli.js.map +1 -1
- package/dist/require/shadow-npm-inject.js +244 -7
- package/dist/require/shadow-npm-inject.js.map +1 -1
- package/dist/require/shadow-npm-paths.d.ts +0 -23
- package/dist/require/shadow-npm-paths.js +4 -227
- package/dist/require/shadow-npm-paths.js.map +1 -1
- package/package.json +5 -5
package/dist/module-sync/cli.js
CHANGED
|
@@ -917,7 +917,7 @@ function emitBanner(name) {
|
|
|
917
917
|
logger.logger.error(getAsciiHeader(name))
|
|
918
918
|
}
|
|
919
919
|
function getAsciiHeader(command) {
|
|
920
|
-
const cliVersion = '0.14.
|
|
920
|
+
const cliVersion = '0.14.115:b2d12c7:12ad560f:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
|
|
921
921
|
const nodeVersion = process$1.version
|
|
922
922
|
const apiToken = shadowNpmInject.getDefaultToken()
|
|
923
923
|
const defaultOrg = shadowNpmInject.getConfigValue('defaultOrg')
|
|
@@ -3831,11 +3831,6 @@ async function gitCreateAndPushBranchIfNeeded(
|
|
|
3831
3831
|
basename === 'pnpm-lock.yaml'
|
|
3832
3832
|
)
|
|
3833
3833
|
})
|
|
3834
|
-
debug.debugLog('branch', branch)
|
|
3835
|
-
debug.debugLog(
|
|
3836
|
-
'gitCreateAndPushBranchIfNeeded > moddedFilepaths',
|
|
3837
|
-
moddedFilepaths
|
|
3838
|
-
)
|
|
3839
3834
|
if (moddedFilepaths.length) {
|
|
3840
3835
|
await spawn.spawn('git', ['add', ...moddedFilepaths], {
|
|
3841
3836
|
cwd
|
|
@@ -4030,9 +4025,10 @@ async function npmFix(
|
|
|
4030
4025
|
pkgEnvDetails,
|
|
4031
4026
|
{ autoMerge, cwd, purls, rangeStyle, spinner, test, testScript }
|
|
4032
4027
|
) {
|
|
4028
|
+
const { pkgPath: rootPath } = pkgEnvDetails
|
|
4033
4029
|
spinner?.start()
|
|
4034
4030
|
const arb = new shadowNpmInject.SafeArborist({
|
|
4035
|
-
path:
|
|
4031
|
+
path: rootPath,
|
|
4036
4032
|
...shadowNpmInject.SAFE_ARBORIST_REIFY_OPTIONS_OVERRIDES
|
|
4037
4033
|
})
|
|
4038
4034
|
// Calling arb.reify() creates the arb.diff object and nulls-out arb.idealTree.
|
|
@@ -4057,14 +4053,14 @@ async function npmFix(
|
|
|
4057
4053
|
|
|
4058
4054
|
// Lazily access constants.ENV[CI].
|
|
4059
4055
|
const isCi = constants.ENV[CI$1]
|
|
4060
|
-
const { pkgPath: rootPath } = pkgEnvDetails
|
|
4061
4056
|
const { 0: isRepo, 1: workspacePkgJsonPaths } = await Promise.all([
|
|
4062
4057
|
isInGitRepo(cwd),
|
|
4063
|
-
|
|
4058
|
+
shadowNpmInject.globWorkspace(pkgEnvDetails.agent, rootPath)
|
|
4064
4059
|
])
|
|
4065
4060
|
const pkgJsonPaths = [
|
|
4066
|
-
|
|
4067
|
-
|
|
4061
|
+
...workspacePkgJsonPaths,
|
|
4062
|
+
// Process the workspace root last since it will add an override to package.json.
|
|
4063
|
+
pkgEnvDetails.editablePkgJson.filename
|
|
4068
4064
|
]
|
|
4069
4065
|
await arb.buildIdealTree()
|
|
4070
4066
|
for (const { 0: name, 1: infos } of infoByPkg) {
|
|
@@ -4253,6 +4249,8 @@ async function npmFix(
|
|
|
4253
4249
|
spinner?.error(`Reverting ${newSpec}${workspaceDetails}`, error)
|
|
4254
4250
|
}
|
|
4255
4251
|
}
|
|
4252
|
+
// eslint-disable-next-line no-await-in-loop
|
|
4253
|
+
await shadowNpmInject.removeNodeModules(cwd)
|
|
4256
4254
|
if (isRepo) {
|
|
4257
4255
|
// eslint-disable-next-line no-await-in-loop
|
|
4258
4256
|
await gitHardReset(cwd)
|
|
@@ -4435,12 +4433,10 @@ async function pnpmFix(
|
|
|
4435
4433
|
pkgEnvDetails,
|
|
4436
4434
|
{ autoMerge, cwd, purls, rangeStyle, spinner, test, testScript }
|
|
4437
4435
|
) {
|
|
4438
|
-
const
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
}
|
|
4443
|
-
)
|
|
4436
|
+
const { pkgPath: rootPath } = pkgEnvDetails
|
|
4437
|
+
const lockfile = await vendor.libExports$3.readWantedLockfile(rootPath, {
|
|
4438
|
+
ignoreIncompatible: false
|
|
4439
|
+
})
|
|
4444
4440
|
if (!lockfile) {
|
|
4445
4441
|
return
|
|
4446
4442
|
}
|
|
@@ -4467,21 +4463,20 @@ async function pnpmFix(
|
|
|
4467
4463
|
|
|
4468
4464
|
// Lazily access constants.ENV[CI].
|
|
4469
4465
|
const isCi = constants.ENV[CI]
|
|
4470
|
-
const { pkgPath: rootPath } = pkgEnvDetails
|
|
4471
4466
|
const {
|
|
4472
4467
|
0: isRepo,
|
|
4473
4468
|
1: workspacePkgJsonPaths,
|
|
4474
4469
|
2: initialTree
|
|
4475
4470
|
} = await Promise.all([
|
|
4476
4471
|
isInGitRepo(cwd),
|
|
4477
|
-
|
|
4472
|
+
shadowNpmInject.globWorkspace(pkgEnvDetails.agent, rootPath),
|
|
4478
4473
|
getActualTree(cwd)
|
|
4479
4474
|
])
|
|
4480
4475
|
const pkgJsonPaths = [
|
|
4481
|
-
|
|
4482
|
-
|
|
4476
|
+
...workspacePkgJsonPaths,
|
|
4477
|
+
// Process the workspace root last since it will add an override to package.json.
|
|
4478
|
+
pkgEnvDetails.editablePkgJson.filename
|
|
4483
4479
|
]
|
|
4484
|
-
debug.debugLog('workspacePkgJsonPaths', workspacePkgJsonPaths)
|
|
4485
4480
|
let actualTree = initialTree
|
|
4486
4481
|
for (const { 0: name, 1: infos } of infoByPkg) {
|
|
4487
4482
|
if (registry.getManifestData(NPM$c, name)) {
|
|
@@ -4513,9 +4508,6 @@ async function pnpmFix(
|
|
|
4513
4508
|
firstPatchedVersionIdentifier,
|
|
4514
4509
|
vulnerableVersionRange
|
|
4515
4510
|
} of infos) {
|
|
4516
|
-
debug.debugLog('name', name)
|
|
4517
|
-
debug.debugLog('oldVersion', oldVersion)
|
|
4518
|
-
debug.debugLog('pkgJsonPath', pkgJsonPath)
|
|
4519
4511
|
const node = shadowNpmInject.findPackageNode(
|
|
4520
4512
|
actualTree,
|
|
4521
4513
|
name,
|
|
@@ -4641,7 +4633,6 @@ async function pnpmFix(
|
|
|
4641
4633
|
rangeStyle
|
|
4642
4634
|
)
|
|
4643
4635
|
debug.debugLog('updatePackageJsonFromNode', modded)
|
|
4644
|
-
debug.debugLog(branch, editablePkgJson.filename)
|
|
4645
4636
|
let error
|
|
4646
4637
|
let errored = false
|
|
4647
4638
|
let installed = false
|
|
@@ -4683,17 +4674,13 @@ async function pnpmFix(
|
|
|
4683
4674
|
error = e
|
|
4684
4675
|
errored = true
|
|
4685
4676
|
}
|
|
4686
|
-
debug.debugLog('check "shouldOpenPr":', shouldOpenPr)
|
|
4687
|
-
debug.debugLog('check "errored":', errored)
|
|
4688
4677
|
if (!errored && shouldOpenPr) {
|
|
4689
|
-
debug.debugLog('1: gitCreateAndPushBranchIfNeeded')
|
|
4690
4678
|
// eslint-disable-next-line no-await-in-loop
|
|
4691
4679
|
await gitCreateAndPushBranchIfNeeded(
|
|
4692
4680
|
branch,
|
|
4693
4681
|
getSocketCommitMessage(oldPurl, newVersion, workspaceName),
|
|
4694
4682
|
cwd
|
|
4695
4683
|
)
|
|
4696
|
-
debug.debugLog('2: openGitHubPullRequest')
|
|
4697
4684
|
// eslint-disable-next-line no-await-in-loop
|
|
4698
4685
|
const prResponse = await openGitHubPullRequest(
|
|
4699
4686
|
owner,
|
|
@@ -4720,6 +4707,8 @@ async function pnpmFix(
|
|
|
4720
4707
|
}
|
|
4721
4708
|
}
|
|
4722
4709
|
editablePkgJson.update(revertData)
|
|
4710
|
+
// eslint-disable-next-line no-await-in-loop
|
|
4711
|
+
await shadowNpmInject.removeNodeModules(cwd)
|
|
4723
4712
|
if (isRepo) {
|
|
4724
4713
|
// eslint-disable-next-line no-await-in-loop
|
|
4725
4714
|
await gitHardReset(cwd)
|
|
@@ -7518,7 +7507,10 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
|
|
|
7518
7507
|
updated: new Set(),
|
|
7519
7508
|
updatedInWorkspaces: new Set(),
|
|
7520
7509
|
warnedPnpmWorkspaceRequiresNpm: false,
|
|
7521
|
-
workspacePkgJsonPaths: await
|
|
7510
|
+
workspacePkgJsonPaths: await shadowNpmInject.globWorkspace(
|
|
7511
|
+
agent,
|
|
7512
|
+
rootPath
|
|
7513
|
+
)
|
|
7522
7514
|
}
|
|
7523
7515
|
} = {
|
|
7524
7516
|
__proto__: null,
|
|
@@ -12311,7 +12303,7 @@ void (async () => {
|
|
|
12311
12303
|
await vendor.updater({
|
|
12312
12304
|
name: SOCKET_CLI_BIN_NAME,
|
|
12313
12305
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
12314
|
-
version: '0.14.
|
|
12306
|
+
version: '0.14.115',
|
|
12315
12307
|
ttl: 86_400_000 /* 24 hours in milliseconds */
|
|
12316
12308
|
})
|
|
12317
12309
|
try {
|
|
@@ -12379,5 +12371,5 @@ void (async () => {
|
|
|
12379
12371
|
await shadowNpmInject.captureException(e)
|
|
12380
12372
|
}
|
|
12381
12373
|
})()
|
|
12382
|
-
//# debugId=
|
|
12374
|
+
//# debugId=69630122-326f-45e7-bdba-67ec950698be
|
|
12383
12375
|
//# sourceMappingURL=cli.js.map
|