poe-code 14.0.53 → 14.0.54

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/index.js CHANGED
@@ -145153,14 +145153,27 @@ function getStringMember(value, property, budget) {
145153
145153
  name: `String#${property}`,
145154
145154
  ...property === "localeCompare" ? { length: 1 } : {},
145155
145155
  ...property === "isWellFormed" || property === "toWellFormed" ? { length: 0 } : {},
145156
- call: (args, context) => callStringMethod(
145157
- value,
145158
- property,
145159
- args,
145160
- budget,
145161
- context === void 0 ? void 0 : async (closure, closureArgs) => await closure.call(closureArgs, { ...context, thisValue: void 0 }),
145162
- context?.compilation
145163
- )
145156
+ call: async (args, context) => {
145157
+ const receiver = context?.thisValue;
145158
+ if (receiver === null || receiver === void 0) {
145159
+ throw new TypeError(`String#${property} requires a non-null receiver.`);
145160
+ }
145161
+ const retainedReceiver = {};
145162
+ budget.setRetainedValues(retainedReceiver, () => [receiver]);
145163
+ try {
145164
+ const string = await sandboxString(receiver, budget, context);
145165
+ return await callStringMethod(
145166
+ string,
145167
+ property,
145168
+ args,
145169
+ budget,
145170
+ (closure, closureArgs) => invokeBuiltinClosure(closure, closureArgs, budget, context, void 0),
145171
+ context?.compilation
145172
+ );
145173
+ } finally {
145174
+ budget.setRetainedValues(retainedReceiver, void 0);
145175
+ }
145176
+ }
145164
145177
  });
145165
145178
  }
145166
145179
  function getStringIndex(property) {
@@ -145532,7 +145545,9 @@ var SPLIT_STRING_MESSAGE, stringMethodNames;
145532
145545
  var init_string = __esm({
145533
145546
  "packages/safe-js/src/interp/methods/string.ts"() {
145534
145547
  "use strict";
145548
+ init_builtin_call();
145535
145549
  init_compile_guard();
145550
+ init_string_coercion();
145536
145551
  init_values();
145537
145552
  init_regex();
145538
145553
  SPLIT_STRING_MESSAGE = "String#split only supports string separator values.";