@adaptic/utils 0.0.1029 → 0.0.1030

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/test.js CHANGED
@@ -495,11 +495,15 @@ let fs;
495
495
  let path;
496
496
  if (isNode) {
497
497
  try {
498
- const readline = require("readline");
498
+ // Referenced inside the guard: in a browser bundle `require` is not defined,
499
+ // and touching the identifier at module scope would throw before the catch
500
+ // below could degrade the module to no-ops.
501
+ const loadNodeBuiltin = require;
502
+ const readline = loadNodeBuiltin("readline");
499
503
  clearLine = readline.clearLine;
500
504
  cursorTo = readline.cursorTo;
501
- fs = require("fs");
502
- path = require("path");
505
+ fs = loadNodeBuiltin("fs");
506
+ path = loadNodeBuiltin("path");
503
507
  }
504
508
  catch {
505
509
  // Silently degrade — all operations will be no-ops.