Skip to content

Commit

Permalink
fix: patch bug in stack-utils npm package
Browse files Browse the repository at this point in the history
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 tapjs/stack-utils#70
  • Loading branch information
FUDCo committed Oct 13, 2022
1 parent d5beb3c commit 8436476
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions patches/stack-utils+2.0.5.patch
Original file line number Diff line number Diff line change
@@ -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) {

0 comments on commit 8436476

Please sign in to comment.