summaryrefslogtreecommitdiff
path: root/doc/api
Commit message (Collapse)AuthorAgeFilesLines
* doc: update process.versions propertiesSaba Kharanauli2023-05-171-15/+24
| | | | | | | | | Fixes: https://github.com/nodejs/node/issues/48016 PR-URL: https://github.com/nodejs/node/pull/48019 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* 2023-05-16, Version 20.2.0 (Current)Michaël Zasso2023-05-162-3/+3
| | | | | | | | | | | | | | | | | Notable changes: doc: * add ovflowd to collaborators (Claudio Wunder) https://github.com/nodejs/node/pull/47844 http: * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) https://github.com/nodejs/node/pull/47732 sea: * (SEMVER-MINOR) add option to disable the experimental SEA warning (Darshan Sen) https://github.com/nodejs/node/pull/47588 test_runner: * (SEMVER-MINOR) add `skip`, `todo`, and `only` shorthands to `test` (Chemi Atlow) https://github.com/nodejs/node/pull/47909 url: * (SEMVER-MINOR) add value argument to `URLSearchParams` `has` and `delete` methods (Sankalp Shubham) https://github.com/nodejs/node/pull/47885 PR-URL: https://github.com/nodejs/node/pull/48020
* doc: clarify CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTEDTobias Nießen2023-05-161-2/+3
| | | | | | | | | | | | The error is not necessarily due to a client certificate engine. For example, the `privateKeyEngine` option might just as well cause this error and is independent of the client certificate. Also mention that this is likely due to a compile-time option of OpenSSL itself and not due to any particular engine. PR-URL: https://github.com/nodejs/node/pull/47976 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* doc: add heading for permission model limitationsTobias Nießen2023-05-151-0/+2
| | | | | | | | | | These limitations are not specific to the file system, so they should not be listed in the "File System Permissions" section. PR-URL: https://github.com/nodejs/node/pull/47989 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* test_runner: use v8.serialize instead of TAPMoshe Atlow2023-05-151-1/+2
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47867 Fixes: https://github.com/nodejs/node/issues/44656 Fixes: https://github.com/nodejs/node/issues/47955 Fixes: https://github.com/nodejs/node/issues/47481 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* test_runner: add shorthands to `test`Chemi Atlow2023-05-151-0/+18
| | | | | PR-URL: https://github.com/nodejs/node/pull/47909 Fixes: https://github.com/nodejs/node/issues/47897 Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
* doc: add missing deprecated blocks to clusterTobias Nießen2023-05-141-0/+4
| | | | | | | | | I believe that these are required so that the respective APIs are marked as deprecated in the table of contents. PR-URL: https://github.com/nodejs/node/pull/47981 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
* url: add value argument to has and delete methodsSankalp Shubham2023-05-141-4/+30
| | | | | | | | | | | | | | | The change aims to add value argument to two methods of URLSearchParams class i.e the has method and the delete method. For has method, if value argument is provided, then use it to check for presence. For delete method, if value argument provided, use it to delete. Fixes: https://github.com/nodejs/node/issues/47883 PR-URL: https://github.com/nodejs/node/pull/47885 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
* doc: update description of globalTobias Nießen2023-05-131-4/+8
| | | | | | | | With widespread support for ES modules, the description of global is outdated now. PR-URL: https://github.com/nodejs/node/pull/47969 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: update measure memory rejection informationYash Ladha2023-05-131-1/+2
| | | | | | | | | | If in case context is unable to allocate a promise then `ERR_CONTEXT_NOT_INITIALIZED` error will be thrown (as promise rejection) in the vm measureMemory call. PR-URL: https://github.com/nodejs/node/pull/41639 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
* http: prevent writing to the body when not allowed by HTTP specGerrard Lindsay2023-05-132-3/+9
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47732 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* doc: fix broken link to TC39 import attributes proposalRich Trott2023-05-131-1/+1
| | | | | | | | | | | | The import assertion proposal has been renamed and the old URL does not redirect to the new one. So let's update our URL to point to the import attributes proposal, which is what import assertions have been renamed to. PR-URL: https://github.com/nodejs/node/pull/47954 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* doc: fix broken linkRich Trott2023-05-121-1/+1
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47953 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: remove broken linkRich Trott2023-05-111-3/+2
| | | | | | | | Closes: https://github.com/nodejs/node/issues/47940 PR-URL: https://github.com/nodejs/node/pull/47942 Fixes: https://github.com/nodejs/node/issues/47940 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: mark global object as legacyMert Can Altın2023-05-091-0/+3
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47819 Fixes: https://github.com/nodejs/node/issues/47784 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* doc: ntfs junction points must link to directoriesBen Noordhuis2023-05-091-2/+4
| | | | | | | | | Fixes: https://github.com/nodejs/node/issues/40184 PR-URL: https://github.com/nodejs/node/pull/47907 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: improve `permission.has` descriptionDaeyeon Jeong2023-05-072-2/+4
| | | | | | | | | This fixes the function description and adds missing available scopes. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47875 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: fix params namesDmitry Semigradsky2023-05-062-6/+6
| | | | | PR-URL: https://github.com/nodejs/node/pull/47853 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Harshitha K P <harshitha014@gmail.com>
* doc: add stability experimental to pmRafael Gonzaga2023-05-061-0/+2
| | | | | PR-URL: https://github.com/nodejs/node/pull/47890 Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
* node-api: get Node API version used by addonVladimir Morozov2023-05-051-23/+38
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/45715 Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
* src: throw DataCloneError on transfering untransferable objectsChengzhong Wu2023-05-051-4/+40
| | | | | | | | | | | | The HTML StructuredSerializeWithTransfer algorithm defines that when an untransferable object is in the transfer list, a DataCloneError is thrown. An array buffer that is already transferred is also considered as untransferable. PR-URL: https://github.com/nodejs/node/pull/47604 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* sea: add option to disable the experimental SEA warningDarshan Sen2023-05-041-1/+2
| | | | | | | | | | Refs: https://github.com/nodejs/single-executable/discussions/60 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47588 Fixes: https://github.com/nodejs/node/issues/47741 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* 2023-05-03, Version 20.1.0 (Current)Michaël Zasso2023-05-039-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable changes: assert: * deprecate `CallTracker` (Moshe Atlow) https://github.com/nodejs/node/pull/47740 crypto: * update root certificates to NSS 3.89 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/47659 dns: * (SEMVER-MINOR) expose `getDefaultResultOrder` (btea) https://github.com/nodejs/node/pull/46973 doc: * add KhafraDev to collaborators (Matthew Aitken) https://github.com/nodejs/node/pull/47510 fs: * (SEMVER-MINOR) add `recursive` option to `readdir` and `opendir` (Ethan Arrowood) https://github.com/nodejs/node/pull/41439 * (SEMVER-MINOR) add support for `mode` flag to specify the copy behavior of the `cp` methods (Tetsuharu Ohzeki) https://github.com/nodejs/node/pull/47084 http: * (SEMVER-MINOR) add `highWaterMark` option `http.createServer` (HinataKah0) https://github.com/nodejs/node/pull/47405 stream: * (SEMVER-MINOR) preserve object mode in `compose` (Raz Luvaton) https://github.com/nodejs/node/pull/47413 test_runner: * (SEMVER-MINOR) add `testNamePatterns` to `run` API (Chemi Atlow) https://github.com/nodejs/node/pull/47628 * (SEMVER-MINOR) execute `before` hook on test (Chemi Atlow) https://github.com/nodejs/node/pull/47586 * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) https://github.com/nodejs/node/pull/47686 wasi: * (SEMVER-MINOR) make `returnOnExit` true by default (Michael Dawson) https://github.com/nodejs/node/pull/47390 PR-URL: https://github.com/nodejs/node/pull/47820
* doc,test: update the v8.startupSnapshot doc and test the exampleJoyee Cheung2023-05-031-32/+53
| | | | | | | | The API is now available to user-land run-time snapshots. So update the example. This also makes the intention of the examples a bit clearer and test it in our test suite. PR-URL: https://github.com/nodejs/node/pull/47468 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
* http: remove internal error in assignSocketMatteo Collina2023-05-021-0/+7
| | | | | | | | | | | Change ServerResponse.assignSocket to not throw an internal error, but an error with its own code. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/47723 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* doc: fix --allow-* CLI flag referencesTobias Nießen2023-05-011-3/+7
| | | | | | PR-URL: https://github.com/nodejs/node/pull/47804 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
* doc: clarify fs permissions only affect fs moduleTobias Nießen2023-05-011-2/+2
| | | | | | | | | | | As far as I can tell, the permission model implementation currently does not restrict all file system operations but only those through the fs module. WASI, for example, bypasses the permission model entirely. PR-URL: https://github.com/nodejs/node/pull/47782 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
* doc: add copy node executable guide on windowsXLor2023-05-011-4/+40
| | | | | | PR-URL: https://github.com/nodejs/node/pull/47781 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
* assert: deprecate callTrackerMoshe Atlow2023-04-292-2/+27
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47740 Fixes: https://github.com/nodejs/node/issues/47492 Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: fix typo in webstreams.mdChristian Takle2023-04-281-1/+1
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47766 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* doc,test: fix concurrency option of test()Tobias Nießen2023-04-281-3/+2
| | | | | | | | | | | | | | | | | | | The documentation appears to still be wrong w.r.t. the meaning of the concurrency option of the test() function. The implementation appears to default to Infinity when the option is set to true. Is that intended or a good idea? I don't know. It certainly makes more sense than what the documentation says (which is basing the number of concurrent tasks within a single thread on the number of CPU cores). This changes the documentation to hopefully match the implementation and adds a test that rules out the (rather arbitrary) behavior described in the documentation. Refs: https://github.com/nodejs/node/issues/47365 Refs: https://github.com/nodejs/node/pull/47642 PR-URL: https://github.com/nodejs/node/pull/47734 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* test_runner: support combining coverage reportscjihrig2023-04-282-4/+4
| | | | | | | | | | This commit adds support for combining code coverage reports in the test runner. This allows coverage to be collected for child processes, and by extension, the test runner CLI. PR-URL: https://github.com/nodejs/node/pull/47686 Fixes: https://github.com/nodejs/node/issues/47669 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* doc: mark signing the binary is macOS and Windows only in SEAXuguang Mei2023-04-281-2/+2
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47722 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Qingyu Deng <i@ayase-lab.com>
* doc: fix a typo in `permissions.md`Daeyeon Jeong2023-04-261-1/+1
| | | | | | | | Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47730 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* dns: expose getDefaultResultOrderbtea2023-04-261-0/+20
| | | | | | PR-URL: https://github.com/nodejs/node/pull/46973 Fixes: https://github.com/nodejs/node/issues/46919 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
* tls: accept SecureContext object in server.addContext()HinataKah02023-04-261-3/+4
| | | | | | | | | | | Do not call tls.createSecureContext() if the context provided is already an instance of tls.SecureContext. Fixes: https://github.com/nodejs/node/issues/47408 PR-URL: https://github.com/nodejs/node/pull/47570 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: async_hooks asynchronous content example add mjs codebtea2023-04-261-1/+42
| | | | PR-URL: https://github.com/nodejs/node/pull/47401 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: clarify concurrency model of test runnerTobias Nießen2023-04-241-3/+9
| | | | | | | | | Refs: https://github.com/nodejs/node/issues/47365 PR-URL: https://github.com/nodejs/node/pull/47642 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: fix a typo in `fs.openAsBlob`Daeyeon Jeong2023-04-241-4/+3
| | | | | | | Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47693 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* http: add highWaterMark opt in http.createServerHinataKah02023-04-242-0/+15
| | | | | | | | | | | Add highWaterMark option when creating a new HTTP server. This option will override the default (readable|writable) highWaterMark values on sockets created. Fixes: https://github.com/nodejs/node/issues/46606 PR-URL: https://github.com/nodejs/node/pull/47405 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
* doc: fix typosMohammed Keyvanzadeh2023-04-238-12/+12
| | | | | | PR-URL: https://github.com/nodejs/node/pull/47685 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
* test_runner: add testNamePatterns to run apiatlowChemi2023-04-231-0/+10
| | | | | | | | | Accept a `testNamePatterns` value in the `run` fn, and drill those patterns to the spawned processes. PR-URL: https://github.com/nodejs/node/pull/47648 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* doc,fs: update description of fs.stat() methodMert Can Altın2023-04-231-0/+3
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47654 Fixes: https://github.com/nodejs/node/issues/47633 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
* doc: update error code of bufferDeokjin Kim2023-04-211-4/+15
| | | | | | | | | According to use of `validateNumber`, error code is changed from ERR_INVALID_ARG_VALUE to ERR_OUT_OF_RANGE. Refs: https://github.com/nodejs/node/pull/45796 PR-URL: https://github.com/nodejs/node/pull/47617 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* fs: add recursive option to readdir and opendirEthan Arrowood2023-04-201-0/+35
| | | | | | | | | | | | | Adds a naive, linear recursive algorithm for the following methods: readdir, readdirSync, opendir, opendirSync, and the promise based equivalents. Fixes: https://github.com/nodejs/node/issues/34992 PR-URL: https://github.com/nodejs/node/pull/41439 Refs: https://github.com/nodejs/tooling/issues/130 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
* inspector: add tips for Sessiontheanarkh2023-04-201-0/+8
| | | | PR-URL: https://github.com/nodejs/node/pull/47195 Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
* doc: change offset of example in `Buffer.copyBytesFrom`Deokjin Kim2023-04-201-3/+3
| | | | | | | | | | | Actual output is different from expected output if offset is 0. Plus, removed unused importing `Buffer`. PR-URL: https://github.com/nodejs/node/pull/47606 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Harshitha K P <harshitha014@gmail.com>
* fs: add support for mode flag to specify the copy behaviorTetsuharu Ohzeki2023-04-201-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | `fs.copyFile()` supports copy-on-write operation if the underlying platform supports it by passing a mode flag. This behavior was added in https://github.com/nodejs/node/commit/a16d88d9e9a6581e463082549823189aba25ca76. This patch adds `mode` flag to `fs.cp()`, `fs.cpSync()`, and `fsPromises.cp()` to allow to change their behaviors to copy files. This test case is based on the test case that was introduced when we add `fs.constants.COPYFILE_FICLONE`. https://github.com/nodejs/node/commit/a16d88d9e9a6581e463082549823189aba25ca76. This test strategy is: - If the platform supports copy-on-write operation, check whether the destination is expected - Otherwise, the operation will fail and check whether the failure error information is expected. Fixes: https://github.com/nodejs/node/issues/47080 PR-URL: https://github.com/nodejs/node/pull/47084 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* doc: improve fs permissions descriptionTobias Nießen2023-04-192-6/+10
| | | | | | | Fix a small grammatical mistake and improve the surrounding wording. PR-URL: https://github.com/nodejs/node/pull/47596 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
* test_runner: execute before hook on testChemi Atlow2023-04-181-0/+24
| | | | | | | | | Execute the before hook for Test as well, and execute it on root before executing any tests. Fixes: https://github.com/nodejs/node/issues/47518 PR-URL: https://github.com/nodejs/node/pull/47586 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>