-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
fs: unexpose internal constants #58327
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
Conversation
Review requested:
|
`EXTENSIONLESS_FORMAT_JAVASCRIPT` and `EXTENSIONLESS_FORMAT_WASM` are only used internally through binding `getFormatOfExtensionlessFile`. They should not be exposed publicly.
2d1466f
to
e228d6f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58327 +/- ##
==========================================
- Coverage 90.23% 90.23% -0.01%
==========================================
Files 633 633
Lines 186818 186827 +9
Branches 36668 36668
==========================================
+ Hits 168578 168584 +6
+ Misses 11036 11035 -1
- Partials 7204 7208 +4
🚀 New features to boost your workflow:
|
Failed to start CI⚠ Commits were pushed since the last approving review: ⚠ - fs: unexpose internal constants ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/15045856908 |
is this a breaking change, then? |
I think breaking an undocumented feature is not considered a semver-major change as long as it doesn't affect the ecosystem. We can decide to not land it on LTS just to be sure – another approach that would limit the number of conflicts would be to land a first iteration moving them to that new |
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.
lgtm
These two undocumented constants are not used in any public APIs. Their values are just 0 and 1. I don't think the two constants can be used in any meaningful way. |
Landed in a436f7b |
EXTENSIONLESS_FORMAT_JAVASCRIPT
andEXTENSIONLESS_FORMAT_WASM
areonly used internally through binding
getFormatOfExtensionlessFile
.They should not be exposed publicly.
Add a test to cover public
fs.constants
to avoid unexpected keys.