Skip to content

Commit

Permalink
feat: drop internal functions from Deprecation Error stack trace (#3426)
Browse files Browse the repository at this point in the history
JSII can throw Deprecation Error and fail compilation when a deprecated property,
enum or method is being used when `JSII_DEPRECATED` environment variable is set
to `fail`. The deprecation error is throw from `.warnings.jsii.js` generated file.
When nested prop of enum is deprecated, the stack trace will contain lot of methods
from `.warnings.jsii.js` and since the file is minimized, tools like Jest which try to be
helpful by printing the line where the error is thrown shows a wall of text without much useful information.

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
yuth authored Mar 29, 2022
1 parent a858962 commit 5b4b852
Show file tree
Hide file tree
Showing 2 changed files with 696 additions and 118 deletions.
Loading

0 comments on commit 5b4b852

Please sign in to comment.