-
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
fs: undeprecate lchown() #21498
fs: undeprecate lchown() #21498
Conversation
doc/api/deprecations.md
Outdated
|
||
<a id="DEP0038"></a> | ||
### DEP0038: fs.lchownSync(path, uid, gid) | ||
|
||
Type: Documentation-only | ||
|
||
The [`fs.lchownSync(path, uid, gid)`][] API is deprecated. | ||
The [`fs.lchownSync(path, uid, gid)`][] API was previously deprecated. As of |
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.
Given it was never hard-deprecated or removed - I'm not sure it's not best to remove this entirely.
doc/api/fs.md
Outdated
@@ -1918,6 +1920,8 @@ changes: | |||
pr-url: https://github.com/nodejs/node/pull/7897 | |||
description: The `callback` parameter is no longer optional. Not passing | |||
it will emit a deprecation warning with id DEP0013. | |||
- version: v0.4.7 |
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.
I also think it makes sense to remove the deprecation entirely since there is no effect about this being deprecated in earlier versions and it was doc-deprecated anyway.
doc/api/fs.md
Outdated
pr-url: https://github.com/nodejs/node/pull/XXXXX-replace | ||
description: This API is no longer deprecated. | ||
- version: v10.0.0 | ||
description: This API is deprecated. |
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.
I don't see a point in keeping this deprecation regardless of the other one since fsPromises is experimental
const int argc = args.Length(); | ||
CHECK_GE(argc, 3); | ||
|
||
BufferValue path(env->isolate(), args[0]); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -0,0 +1,50 @@ | |||
'use strict'; | |||
|
|||
const common = require('../common'); |
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.
If there are other tests you think we should add to lchown
, let me know and we'll make good-first-issue
s out of them
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.
We're pretty light on chown()
, fchown()
, and lchown()
happy path tests in general. My guess is because of platform support and getting the uid
and gid
parts right on the CI.
Code of commit 5a08026 LGTM but would prefer it if someone with more libuv experience approves :) Nice work! |
11cd3f4
to
ea9d597
Compare
uv_fs_lchown() exists, as of libuv 1.21.0. fs.lchown() can now be undeprecated. This commit also adds tests, as there were none. PR-URL: nodejs#21498 Fixes: nodejs#19868 Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Updated as requested. CI: https://ci.nodejs.org/job/node-test-pull-request/15652/ |
@nodejs/tsc According the the git history, this is the first commit which removes deprecation numbers from the documentation. Is that intended? |
@ChALkeR As long as the deprecation number is never re-used, I'm personally OK with removing a deprecation number from the docs if it is unused in the corresponding Node.js version. (I'm also OK with leaving it in, with or without an indication that it is no longer used.) |
Notable changes: * build: * Node.js should now be about 60% faster to startup than the previous version, thanks to the use V8's code cache feature for core modules. [#21405](#21405) * dns: * An experimental promisified version of the dns module is now available. Give it a try with `require('dns').promises`. [#21264](#21264) * fs: * `fs.lchown` has been undeprecated now that libuv supports it. [#21498](#21498) * lib: * `Atomics.wake` is being renamed to `Atomics.notify` in the ECMAScript specification ([reference](tc39/ecma262#1220)). Since Node.js now has experimental support for worker threads, we are being proactive and added a `notify` alias, while emitting a warning if `wake` is used. [#21413](#21413) [#21518](#21518) * n-api: * Add API for asynchronous functions. [#17887](#17887) * util: * `util.inspect` is now able to return a result instead of throwing when the maximum call stack size is exceeded during inspection. [#20725](#20725) * vm: * Add `script.createCachedData()`. This API replaces the `produceCachedData` option of the `Script` constructor that is now deprecated. [#20300](#20300) * worker: * Support for relative paths has been added to the `Worker` constructor. Paths are interpreted relative to the current working directory. [#21407](#21407) PR-URL: #21629
Notable changes: * dns: * An experimental promisified version of the dns module is now available. Give it a try with `require('dns').promises`. [#21264](#21264) * fs: * `fs.lchown` has been undeprecated now that libuv supports it. [#21498](#21498) * lib: * `Atomics.wake` is being renamed to `Atomics.notify` in the ECMAScript specification ([reference](tc39/ecma262#1220)). Since Node.js now has experimental support for worker threads, we are being proactive and added a `notify` alias, while emitting a warning if `wake` is used. [#21413](#21413) [#21518](#21518) * n-api: * Add API for asynchronous functions. [#17887](#17887) * util: * `util.inspect` is now able to return a result instead of throwing when the maximum call stack size is exceeded during inspection. [#20725](#20725) * vm: * Add `script.createCachedData()`. This API replaces the `produceCachedData` option of the `Script` constructor that is now deprecated. [#20300](#20300) * worker: * Support for relative paths has been added to the `Worker` constructor. Paths are interpreted relative to the current working directory. [#21407](#21407) PR-URL: #21629
Notable changes: * dns: * An experimental promisified version of the dns module is now available. Give it a try with `require('dns').promises`. [#21264](#21264) * fs: * `fs.lchown` has been undeprecated now that libuv supports it. [#21498](#21498) * lib: * `Atomics.wake` is being renamed to `Atomics.notify` in the ECMAScript specification ([reference](tc39/ecma262#1220)). Since Node.js now has experimental support for worker threads, we are being proactive and added a `notify` alias, while emitting a warning if `wake` is used. [#21413](#21413) [#21518](#21518) * n-api: * Add API for asynchronous functions. [#17887](#17887) * util: * `util.inspect` is now able to return a result instead of throwing when the maximum call stack size is exceeded during inspection. [#20725](#20725) * vm: * Add `script.createCachedData()`. This API replaces the `produceCachedData` option of the `Script` constructor that is now deprecated. [#20300](#20300) * worker: * Support for relative paths has been added to the `Worker` constructor. Paths are interpreted relative to the current working directory. [#21407](#21407) PR-URL: #21629
uv_fs_lchown()
exists, as of libuv 1.21.0.fs.lchown()
can now be undeprecated. This commit also adds tests, as there were none. As withfs.chown()
andfs.fchown()
, the tests are somewhat limited.Fixes: #19868
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes