fix: replace deprecated fs.F_OK with fs.constants.F_OK#1820
Merged
breautek merged 1 commit intoapache:masterfrom Jul 8, 2025
Merged
fix: replace deprecated fs.F_OK with fs.constants.F_OK#1820breautek merged 1 commit intoapache:masterfrom
breautek merged 1 commit intoapache:masterfrom
Conversation
This addresses the warning DEP0176 introduces in Node.js v20.8.0
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1820 +/- ##
=======================================
Coverage 72.24% 72.24%
=======================================
Files 23 23
Lines 1841 1841
=======================================
Hits 1330 1330
Misses 511 511 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dpogue
approved these changes
Jul 8, 2025
erisu
approved these changes
Jul 8, 2025
breautek
approved these changes
Jul 8, 2025
Contributor
breautek
left a comment
There was a problem hiding this comment.
fs.constants.F_OK is available since NodeJS 6, and we require a much later version of NodeJS anyway, so 👍 to moving off the old deprecated constant.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This change resolves the Node.js deprecation warning DEP0176:
The warning appears when building projects with recent versions of Node.js (v20.8.0+).
No open issue was found for this warning at the time of writing.
Description
Replaced usage of the deprecated
fs.F_OKwithfs.constants.F_OKincordova-android/lib/builders/ProjectBuilder.js.This change aligns with the Node.js recommendation since v6.3.0.
Testing
npm testChecklist
(platform)if this change only applies to one platform (e.g.(android))