node icon indicating copy to clipboard operation
node copied to clipboard

module: Add SourceMap.findOrigin

Open isaacs opened this issue 1 year ago • 9 comments

This adds the SourceMap.findOrigin(lineNumber, columnNumber) method, for finding the origin source file and 1-indexed line and column numbers corresponding to the 1-indexed line and column numbers from a call site in generated source code.

Fix: #47770

isaacs avatar Apr 30 '23 05:04 isaacs

Review requested:

  • [ ] @nodejs/loaders
  • [ ] @nodejs/modules

nodejs-github-bot avatar Apr 30 '23 05:04 nodejs-github-bot

Fixed the lint errors.

@VoltrexKeyva I followed the same pattern used throughout the file. (Eg, I didn't actually edit the annotations for findEntry except to add that it is 0-indexed line/column offset, rather than a 1-indexed line/column number.)

I agree that object is not particularly informative, but I'm not familiar with the format used, and since this is not making it worse, I don't think it should be a reason to block merging.

An effort to improve the type annotations throughout this API would certainly be worthwhile. If anyone can provide guidance as to what those annotations should look like, then I have no objection, of course.

isaacs avatar May 01 '23 04:05 isaacs

CI: https://ci.nodejs.org/job/node-test-pull-request/51568/

nodejs-github-bot avatar May 01 '23 22:05 nodejs-github-bot

Can someone with permission to view the Jenkins test results help out here? I can't view the output to see why they might be failing.

isaacs avatar Jun 15 '23 16:06 isaacs

Or even better, can someone grant me the Overall/Read permission?

isaacs avatar Jun 15 '23 16:06 isaacs

@isaacs FYI Access to the Jenkins CI has been restricted for preparing next week's security releases. It'll be opened up again after those releases are out.

In any case, if this is referring to the CI from 1 May those results have been expunged -- we only keep Jenkins results around for 20 days.

richardlau avatar Jun 15 '23 16:06 richardlau

Thanks for the update @richardlau

What's the best path forward here then? Wait until the sec releases are out and then push a change to trigger a re-run?

isaacs avatar Jun 15 '23 17:06 isaacs

Yes, wait until the security releases are out and CI opened up again. No need to push new changes, we can trigger a new CI run with a https://github.com/nodejs/node/labels/request-ci label.

richardlau avatar Jun 15 '23 17:06 richardlau

CI: https://ci.nodejs.org/job/node-test-pull-request/52342/

nodejs-github-bot avatar Jun 22 '23 13:06 nodejs-github-bot

Landed in e26ffe7358d3874f85714985bb2bffdbcf1a75df

nodejs-github-bot avatar Jun 23 '23 19:06 nodejs-github-bot