Skip to content
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

fs: deprecate never throw behaviour in fs.existsSync #55753

Merged
merged 11 commits into from
Jan 10, 2025

Conversation

Ceres6
Copy link
Contributor

@Ceres6 Ceres6 commented Nov 6, 2024

This PR attempts to deprecate the behaviour of returning false on argument validation in fs.existsSync

cc @joyeecheung @BridgeAR

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Nov 6, 2024
lib/fs.js Outdated Show resolved Hide resolved
@Ceres6 Ceres6 force-pushed the chore/deprecate-fs-existSync-never-throw branch from ac72356 to c3d38fb Compare November 6, 2024 17:02
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.16%. Comparing base (19c8cc1) to head (6f5fda9).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55753      +/-   ##
==========================================
- Coverage   89.16%   89.16%   -0.01%     
==========================================
  Files         662      662              
  Lines      191745   191746       +1     
  Branches    36902    36897       -5     
==========================================
- Hits       170971   170967       -4     
- Misses      13627    13639      +12     
+ Partials     7147     7140       -7     
Files with missing lines Coverage Δ
lib/fs.js 98.30% <100.00%> (+<0.01%) ⬆️

... and 35 files with indirect coverage changes

@aduh95 aduh95 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Nov 14, 2024
doc/api/deprecations.md Outdated Show resolved Hide resolved
doc/api/deprecations.md Outdated Show resolved Hide resolved
@aduh95
Copy link
Contributor

aduh95 commented Nov 25, 2024

This needs a rebase now that #55892 landed

@Ceres6 Ceres6 force-pushed the chore/deprecate-fs-existSync-never-throw branch 2 times, most recently from 26a540d to 4963d03 Compare November 26, 2024 07:41
@Ceres6
Copy link
Contributor Author

Ceres6 commented Nov 26, 2024

@aduh95 rebased

lib/fs.js Outdated Show resolved Hide resolved
@LiviaMedeiros LiviaMedeiros added the needs-citgm PRs that need a CITGM CI run. label Nov 26, 2024
@Ceres6
Copy link
Contributor Author

Ceres6 commented Dec 29, 2024

Can we move this forward? @right @aduh95

@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 5, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 5, 2025
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jan 5, 2025

@nodejs-github-bot
Copy link
Collaborator

@Ceres6 Ceres6 force-pushed the chore/deprecate-fs-existSync-never-throw branch from 56c1b7c to 0484b00 Compare January 6, 2025 09:51
@Ceres6
Copy link
Contributor Author

Ceres6 commented Jan 6, 2025

I think it CI was failing due to missing rebase, can we try again? @LiviaMedeiros

@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2025
@LiviaMedeiros LiviaMedeiros removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2025
Co-authored-by: Livia Medeiros <livia@cirno.name>
@nodejs-github-bot

This comment was marked as outdated.

@Ceres6
Copy link
Contributor Author

Ceres6 commented Jan 7, 2025

@LiviaMedeiros the failed test is reported as flaky can we retry?

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jan 7, 2025

@jasnell
Copy link
Member

jasnell commented Jan 7, 2025

@nodejs/tsc ... needs another tsc review

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jasnell jasnell added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. needs-citgm PRs that need a CITGM CI run. labels Jan 7, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jan 7, 2025
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/55753
✔  Done loading data for nodejs/node/pull/55753
----------------------------------- PR info ------------------------------------
Title      fs: deprecate never throw behaviour in fs.existsSync (#55753)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     Ceres6:chore/deprecate-fs-existSync-never-throw -> nodejs:main
Labels     fs, semver-major, needs-ci
Commits    10
 - fs: deprecate never throw behaviour in fs.existsSync
 - fixup! fs: deprecate never throw behaviour in fs.existsSync
 - fixup! fixup! fs: deprecate never throw behaviour in fs.existsSync
 - fs: deprecate never throw behaviour in fs.existsSync
 - fixup! fs: deprecate never throw behaviour in fs.existsSync
 - fixup! fs: deprecate never throw behaviour in fs.existsSync
 - Apply suggestions from code review
 - fixup! fs: deprecate never throw behaviour in fs.existsSync
 - fixup! fs: deprecate never throw behaviour in fs.existsSync
 - Update doc/api/deprecations.md
Committers 2
 - Carlos Espa <carlos.espa@nearform.com>
 - GitHub <noreply@github.com>
PR-URL: https://github.com/nodejs/node/pull/55753
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/55753
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 06 Nov 2024 16:46:50 GMT
   ✔  Approvals: 2
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/55753#pullrequestreview-2534858567
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/55753#pullrequestreview-2534898346
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-01-07T13:48:39Z: https://ci.nodejs.org/job/node-test-pull-request/64383/
   ℹ  Last CITGM CI on 2025-01-05T10:54:25Z: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/3532/
- Querying data for job/node-test-pull-request/64383/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 55753
From https://github.com/nodejs/node
 * branch                  refs/pull/55753/merge -> FETCH_HEAD
✔  Fetched commits as 7c3aa9fe8573..f70e0a2fe7e8
--------------------------------------------------------------------------------
[main 90e2c9c41c] fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Wed Nov 6 17:42:58 2024 +0100
 2 files changed, 6 insertions(+), 2 deletions(-)
[main e89d1c4fbe] fixup! fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Wed Nov 6 18:03:03 2024 +0100
 1 file changed, 1 insertion(+), 1 deletion(-)
[main 3efc9c4766] fixup! fixup! fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Wed Nov 6 18:22:17 2024 +0100
 1 file changed, 2 insertions(+), 2 deletions(-)
[main 2cb80e6d36] fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Wed Nov 6 17:42:58 2024 +0100
 1 file changed, 1 insertion(+)
[main 36c77fd720] fixup! fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Tue Nov 26 08:33:17 2024 +0100
 1 file changed, 1 insertion(+), 1 deletion(-)
[main e3013dda5a] fixup! fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Tue Nov 26 09:06:10 2024 +0100
 1 file changed, 2 deletions(-)
[main e162aa91f4] Apply suggestions from code review
 Author: Carlos Espa <43477095+Ceres6@users.noreply.github.com>
 Date: Wed Nov 27 08:27:05 2024 +0100
 2 files changed, 7 insertions(+), 1 deletion(-)
[main 3856bec8b2] fixup! fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Wed Nov 27 19:17:06 2024 +0100
 2 files changed, 8 insertions(+), 8 deletions(-)
[main 8b8a847d87] fixup! fs: deprecate never throw behaviour in fs.existsSync
 Author: Carlos Espa <carlos.espa@nearform.com>
 Date: Mon Jan 6 10:54:12 2025 +0100
 1 file changed, 3 deletions(-)
[main e58dfc9282] Update doc/api/deprecations.md
 Author: Carlos Espa <43477095+Ceres6@users.noreply.github.com>
 Date: Mon Jan 6 11:21:39 2025 +0100
 1 file changed, 3 insertions(+), 3 deletions(-)
   ✔  Patches applied
There are 10 commits in the PR. Attempting autorebase.
Rebasing (2/14)
Rebasing (3/14)
Rebasing (4/14)
Rebasing (5/14)
Rebasing (6/14)
Auto-merging lib/fs.js
CONFLICT (content): Merge conflict in lib/fs.js
error: could not apply 3856bec8b2... fixup! fs: deprecate never throw behaviour in fs.existsSync
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Could not apply 3856bec8b2... fixup! fs: deprecate never throw behaviour in fs.existsSync
Couldn't rebase 10 commits in the PR automatically
Please run the following commands to complete landing

$ git rebase origin/main --no-keep-empty -i -x "git node land --amend" --autosquash
$ git node land --continue

https://github.com/nodejs/node/actions/runs/12655730765

@jasnell jasnell added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jan 7, 2025
@aduh95 aduh95 merged commit 529b56e into nodejs:main Jan 10, 2025
22 checks passed
@aduh95
Copy link
Contributor

aduh95 commented Jan 10, 2025

Landed in 529b56e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants