From 0ee93e56174c8b8b265cae4448b17f925d0e6840 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Sat, 27 Feb 2021 13:28:59 -0600 Subject: [PATCH] fix(bundleSource): patch acorn with defineProperty to avoid override (#2549) --- patches/acorn+7.1.1.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/acorn+7.1.1.patch diff --git a/patches/acorn+7.1.1.patch b/patches/acorn+7.1.1.patch new file mode 100644 index 00000000000..8fd6d5846b3 --- /dev/null +++ b/patches/acorn+7.1.1.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js +index e2b3317..bc1c4d3 100644 +--- a/node_modules/acorn/dist/acorn.js ++++ b/node_modules/acorn/dist/acorn.js +@@ -1811,7 +1811,7 @@ + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } +- checkClashes[expr.name] = true; ++ Object.defineProperty(checkClashes, expr.name, { configurable: true, enumerable: true, value: true }); + } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break