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 7e071a7 commit 42c2324
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions 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) {

0 comments on commit 42c2324

Please sign in to comment.