socket 1.1.21 → 1.1.22
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/CHANGELOG.md +9 -0
- package/dist/cli.js +16 -15
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +6 -3
- package/dist/constants.js.map +1 -1
- package/dist/npm-cli.js +6 -2
- package/dist/npm-cli.js.map +1 -1
- package/dist/pnpm-cli.js +6 -2
- package/dist/pnpm-cli.js.map +1 -1
- package/dist/shadow-npm-bin2.js +7 -3
- package/dist/shadow-npm-bin2.js.map +1 -1
- package/dist/shadow-pnpm-bin2.js +40 -36
- package/dist/shadow-pnpm-bin2.js.map +1 -1
- package/dist/shadow-yarn-bin.js +14 -7
- package/dist/shadow-yarn-bin.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/handle-fix.d.mts +2 -2
- package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/types.d.mts +1 -1
- package/dist/types/commands/fix/types.d.mts.map +1 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +1 -1
- package/dist/types/constants.d.mts +3 -1
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/shadow/common.d.mts +0 -8
- package/dist/types/shadow/common.d.mts.map +1 -1
- package/dist/types/shadow/npm-base.d.mts.map +1 -1
- package/dist/types/shadow/pnpm/bin.d.mts.map +1 -1
- package/dist/types/shadow/yarn/bin.d.mts.map +1 -1
- package/dist/types/utils/agent.d.mts.map +1 -1
- package/dist/types/utils/cmd.d.mts +25 -4
- package/dist/types/utils/cmd.d.mts.map +1 -1
- package/dist/types/utils/extract-names.d.mts +15 -0
- package/dist/types/utils/extract-names.d.mts.map +1 -0
- package/dist/types/utils/git.d.mts.map +1 -1
- package/dist/utils.js +88 -26
- package/dist/utils.js.map +1 -1
- package/dist/yarn-cli.js +6 -2
- package/dist/yarn-cli.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [1.1.22](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.22) - 2025-09-20
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Rename `--only-compute` flag to `--dont-apply-fixes` for `socket fix`, but keep old flag as an alias.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Resolved interactive prompts in `socket optimize` when using pnpm
|
|
14
|
+
- Sanitize extracted git repository names to be compatible with the Socket API.
|
|
15
|
+
|
|
7
16
|
## [1.1.21](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.22) - 2025-09-20
|
|
8
17
|
|
|
9
18
|
### Added
|
package/dist/cli.js
CHANGED
|
@@ -3546,10 +3546,10 @@ async function coanaFix(fixConfig) {
|
|
|
3546
3546
|
const {
|
|
3547
3547
|
autopilot,
|
|
3548
3548
|
cwd,
|
|
3549
|
+
dontApplyFixes,
|
|
3549
3550
|
ghsas,
|
|
3550
3551
|
glob,
|
|
3551
3552
|
limit,
|
|
3552
|
-
onlyCompute,
|
|
3553
3553
|
orgSlug,
|
|
3554
3554
|
outputFile,
|
|
3555
3555
|
spinner
|
|
@@ -3594,7 +3594,7 @@ async function coanaFix(fixConfig) {
|
|
|
3594
3594
|
const shouldOpenPrs = fixEnv.isCi && fixEnv.repoInfo;
|
|
3595
3595
|
if (!shouldOpenPrs) {
|
|
3596
3596
|
// Inform user about local mode when fixes will be applied.
|
|
3597
|
-
if (!
|
|
3597
|
+
if (!dontApplyFixes && ghsas.length) {
|
|
3598
3598
|
const envCheck = checkCiEnvVars();
|
|
3599
3599
|
if (envCheck.present.length) {
|
|
3600
3600
|
// Some CI vars are set but not all - show what's missing.
|
|
@@ -3616,7 +3616,7 @@ async function coanaFix(fixConfig) {
|
|
|
3616
3616
|
}
|
|
3617
3617
|
};
|
|
3618
3618
|
}
|
|
3619
|
-
const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...(isAll ? ['all'] : ghsas), ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(glob ? ['--glob', glob] : []), ...(
|
|
3619
|
+
const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...(isAll ? ['all'] : ghsas), ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(glob ? ['--glob', glob] : []), ...(dontApplyFixes ? [constants.FLAG_DRY_RUN] : []), ...(outputFile ? ['--output-file', outputFile] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
|
|
3620
3620
|
cwd,
|
|
3621
3621
|
spinner,
|
|
3622
3622
|
stdio: 'inherit'
|
|
@@ -3905,11 +3905,11 @@ async function convertIdsToGhsas(ids) {
|
|
|
3905
3905
|
async function handleFix({
|
|
3906
3906
|
autopilot,
|
|
3907
3907
|
cwd,
|
|
3908
|
+
dontApplyFixes,
|
|
3908
3909
|
ghsas,
|
|
3909
3910
|
glob,
|
|
3910
3911
|
limit,
|
|
3911
3912
|
minSatisfying,
|
|
3912
|
-
onlyCompute,
|
|
3913
3913
|
orgSlug,
|
|
3914
3914
|
outputFile,
|
|
3915
3915
|
outputKind,
|
|
@@ -3926,7 +3926,7 @@ async function handleFix({
|
|
|
3926
3926
|
glob,
|
|
3927
3927
|
limit,
|
|
3928
3928
|
minSatisfying,
|
|
3929
|
-
|
|
3929
|
+
dontApplyFixes,
|
|
3930
3930
|
outputFile,
|
|
3931
3931
|
outputKind,
|
|
3932
3932
|
prCheck,
|
|
@@ -3935,6 +3935,7 @@ async function handleFix({
|
|
|
3935
3935
|
});
|
|
3936
3936
|
await outputFixResult(await coanaFix({
|
|
3937
3937
|
autopilot,
|
|
3938
|
+
dontApplyFixes,
|
|
3938
3939
|
cwd,
|
|
3939
3940
|
// Convert mixed CVE/GHSA/PURL inputs to GHSA IDs only
|
|
3940
3941
|
ghsas: await convertIdsToGhsas(ghsas),
|
|
@@ -3944,7 +3945,6 @@ async function handleFix({
|
|
|
3944
3945
|
rangeStyle,
|
|
3945
3946
|
spinner,
|
|
3946
3947
|
unknownFlags,
|
|
3947
|
-
onlyCompute,
|
|
3948
3948
|
outputFile
|
|
3949
3949
|
}), outputKind);
|
|
3950
3950
|
}
|
|
@@ -3964,6 +3964,12 @@ const generalFlags$2 = {
|
|
|
3964
3964
|
default: false,
|
|
3965
3965
|
description: `Enable auto-merge for pull requests that Socket opens.\nSee ${vendor.terminalLinkExports('GitHub documentation', 'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository')} for managing auto-merge for pull requests in your repository.`
|
|
3966
3966
|
},
|
|
3967
|
+
dontApplyFixes: {
|
|
3968
|
+
aliases: ['onlyCompute'],
|
|
3969
|
+
type: 'boolean',
|
|
3970
|
+
default: false,
|
|
3971
|
+
description: 'Compute fixes only, do not apply them. Logs what upgrades would be applied. If combined with --output-file, the output file will contain the upgrades that would be applied.'
|
|
3972
|
+
},
|
|
3967
3973
|
id: {
|
|
3968
3974
|
type: 'string',
|
|
3969
3975
|
default: [],
|
|
@@ -3989,11 +3995,6 @@ Available styles:
|
|
|
3989
3995
|
* preserve - Retain the existing version range style as-is
|
|
3990
3996
|
`.trim()
|
|
3991
3997
|
},
|
|
3992
|
-
onlyCompute: {
|
|
3993
|
-
type: 'boolean',
|
|
3994
|
-
default: false,
|
|
3995
|
-
description: 'Compute fixes only, do not apply them. Logs what upgrades would be applied. If combined with --output-file, the output file will contain the upgrades that would be applied.'
|
|
3996
|
-
},
|
|
3997
3998
|
outputFile: {
|
|
3998
3999
|
type: 'string',
|
|
3999
4000
|
default: '',
|
|
@@ -4099,12 +4100,12 @@ async function run$K(argv, importMeta, {
|
|
|
4099
4100
|
});
|
|
4100
4101
|
const {
|
|
4101
4102
|
autopilot,
|
|
4103
|
+
dontApplyFixes,
|
|
4102
4104
|
glob,
|
|
4103
4105
|
json,
|
|
4104
4106
|
limit,
|
|
4105
4107
|
markdown,
|
|
4106
4108
|
maxSatisfying,
|
|
4107
|
-
onlyCompute,
|
|
4108
4109
|
outputFile,
|
|
4109
4110
|
prCheck,
|
|
4110
4111
|
rangeStyle,
|
|
@@ -4149,6 +4150,7 @@ async function run$K(argv, importMeta, {
|
|
|
4149
4150
|
const ghsas = arrays.arrayUnique([...utils.cmdFlagValueToArray(cli.flags['id']), ...utils.cmdFlagValueToArray(cli.flags['ghsa']), ...utils.cmdFlagValueToArray(cli.flags['purl'])]);
|
|
4150
4151
|
await handleFix({
|
|
4151
4152
|
autopilot,
|
|
4153
|
+
dontApplyFixes,
|
|
4152
4154
|
cwd,
|
|
4153
4155
|
ghsas,
|
|
4154
4156
|
glob,
|
|
@@ -4160,7 +4162,6 @@ async function run$K(argv, importMeta, {
|
|
|
4160
4162
|
rangeStyle,
|
|
4161
4163
|
spinner,
|
|
4162
4164
|
unknownFlags,
|
|
4163
|
-
onlyCompute,
|
|
4164
4165
|
outputFile
|
|
4165
4166
|
});
|
|
4166
4167
|
}
|
|
@@ -4361,7 +4362,7 @@ const cmdInstall = {
|
|
|
4361
4362
|
async function outputCmdJson(cwd) {
|
|
4362
4363
|
logger.logger.info('Target cwd:', constants.default.ENV.VITEST ? constants.REDACTED : utils.tildify(cwd));
|
|
4363
4364
|
const sockJsonPath = path.join(cwd, constants.SOCKET_JSON);
|
|
4364
|
-
const tildeSockJsonPath = constants.default.ENV.VITEST ?
|
|
4365
|
+
const tildeSockJsonPath = constants.default.ENV.VITEST ? constants.REDACTED : utils.tildify(sockJsonPath);
|
|
4365
4366
|
if (!fs$1.existsSync(sockJsonPath)) {
|
|
4366
4367
|
logger.logger.fail(`Not found: ${tildeSockJsonPath}`);
|
|
4367
4368
|
process.exitCode = 1;
|
|
@@ -14944,5 +14945,5 @@ void (async () => {
|
|
|
14944
14945
|
await utils.captureException(e);
|
|
14945
14946
|
}
|
|
14946
14947
|
})();
|
|
14947
|
-
//# debugId=
|
|
14948
|
+
//# debugId=4aa44248-7031-4a9e-8cad-1c9fbaa730ef
|
|
14948
14949
|
//# sourceMappingURL=cli.js.map
|