src: remove regex usage for env file parsing#52406
src: remove regex usage for env file parsing#52406nodejs-github-bot merged 2 commits intonodejs:mainfrom
Conversation
climba03003
left a comment
There was a problem hiding this comment.
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
anonrig
left a comment
There was a problem hiding this comment.
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 |
|
Is it possible that with this change inline comments are gone? |
This PR aims to remove regex usage for env file parsing, this will close: