Skip to content

Conversation

@marco-ippolito
Copy link
Member

Fixes: #55109

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/typescript

@nodejs-github-bot nodejs-github-bot added module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Oct 29, 2024
@marco-ippolito marco-ippolito marked this pull request as ready for review October 30, 2024 10:54
@marco-ippolito marco-ippolito added the semver-minor PRs that contain new features and should be released in the next minor version. label Oct 30, 2024
@codecov
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.40%. Comparing base (68dc15e) to head (8a14517).
Report is 1332 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55589      +/-   ##
==========================================
- Coverage   88.40%   88.40%   -0.01%     
==========================================
  Files         654      654              
  Lines      187637   187640       +3     
  Branches    36098    36103       +5     
==========================================
- Hits       165887   165879       -8     
- Misses      14994    15002       +8     
- Partials     6756     6759       +3     
Files with missing lines Coverage Δ
lib/util.js 97.75% <100.00%> (+0.43%) ⬆️

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marco-ippolito marco-ippolito force-pushed the mapCallSite branch 5 times, most recently from 2bc03cf to fe8f181 Compare October 30, 2024 19:09
@marco-ippolito marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 31, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 31, 2024
@nodejs-github-bot

This comment was marked as outdated.

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

I agree that if we want to fix #55109 instead of adding a new function, we should just improve the support of the existing util.getCallSite(). What about accepting a config and then proceeding with module mapping inside node:util?

@marco-ippolito
Copy link
Member Author

marco-ippolito commented Oct 31, 2024

I agree that if we want to fix #55109 instead of adding a new function, we should just improve the support of the existing util.getCallSite(). What about accepting a config and then proceeding with module mapping inside node:util?

With a new function it is more flexibile because you can decide which frame to map, instead of mapping all of them, and you can also mock.
It doesn't exclude that we could also improve support in util.getCallSite by adding an option.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment has been minimized.

@legendecas
Copy link
Member

Not a big fan of the polymorphism that derived from the ambiguity of the name util.getCallSite which actually returns an array of call site object.

Submitted #55626 to not hijacking this thread.

@marco-ippolito marco-ippolito force-pushed the mapCallSite branch 2 times, most recently from 507688e to c1bc9e4 Compare November 2, 2024 11:23
@marco-ippolito marco-ippolito marked this pull request as draft November 2, 2024 11:36
@ruyadorno
Copy link
Member

This commit does not land cleanly on v22.x-staging and will need manual backport in case we want it in v22.x.

@ruyadorno ruyadorno added the backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. label Nov 27, 2024
@marco-ippolito marco-ippolito added the backport-open-v22.x Indicate that the PR has an open backport label Dec 10, 2024
@aduh95 aduh95 added backported-to-v22.x PRs backported to the v22.x-staging branch. and removed backport-open-v22.x Indicate that the PR has an open backport backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported-to-v22.x PRs backported to the v22.x-staging branch. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[22.9.0] util.getCallSite() doesn't report original line number for TS files

9 participants