-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: remove regex usage for env file parsing #52406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add multiple continues comments in valid.env
to ensure it works?
@climba03003 Could you provide me with an example and the expected result? |
// .valid.env
#COMMENTED_ENV=should not shown
#COMMENTED_ENV_FOLLOW_COMMENTED_ENV=should not shown
#COMMENTED_ENV_FOLLOW_COMMENTED_ENV_2=should not shown
// test
// Commented environment should be undefined
assert.strictEqual(process.env.COMMENTED_ENV, undefined);
assert.strictEqual(process.env.COMMENTED_ENV_FOLLOW_COMMENTED_ENV, undefined);
assert.strictEqual(process.env.COMMENTED_ENV_FOLLOW_COMMENTED_ENV_2, undefined); |
You should use the snake_case naming convention for local variables and parameters as stated here in the C++ style guide. |
9df5358
to
c42b6a0
Compare
c42b6a0
to
077f619
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes but overall I think this is ready to land. Thank you.
077f619
to
46783d0
Compare
46783d0
to
a723280
Compare
Flaky tests |
No. Some dotenv tests are broken on Windows. (Search for "not ok" in the output) |
c69d5c3
to
456a29b
Compare
456a29b
to
97fa6a0
Compare
Commit Queue failed- Loading data for nodejs/node/pull/52406 ✔ Done loading data for nodejs/node/pull/52406 ----------------------------------- PR info ------------------------------------ Title src: remove regex usage for env file parsing (#52406) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch IlyasShabi:dotenv-refacto -> nodejs:main Labels c++, author ready, needs-ci, commit-queue-squash Commits 2 - src: remove regex usage for env file parsing - src: handle empty value without newline at EOF Committers 1 - Ilyas Shabi PR-URL: https://github.com/nodejs/node/pull/52406 Fixes: https://github.com/nodejs/node/issues/52248 Reviewed-By: Yagiz Nizipli ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/52406 Fixes: https://github.com/nodejs/node/issues/52248 Reviewed-By: Yagiz Nizipli -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - src: handle empty value without newline at EOF ℹ This PR was created on Sun, 07 Apr 2024 15:34:18 GMT ✔ Approvals: 1 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/52406#pullrequestreview-1995581300 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-04-16T01:40:19Z: https://ci.nodejs.org/job/node-test-pull-request/58417/ - Querying data for job/node-test-pull-request/58417/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/8699372234 |
78c7bc4
to
e85159d
Compare
Landed in 3f88e14 |
@IlyasShabi thank you so much! do you plan to backport to 20.x too? |
@RafaelGSS I don't see this PR in the changelog for 22.0.0, was it somehow excluded for whatever reason? It doesn't seem to be fixed in current V22 either. |
cc @nodejs/releasers |
PR-URL: #52406 Fixes: #52248 Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: #52406 Fixes: #52248 Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: #52406 Fixes: #52248 Reviewed-By: Yagiz Nizipli <[email protected]>
This PR aims to remove regex usage for env file parsing, this will close: