FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lib: fix module print timing when specifier includes `"` by aduh95 · Pull Request #55150 · nodejs/node · GitHub

/ node Public

lib: fix module print timing when specifier includes " - #55150

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
aduh95:quote-print-timing
Oct 8, 2024
Merged

lib: fix module print timing when specifier includes "#55150
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
aduh95:quote-print-timing

Conversation

aduh95 commented Sep 28, 2024

Copy link
Copy Markdown
Contributor

Currently, we generate invalid JSON if the specifier contains ", this can be addressed by escaping all double quotes like this PR is doing.

nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Sep 28, 2024

codecov Bot commented Sep 28, 2024
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.18%. Comparing base (f5d454a) to head (bda9e62).
Report is 917 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55150      +/-   ##
==========================================
- Coverage   88.23%   88.18%   -0.05%     
==========================================
  Files         651      649       -2     
  Lines      183902   183327     -575     
  Branches    35855    35686     -169     
==========================================
- Hits       162269   161672     -597     
- Misses      14926    15024      +98     
+ Partials     6707     6631      -76     
Files with missing lines Coverage Δ
lib/internal/util/debuglog.js 95.20% <100.00%> (ø)

... and 56 files with indirect coverage changes

H4ad commented Sep 28, 2024

Copy link
Copy Markdown
Member

From what I remember, almost all places that use/expose trace labels are susceptible to this issue, I don't remember exactly the places but I think could be something worthy to take a double look.

Fixing this implementation also fixes the console.time implementation, so if you want to include a test there too, could be useful.

aduh95 commented Sep 28, 2024

Copy link
Copy Markdown
Contributor Author

Fixing this implementation also fixes the console.time implementation, so if you want to include a test there too, could be useful.

Do you have an example? Naive testing (node -e 'console.time(`test"`);console.timeEnd(`test"`)') doesn't show the issue.

aduh95 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 29, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 29, 2024

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

H4ad commented Sep 30, 2024
edited by aduh95
Loading

Copy link
Copy Markdown
Member

@aduh95 node --trace-event-categories -e 'console.time(`test"`);console.timeEnd(`test"`)'

The generated logs are in json, and the json file is broken.

Edit2: I'm okay with adding tests in another PR (since the CI of this PR is already green)

aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 8, 2024
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 8, 2024
nodejs-github-bot merged commit 78f421d into nodejs:main Oct 8, 2024

Copy link
Copy Markdown
Collaborator

Landed in 78f421d

aduh95 deleted the quote-print-timing branch October 8, 2024 17:19
aduh95 added a commit that referenced this pull request Oct 9, 2024
PR-URL: #55150
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
aduh95 mentioned this pull request Oct 9, 2024
joyeecheung pushed a commit to joyeecheung/node that referenced this pull request Feb 6, 2025
PR-URL: nodejs#55150
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>

Copy link
Copy Markdown
Member

Tentatively backport in #56927 to reduce conflicts. Though this is not very essential and might get dropped.

Copy link
Copy Markdown
Member

Backing it out from #56927 to avoid introducing surface for regressions.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL