@socketsecurity/lib 5.24.0 → 5.25.1

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/archives.js +4 -4
  3. package/dist/constants/socket.js +1 -1
  4. package/dist/debug.js +5 -5
  5. package/dist/dlx/manifest.js +18 -20
  6. package/dist/errors.js +2 -3
  7. package/dist/external/@npmcli/package-json/lib/read-package.js +3 -2
  8. package/dist/external/@npmcli/package-json.js +19 -18
  9. package/dist/external/@npmcli/promise-spawn.js +3 -2
  10. package/dist/external/adm-zip.js +3 -2
  11. package/dist/external/debug.js +2 -1
  12. package/dist/external/external-pack.js +4 -3
  13. package/dist/external/fast-sort.js +2 -1
  14. package/dist/external/get-east-asian-width.js +3 -2
  15. package/dist/external/npm-pack.js +36 -35
  16. package/dist/external/p-map.js +6 -5
  17. package/dist/external/pico-pack.js +24 -23
  18. package/dist/external/supports-color.js +3 -1
  19. package/dist/external/tar-fs.js +9 -8
  20. package/dist/external/which.js +3 -2
  21. package/dist/external/yargs-parser.js +3 -2
  22. package/dist/fs.js +5 -4
  23. package/dist/git.js +3 -3
  24. package/dist/github.d.ts +3 -3
  25. package/dist/github.js +3 -3
  26. package/dist/http-request.d.ts +2 -2
  27. package/dist/json/edit.js +9 -9
  28. package/dist/json/parse.d.ts +2 -2
  29. package/dist/json/parse.js +2 -2
  30. package/dist/logger.js +5 -6
  31. package/dist/objects.js +28 -39
  32. package/dist/packages/edit.js +3 -3
  33. package/dist/packages/isolation.js +3 -3
  34. package/dist/primordials.d.ts +337 -0
  35. package/dist/primordials.js +828 -0
  36. package/dist/process-lock.js +11 -11
  37. package/dist/releases/github.js +4 -4
  38. package/dist/signal-exit.js +4 -4
  39. package/dist/spawn.d.ts +13 -13
  40. package/dist/stdio/stderr.d.ts +2 -2
  41. package/dist/suppress-warnings.js +2 -2
  42. package/package.json +12 -4
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [5.25.1](https://github.com/SocketDev/socket-lib/releases/tag/v5.25.1) - 2026-04-27
9
+
10
+ ### Fixed
11
+
12
+ - `@socketsecurity/lib/primordials` `StringPrototypeReplace` / `StringPrototypeReplaceAll` — `replaceValue` parameter now accepts the callback form (`(substring, ...args) => string`) in addition to a literal string, matching `String.prototype.replace`'s actual signature
13
+
14
+ ## [5.25.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.25.0) - 2026-04-26
15
+
16
+ ### Added
17
+
18
+ - `@socketsecurity/lib/primordials` — new public module exposing safe references to ~100 built-in constructors, static methods, and prototype methods captured at module-load time. Mirrors the Node.js-internal primordials convention: static methods retain their name (`ObjectKeys`, `ArrayIsArray`, `JSONParse`, `ReflectApply`); prototype methods are uncurried via `uncurryThis` (`StringPrototypeSlice(str, 0, 3)` instead of `str.slice(0, 3)`); constructors get a `Ctor` suffix (`MapCtor`, `SetCtor`, `ErrorCtor`, …) to avoid shadowing the capital-case global. Library internals migrated to use these helpers so prototype-pollution attacks on the caller realm can't redirect them. Surface includes `Function`, `Math`, and the full Error subclass set (`TypeErrorCtor`, `RangeErrorCtor`, `SyntaxErrorCtor`, `ReferenceErrorCtor`, `URIErrorCtor`, `EvalErrorCtor`, `AggregateErrorCtor`) after audit-driven coverage passes
19
+
8
20
  ## [5.24.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.24.0) - 2026-04-22
9
21
 
10
22
  ### Removed
package/dist/archives.js CHANGED
@@ -212,9 +212,9 @@ async function extractTar(archivePath, outputDir, options = {}) {
212
212
  const readStream = (0, import_node_fs.createReadStream)(archivePath);
213
213
  try {
214
214
  await (0, import_promises.pipeline)(readStream, extractStream);
215
- } catch (error) {
215
+ } catch (e) {
216
216
  readStream.destroy();
217
- throw error;
217
+ throw e;
218
218
  }
219
219
  }
220
220
  async function extractTarGz(archivePath, outputDir, options = {}) {
@@ -304,9 +304,9 @@ async function extractTarGz(archivePath, outputDir, options = {}) {
304
304
  const readStream = (0, import_node_fs.createReadStream)(archivePath);
305
305
  try {
306
306
  await (0, import_promises.pipeline)(readStream, (0, import_node_zlib.createGunzip)(), extractStream);
307
- } catch (error) {
307
+ } catch (e) {
308
308
  readStream.destroy();
309
- throw error;
309
+ throw e;
310
310
  }
311
311
  }
312
312
  async function extractZip(archivePath, outputDir, options = {}) {
@@ -77,7 +77,7 @@ const SOCKET_FIREWALL_APP_NAME = "sfw";
77
77
  const SOCKET_REGISTRY_APP_NAME = "registry";
78
78
  const SOCKET_APP_PREFIX = "_";
79
79
  const SOCKET_LIB_NAME = "@socketsecurity/lib";
80
- const SOCKET_LIB_VERSION = "5.24.0";
80
+ const SOCKET_LIB_VERSION = "5.25.1";
81
81
  const SOCKET_LIB_URL = "https://github.com/SocketDev/socket-lib";
82
82
  const SOCKET_LIB_USER_AGENT = `socketsecurity-lib/${SOCKET_LIB_VERSION} (${SOCKET_LIB_URL})`;
83
83
  const SOCKET_IPC_HANDSHAKE = "SOCKET_IPC_HANDSHAKE";
package/dist/debug.js CHANGED
@@ -50,9 +50,9 @@ var import_is_unicode_supported = __toESM(require("./external/@socketregistry/is
50
50
  var import_debug2 = __toESM(require("./external/debug"));
51
51
  var import_logger = require("./logger");
52
52
  var import_objects = require("./objects");
53
+ var import_primordials = require("./primordials");
53
54
  var import_spinner = require("./spinner");
54
55
  var import_strings = require("./strings");
55
- const ReflectApply = Reflect.apply;
56
56
  const logger = (0, import_logger.getDefaultLogger)();
57
57
  const debugByNamespace = /* @__PURE__ */ new Map();
58
58
  let _util;
@@ -65,7 +65,7 @@ function customLog(...args) {
65
65
  showHidden: import_debug2.default.inspectOpts.showHidden === null ? void 0 : import_debug2.default.inspectOpts.showHidden,
66
66
  depth: import_debug2.default.inspectOpts.depth === null || typeof import_debug2.default.inspectOpts.depth === "boolean" ? void 0 : import_debug2.default.inspectOpts.depth
67
67
  } : {};
68
- ReflectApply(logger.info, logger, [
68
+ (0, import_primordials.ReflectApply)(logger.info, logger, [
69
69
  util.formatWithOptions(inspectOpts, ...args)
70
70
  ]);
71
71
  }
@@ -189,7 +189,7 @@ function debugCacheNs(namespacesOrOpts, operation, key, meta) {
189
189
  const spinnerInstance = options.spinner || (0, import_spinner.getDefaultSpinner)();
190
190
  const wasSpinning = spinnerInstance?.isSpinning;
191
191
  spinnerInstance?.stop();
192
- ReflectApply(logger.info, logger, logArgs);
192
+ (0, import_primordials.ReflectApply)(logger.info, logger, logArgs);
193
193
  if (wasSpinning) {
194
194
  spinnerInstance?.start();
195
195
  }
@@ -253,7 +253,7 @@ function debugLogNs(namespacesOrOpts, ...args) {
253
253
  const spinnerInstance = options.spinner || (0, import_spinner.getDefaultSpinner)();
254
254
  const wasSpinning = spinnerInstance?.isSpinning;
255
255
  spinnerInstance?.stop();
256
- ReflectApply(logger.info, logger, logArgs);
256
+ (0, import_primordials.ReflectApply)(logger.info, logger, logArgs);
257
257
  if (wasSpinning) {
258
258
  spinnerInstance?.start();
259
259
  }
@@ -285,7 +285,7 @@ function debugNs(namespacesOrOpts, ...args) {
285
285
  const spinnerInstance = options.spinner || (0, import_spinner.getDefaultSpinner)();
286
286
  const wasSpinning = spinnerInstance?.isSpinning;
287
287
  spinnerInstance?.stop();
288
- ReflectApply(logger.info, logger, logArgs);
288
+ (0, import_primordials.ReflectApply)(logger.info, logger, logArgs);
289
289
  if (wasSpinning) {
290
290
  spinnerInstance?.start();
291
291
  }
@@ -79,8 +79,8 @@ class DlxManifest {
79
79
  return { __proto__: null };
80
80
  }
81
81
  return JSON.parse(content);
82
- } catch (error) {
83
- logger.warn(`Failed to read manifest: ${(0, import_errors.errorMessage)(error)}`);
82
+ } catch (e) {
83
+ logger.warn(`Failed to read manifest: ${(0, import_errors.errorMessage)(e)}`);
84
84
  return { __proto__: null };
85
85
  }
86
86
  }
@@ -92,22 +92,22 @@ class DlxManifest {
92
92
  const manifestDir = path.dirname(this.manifestPath);
93
93
  try {
94
94
  (0, import_fs.safeMkdirSync)(manifestDir, { recursive: true });
95
- } catch (error) {
96
- logger.warn(`Failed to create manifest directory: ${(0, import_errors.errorMessage)(error)}`);
95
+ } catch (e) {
96
+ logger.warn(`Failed to create manifest directory: ${(0, import_errors.errorMessage)(e)}`);
97
97
  }
98
98
  const content = JSON.stringify(data, null, 2);
99
99
  const tempPath = `${this.manifestPath}.tmp`;
100
100
  try {
101
101
  fs.writeFileSync(tempPath, content, "utf8");
102
102
  fs.renameSync(tempPath, this.manifestPath);
103
- } catch (error) {
103
+ } catch (e) {
104
104
  try {
105
105
  if (fs.existsSync(tempPath)) {
106
106
  fs.unlinkSync(tempPath);
107
107
  }
108
108
  } catch {
109
109
  }
110
- throw error;
110
+ throw e;
111
111
  }
112
112
  }
113
113
  /**
@@ -126,8 +126,8 @@ class DlxManifest {
126
126
  const data = JSON.parse(content);
127
127
  delete data[name];
128
128
  await this.writeManifest(data);
129
- } catch (error) {
130
- logger.warn(`Failed to clear cache for ${name}: ${(0, import_errors.errorMessage)(error)}`);
129
+ } catch (e) {
130
+ logger.warn(`Failed to clear cache for ${name}: ${(0, import_errors.errorMessage)(e)}`);
131
131
  }
132
132
  });
133
133
  }
@@ -140,8 +140,8 @@ class DlxManifest {
140
140
  if (fs.existsSync(this.manifestPath)) {
141
141
  fs.unlinkSync(this.manifestPath);
142
142
  }
143
- } catch (error) {
144
- logger.warn(`Failed to clear all cache: ${(0, import_errors.errorMessage)(error)}`);
143
+ } catch (e) {
144
+ logger.warn(`Failed to clear all cache: ${(0, import_errors.errorMessage)(e)}`);
145
145
  }
146
146
  });
147
147
  }
@@ -172,8 +172,8 @@ class DlxManifest {
172
172
  }
173
173
  const data = JSON.parse(content);
174
174
  return Object.keys(data);
175
- } catch (error) {
176
- logger.warn(`Failed to get package list: ${(0, import_errors.errorMessage)(error)}`);
175
+ } catch (e) {
176
+ logger.warn(`Failed to get package list: ${(0, import_errors.errorMessage)(e)}`);
177
177
  return [];
178
178
  }
179
179
  }
@@ -214,31 +214,29 @@ class DlxManifest {
214
214
  data = JSON.parse(content2);
215
215
  }
216
216
  }
217
- } catch (error) {
218
- logger.warn(`Failed to read existing manifest: ${(0, import_errors.errorMessage)(error)}`);
217
+ } catch (e) {
218
+ logger.warn(`Failed to read existing manifest: ${(0, import_errors.errorMessage)(e)}`);
219
219
  }
220
220
  data[name] = record;
221
221
  const manifestDir = path.dirname(this.manifestPath);
222
222
  try {
223
223
  (0, import_fs.safeMkdirSync)(manifestDir, { recursive: true });
224
- } catch (error) {
225
- logger.warn(
226
- `Failed to create manifest directory: ${(0, import_errors.errorMessage)(error)}`
227
- );
224
+ } catch (e) {
225
+ logger.warn(`Failed to create manifest directory: ${(0, import_errors.errorMessage)(e)}`);
228
226
  }
229
227
  const content = JSON.stringify(data, null, 2);
230
228
  const tempPath = `${this.manifestPath}.tmp`;
231
229
  try {
232
230
  fs.writeFileSync(tempPath, content, "utf8");
233
231
  fs.renameSync(tempPath, this.manifestPath);
234
- } catch (error) {
232
+ } catch (e) {
235
233
  try {
236
234
  if (fs.existsSync(tempPath)) {
237
235
  fs.unlinkSync(tempPath);
238
236
  }
239
237
  } catch {
240
238
  }
241
- throw error;
239
+ throw e;
242
240
  }
243
241
  });
244
242
  }
package/dist/errors.js CHANGED
@@ -33,13 +33,12 @@ __export(errors_exports, {
33
33
  module.exports = __toCommonJS(errors_exports);
34
34
  var import_core = require("./constants/core");
35
35
  var import_pony_cause = require("./external/pony-cause");
36
- const ObjectPrototypeToString = Object.prototype.toString;
37
- const ReflectApply = Reflect.apply;
36
+ var import_primordials = require("./primordials");
38
37
  function isErrorShim(value) {
39
38
  if (value === null || typeof value !== "object") {
40
39
  return false;
41
40
  }
42
- return ReflectApply(ObjectPrototypeToString, value, []) === "[object Error]";
41
+ return (0, import_primordials.ObjectPrototypeToString)(value) === "[object Error]";
43
42
  }
44
43
  const isErrorBuiltin = Error.isError;
45
44
  const isError = isErrorBuiltin ?? isErrorShim;
@@ -1,3 +1,4 @@
1
+ const { SymbolFor: _p_SymbolFor } = require('../../../../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from @npmcli/package-json/lib/read-package.js
@@ -15,8 +16,8 @@ var __commonJS = (cb, mod) => function __require() {
15
16
  var require_lib = __commonJS({
16
17
  "node_modules/.pnpm/json-parse-even-better-errors@5.0.0/node_modules/json-parse-even-better-errors/lib/index.js"(exports2, module2) {
17
18
  "use strict";
18
- var INDENT = Symbol.for("indent");
19
- var NEWLINE = Symbol.for("newline");
19
+ var INDENT = _p_SymbolFor("indent");
20
+ var NEWLINE = _p_SymbolFor("newline");
20
21
  var DEFAULT_NEWLINE = "\n";
21
22
  var DEFAULT_INDENT = " ";
22
23
  var BOM = /^\uFEFF/;
@@ -1,3 +1,4 @@
1
+ const { JSONParse: _p_JSONParse, JSONStringify: _p_JSONStringify, MathRandom: _p_MathRandom, ObjectDefineProperty: _p_ObjectDefineProperty, ObjectGetOwnPropertyDescriptor: _p_ObjectGetOwnPropertyDescriptor, SetCtor: _p_SetCtor, SymbolFor: _p_SymbolFor } = require('../../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from @npmcli/package-json
@@ -15,8 +16,8 @@ var __commonJS = (cb, mod) => function __require() {
15
16
  var require_lib = __commonJS({
16
17
  "node_modules/.pnpm/json-parse-even-better-errors@5.0.0/node_modules/json-parse-even-better-errors/lib/index.js"(exports2, module2) {
17
18
  "use strict";
18
- var INDENT = Symbol.for("indent");
19
- var NEWLINE = Symbol.for("newline");
19
+ var INDENT = _p_SymbolFor("indent");
20
+ var NEWLINE = _p_SymbolFor("newline");
20
21
  var DEFAULT_NEWLINE = "\n";
21
22
  var DEFAULT_INDENT = " ";
22
23
  var BOM = /^\uFEFF/;
@@ -122,7 +123,7 @@ var require_lib = __commonJS({
122
123
  // node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/update-dependencies.js
123
124
  var require_update_dependencies = __commonJS({
124
125
  "node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/update-dependencies.js"(exports2, module2) {
125
- var depTypes = /* @__PURE__ */ new Set([
126
+ var depTypes = /* @__PURE__ */ new _p_SetCtor([
126
127
  "dependencies",
127
128
  "optionalDependencies",
128
129
  "devDependencies",
@@ -883,7 +884,7 @@ var require_lib2 = __commonJS({
883
884
  var require_commonjs = __commonJS({
884
885
  "node_modules/.pnpm/lru-cache@11.2.2/node_modules/lru-cache/dist/commonjs/index.js"(exports2) {
885
886
  "use strict";
886
- Object.defineProperty(exports2, "__esModule", { value: true });
887
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
887
888
  exports2.LRUCache = void 0;
888
889
  var defaultPerf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
889
890
  var warned = /* @__PURE__ */ new Set();
@@ -2863,11 +2864,11 @@ var require_commonjs2 = __commonJS({
2863
2864
  var require_commonjs3 = __commonJS({
2864
2865
  "node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/commonjs/index.js"(exports2) {
2865
2866
  "use strict";
2866
- Object.defineProperty(exports2, "__esModule", { value: true });
2867
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
2867
2868
  exports2.EXPANSION_MAX = void 0;
2868
2869
  exports2.expand = expand;
2869
2870
  var balanced_match_1 = require_commonjs2();
2870
- var escSlash = "\0SLASH" + Math.random() + "\0";
2871
+ var escSlash = "\0SLASH" + _p_MathRandom() + "\0";
2871
2872
  var escOpen = "\0OPEN" + Math.random() + "\0";
2872
2873
  var escClose = "\0CLOSE" + Math.random() + "\0";
2873
2874
  var escComma = "\0COMMA" + Math.random() + "\0";
@@ -3191,7 +3192,7 @@ var require_unescape = __commonJS({
3191
3192
  var require_ast = __commonJS({
3192
3193
  "node_modules/.pnpm/minimatch@9.0.6/node_modules/minimatch/dist/commonjs/ast.js"(exports2) {
3193
3194
  "use strict";
3194
- Object.defineProperty(exports2, "__esModule", { value: true });
3195
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
3195
3196
  exports2.AST = void 0;
3196
3197
  var brace_expressions_js_1 = require_brace_expressions();
3197
3198
  var unescape_js_1 = require_unescape();
@@ -3701,7 +3702,7 @@ var require_escape = __commonJS({
3701
3702
  var require_commonjs4 = __commonJS({
3702
3703
  "node_modules/.pnpm/minimatch@9.0.6/node_modules/minimatch/dist/commonjs/index.js"(exports2) {
3703
3704
  "use strict";
3704
- Object.defineProperty(exports2, "__esModule", { value: true });
3705
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
3705
3706
  exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0;
3706
3707
  var brace_expansion_1 = require_commonjs3();
3707
3708
  var assert_valid_pattern_js_1 = require_assert_valid_pattern();
@@ -4462,7 +4463,7 @@ var require_commonjs5 = __commonJS({
4462
4463
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
4463
4464
  return mod && mod.__esModule ? mod : { "default": mod };
4464
4465
  };
4465
- Object.defineProperty(exports2, "__esModule", { value: true });
4466
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4466
4467
  exports2.Minipass = exports2.isWritable = exports2.isReadable = exports2.isStream = void 0;
4467
4468
  var proc = typeof process === "object" && process ? process : {
4468
4469
  stdout: null,
@@ -5366,7 +5367,7 @@ var require_commonjs6 = __commonJS({
5366
5367
  "use strict";
5367
5368
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
5368
5369
  if (k2 === void 0) k2 = k;
5369
- var desc = Object.getOwnPropertyDescriptor(m, k);
5370
+ var desc = _p_ObjectGetOwnPropertyDescriptor(m, k);
5370
5371
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5371
5372
  desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
5372
5373
  return m[k];
@@ -7446,7 +7447,7 @@ var require_ignore = __commonJS({
7446
7447
  var require_processor = __commonJS({
7447
7448
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/processor.js"(exports2) {
7448
7449
  "use strict";
7449
- Object.defineProperty(exports2, "__esModule", { value: true });
7450
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
7450
7451
  exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0;
7451
7452
  var minimatch_1 = require_commonjs4();
7452
7453
  var HasWalkedCache = class _HasWalkedCache {
@@ -7691,7 +7692,7 @@ var require_processor = __commonJS({
7691
7692
  var require_walker = __commonJS({
7692
7693
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/walker.js"(exports2) {
7693
7694
  "use strict";
7694
- Object.defineProperty(exports2, "__esModule", { value: true });
7695
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
7695
7696
  exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0;
7696
7697
  var minipass_1 = require_commonjs5();
7697
7698
  var ignore_js_1 = require_ignore();
@@ -8040,7 +8041,7 @@ var require_walker = __commonJS({
8040
8041
  var require_glob = __commonJS({
8041
8042
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/glob.js"(exports2) {
8042
8043
  "use strict";
8043
- Object.defineProperty(exports2, "__esModule", { value: true });
8044
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
8044
8045
  exports2.Glob = void 0;
8045
8046
  var minimatch_1 = require_commonjs4();
8046
8047
  var node_url_1 = require("node:url");
@@ -8277,7 +8278,7 @@ var require_has_magic = __commonJS({
8277
8278
  var require_commonjs7 = __commonJS({
8278
8279
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/index.js"(exports2) {
8279
8280
  "use strict";
8280
- Object.defineProperty(exports2, "__esModule", { value: true });
8281
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
8281
8282
  exports2.glob = exports2.sync = exports2.iterate = exports2.iterateSync = exports2.stream = exports2.streamSync = exports2.Ignore = exports2.hasMagic = exports2.Glob = exports2.unescape = exports2.escape = void 0;
8282
8283
  exports2.globStreamSync = globStreamSync;
8283
8284
  exports2.globStream = globStream;
@@ -10071,7 +10072,7 @@ var require_normalize_data = __commonJS({
10071
10072
  var require_posix = __commonJS({
10072
10073
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js"(exports2) {
10073
10074
  "use strict";
10074
- Object.defineProperty(exports2, "__esModule", { value: true });
10075
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
10075
10076
  exports2.sync = exports2.isexe = void 0;
10076
10077
  var fs_1 = require("fs");
10077
10078
  var promises_1 = require("fs/promises");
@@ -10124,7 +10125,7 @@ var require_posix = __commonJS({
10124
10125
  var require_win32 = __commonJS({
10125
10126
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js"(exports2) {
10126
10127
  "use strict";
10127
- Object.defineProperty(exports2, "__esModule", { value: true });
10128
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
10128
10129
  exports2.sync = exports2.isexe = void 0;
10129
10130
  var fs_1 = require("fs");
10130
10131
  var promises_1 = require("fs/promises");
@@ -10589,7 +10590,7 @@ var require_retry_operation = __commonJS({
10589
10590
  if (typeof options === "boolean") {
10590
10591
  options = { forever: options };
10591
10592
  }
10592
- this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
10593
+ this._originalTimeouts = _p_JSONParse(_p_JSONStringify(timeouts));
10593
10594
  this._timeouts = timeouts;
10594
10595
  this._options = options || {};
10595
10596
  this._maxRetryTime = options && options.maxRetryTime || Infinity;
@@ -13862,7 +13863,7 @@ ${polMsg}`;
13862
13863
  // node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/clone.js
13863
13864
  var require_clone = __commonJS({
13864
13865
  "node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/clone.js"(exports2, module2) {
13865
- var shallowHosts = /* @__PURE__ */ new Set([
13866
+ var shallowHosts = /* @__PURE__ */ new _p_SetCtor([
13866
13867
  "github.com",
13867
13868
  "gist.github.com",
13868
13869
  "gitlab.com",
@@ -1,3 +1,4 @@
1
+ const { ObjectDefineProperty: _p_ObjectDefineProperty } = require('../../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from @npmcli/promise-spawn
@@ -15,7 +16,7 @@ var __commonJS = (cb, mod) => function __require() {
15
16
  var require_posix = __commonJS({
16
17
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js"(exports2) {
17
18
  "use strict";
18
- Object.defineProperty(exports2, "__esModule", { value: true });
19
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
19
20
  exports2.sync = exports2.isexe = void 0;
20
21
  var fs_1 = require("fs");
21
22
  var promises_1 = require("fs/promises");
@@ -68,7 +69,7 @@ var require_posix = __commonJS({
68
69
  var require_win32 = __commonJS({
69
70
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js"(exports2) {
70
71
  "use strict";
71
- Object.defineProperty(exports2, "__esModule", { value: true });
72
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
72
73
  exports2.sync = exports2.isexe = void 0;
73
74
  var fs_1 = require("fs");
74
75
  var promises_1 = require("fs/promises");
@@ -1,3 +1,4 @@
1
+ const { BufferFrom: _p_BufferFrom, Uint32ArrayCtor: _p_Uint32ArrayCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from adm-zip
@@ -627,7 +628,7 @@ var require_decoder = __commonJS({
627
628
  "node_modules/.pnpm/adm-zip@0.5.16/node_modules/adm-zip/util/decoder.js"(exports2, module2) {
628
629
  module2.exports = {
629
630
  efs: true,
630
- encode: /* @__PURE__ */ __name((data) => Buffer.from(data, "utf8"), "encode"),
631
+ encode: /* @__PURE__ */ __name((data) => _p_BufferFrom(data, "utf8"), "encode"),
631
632
  decode: /* @__PURE__ */ __name((data) => data.toString("utf8"), "decode")
632
633
  };
633
634
  }
@@ -1086,7 +1087,7 @@ var require_zipcrypto = __commonJS({
1086
1087
  "use strict";
1087
1088
  var { randomFillSync } = require("crypto");
1088
1089
  var Errors = require_errors();
1089
- var crctable = new Uint32Array(256).map((t, crc) => {
1090
+ var crctable = new _p_Uint32ArrayCtor(256).map((t, crc) => {
1090
1091
  for (let j = 0; j < 8; j++) {
1091
1092
  if (0 !== (crc & 1)) {
1092
1093
  crc = crc >>> 1 ^ 3988292384;
@@ -1,3 +1,4 @@
1
+ const { StringPrototypeStartsWith: _p_StringPrototypeStartsWith } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from debug
@@ -54,7 +55,7 @@ __export(supports_color_exports, {
54
55
  default: () => supports_color_default
55
56
  });
56
57
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
57
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
58
+ const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
58
59
  const position = argv.indexOf(prefix + flag);
59
60
  const terminatorPosition = argv.indexOf("--");
60
61
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
@@ -1,3 +1,4 @@
1
+ const { ObjectDefineProperty: _p_ObjectDefineProperty, StringPrototypeStartsWith: _p_StringPrototypeStartsWith } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from external-pack
@@ -75,7 +76,7 @@ var require_cjs = __commonJS({
75
76
  "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js"(exports2) {
76
77
  "use strict";
77
78
  var _a;
78
- Object.defineProperty(exports2, "__esModule", { value: true });
79
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
79
80
  exports2.unload = exports2.load = exports2.onExit = exports2.signals = void 0;
80
81
  var signals_js_1 = require_signals();
81
82
  Object.defineProperty(exports2, "signals", { enumerable: true, get: /* @__PURE__ */ __name(function() {
@@ -324,7 +325,7 @@ __export(supports_color_exports, {
324
325
  default: () => supports_color_default
325
326
  });
326
327
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
327
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
328
+ const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
328
329
  const position = argv.indexOf(prefix + flag);
329
330
  const terminatorPosition = argv.indexOf("--");
330
331
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
@@ -477,7 +478,7 @@ __export(has_flag_exports, {
477
478
  default: () => hasFlag2
478
479
  });
479
480
  function hasFlag2(flag, argv = import_process.default.argv) {
480
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
481
+ const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
481
482
  const position = argv.indexOf(prefix + flag);
482
483
  const terminatorPosition = argv.indexOf("--");
483
484
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
@@ -1,3 +1,4 @@
1
+ const { ObjectDefineProperty: _p_ObjectDefineProperty } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from fast-sort
@@ -15,7 +16,7 @@ var __commonJS = (cb, mod) => function __require() {
15
16
  var require_sort_cjs = __commonJS({
16
17
  "node_modules/.pnpm/fast-sort@3.4.1/node_modules/fast-sort/dist/sort.cjs.js"(exports2) {
17
18
  "use strict";
18
- Object.defineProperty(exports2, "__esModule", { value: true });
19
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
19
20
  var castComparer = /* @__PURE__ */ __name(function(comparer) {
20
21
  return function(a, b, order) {
21
22
  return comparer(a, b, order) * order;
@@ -1,3 +1,4 @@
1
+ const { NumberIsSafeInteger: _p_NumberIsSafeInteger, TypeErrorCtor: _p_TypeErrorCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from get-east-asian-width
@@ -65,8 +66,8 @@ __export(get_east_asian_width_exports, {
65
66
  eastAsianWidthType: () => eastAsianWidthType
66
67
  });
67
68
  function validate(codePoint) {
68
- if (!Number.isSafeInteger(codePoint)) {
69
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
69
+ if (!_p_NumberIsSafeInteger(codePoint)) {
70
+ throw new _p_TypeErrorCtor(`Expected a code point, got \`${typeof codePoint}\`.`);
70
71
  }
71
72
  }
72
73
  function eastAsianWidthType(codePoint) {