socket 0.14.127 → 0.14.129
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 +19 -18
- package/dist/module-sync/cli.js.map +1 -1
- package/dist/module-sync/shadow-npm-inject.js +2 -2
- package/dist/module-sync/shadow-npm-inject.js.map +1 -1
- package/dist/require/cli.js +19 -18
- package/dist/require/cli.js.map +1 -1
- package/dist/require/shadow-npm-inject.js +2 -2
- package/dist/require/shadow-npm-inject.js.map +1 -1
- package/package.json +1 -1
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.129:a3be3d1:0a60013f: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')
|
|
@@ -3811,6 +3811,11 @@ async function gitCheckoutBaseBranchIfAvailable(
|
|
|
3811
3811
|
debug.debugLog(e)
|
|
3812
3812
|
}
|
|
3813
3813
|
}
|
|
3814
|
+
async function gitCleanFdx(cwd = process.cwd()) {
|
|
3815
|
+
await spawn.spawn('git', ['clean', '-fdx'], {
|
|
3816
|
+
cwd
|
|
3817
|
+
})
|
|
3818
|
+
}
|
|
3814
3819
|
async function gitCreateAndPushBranchIfNeeded(
|
|
3815
3820
|
branch,
|
|
3816
3821
|
commitMsg,
|
|
@@ -3846,8 +3851,8 @@ async function gitCreateAndPushBranchIfNeeded(
|
|
|
3846
3851
|
})
|
|
3847
3852
|
return true
|
|
3848
3853
|
}
|
|
3849
|
-
async function gitHardReset(cwd = process.cwd()) {
|
|
3850
|
-
await spawn.spawn('git', ['reset', '--hard'], {
|
|
3854
|
+
async function gitHardReset(branch = 'HEAD', cwd = process.cwd()) {
|
|
3855
|
+
await spawn.spawn('git', ['reset', '--hard', branch], {
|
|
3851
3856
|
cwd
|
|
3852
3857
|
})
|
|
3853
3858
|
}
|
|
@@ -4497,12 +4502,12 @@ async function pnpmFix(
|
|
|
4497
4502
|
const workspaceName = isWorkspaceRoot
|
|
4498
4503
|
? 'root'
|
|
4499
4504
|
: path$1.relative(rootPath, path$1.dirname(pkgJsonPath))
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4505
|
+
|
|
4506
|
+
// Always re-read the editable package.json to avoid stale mutations across iterations
|
|
4507
|
+
// eslint-disable-next-line no-await-in-loop
|
|
4508
|
+
const editablePkgJson = await packages.readPackageJson(pkgJsonPath, {
|
|
4509
|
+
editable: true
|
|
4510
|
+
})
|
|
4506
4511
|
|
|
4507
4512
|
// Get current overrides for revert logic
|
|
4508
4513
|
const oldPnpmSection = editablePkgJson.content[PNPM$8]
|
|
@@ -4685,13 +4690,11 @@ async function pnpmFix(
|
|
|
4685
4690
|
}
|
|
4686
4691
|
if (errored) {
|
|
4687
4692
|
editablePkgJson.update(revertData)
|
|
4688
|
-
|
|
4689
4693
|
// eslint-disable-next-line no-await-in-loop
|
|
4690
4694
|
await Promise.all([
|
|
4691
4695
|
shadowNpmInject.removeNodeModules(cwd),
|
|
4692
4696
|
editablePkgJson.save()
|
|
4693
4697
|
])
|
|
4694
|
-
|
|
4695
4698
|
// eslint-disable-next-line no-await-in-loop
|
|
4696
4699
|
actualTree = await install(pkgEnvDetails, {
|
|
4697
4700
|
spinner
|
|
@@ -4702,11 +4705,9 @@ async function pnpmFix(
|
|
|
4702
4705
|
)
|
|
4703
4706
|
} else if (isCi) {
|
|
4704
4707
|
// eslint-disable-next-line no-await-in-loop
|
|
4705
|
-
await
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
])
|
|
4709
|
-
|
|
4708
|
+
await gitHardReset(baseBranch, cwd)
|
|
4709
|
+
// eslint-disable-next-line no-await-in-loop
|
|
4710
|
+
await gitCleanFdx(cwd)
|
|
4710
4711
|
// eslint-disable-next-line no-await-in-loop
|
|
4711
4712
|
actualTree = await install(pkgEnvDetails, {
|
|
4712
4713
|
spinner
|
|
@@ -12284,7 +12285,7 @@ void (async () => {
|
|
|
12284
12285
|
await vendor.updater({
|
|
12285
12286
|
name: SOCKET_CLI_BIN_NAME,
|
|
12286
12287
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
12287
|
-
version: '0.14.
|
|
12288
|
+
version: '0.14.129',
|
|
12288
12289
|
ttl: 86_400_000 /* 24 hours in milliseconds */
|
|
12289
12290
|
})
|
|
12290
12291
|
try {
|
|
@@ -12352,5 +12353,5 @@ void (async () => {
|
|
|
12352
12353
|
await shadowNpmInject.captureException(e)
|
|
12353
12354
|
}
|
|
12354
12355
|
})()
|
|
12355
|
-
//# debugId=
|
|
12356
|
+
//# debugId=b66ba2bc-112f-4b8d-9a20-2281190b67fe
|
|
12356
12357
|
//# sourceMappingURL=cli.js.map
|