poe-code 13.0.8 → 13.0.9

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
@@ -119629,7 +119629,9 @@ function isExpressionEndingPunctuator(value) {
119629
119629
  return value === ")" || value === "]" || value === "}" || value === "++" || value === "--";
119630
119630
  }
119631
119631
  function matchPunctuator(source, index) {
119632
- return PUNCTUATORS.find((punctuator) => source.startsWith(punctuator, index));
119632
+ return PUNCTUATORS.find(
119633
+ (punctuator) => source.startsWith(punctuator, index) && (punctuator !== "?." || !isDecimalDigit(source[index + 2] ?? ""))
119634
+ );
119633
119635
  }
119634
119636
  function shouldRejectRegexLiteral(previousToken, lastClosedControlParenthesis) {
119635
119637
  if (previousToken === void 0) {
@@ -145615,6 +145617,7 @@ function getStringMember(value, property, budget) {
145615
145617
  sandbox: true,
145616
145618
  name: `String#${property}`,
145617
145619
  ...property === "localeCompare" ? { length: 1 } : {},
145620
+ ...property === "isWellFormed" ? { length: 0 } : {},
145618
145621
  call: (args, context) => callStringMethod(
145619
145622
  value,
145620
145623
  property,
@@ -145638,6 +145641,21 @@ function isStringMethodName(property) {
145638
145641
  function validateStringMethodArguments(_methodName, _args) {
145639
145642
  }
145640
145643
  function callStringMethod(value, methodName, args, budget, callClosure = async (closure, closureArgs) => await closure.call(closureArgs), parent) {
145644
+ if (methodName === "isWellFormed") {
145645
+ for (let index = 0; index < value.length; index++) {
145646
+ const codeUnit = value.charCodeAt(index);
145647
+ if (codeUnit >= 55296 && codeUnit <= 56319) {
145648
+ const nextCodeUnit = value.charCodeAt(index + 1);
145649
+ if (!(nextCodeUnit >= 56320 && nextCodeUnit <= 57343)) {
145650
+ return false;
145651
+ }
145652
+ index++;
145653
+ } else if (codeUnit >= 56320 && codeUnit <= 57343) {
145654
+ return false;
145655
+ }
145656
+ }
145657
+ return true;
145658
+ }
145641
145659
  if (methodName === "replace" || methodName === "replaceAll") {
145642
145660
  return callReplaceLikeMethod(value, methodName, args, budget, callClosure);
145643
145661
  }
@@ -145971,6 +145989,7 @@ var init_string = __esm({
145971
145989
  "endsWith",
145972
145990
  "includes",
145973
145991
  "indexOf",
145992
+ "isWellFormed",
145974
145993
  "lastIndexOf",
145975
145994
  "localeCompare",
145976
145995
  "match",
@@ -157398,7 +157417,7 @@ var init_package2 = __esm({
157398
157417
  "package.json"() {
157399
157418
  package_default2 = {
157400
157419
  name: "poe-code",
157401
- version: "13.0.8",
157420
+ version: "13.0.9",
157402
157421
  description: "CLI tool to configure Poe API for developer workflows.",
157403
157422
  license: "MIT",
157404
157423
  type: "module",