node icon indicating copy to clipboard operation
node copied to clipboard

lib: don't match `sourceMappingURL` in strings

Open alan-agius4 opened this issue 2 years ago • 10 comments

Prior to this change sourceMappingURL in string where being matched by the RegExp which caused sourcemaps not be loaded when using the --enable-source-maps flag. This commit changes the RegExp to match the last occurrence.

Fixes: https://github.com/nodejs/node/issues/44654

alan-agius4 avatar Sep 15 '22 13:09 alan-agius4

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

nodejs-github-bot avatar Sep 15 '22 17:09 nodejs-github-bot

@alan-agius4 don't hesitate not to force push when pushing more updates, it creates a poor reviewer experience because GitHub is not able to show the diff since the last review, it's a bit frustrating to have to "start over" the review again and again. If instead, you push additional commits to the branch, that would be better for me (and all commits will be squashed into one upon landing anyway).

aduh95 avatar Sep 16 '22 08:09 aduh95

@alan-agius4 don't hesitate not to force push when pushing more updates, it creates a poor reviewer experience because GitHub is not able to show the diff since the last review, it's a bit frustrating to have to "start over" the review again and again. If instead, you push additional commits to the branch, that would be better for me (and all commits will be squashed into one upon landing anyway).

Oops sorry about that. I will keep this in mind for the next time.

alan-agius4 avatar Sep 16 '22 09:09 alan-agius4

This deserves some comments as I don't think it would be obvious to future reader why we use a loop.

Added comments.

alan-agius4 avatar Sep 16 '22 09:09 alan-agius4

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

nodejs-github-bot avatar Sep 18 '22 10:09 nodejs-github-bot

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

nodejs-github-bot avatar Sep 18 '22 16:09 nodejs-github-bot

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

nodejs-github-bot avatar Sep 19 '22 01:09 nodejs-github-bot

Anything needed from my end to make this green? As the failures seems unrelated to this change.

Should I rebase?

alan-agius4 avatar Sep 20 '22 19:09 alan-agius4

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

nodejs-github-bot avatar Sep 20 '22 21:09 nodejs-github-bot

Should I rebase?

Please don't, it wouldn't help in this case. CI failures seem indeed to be unrelated, I've resumed the CI, hopefully that'd be enough to turn it green.

aduh95 avatar Sep 20 '22 21:09 aduh95

Landed in e6018e28643d. Thank you for your contribution!

legendecas avatar Sep 25 '22 16:09 legendecas

This depends on https://github.com/nodejs/node/pull/43875; marking this as "backport-blocked-v16.x"

juanarbol avatar Oct 04 '22 00:10 juanarbol