socket 0.14.72 → 0.14.74
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
CHANGED
|
@@ -914,7 +914,7 @@ function emitBanner(name) {
|
|
|
914
914
|
logger.logger.error(getAsciiHeader(name))
|
|
915
915
|
}
|
|
916
916
|
function getAsciiHeader(command) {
|
|
917
|
-
const cliVersion = '0.14.
|
|
917
|
+
const cliVersion = '0.14.74:e430910:1d68f7d1:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
|
|
918
918
|
const nodeVersion = process$1.version
|
|
919
919
|
const apiToken = shadowNpmInject.getDefaultToken()
|
|
920
920
|
const shownToken = apiToken ? getLastFiveOfApiToken(apiToken) : 'no'
|
|
@@ -3171,6 +3171,10 @@ async function commitAndPushFix(branchName, commitMsg, cwd) {
|
|
|
3171
3171
|
)
|
|
3172
3172
|
return
|
|
3173
3173
|
}
|
|
3174
|
+
const baseBranch = process.env['GITHUB_REF_NAME'] ?? 'main'
|
|
3175
|
+
await spawn.spawn('git', ['checkout', baseBranch], {
|
|
3176
|
+
cwd
|
|
3177
|
+
})
|
|
3174
3178
|
await spawn.spawn('git', ['checkout', '-b', branchName], {
|
|
3175
3179
|
cwd
|
|
3176
3180
|
})
|
|
@@ -3195,6 +3199,7 @@ async function createPullRequest({
|
|
|
3195
3199
|
const octokit = new rest.Octokit({
|
|
3196
3200
|
auth: process.env['SOCKET_AUTOFIX_PAT'] ?? process.env['GITHUB_TOKEN']
|
|
3197
3201
|
})
|
|
3202
|
+
await new Promise(resolve => setTimeout(resolve, 3000)) // 3s
|
|
3198
3203
|
await octokit.pulls.create({
|
|
3199
3204
|
owner,
|
|
3200
3205
|
repo,
|
|
@@ -3340,6 +3345,19 @@ async function pnpmFix(pkgEnvDetails, options) {
|
|
|
3340
3345
|
const commitMsg = `fix: upgrade ${name} to ${targetVersion}`
|
|
3341
3346
|
const { owner, repo } = getRepoInfo()
|
|
3342
3347
|
// eslint-disable-next-line no-await-in-loop
|
|
3348
|
+
await spawn.spawn(
|
|
3349
|
+
'git',
|
|
3350
|
+
[
|
|
3351
|
+
'remote',
|
|
3352
|
+
'set-url',
|
|
3353
|
+
'origin',
|
|
3354
|
+
`https://x-access-token:${process.env['SOCKET_AUTOFIX_PAT']}@github.com/${owner}/${repo}`
|
|
3355
|
+
],
|
|
3356
|
+
{
|
|
3357
|
+
cwd
|
|
3358
|
+
}
|
|
3359
|
+
)
|
|
3360
|
+
// eslint-disable-next-line no-await-in-loop
|
|
3343
3361
|
await commitAndPushFix(branchName, commitMsg, cwd)
|
|
3344
3362
|
// eslint-disable-next-line no-await-in-loop
|
|
3345
3363
|
await createPullRequest({
|
|
@@ -11012,7 +11030,7 @@ void (async () => {
|
|
|
11012
11030
|
await updateNotifier({
|
|
11013
11031
|
name: SOCKET_CLI_BIN_NAME,
|
|
11014
11032
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
11015
|
-
version: '0.14.
|
|
11033
|
+
version: '0.14.74',
|
|
11016
11034
|
ttl: 86_400_000 /* 24 hours in milliseconds */
|
|
11017
11035
|
})
|
|
11018
11036
|
try {
|
|
@@ -11083,5 +11101,5 @@ void (async () => {
|
|
|
11083
11101
|
await shadowNpmInject.captureException(e)
|
|
11084
11102
|
}
|
|
11085
11103
|
})()
|
|
11086
|
-
//# debugId=
|
|
11104
|
+
//# debugId=41229246-2f4d-4389-a72e-22e243adcc29
|
|
11087
11105
|
//# sourceMappingURL=cli.js.map
|