Skip to content

Improve async type classification and output labels#89

Open
chrismwendt wants to merge 2 commits intomafintosh:masterfrom
chrismwendt:source-maps
Open

Improve async type classification and output labels#89
chrismwendt wants to merge 2 commits intomafintosh:masterfrom
chrismwendt:source-maps

Conversation

@chrismwendt
Copy link
Copy Markdown

@chrismwendt chrismwendt commented Mar 8, 2026

Prints more readable labels for the async resources like "Filesystem request" instead of "FSREQCALLBACK".

Depends on #88

@jonkoops does this look good to you?

RReverser and others added 2 commits July 24, 2025 20:31
Use the new getCallSites API, which is both a bit simpler to use than V8 one, but also integrates correctly with Node.js source maps support.

For a demo, I renamed example.js to example.ts) and used [tsx](https://github.com/privatenumber/tsx) to run it.

Before:

```
> npx tsx --enable-source-maps example.ts
There are 4 handle(s) keeping the process running.

# Timeout
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import

# TCPSERVERWRAP
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import

# Timeout
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import

# TCPSERVERWRAP
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import
example.ts:1 - import whyIsNodeRunning from 'why-is-node-running' // should be your first import
```

After:

```
> npx tsx --enable-source-maps example.ts
There are 4 handle(s) keeping the process running.

# Timeout
example.ts:6  - setInterval(() => {}, 1000)
example.ts:10 - startServer()

# TCPSERVERWRAP
example.ts:7  - server.listen(0)
example.ts:10 - startServer()

# Timeout
example.ts:6  - setInterval(() => {}, 1000)
example.ts:11 - startServer()

# TCPSERVERWRAP
example.ts:7  - server.listen(0)
example.ts:11 - startServer()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants