socket 1.1.15 → 1.1.18
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 +15 -0
- package/dist/cli.js +14 -15
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +35 -37
- package/dist/constants.js.map +1 -1
- package/dist/shadow-npm-bin.js +6 -6
- package/dist/shadow-npm-bin.js.map +1 -1
- package/dist/shadow-pnpm-bin.js +3 -5
- package/dist/shadow-pnpm-bin.js.map +1 -1
- package/dist/shadow-yarn-bin.js +2 -2
- package/dist/shadow-yarn-bin.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
- package/dist/types/commands/optimize/apply-optimization.d.mts.map +1 -1
- package/dist/types/commands/optimize/update-lockfile.d.mts.map +1 -1
- package/dist/types/commands/patch/cmd-patch.d.mts.map +1 -1
- package/dist/types/commands/patch/handle-patch.d.mts.map +1 -1
- package/dist/types/commands/yarn/cmd-yarn.d.mts +1 -1
- package/dist/types/commands/yarn/cmd-yarn.d.mts.map +1 -1
- package/dist/types/constants.d.mts +15 -19
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/shadow/pnpm/bin.d.mts.map +1 -1
- package/dist/types/utils/agent.d.mts.map +1 -1
- package/dist/types/utils/dlx.d.mts.map +1 -1
- package/dist/types/utils/package-environment.d.mts.map +1 -1
- package/dist/types/utils/path-resolve.d.mts.map +1 -1
- package/dist/utils.js +65 -27
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +522 -524
- package/external/@socketsecurity/registry/external/@inquirer/confirm.js +45 -205
- package/external/@socketsecurity/registry/external/@inquirer/input.js +45 -205
- package/external/@socketsecurity/registry/external/@inquirer/password.js +181 -205
- package/external/@socketsecurity/registry/external/@inquirer/search.js +47 -207
- package/external/@socketsecurity/registry/external/@inquirer/select.js +183 -207
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +388 -2280
- package/external/@socketsecurity/registry/external/browserslist.js +11534 -567
- package/external/@socketsecurity/registry/external/cacache.js +2575 -4914
- package/external/@socketsecurity/registry/external/libnpmpack.js +64667 -166061
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +384 -4044
- package/external/@socketsecurity/registry/external/normalize-package-data.js +30 -278
- package/external/@socketsecurity/registry/external/npm-package-arg.js +28 -9
- package/external/@socketsecurity/registry/external/pacote.js +46680 -66482
- package/external/@socketsecurity/registry/external/spdx-correct.js +19 -0
- package/external/@socketsecurity/registry/external/spdx-expression-parse.js +19 -0
- package/external/@socketsecurity/registry/lib/agent.js +390 -0
- package/external/@socketsecurity/registry/lib/arrays.js +31 -0
- package/external/@socketsecurity/registry/lib/bin.js +650 -0
- package/external/@socketsecurity/registry/lib/constants/bun-lock.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/bun.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/empty-value.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/env.js +17 -3
- package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/ext-yml.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/index.js +20 -11
- package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +2 -2
- package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +1 -1
- package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +5 -0
- package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/unknown-error.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/unknown-value.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/vlt.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +3 -0
- package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +5 -0
- package/external/@socketsecurity/registry/lib/constants/yarn.js +3 -0
- package/external/@socketsecurity/registry/lib/debug.js +53 -0
- package/external/@socketsecurity/registry/lib/env.js +18 -0
- package/external/@socketsecurity/registry/lib/fs.js +218 -2
- package/external/@socketsecurity/registry/lib/functions.js +5 -0
- package/external/@socketsecurity/registry/lib/globs.js +22 -1
- package/external/@socketsecurity/registry/lib/json.js +16 -0
- package/external/@socketsecurity/registry/lib/logger.js +157 -0
- package/external/@socketsecurity/registry/lib/objects.js +103 -0
- package/external/@socketsecurity/registry/lib/packages.js +88 -0
- package/external/@socketsecurity/registry/lib/path.js +51 -1
- package/external/@socketsecurity/registry/lib/promises.js +55 -0
- package/external/@socketsecurity/registry/lib/regexps.js +5 -0
- package/external/@socketsecurity/registry/lib/sorts.js +17 -0
- package/external/@socketsecurity/registry/lib/spawn.js +105 -7
- package/external/@socketsecurity/registry/lib/streams.js +26 -0
- package/external/@socketsecurity/registry/lib/strings.js +123 -9
- package/external/@socketsecurity/registry/lib/url.js +21 -0
- package/external/@socketsecurity/registry/lib/words.js +16 -0
- package/external/@socketsecurity/registry/manifest.json +5 -4
- package/package.json +6 -5
- package/external/@socketsecurity/registry/external/ansi-regex.js +0 -13
- package/external/@socketsecurity/registry/lib/constants/node-workspaces.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/parse-args-config.js +0 -14
- package/external/@socketsecurity/registry/lib/constants/skip-tests-by-ecosystem.js +0 -43
- package/external/@socketsecurity/registry/lib/constants/template-cjs-browser.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/template-cjs-esm.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/template-cjs.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/template-es-shim-constructor.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/template-es-shim-prototype-method.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/template-es-shim-static-method.js +0 -3
- package/external/@socketsecurity/registry/lib/constants/win32-ensure-tests-by-ecosystem.js +0 -3
- package/external/@socketsecurity/registry/lib/npm.js +0 -404
- /package/external/@socketsecurity/registry/lib/constants/{hidden-package-lock-json.js → dot-package-lock-json.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ 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.18](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.18) - 2025-09-18
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Enhanced Node.js version compatibility by downgrading yargs-parser for Node versions below 20
|
|
11
|
+
|
|
12
|
+
## [1.1.17](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.17) - 2025-09-18
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Enhanced Windows compatibility for package manager detection and execution
|
|
16
|
+
|
|
17
|
+
## [1.1.16](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.16) - 2025-09-16
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- Enhanced pnpm wrapper compatibility with dlx commands for better package execution support
|
|
21
|
+
|
|
7
22
|
## [1.1.15](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.15) - 2025-09-16
|
|
8
23
|
|
|
9
24
|
### Changed
|
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,6 @@ var packages = require('../external/@socketsecurity/registry/lib/packages');
|
|
|
25
25
|
var require$$12 = require('../external/@socketsecurity/registry/lib/promises');
|
|
26
26
|
var regexps = require('../external/@socketsecurity/registry/lib/regexps');
|
|
27
27
|
var require$$0$1 = require('node:crypto');
|
|
28
|
-
var registryConstants = require('../external/@socketsecurity/registry/lib/constants');
|
|
29
28
|
var require$$1 = require('node:util');
|
|
30
29
|
var os = require('node:os');
|
|
31
30
|
var promises = require('node:stream/promises');
|
|
@@ -3560,7 +3559,7 @@ async function coanaFix(fixConfig) {
|
|
|
3560
3559
|
}
|
|
3561
3560
|
};
|
|
3562
3561
|
}
|
|
3563
|
-
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] : []), ...(onlyCompute ? [
|
|
3562
|
+
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] : []), ...(onlyCompute ? [constants.FLAG_DRY_RUN] : []), ...(outputFile ? ['--output-file', outputFile] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
|
|
3564
3563
|
cwd,
|
|
3565
3564
|
spinner,
|
|
3566
3565
|
stdio: 'inherit'
|
|
@@ -4611,7 +4610,7 @@ const {
|
|
|
4611
4610
|
const nodejsPlatformTypes = new Set(['javascript', 'js', 'nodejs', constants.NPM, constants.PNPM, 'ts', 'tsx', 'typescript']);
|
|
4612
4611
|
function argvToArray(argvObj) {
|
|
4613
4612
|
if (argvObj['help']) {
|
|
4614
|
-
return [
|
|
4613
|
+
return [constants.FLAG_HELP];
|
|
4615
4614
|
}
|
|
4616
4615
|
const result = [];
|
|
4617
4616
|
for (const {
|
|
@@ -4940,7 +4939,7 @@ async function run$F(argv, importMeta, context) {
|
|
|
4940
4939
|
const argsToProcess = utils.filterFlags(argv, {
|
|
4941
4940
|
...flags.commonFlags,
|
|
4942
4941
|
...flags.outputFlags
|
|
4943
|
-
}, ['--no-banner',
|
|
4942
|
+
}, ['--no-banner', constants.FLAG_HELP, '-h']);
|
|
4944
4943
|
const yargv = {
|
|
4945
4944
|
...vendor.yargsParser(argsToProcess, yargsConfig)
|
|
4946
4945
|
};
|
|
@@ -6759,7 +6758,7 @@ async function lsPnpm(pkgEnvDetails, options) {
|
|
|
6759
6758
|
stdout = (await spawn.spawn(pkgEnvDetails.agentExecPath,
|
|
6760
6759
|
// Pnpm uses the alternative spelling of parsable.
|
|
6761
6760
|
// https://en.wiktionary.org/wiki/parsable
|
|
6762
|
-
['ls', '--parseable',
|
|
6761
|
+
['ls', '--parseable', constants.FLAG_PROD, '--depth', 'Infinity'], {
|
|
6763
6762
|
cwd,
|
|
6764
6763
|
shell: constants.default.WIN32
|
|
6765
6764
|
})).stdout;
|
|
@@ -6812,7 +6811,7 @@ async function lsYarnClassic(pkgEnvDetails, options) {
|
|
|
6812
6811
|
// https://github.com/yarnpkg/yarn/releases/tag/v1.0.0
|
|
6813
6812
|
// > Fix: Excludes dev dependencies from the yarn list output when the
|
|
6814
6813
|
// environment is production
|
|
6815
|
-
return (await spawn.spawn(pkgEnvDetails.agentExecPath, ['list',
|
|
6814
|
+
return (await spawn.spawn(pkgEnvDetails.agentExecPath, ['list', constants.FLAG_PROD], {
|
|
6816
6815
|
cwd,
|
|
6817
6816
|
shell: constants.default.WIN32
|
|
6818
6817
|
})).stdout;
|
|
@@ -9052,7 +9051,7 @@ async function computeSHA256(filepath) {
|
|
|
9052
9051
|
return {
|
|
9053
9052
|
ok: false,
|
|
9054
9053
|
message: 'Failed to compute file hash',
|
|
9055
|
-
cause: `Unable to read file ${filepath}: ${e instanceof Error ? e.message :
|
|
9054
|
+
cause: `Unable to read file ${filepath}: ${e instanceof Error ? e.message : constants.UNKNOWN_ERROR}`
|
|
9056
9055
|
};
|
|
9057
9056
|
}
|
|
9058
9057
|
}
|
|
@@ -9172,9 +9171,9 @@ async function handlePatch({
|
|
|
9172
9171
|
spinner
|
|
9173
9172
|
}) {
|
|
9174
9173
|
try {
|
|
9175
|
-
const dotSocketDirPath = path.join(cwd, constants.
|
|
9176
|
-
const manifestPath = path.join(dotSocketDirPath,
|
|
9177
|
-
const manifestContent = await fs$1.promises.readFile(manifestPath,
|
|
9174
|
+
const dotSocketDirPath = path.join(cwd, constants.DOT_SOCKET_DIR);
|
|
9175
|
+
const manifestPath = path.join(dotSocketDirPath, constants.MANIFEST_JSON);
|
|
9176
|
+
const manifestContent = await fs$1.promises.readFile(manifestPath, constants.UTF8);
|
|
9178
9177
|
const manifestData = JSON.parse(manifestContent);
|
|
9179
9178
|
const purls = purlObjs.map(String);
|
|
9180
9179
|
const validated = PatchManifestSchema.parse(manifestData);
|
|
@@ -9235,7 +9234,7 @@ async function handlePatch({
|
|
|
9235
9234
|
let message = 'Failed to apply patches';
|
|
9236
9235
|
let cause = e?.message || constants.UNKNOWN_ERROR;
|
|
9237
9236
|
if (e instanceof SyntaxError) {
|
|
9238
|
-
message = `Invalid JSON in ${
|
|
9237
|
+
message = `Invalid JSON in ${constants.MANIFEST_JSON}`;
|
|
9239
9238
|
cause = e.message;
|
|
9240
9239
|
} else if (e instanceof Error && 'issues' in e) {
|
|
9241
9240
|
message = 'Schema validation failed';
|
|
@@ -9318,13 +9317,13 @@ async function run$m(argv, importMeta, {
|
|
|
9318
9317
|
// Note: path.resolve vs .join:
|
|
9319
9318
|
// If given path is absolute then cwd should not affect it.
|
|
9320
9319
|
cwd = path.resolve(process.cwd(), cwd);
|
|
9321
|
-
const dotSocketDirPath = path.join(cwd, constants.
|
|
9320
|
+
const dotSocketDirPath = path.join(cwd, constants.DOT_SOCKET_DIR);
|
|
9322
9321
|
if (!fs$1.existsSync(dotSocketDirPath)) {
|
|
9323
|
-
throw new utils.InputError(`No ${constants.
|
|
9322
|
+
throw new utils.InputError(`No ${constants.DOT_SOCKET_DIR} directory found in current directory`);
|
|
9324
9323
|
}
|
|
9325
9324
|
const manifestPath = path.join(dotSocketDirPath, constants.MANIFEST_JSON);
|
|
9326
9325
|
if (!fs$1.existsSync(manifestPath)) {
|
|
9327
|
-
throw new utils.InputError(`No ${constants.MANIFEST_JSON} found in ${constants.
|
|
9326
|
+
throw new utils.InputError(`No ${constants.MANIFEST_JSON} found in ${constants.DOT_SOCKET_DIR} directory`);
|
|
9328
9327
|
}
|
|
9329
9328
|
const {
|
|
9330
9329
|
spinner
|
|
@@ -14735,5 +14734,5 @@ void (async () => {
|
|
|
14735
14734
|
await utils.captureException(e);
|
|
14736
14735
|
}
|
|
14737
14736
|
})();
|
|
14738
|
-
//# debugId=
|
|
14737
|
+
//# debugId=b2633ba4-7e32-440b-9581-735f53ff9fc8
|
|
14739
14738
|
//# sourceMappingURL=cli.js.map
|