@socketsecurity/lib 5.2.1 → 5.3.0

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/dlx/dir.js CHANGED
@@ -35,7 +35,7 @@ let _fs;
35
35
  // @__NO_SIDE_EFFECTS__
36
36
  function getFs() {
37
37
  if (_fs === void 0) {
38
- _fs = require("node:fs");
38
+ _fs = require("fs");
39
39
  }
40
40
  return _fs;
41
41
  }
@@ -15,7 +15,7 @@ export interface PackageDetails {
15
15
  */
16
16
  export interface BinaryDetails {
17
17
  checksum: string;
18
- checksum_algorithm: 'sha256' | 'sha512';
18
+ checksum_algorithm: ChecksumAlgorithm;
19
19
  platform: string;
20
20
  arch: string;
21
21
  size: number;
@@ -24,6 +24,7 @@ export interface BinaryDetails {
24
24
  url: string;
25
25
  };
26
26
  }
27
+ export type ChecksumAlgorithm = 'sha256' | 'sha512';
27
28
  /**
28
29
  * Unified manifest entry for all cached items (packages and binaries).
29
30
  * Shared fields at root, type-specific fields in details.
@@ -34,8 +34,6 @@ __export(package_exports, {
34
34
  executePackage: () => executePackage
35
35
  });
36
36
  module.exports = __toCommonJS(package_exports);
37
- var import_node_fs = __toESM(require("node:fs"));
38
- var import_path = __toESM(require("path"));
39
37
  var import_platform = require("../constants/platform");
40
38
  var import_packages = require("../constants/packages");
41
39
  var import_cache = require("./cache");
@@ -48,6 +46,22 @@ var import_normalize = require("../paths/normalize");
48
46
  var import_socket = require("../paths/socket");
49
47
  var import_process_lock = require("../process-lock");
50
48
  var import_spawn = require("../spawn");
49
+ let _fs;
50
+ // @__NO_SIDE_EFFECTS__
51
+ function getFs() {
52
+ if (_fs === void 0) {
53
+ _fs = require("fs");
54
+ }
55
+ return _fs;
56
+ }
57
+ let _path;
58
+ // @__NO_SIDE_EFFECTS__
59
+ function getPath() {
60
+ if (_path === void 0) {
61
+ _path = require("path");
62
+ }
63
+ return _path;
64
+ }
51
65
  const rangeOperatorsRegExp = /[~^><=xX* ]|\|\|/;
52
66
  function parsePackageSpec(spec) {
53
67
  try {
@@ -69,10 +83,12 @@ function parsePackageSpec(spec) {
69
83
  }
70
84
  }
71
85
  async function ensurePackageInstalled(packageName, packageSpec, force) {
86
+ const fs = /* @__PURE__ */ getFs();
87
+ const path = /* @__PURE__ */ getPath();
72
88
  const cacheKey = (0, import_cache.generateCacheKey)(packageSpec);
73
- const packageDir = (0, import_normalize.normalizePath)(import_path.default.join((0, import_socket.getSocketDlxDir)(), cacheKey));
89
+ const packageDir = (0, import_normalize.normalizePath)(path.join((0, import_socket.getSocketDlxDir)(), cacheKey));
74
90
  const installedDir = (0, import_normalize.normalizePath)(
75
- import_path.default.join(packageDir, "node_modules", packageName)
91
+ path.join(packageDir, "node_modules", packageName)
76
92
  );
77
93
  try {
78
94
  await (0, import_fs.safeMkdir)(packageDir);
@@ -96,13 +112,13 @@ Ensure the filesystem is writable or set SOCKET_DLX_DIR to a writable location.`
96
112
  cause: e
97
113
  });
98
114
  }
99
- const lockPath = import_path.default.join(packageDir, "concurrency.lock");
115
+ const lockPath = path.join(packageDir, "concurrency.lock");
100
116
  return await import_process_lock.processLock.withLock(
101
117
  lockPath,
102
118
  async () => {
103
- if (!force && import_node_fs.default.existsSync(installedDir)) {
104
- const pkgJsonPath = import_path.default.join(installedDir, "package.json");
105
- if (import_node_fs.default.existsSync(pkgJsonPath)) {
119
+ if (!force && fs.existsSync(installedDir)) {
120
+ const pkgJsonPath = path.join(installedDir, "package.json");
121
+ if (fs.existsSync(pkgJsonPath)) {
106
122
  return { installed: false, packageDir };
107
123
  }
108
124
  }
@@ -110,11 +126,11 @@ Ensure the filesystem is writable or set SOCKET_DLX_DIR to a writable location.`
110
126
  try {
111
127
  await import_pacote.default.extract(packageSpec, installedDir, {
112
128
  // Use consistent pacote cache path (respects npm cache locations when available).
113
- cache: pacoteCachePath || import_path.default.join(packageDir, ".cache")
129
+ cache: pacoteCachePath || path.join(packageDir, ".cache")
114
130
  });
115
131
  const arb = new import_arborist.default({
116
132
  path: installedDir,
117
- cache: pacoteCachePath || import_path.default.join(packageDir, ".cache"),
133
+ cache: pacoteCachePath || path.join(packageDir, ".cache"),
118
134
  // Skip devDependencies (production-only like npx).
119
135
  omit: ["dev"],
120
136
  // Security: Skip install/preinstall/postinstall scripts to prevent arbitrary code execution.
@@ -167,20 +183,22 @@ function resolveBinaryPath(basePath) {
167
183
  if (!import_platform.WIN32) {
168
184
  return basePath;
169
185
  }
186
+ const fs = /* @__PURE__ */ getFs();
170
187
  const extensions = [".cmd", ".bat", ".ps1", ".exe", ""];
171
188
  for (const ext of extensions) {
172
189
  const testPath = basePath + ext;
173
- if (import_node_fs.default.existsSync(testPath)) {
190
+ if (fs.existsSync(testPath)) {
174
191
  return testPath;
175
192
  }
176
193
  }
177
194
  return basePath;
178
195
  }
179
196
  function findBinaryPath(packageDir, packageName, binaryName) {
197
+ const path = /* @__PURE__ */ getPath();
180
198
  const installedDir = (0, import_normalize.normalizePath)(
181
- import_path.default.join(packageDir, "node_modules", packageName)
199
+ path.join(packageDir, "node_modules", packageName)
182
200
  );
183
- const pkgJsonPath = import_path.default.join(installedDir, "package.json");
201
+ const pkgJsonPath = path.join(installedDir, "package.json");
184
202
  const pkgJson = (0, import_fs.readJsonSync)(pkgJsonPath);
185
203
  const bin = pkgJson["bin"];
186
204
  let binName;
@@ -226,7 +244,7 @@ function findBinaryPath(packageDir, packageName, binaryName) {
226
244
  if (!binPath) {
227
245
  throw new Error(`No binary found for package "${packageName}"`);
228
246
  }
229
- const rawPath = (0, import_normalize.normalizePath)(import_path.default.join(installedDir, binPath));
247
+ const rawPath = (0, import_normalize.normalizePath)(path.join(installedDir, binPath));
230
248
  return resolveBinaryPath(rawPath);
231
249
  }
232
250
  async function dlxPackage(args, options, spawnExtra) {
@@ -246,10 +264,12 @@ function makePackageBinsExecutable(packageDir, packageName) {
246
264
  if (import_platform.WIN32) {
247
265
  return;
248
266
  }
267
+ const fs = /* @__PURE__ */ getFs();
268
+ const path = /* @__PURE__ */ getPath();
249
269
  const installedDir = (0, import_normalize.normalizePath)(
250
- import_path.default.join(packageDir, "node_modules", packageName)
270
+ path.join(packageDir, "node_modules", packageName)
251
271
  );
252
- const pkgJsonPath = import_path.default.join(installedDir, "package.json");
272
+ const pkgJsonPath = path.join(installedDir, "package.json");
253
273
  try {
254
274
  const pkgJson = (0, import_fs.readJsonSync)(pkgJsonPath);
255
275
  const bin = pkgJson["bin"];
@@ -264,10 +284,10 @@ function makePackageBinsExecutable(packageDir, packageName) {
264
284
  binPaths.push(...Object.values(binObj));
265
285
  }
266
286
  for (const binPath of binPaths) {
267
- const fullPath = (0, import_normalize.normalizePath)(import_path.default.join(installedDir, binPath));
268
- if (import_node_fs.default.existsSync(fullPath)) {
287
+ const fullPath = (0, import_normalize.normalizePath)(path.join(installedDir, binPath));
288
+ if (fs.existsSync(fullPath)) {
269
289
  try {
270
- import_node_fs.default.chmodSync(fullPath, 493);
290
+ fs.chmodSync(fullPath, 493);
271
291
  } catch {
272
292
  }
273
293
  }
@@ -34,7 +34,7 @@ let _fs;
34
34
  // @__NO_SIDE_EFFECTS__
35
35
  function getFs() {
36
36
  if (_fs === void 0) {
37
- _fs = require("node:fs");
37
+ _fs = require("fs");
38
38
  }
39
39
  return _fs;
40
40
  }
package/dist/dlx/paths.js CHANGED
@@ -32,7 +32,7 @@ let _path;
32
32
  // @__NO_SIDE_EFFECTS__
33
33
  function getPath() {
34
34
  if (_path === void 0) {
35
- _path = require("node:path");
35
+ _path = require("path");
36
36
  }
37
37
  return _path;
38
38
  }
package/dist/fs.js CHANGED
@@ -84,7 +84,7 @@ let _buffer;
84
84
  // @__NO_SIDE_EFFECTS__
85
85
  function getBuffer() {
86
86
  if (_buffer === void 0) {
87
- _buffer = require("node:buffer");
87
+ _buffer = require("buffer");
88
88
  }
89
89
  return _buffer;
90
90
  }
@@ -92,7 +92,7 @@ let _fs;
92
92
  // @__NO_SIDE_EFFECTS__
93
93
  function getFs() {
94
94
  if (_fs === void 0) {
95
- _fs = require("node:fs");
95
+ _fs = require("fs");
96
96
  }
97
97
  return _fs;
98
98
  }
@@ -100,7 +100,7 @@ let _path;
100
100
  // @__NO_SIDE_EFFECTS__
101
101
  function getPath() {
102
102
  if (_path === void 0) {
103
- _path = require("node:path");
103
+ _path = require("path");
104
104
  }
105
105
  return _path;
106
106
  }
package/dist/git.js CHANGED
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with esbuild */
3
- var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
7
  var __export = (target, all) => {
10
8
  for (var name in all)
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
18
16
  }
19
17
  return to;
20
18
  };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
20
  var git_exports = {};
31
21
  __export(git_exports, {
@@ -44,18 +34,16 @@ __export(git_exports, {
44
34
  isUnstagedSync: () => isUnstagedSync
45
35
  });
46
36
  module.exports = __toCommonJS(git_exports);
47
- var import_path = __toESM(require("path"));
48
37
  var import_debug = require("./debug");
49
38
  var import_globs = require("./globs");
50
39
  var import_normalize = require("./paths/normalize");
51
40
  var import_spawn = require("./spawn");
52
41
  var import_strings = require("./strings");
53
- const gitDiffCache = /* @__PURE__ */ new Map();
54
42
  let _fs;
55
43
  // @__NO_SIDE_EFFECTS__
56
44
  function getFs() {
57
45
  if (_fs === void 0) {
58
- _fs = require("node:fs");
46
+ _fs = require("fs");
59
47
  }
60
48
  return _fs;
61
49
  }
@@ -63,10 +51,11 @@ let _path;
63
51
  // @__NO_SIDE_EFFECTS__
64
52
  function getPath() {
65
53
  if (_path === void 0) {
66
- _path = require("node:path");
54
+ _path = require("path");
67
55
  }
68
56
  return _path;
69
57
  }
58
+ const gitDiffCache = /* @__PURE__ */ new Map();
70
59
  function getGitPath() {
71
60
  return "git";
72
61
  }
@@ -161,17 +150,17 @@ function innerDiffSync(args, options) {
161
150
  }
162
151
  function findGitRoot(startPath) {
163
152
  const fs = /* @__PURE__ */ getFs();
164
- const path2 = /* @__PURE__ */ getPath();
153
+ const path = /* @__PURE__ */ getPath();
165
154
  let currentPath = startPath;
166
155
  while (true) {
167
156
  try {
168
- const gitPath = path2.join(currentPath, ".git");
157
+ const gitPath = path.join(currentPath, ".git");
169
158
  if (fs.existsSync(gitPath)) {
170
159
  return currentPath;
171
160
  }
172
161
  } catch {
173
162
  }
174
- const parentPath = path2.dirname(currentPath);
163
+ const parentPath = path.dirname(currentPath);
175
164
  if (parentPath === currentPath) {
176
165
  return startPath;
177
166
  }
@@ -186,7 +175,9 @@ function parseGitDiffStdout(stdout, options, spawnCwd) {
186
175
  porcelain = false,
187
176
  ...matcherOptions
188
177
  } = { __proto__: null, ...options };
189
- const cwd = cwdOption === defaultRoot ? defaultRoot : (/* @__PURE__ */ getFs()).realpathSync(cwdOption);
178
+ const fs = /* @__PURE__ */ getFs();
179
+ const path = /* @__PURE__ */ getPath();
180
+ const cwd = cwdOption === defaultRoot ? defaultRoot : fs.realpathSync(cwdOption);
190
181
  const rootPath = defaultRoot;
191
182
  let rawFiles = stdout ? (0, import_strings.stripAnsi)(stdout).split("\n").map((line) => line.trimEnd()).filter((line) => line) : [];
192
183
  if (porcelain) {
@@ -194,11 +185,11 @@ function parseGitDiffStdout(stdout, options, spawnCwd) {
194
185
  return line.length > 3 ? line.substring(3) : line;
195
186
  });
196
187
  }
197
- const files = absolute ? rawFiles.map((relPath2) => (0, import_normalize.normalizePath)(import_path.default.join(rootPath, relPath2))) : rawFiles.map((relPath2) => (0, import_normalize.normalizePath)(relPath2));
188
+ const files = absolute ? rawFiles.map((relPath2) => (0, import_normalize.normalizePath)(path.join(rootPath, relPath2))) : rawFiles.map((relPath2) => (0, import_normalize.normalizePath)(relPath2));
198
189
  if (cwd === rootPath) {
199
190
  return files;
200
191
  }
201
- const relPath = (0, import_normalize.normalizePath)(import_path.default.relative(rootPath, cwd));
192
+ const relPath = (0, import_normalize.normalizePath)(path.relative(rootPath, cwd));
202
193
  const matcher = (0, import_globs.getGlobMatcher)([`${relPath}/**`], {
203
194
  ...matcherOptions,
204
195
  absolute,
@@ -250,9 +241,11 @@ async function isChanged(pathname, options) {
250
241
  ...options,
251
242
  absolute: false
252
243
  });
253
- const resolvedPathname = (/* @__PURE__ */ getFs()).realpathSync(pathname);
254
- const baseCwd = options?.cwd ? (/* @__PURE__ */ getFs()).realpathSync(options["cwd"]) : getCwd();
255
- const relativePath = (0, import_normalize.normalizePath)(import_path.default.relative(baseCwd, resolvedPathname));
244
+ const fs = /* @__PURE__ */ getFs();
245
+ const path = /* @__PURE__ */ getPath();
246
+ const resolvedPathname = fs.realpathSync(pathname);
247
+ const baseCwd = options?.cwd ? fs.realpathSync(options["cwd"]) : getCwd();
248
+ const relativePath = (0, import_normalize.normalizePath)(path.relative(baseCwd, resolvedPathname));
256
249
  return files.includes(relativePath);
257
250
  }
258
251
  function isChangedSync(pathname, options) {
@@ -261,9 +254,11 @@ function isChangedSync(pathname, options) {
261
254
  ...options,
262
255
  absolute: false
263
256
  });
264
- const resolvedPathname = (/* @__PURE__ */ getFs()).realpathSync(pathname);
265
- const baseCwd = options?.cwd ? (/* @__PURE__ */ getFs()).realpathSync(options["cwd"]) : getCwd();
266
- const relativePath = (0, import_normalize.normalizePath)(import_path.default.relative(baseCwd, resolvedPathname));
257
+ const fs = /* @__PURE__ */ getFs();
258
+ const path = /* @__PURE__ */ getPath();
259
+ const resolvedPathname = fs.realpathSync(pathname);
260
+ const baseCwd = options?.cwd ? fs.realpathSync(options["cwd"]) : getCwd();
261
+ const relativePath = (0, import_normalize.normalizePath)(path.relative(baseCwd, resolvedPathname));
267
262
  return files.includes(relativePath);
268
263
  }
269
264
  async function isUnstaged(pathname, options) {
@@ -272,9 +267,11 @@ async function isUnstaged(pathname, options) {
272
267
  ...options,
273
268
  absolute: false
274
269
  });
275
- const resolvedPathname = (/* @__PURE__ */ getFs()).realpathSync(pathname);
276
- const baseCwd = options?.cwd ? (/* @__PURE__ */ getFs()).realpathSync(options["cwd"]) : getCwd();
277
- const relativePath = (0, import_normalize.normalizePath)(import_path.default.relative(baseCwd, resolvedPathname));
270
+ const fs = /* @__PURE__ */ getFs();
271
+ const path = /* @__PURE__ */ getPath();
272
+ const resolvedPathname = fs.realpathSync(pathname);
273
+ const baseCwd = options?.cwd ? fs.realpathSync(options["cwd"]) : getCwd();
274
+ const relativePath = (0, import_normalize.normalizePath)(path.relative(baseCwd, resolvedPathname));
278
275
  return files.includes(relativePath);
279
276
  }
280
277
  function isUnstagedSync(pathname, options) {
@@ -283,9 +280,11 @@ function isUnstagedSync(pathname, options) {
283
280
  ...options,
284
281
  absolute: false
285
282
  });
286
- const resolvedPathname = (/* @__PURE__ */ getFs()).realpathSync(pathname);
287
- const baseCwd = options?.cwd ? (/* @__PURE__ */ getFs()).realpathSync(options["cwd"]) : getCwd();
288
- const relativePath = (0, import_normalize.normalizePath)(import_path.default.relative(baseCwd, resolvedPathname));
283
+ const fs = /* @__PURE__ */ getFs();
284
+ const path = /* @__PURE__ */ getPath();
285
+ const resolvedPathname = fs.realpathSync(pathname);
286
+ const baseCwd = options?.cwd ? fs.realpathSync(options["cwd"]) : getCwd();
287
+ const relativePath = (0, import_normalize.normalizePath)(path.relative(baseCwd, resolvedPathname));
289
288
  return files.includes(relativePath);
290
289
  }
291
290
  async function isStaged(pathname, options) {
@@ -294,9 +293,11 @@ async function isStaged(pathname, options) {
294
293
  ...options,
295
294
  absolute: false
296
295
  });
297
- const resolvedPathname = (/* @__PURE__ */ getFs()).realpathSync(pathname);
298
- const baseCwd = options?.cwd ? (/* @__PURE__ */ getFs()).realpathSync(options["cwd"]) : getCwd();
299
- const relativePath = (0, import_normalize.normalizePath)(import_path.default.relative(baseCwd, resolvedPathname));
296
+ const fs = /* @__PURE__ */ getFs();
297
+ const path = /* @__PURE__ */ getPath();
298
+ const resolvedPathname = fs.realpathSync(pathname);
299
+ const baseCwd = options?.cwd ? fs.realpathSync(options["cwd"]) : getCwd();
300
+ const relativePath = (0, import_normalize.normalizePath)(path.relative(baseCwd, resolvedPathname));
300
301
  return files.includes(relativePath);
301
302
  }
302
303
  function isStagedSync(pathname, options) {
@@ -305,9 +306,11 @@ function isStagedSync(pathname, options) {
305
306
  ...options,
306
307
  absolute: false
307
308
  });
308
- const resolvedPathname = (/* @__PURE__ */ getFs()).realpathSync(pathname);
309
- const baseCwd = options?.cwd ? (/* @__PURE__ */ getFs()).realpathSync(options["cwd"]) : getCwd();
310
- const relativePath = (0, import_normalize.normalizePath)(import_path.default.relative(baseCwd, resolvedPathname));
309
+ const fs = /* @__PURE__ */ getFs();
310
+ const path = /* @__PURE__ */ getPath();
311
+ const resolvedPathname = fs.realpathSync(pathname);
312
+ const baseCwd = options?.cwd ? fs.realpathSync(options["cwd"]) : getCwd();
313
+ const relativePath = (0, import_normalize.normalizePath)(path.relative(baseCwd, resolvedPathname));
311
314
  return files.includes(relativePath);
312
315
  }
313
316
  // Annotate the CommonJS export names for ESM import in node:
@@ -31,14 +31,14 @@ let _https;
31
31
  // @__NO_SIDE_EFFECTS__
32
32
  function getHttp() {
33
33
  if (_http === void 0) {
34
- _http = require("node:http");
34
+ _http = require("http");
35
35
  }
36
36
  return _http;
37
37
  }
38
38
  // @__NO_SIDE_EFFECTS__
39
39
  function getHttps() {
40
40
  if (_https === void 0) {
41
- _https = require("node:https");
41
+ _https = require("https");
42
42
  }
43
43
  return _https;
44
44
  }
package/dist/json/edit.js CHANGED
@@ -32,7 +32,7 @@ let _fs;
32
32
  // @__NO_SIDE_EFFECTS__
33
33
  function getFs() {
34
34
  if (_fs === void 0) {
35
- _fs = require("node:fs");
35
+ _fs = require("fs");
36
36
  }
37
37
  return _fs;
38
38
  }
@@ -98,7 +98,7 @@ function shouldSave(currentContent, originalContent, originalFileContent, option
98
98
  const sortedContent = sortFn ? sortFn(content) : sort ? sortKeys(content) : content;
99
99
  const origContent = originalContent ? stripFormattingSymbols(originalContent) : {};
100
100
  if (ignoreWhitespace) {
101
- const util = require("node:util");
101
+ const util = require("util");
102
102
  return !util.isDeepStrictEqual(sortedContent, origContent);
103
103
  }
104
104
  const formatting = getFormattingFromContent(currentContent);
package/dist/logger.js CHANGED
@@ -48,7 +48,7 @@ let _Console;
48
48
  // @__NO_SIDE_EFFECTS__
49
49
  function constructConsole(...args) {
50
50
  if (_Console === void 0) {
51
- const nodeConsole = require("node:console");
51
+ const nodeConsole = require("console");
52
52
  _Console = nodeConsole.Console;
53
53
  }
54
54
  return ReflectConstruct(
@@ -47,7 +47,7 @@ let _fs;
47
47
  // @__NO_SIDE_EFFECTS__
48
48
  function getFs() {
49
49
  if (_fs === void 0) {
50
- _fs = require("node:fs");
50
+ _fs = require("fs");
51
51
  }
52
52
  return _fs;
53
53
  }
@@ -55,7 +55,7 @@ let _path;
55
55
  // @__NO_SIDE_EFFECTS__
56
56
  function getPath() {
57
57
  if (_path === void 0) {
58
- _path = require("node:path");
58
+ _path = require("path");
59
59
  }
60
60
  return _path;
61
61
  }
@@ -63,7 +63,7 @@ let _util;
63
63
  // @__NO_SIDE_EFFECTS__
64
64
  function getUtil() {
65
65
  if (_util === void 0) {
66
- _util = require("node:util");
66
+ _util = require("util");
67
67
  }
68
68
  return _util;
69
69
  }
@@ -54,7 +54,7 @@ let _buffer;
54
54
  // @__NO_SIDE_EFFECTS__
55
55
  function getBuffer() {
56
56
  if (_buffer === void 0) {
57
- _buffer = require("node:buffer");
57
+ _buffer = require("buffer");
58
58
  }
59
59
  return _buffer;
60
60
  }
@@ -62,7 +62,7 @@ let _url;
62
62
  // @__NO_SIDE_EFFECTS__
63
63
  function getUrl() {
64
64
  if (_url === void 0) {
65
- _url = require("node:url");
65
+ _url = require("url");
66
66
  }
67
67
  return _url;
68
68
  }
@@ -351,7 +351,7 @@ function resolve(...segments) {
351
351
  resolvedAbsolute = /* @__PURE__ */ isAbsolute(segment);
352
352
  }
353
353
  if (!resolvedAbsolute) {
354
- const cwd = /* @__PURE__ */ require("node:process").cwd();
354
+ const cwd = /* @__PURE__ */ require("process").cwd();
355
355
  resolvedPath = cwd + (resolvedPath.length === 0 ? "" : `/${resolvedPath}`);
356
356
  }
357
357
  return /* @__PURE__ */ normalizePath(resolvedPath);
@@ -28,7 +28,7 @@ let _path;
28
28
  // @__NO_SIDE_EFFECTS__
29
29
  function getPath() {
30
30
  if (_path === void 0) {
31
- _path = require("node:path");
31
+ _path = require("path");
32
32
  }
33
33
  return _path;
34
34
  }
package/dist/promises.js CHANGED
@@ -37,7 +37,7 @@ let _timers;
37
37
  // @__NO_SIDE_EFFECTS__
38
38
  function getTimers() {
39
39
  if (_timers === void 0) {
40
- _timers = require("node:timers/promises");
40
+ _timers = require("timers/promises");
41
41
  }
42
42
  return _timers;
43
43
  }