GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update types to reflect issue#45 by alessioprestileo · Pull Request #74 · stacktracejs/error-stack-parser

Conversation

@alessioprestileo

@alessioprestileo alessioprestileo commented May 6, 2022

Copy link
Copy Markdown
Contributor

The parse function should not be imported by itself. Types were updated accordingly.

Description

The parse function should not be imported by itself, as explained in issue#45. The issue arises because the types allow the parse function to be imported by itself, as a named export.
I changed the types so that the only possible import is the default export, like
import ErrorStackParser from 'error-stack-parser';
and the parse function can only be used like
ErrorStackParser.parse(error)

Motivation and Context

This PR updates the types so that Issue #45 cannot occur, because the parse function cannot be imported by itself.

How Has This Been Tested?

I tested the new types in a repo where I use error-stack-parser.

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
  • I have updated the documentation accordingly
  • I have added tests to cover my changes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@alessioprestileo
Update types to reflect issue#45
3622f54
The parse function should not be imported by itself. Types were updated accordingly.
@alessioprestileo

alessioprestileo commented May 11, 2022

Copy link
Copy Markdown
Contributor Author

@eriwen
Hello, do you have any feedback on this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eriwen
Merge branch 'master' into master
51fac41
@eriwen
eriwen merged commit 97b30d1 into stacktracejs:master Jun 5, 2022
@eriwen eriwen mentioned this pull request Jun 5, 2022
Parsing a stack trace in Node.js throws an exception #45
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@alessioprestileo @eriwen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.