GitShow/sindresorhus/clean-stack
sindresorhus

clean-stack

Clean up error stack traces

by sindresorhus
Star on GitHubForknpm

JavaScript

346 stars23 forks15 contributorsQuiet · 9mo agoSince 2016v6.0.0MIT

Meet the team

See all 15 on GitHub →
sindresorhus
sindresorhus42 contributions
silverwind
silverwind3 contributions
mastilver
mastilver2 contributions
broguinn
broguinn1 contribution
coreyfarrell
coreyfarrell1 contribution
BendingBender
BendingBender1 contribution
neezer
neezer1 contribution
Jblew
Jblew1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
colelawrence
Remove dependency on node:url for browser compatibilityClosedIssue

In 5.3.0, there was an added dependency on node:url in order to support prettying up file url errors, but in the latest version of vite, it's default browser externalizer for production doesn't support externalizing I'd love to see the helper being brought into the library. I have the following version that I'm using guided by the examples on the implementation site https://nodejs.org/api/url.html#urlfileurltopathurl-options See another related issue here: https://github.com/decaporg/decap-cms/issues/7616

colelawrence · 9mo ago
ehmicky
Make `clean-stack` idempotentMergedPR

is not always idempotent. This PR fixes it. The reason is: any stack line that looks like is filtered out but the option produces such lines, _providing_ the file is directly in the directory (not a subdirectory) So, when the option is used, applying a second time results in an empty stack trace. The problem here is: why remove stack lines that look like ? It seems like this originated from the following commit 9 years ago: https://github.com/sindresorhus/clean-stack/commit/571de7fe5cce8574df2e971ea30c01f64974cc2d If I'm not mistaken, it seems like the reason was to remove the stack lines that were added by Node.js when executing a shebang file. However, those lines are not produced since Node.js 10. Another potential reason might be to remove node internals which used to be like: . However, since Node 10, those are like: . Then since Node 16, the stack shows instead of . 's regular expression targets both the and the keywords, so there's no need for the above logic then, if that was the reason.

ehmicky · 9mo ago
fregante
`pretty` produces meaningless URLsClosedIssue

The first one is clickable in my IDE, the second one isn't. I think should also drop to be useful and not counter-productive. Related: #27

fregante · 11mo ago
Structured data for AI agents

Repository: sindresorhus/clean-stack. Description: Clean up error stack traces Stars: 346, Forks: 23. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v6.0.0 (9mo ago). Open PRs: 0, open issues: 0. Last activity: 9mo ago. Community health: 85%. Top contributors: sindresorhus, silverwind, mastilver, broguinn, coreyfarrell, BendingBender, neezer, Jblew, Levminer, mooyoul and others.

·@ofershap

Replace github.com with gitshow.dev