tapjs / stack-utils

Captures and cleans stack traces.
https://www.npmjs.com/package/stack-utils
MIT License
190 stars 35 forks source link

stack-utils 1.0.3 causing error in npm test #57

Closed AnujJain7 closed 3 years ago

AnujJain7 commented 3 years ago

https://github.com/tapjs/stack-utils/blob/85ad2ca7a6f2ca83588f4c0d6960db485534e442/index.js#L15

facing below error in npm test node_modules/stack-utils/index.js:16 ).map(n => new RegExp((?:\\((?:node:)?${n}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${n}(?:\\.js)?:\\d+:\\d+$))); ^

SyntaxError: Unexpected token ) at createScript (vm.js:56:10)

seems the extra comma(,) casing issue.

Reference Bug - https://github.com/tapjs/stack-utils/issues/56

This causing issue as stack-utils used as internal dependency in jest-message-util. Till 12th November picking 1.0.2 and working fine after release of 1.0.3 , npm test getting failed.

AnujJain7 commented 3 years ago

Changes Done in https://github.com/tapjs/stack-utils/compare/v1-legacy...AnujJain7:patch-1 @isaacs , Please verify.

AnujJain7 commented 3 years ago

PR for review https://github.com/tapjs/stack-utils/pull/58

isaacs commented 3 years ago

What version of node are you using? That syntax has been supported for a very long time now.