poe-code 13.0.4 → 13.0.6

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
@@ -128549,10 +128549,13 @@ function copyFromSandbox(value, state, path191 = "<root>", options, depth = 0) {
128549
128549
  const guard = new RegexCompileGuard(options.compilation);
128550
128550
  try {
128551
128551
  guard.preflight(source, flags);
128552
+ const existing = state.seen.get(value);
128553
+ if (existing !== void 0) return existing;
128552
128554
  guard.allocate(1 + source.length + flags.length);
128553
128555
  const regex = new RegExp(source, flags);
128554
128556
  regex.lastIndex = lastIndex;
128555
128557
  guard.retainScratch();
128558
+ state.seen.set(value, regex);
128556
128559
  return regex;
128557
128560
  } finally {
128558
128561
  guard.close();
@@ -145913,9 +145916,9 @@ function callMatchLikeMethod(value, methodName, args, compilation) {
145913
145916
  throw new TypeError(`String#${methodName} requires a regex argument.`);
145914
145917
  if (methodName === "search") {
145915
145918
  const lastIndex = regex.lastIndex;
145916
- regex.lastIndex = 0;
145919
+ if (!Object.is(lastIndex, 0)) regex.lastIndex = 0;
145917
145920
  const match = executeRegex(regex, value);
145918
- regex.lastIndex = lastIndex;
145921
+ if (!Object.is(regex.lastIndex, lastIndex)) regex.lastIndex = lastIndex;
145919
145922
  return match?.index ?? -1;
145920
145923
  }
145921
145924
  if (methodName === "matchAll" && !regex.flags.includes("g"))
@@ -157395,7 +157398,7 @@ var init_package2 = __esm({
157395
157398
  "package.json"() {
157396
157399
  package_default2 = {
157397
157400
  name: "poe-code",
157398
- version: "13.0.4",
157401
+ version: "13.0.6",
157399
157402
  description: "CLI tool to configure Poe API for developer workflows.",
157400
157403
  license: "MIT",
157401
157404
  type: "module",