nudojs 1.0.1 → 1.0.2

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 (2) hide show
  1. package/dist/index.js +12 -3
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -30219,7 +30219,9 @@ __export(calls_exports, {
30219
30219
  $recordBinding: () => $recordBinding,
30220
30220
  MAX_B_CALL_DEPTH: () => MAX_B_CALL_DEPTH,
30221
30221
  MAX_B_TOTAL_CALLS: () => MAX_B_TOTAL_CALLS,
30222
+ blockHostSideEffect: () => blockHostSideEffect,
30222
30223
  getBCallCollector: () => getBCallCollector,
30224
+ neverExecHostName: () => neverExecHostName,
30223
30225
  noteBCallRecord: () => noteBCallRecord,
30224
30226
  resetBCallBudget: () => resetBCallBudget,
30225
30227
  setBAssignCollector: () => setBAssignCollector,
@@ -30259,6 +30261,12 @@ function neverExecHostName(fn2) {
30259
30261
  }
30260
30262
  return null;
30261
30263
  }
30264
+ function blockHostSideEffect(fn2) {
30265
+ const hostName = neverExecHostName(fn2);
30266
+ if (hostName === null) return null;
30267
+ noteHostEffectBlocked(hostName);
30268
+ return abs({ k: "unknown" }, void 0, void 0, "opaque");
30269
+ }
30262
30270
  function noteBCallRecord(r) {
30263
30271
  if (!bCallCollector) return;
30264
30272
  try {
@@ -30333,12 +30341,11 @@ function $callNamed(name, fn2, args, loc, argLocs) {
30333
30341
  try {
30334
30342
  if (typeof fn2 === "function") {
30335
30343
  const g = GLOBAL_FNS.has(name) && fn2 === globalThis[name] ? evalGlobalFn(name, args) : void 0;
30336
- const blockedHost = g === void 0 ? neverExecHostName(fn2) : null;
30344
+ const blockedHost = g === void 0 ? blockHostSideEffect(fn2) : null;
30337
30345
  if (g !== void 0) {
30338
30346
  result = g;
30339
30347
  } else if (blockedHost !== null) {
30340
- noteHostEffectBlocked(blockedHost);
30341
- result = bTruncatedAbs();
30348
+ result = blockedHost;
30342
30349
  } else {
30343
30350
  const entered = bEnterCall(name, fn2, args);
30344
30351
  if (!entered.ok) {
@@ -30691,6 +30698,8 @@ function $new(cls, args) {
30691
30698
  }
30692
30699
  }
30693
30700
  if (typeof cls === "function") {
30701
+ const blockedHost = blockHostSideEffect(cls);
30702
+ if (blockedHost) return blockedHost;
30694
30703
  if (cls === Array) {
30695
30704
  return makeArrayCtorAbs(args);
30696
30705
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nudojs",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -46,10 +46,10 @@
46
46
  "dependencies": {
47
47
  "@babel/generator": "^8.0.6",
48
48
  "@babel/types": "^8.0.6",
49
- "@nudojs/core": "1.1.1",
50
- "@nudojs/parser": "1.1.1",
51
- "@nudojs/service": "1.1.1",
52
- "@nudojs/harvester": "0.2.9",
49
+ "@nudojs/core": "1.1.2",
50
+ "@nudojs/parser": "1.1.2",
51
+ "@nudojs/service": "1.1.2",
52
+ "@nudojs/harvester": "0.2.10",
53
53
  "commander": "^15.0.0"
54
54
  },
55
55
  "devDependencies": {