socket 1.0.71 → 1.0.73

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.
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
+ const npmExecPath = /*@__PURE__*/ require('./npm-exec-path')
3
4
  const { resolveBinPathSync } = /*@__PURE__*/ require('../npm')
4
- const which = /*@__PURE__*/ require('../../external/which')
5
5
 
6
- module.exports = resolveBinPathSync(which.sync('npm'))
6
+ module.exports = resolveBinPathSync(npmExecPath)
@@ -119,8 +119,31 @@ function spawn(cmd, args, options, extra) {
119
119
  }
120
120
 
121
121
  /*@__NO_SIDE_EFFECTS__*/
122
- function spawnSync(...args) {
123
- return getChildProcess().spawnSync(...args)
122
+ function spawnSync(cmd, args, options) {
123
+ const { stripAnsi: shouldStripAnsi = true, ...rawSpawnOptions } = {
124
+ __proto__: null,
125
+ ...options
126
+ }
127
+ const { stdioString: rawStdioString = true } = rawSpawnOptions
128
+ const rawEncoding = rawStdioString ? 'utf8' : 'buffer'
129
+ const spawnOptions = {
130
+ encoding: rawEncoding,
131
+ ...rawSpawnOptions
132
+ }
133
+ const stdioString = spawnOptions.encoding !== 'buffer'
134
+ const result = getChildProcess().spawnSync(cmd, args, spawnOptions)
135
+ if (stdioString) {
136
+ const { stderr, stdout } = result
137
+ if (stdout) {
138
+ result.stdout = stdout.toString().trim()
139
+ }
140
+ if (stderr) {
141
+ result.stderr = stderr.toString().trim()
142
+ }
143
+ }
144
+ return shouldStripAnsi && stdioString
145
+ ? stripAnsiFromSpawnResult(result)
146
+ : result
124
147
  }
125
148
 
126
149
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "CLI for Socket.dev",
5
5
  "homepage": "https://github.com/SocketDev/socket-cli",
6
6
  "license": "MIT",
@@ -84,7 +84,7 @@
84
84
  "@babel/preset-typescript": "7.27.1",
85
85
  "@babel/runtime": "7.28.2",
86
86
  "@biomejs/biome": "2.1.2",
87
- "@coana-tech/cli": "14.10.4",
87
+ "@coana-tech/cli": "14.10.5",
88
88
  "@cyclonedx/cdxgen": "11.4.4",
89
89
  "@dotenvx/dotenvx": "1.48.3",
90
90
  "@eslint/compat": "1.3.1",
@@ -111,7 +111,7 @@
111
111
  "@socketregistry/is-interactive": "1.0.6",
112
112
  "@socketregistry/packageurl-js": "1.0.8",
113
113
  "@socketsecurity/config": "3.0.1",
114
- "@socketsecurity/registry": "1.0.245",
114
+ "@socketsecurity/registry": "1.0.249",
115
115
  "@socketsecurity/sdk": "1.4.65",
116
116
  "@types/blessed": "0.1.25",
117
117
  "@types/cmd-shim": "5.0.2",
@@ -126,7 +126,7 @@
126
126
  "@types/which": "3.0.4",
127
127
  "@types/yargs-parser": "21.0.3",
128
128
  "@typescript-eslint/parser": "8.38.0",
129
- "@typescript/native-preview": "7.0.0-dev.20250725.1",
129
+ "@typescript/native-preview": "7.0.0-dev.20250728.1",
130
130
  "@vitest/coverage-v8": "3.2.4",
131
131
  "blessed": "0.1.81",
132
132
  "blessed-contrib": "4.11.0",
@@ -139,7 +139,7 @@
139
139
  "eslint": "9.32.0",
140
140
  "eslint-import-resolver-typescript": "4.4.4",
141
141
  "eslint-plugin-import-x": "4.16.1",
142
- "eslint-plugin-n": "17.21.0",
142
+ "eslint-plugin-n": "17.21.3",
143
143
  "eslint-plugin-sort-destructure-keys": "2.0.0",
144
144
  "eslint-plugin-unicorn": "56.0.1",
145
145
  "globals": "16.3.0",
@@ -153,7 +153,7 @@
153
153
  "meow": "13.2.0",
154
154
  "micromatch": "4.0.8",
155
155
  "mock-fs": "5.5.0",
156
- "nock": "14.0.6",
156
+ "nock": "14.0.7",
157
157
  "npm-package-arg": "13.0.0",
158
158
  "npm-run-all2": "8.0.4",
159
159
  "open": "10.2.0",
@@ -161,7 +161,7 @@
161
161
  "pony-cause": "2.1.11",
162
162
  "registry-auth-token": "5.1.0",
163
163
  "registry-url": "7.2.0",
164
- "rollup": "4.45.1",
164
+ "rollup": "4.46.1",
165
165
  "semver": "7.7.2",
166
166
  "synp": "1.9.14",
167
167
  "terminal-link": "2.1.1",
package/shadow-bin/npm CHANGED
@@ -6,5 +6,5 @@ const path = require('node:path')
6
6
  const rootPath = path.join(__dirname, '..')
7
7
  Module.enableCompileCache?.(path.join(rootPath, '.cache'))
8
8
 
9
- const shadowBin = require(path.join(rootPath, 'dist/shadow-bin.js'))
9
+ const shadowBin = require(path.join(rootPath, 'dist/shadow-npm-bin.js'))
10
10
  shadowBin('npm')
package/shadow-bin/npx CHANGED
@@ -6,5 +6,5 @@ const path = require('node:path')
6
6
  const rootPath = path.join(__dirname, '..')
7
7
  Module.enableCompileCache?.(path.join(rootPath, '.cache'))
8
8
 
9
- const shadowBin = require(path.join(rootPath, 'dist/shadow-bin.js'))
9
+ const shadowBin = require(path.join(rootPath, 'dist/shadow-npm-bin.js'))
10
10
  shadowBin('npx')