From 7eceb122bb654d6df35aa748e43151ca37bed077 Mon Sep 17 00:00:00 2001 From: Chip Morningstar Date: Thu, 13 Oct 2022 14:50:07 -0700 Subject: [PATCH] fix: patch bug in `stack-utils` npm package Lockdown breaks Ava under certain versions of NodeJS. It turns out to be due to a bug in the `stack-utils` npm package with trips over the override mistake. I've filed an issue with the maintainer of that package, but in the meantime this patch deals with the problem. See https://github.com/tapjs/stack-utils/issues/70 --- patches/stack-utils+2.0.5.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/stack-utils+2.0.5.patch diff --git a/patches/stack-utils+2.0.5.patch b/patches/stack-utils+2.0.5.patch new file mode 100644 index 00000000000..16d5e98ad9d --- /dev/null +++ b/patches/stack-utils+2.0.5.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/stack-utils/index.js b/node_modules/stack-utils/index.js +index ed14bd3..ad9eeb1 100644 +--- a/node_modules/stack-utils/index.js ++++ b/node_modules/stack-utils/index.js +@@ -161,7 +161,7 @@ class StackUtils { + setFile(res, site.getFileName(), this._cwd); + + if (site.isConstructor()) { +- res.constructor = true; ++ Object.defineProperty(res, 'constructor', { value: true }); + } + + if (site.isEval()) { +@@ -260,7 +260,7 @@ class StackUtils { + setFile(res, file, this._cwd); + + if (ctor) { +- res.constructor = true; ++ Object.defineProperty(res, 'constructor', { value: true }); + } + + if (evalOrigin) {