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 — fix: fixed parsing for node by Aleksey28 · Pull Request #66 · stacktracejs/error-stack-parser

Conversation

@Aleksey28

@Aleksey28 Aleksey28 commented Oct 7, 2021

Copy link
Copy Markdown
Contributor

Description

  1. added pre-replace unnecessary part of the line instead of slicing it after splitting
  2. fixed removing last round bracket during throwing out eval information
  3. removed regexp group ':(\d+):(\d+)' because we should get any location in brackets
  4. removed splitting 'sanitizedLine' and reorganized using 'sanitizedLine' and 'location'
  5. added a new option for node error test when the function name isn't there

Motivation and Context

I have a problem with the Node.js product. In some ways error looks like this:

Error
    at /var/app/scratch/my project/index.js:2:9
    at Object.<anonymous> (/var/app/scratch/my project/index.js:2:9)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11

First-line doesn't have a function name and round brackets and it loses full file name after splitting.

How Has This Been Tested?

Added new option for test 'should handle spaces in Node.js stacks'

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
Aleksey28 added 5 commits October 7, 2021 12:27
@Aleksey28
refactor: added pre-replace instead of splitting
523951b
@Aleksey28
fix: fixed removing last round bracket
df5d38f
@Aleksey28
fix: removed regexp group ':(\d+):(\d+)' because we should get any lo…
280acd5
…cation in brackets
@Aleksey28
fix: removed splitting 'sanitizedLine' and reorganized using 'sanitiz…
d74fe21
…edLine' and 'location'
@Aleksey28
test:added new key for node error when function name isn't there
2bd8aa1
@niftylettuce

niftylettuce commented Jan 17, 2022

Copy link
Copy Markdown
Contributor

@Aleksey28 I wanted to follow up - I haven't had a chance to closely review this - but I would love to merge. Is this ready to go? I see you haven't checked off two checkboxes in the checklist above (docs and running that script without errors).

All reactions

Sorry, something went wrong.

Uh oh!

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

@niftylettuce
niftylettuce requested review from a team, bengourley, eriwen, oliversalzburg and victor-homyakov and removed request for bengourley January 17, 2022 23:41
niftylettuce
niftylettuce requested changes Jan 17, 2022
View reviewed changes

@niftylettuce niftylettuce left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

See my comment (you didn't check off two checkboxes yet in the GH issue template).

Sorry, something went wrong.

Uh oh!

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

All reactions
@Aleksey28

Aleksey28 commented Feb 2, 2022

Copy link
Copy Markdown
Contributor Author

@niftylettuce Yes, it's ready to go. I haven't checked because they're unnecessary and they just were in the template of the PR. I think it outdated checkboxes

  • node_modules/.bin/jscs -c .jscsrc error-stack-parser.js passes without errors - I think it's outdated checkbox. The project now has ESLint instead of this package and also the project doesn't have this package in dependencies
  • I have updated the documentation accordingly - my bugfix doesn't need any documentation updates
All reactions

Sorry, something went wrong.

Uh oh!

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

@niftylettuce
niftylettuce merged commit 1c9261a into stacktracejs:master Feb 2, 2022
@niftylettuce

niftylettuce commented Feb 2, 2022

Copy link
Copy Markdown
Contributor

Ping @eriwen for npm owner access so I can publish v2.0.7 via np

All reactions

Sorry, something went wrong.

Uh oh!

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

@niftylettuce

niftylettuce commented Feb 11, 2022

Copy link
Copy Markdown
Contributor

v2.0.7 published, thanks again @eriwen 🙏 cc @Aleksey28

https://github.com/stacktracejs/error-stack-parser/releases/tag/v2.0.7

Aleksey28 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@GrahamCampbell GrahamCampbell mentioned this pull request Oct 5, 2026
@bugsnag/browser 9.0.0 keeps "async " in the file of anonymous async stack frames bugsnag/bugsnag-js#2830
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@niftylettuce niftylettuce niftylettuce requested changes
@eriwen eriwen Awaiting requested review from eriwen
@bengourley bengourley Awaiting requested review from bengourley
@oliversalzburg oliversalzburg Awaiting requested review from oliversalzburg
@victor-homyakov victor-homyakov Awaiting requested review from victor-homyakov

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

@Aleksey28 @niftylettuce
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.