Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-export StackFrame type for backwards compatibility #72

Merged
merged 1 commit into from
Jun 5, 2022

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Feb 12, 2022

Description

2.0.7 removed a mis-matching export of StackFrame (#54), but some users were relying on it. Re-export the correct one.

Motivation and Context

#54 (comment)

How Has This Been Tested?

tsc error-stack-parser.d.ts

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • node_modules/.bin/jscs -c .jscsrc error-stack-parser.js passes without errors
  • npm test passes without errors
  • I have read the contribution guidelines
    • (FYI, this is a broken link when you actually open a PR.)
  • I have updated the documentation accordingly
  • I have added tests to cover my changes

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
andersk referenced this pull request Feb 12, 2022
The slight incompatibility of the old definition was necessitating
unsafe casts between ErrorStackParser.StackFrame and StackFrame.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@eriwen eriwen self-assigned this Jun 5, 2022
@eriwen eriwen merged commit 1f7562c into stacktracejs:master Jun 5, 2022
@eriwen
Copy link
Member

eriwen commented Jun 5, 2022

Thanks for the PR @andersk!

I'd like to prevent these kinds of regressions using automated checks. Do you have any recommendations (GitHub actions or npm scripts) to do this?

Copy link

@RenateM RenateM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit seems to be causing our builds to fail with the following error:
ERROR in node_modules/error-stack-parser/error-stack-parser.d.ts:9:5 - error TS1128: Declaration or statement expected.
9 export type {StackFrame};
~~~~~~
node_modules/error-stack-parser/error-stack-parser.d.ts:9:17 - error TS1005: ';' expected.
9 export type {StackFrame};
~

@andersk andersk deleted the re-export-StackFrame branch June 8, 2022 00:14
@andersk
Copy link
Contributor Author

andersk commented Jun 8, 2022

@RenateM It sounds like you have a very old version of TypeScript. Make sure you’ve upgraded to at least 3.8 (latest: 4.7.3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants