socket 0.14.118 → 0.14.119
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 +26 -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 +26 -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.119:4f7b6a8:5ff737f3: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')
|
|
@@ -3817,12 +3817,9 @@ async function gitCreateAndPushBranchIfNeeded(
|
|
|
3817
3817
|
cwd = process.cwd()
|
|
3818
3818
|
) {
|
|
3819
3819
|
if (await gitBranchExists(branch, cwd)) {
|
|
3820
|
-
logger.logger.warn(`Branch "${branch}" already exists
|
|
3821
|
-
return
|
|
3820
|
+
logger.logger.warn(`Branch "${branch}" already exists, skipping creation.`)
|
|
3821
|
+
return true
|
|
3822
3822
|
}
|
|
3823
|
-
await spawn.spawn('git', ['checkout', '-b', branch], {
|
|
3824
|
-
cwd
|
|
3825
|
-
})
|
|
3826
3823
|
const moddedFilepaths = (await gitUnstagedModifiedFiles(cwd)).filter(p => {
|
|
3827
3824
|
const basename = path$1.basename(p)
|
|
3828
3825
|
return (
|
|
@@ -3831,11 +3828,16 @@ async function gitCreateAndPushBranchIfNeeded(
|
|
|
3831
3828
|
basename === 'pnpm-lock.yaml'
|
|
3832
3829
|
)
|
|
3833
3830
|
})
|
|
3834
|
-
if (moddedFilepaths.length) {
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
})
|
|
3831
|
+
if (!moddedFilepaths.length) {
|
|
3832
|
+
logger.logger.warn('Nothing to commit, skipping push.')
|
|
3833
|
+
return false
|
|
3838
3834
|
}
|
|
3835
|
+
await spawn.spawn('git', ['checkout', '-b', branch], {
|
|
3836
|
+
cwd
|
|
3837
|
+
})
|
|
3838
|
+
await spawn.spawn('git', ['add', ...moddedFilepaths], {
|
|
3839
|
+
cwd
|
|
3840
|
+
})
|
|
3839
3841
|
await spawn.spawn('git', ['commit', '-m', commitMsg], {
|
|
3840
3842
|
cwd
|
|
3841
3843
|
})
|
|
@@ -4216,13 +4218,16 @@ async function npmFix(
|
|
|
4216
4218
|
error = e
|
|
4217
4219
|
errored = true
|
|
4218
4220
|
}
|
|
4219
|
-
if (
|
|
4221
|
+
if (
|
|
4222
|
+
!errored &&
|
|
4223
|
+
shouldOpenPr &&
|
|
4220
4224
|
// eslint-disable-next-line no-await-in-loop
|
|
4221
|
-
await gitCreateAndPushBranchIfNeeded(
|
|
4225
|
+
(await gitCreateAndPushBranchIfNeeded(
|
|
4222
4226
|
branch,
|
|
4223
4227
|
getSocketCommitMessage(oldPurl, newVersion, workspaceName),
|
|
4224
4228
|
cwd
|
|
4225
|
-
)
|
|
4229
|
+
))
|
|
4230
|
+
) {
|
|
4226
4231
|
// eslint-disable-next-line no-await-in-loop
|
|
4227
4232
|
const prResponse = await openGitHubPullRequest(
|
|
4228
4233
|
owner,
|
|
@@ -4669,13 +4674,16 @@ async function pnpmFix(
|
|
|
4669
4674
|
error = e
|
|
4670
4675
|
errored = true
|
|
4671
4676
|
}
|
|
4672
|
-
if (
|
|
4677
|
+
if (
|
|
4678
|
+
!errored &&
|
|
4679
|
+
shouldOpenPr &&
|
|
4673
4680
|
// eslint-disable-next-line no-await-in-loop
|
|
4674
|
-
await gitCreateAndPushBranchIfNeeded(
|
|
4681
|
+
(await gitCreateAndPushBranchIfNeeded(
|
|
4675
4682
|
branch,
|
|
4676
4683
|
getSocketCommitMessage(oldPurl, newVersion, workspaceName),
|
|
4677
4684
|
cwd
|
|
4678
|
-
)
|
|
4685
|
+
))
|
|
4686
|
+
) {
|
|
4679
4687
|
// eslint-disable-next-line no-await-in-loop
|
|
4680
4688
|
const prResponse = await openGitHubPullRequest(
|
|
4681
4689
|
owner,
|
|
@@ -12296,7 +12304,7 @@ void (async () => {
|
|
|
12296
12304
|
await vendor.updater({
|
|
12297
12305
|
name: SOCKET_CLI_BIN_NAME,
|
|
12298
12306
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
12299
|
-
version: '0.14.
|
|
12307
|
+
version: '0.14.119',
|
|
12300
12308
|
ttl: 86_400_000 /* 24 hours in milliseconds */
|
|
12301
12309
|
})
|
|
12302
12310
|
try {
|
|
@@ -12364,5 +12372,5 @@ void (async () => {
|
|
|
12364
12372
|
await shadowNpmInject.captureException(e)
|
|
12365
12373
|
}
|
|
12366
12374
|
})()
|
|
12367
|
-
//# debugId=
|
|
12375
|
+
//# debugId=617452d4-7fe3-48d9-912c-adf3352d17b3
|
|
12368
12376
|
//# sourceMappingURL=cli.js.map
|