-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: add flush option to writeFile() functions #50009
Conversation
This commit adds a 'flush' option to the fs.writeFile family of functions. Refs: nodejs#49886
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
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
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. |
Landed in e01c1d7 |
Notable Changes: doc: * promote fetch/webstreams from experimental to stable (Steven) #45684 esm: * use import attributes instead of import assertions (Antoine du Hamel) #50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869 * remove `globalPreload` hook (superseded by `initialize`) (Jacob Smith) #49144 fs: * add flush option to writeFile() functions (Colin Ihrig) #50009 * (SEMVER-MAJOR) add globSync implementation (Moshe Atlow) #47653 http: * (SEMVER-MAJOR) reduce parts in chunked response when corking (Robert Nagy) #50167 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) #49830 * (SEMVER-MAJOR) add `navigator.hardwareConcurrency` (Yagiz Nizipli) #47769 stream: * optimize Writable (Robert Nagy) #50012 test_runner: * (SEMVER-MAJOR) support passing globs (Moshe Atlow) #47653 vm: * use default HDO when importModuleDynamically is not set (Joyee Cheung) #49950 Semver-Major Commits: * (SEMVER-MAJOR) build: drop support for Visual Studio 2019 (Michaël Zasso) #49051 * (SEMVER-MAJOR) build: bump supported macOS and Xcode versions (Michaël Zasso) #49164 * (SEMVER-MAJOR) crypto: do not overwrite \_writableState.defaultEncoding (Tobias Nießen) #49140 * (SEMVER-MAJOR) deps: bump minimum ICU version to 73 (Michaël Zasso) #49639 * (SEMVER-MAJOR) deps: update V8 to 11.8.172.13 (Michaël Zasso) #49639 * (SEMVER-MAJOR) deps: update llhttp to 9.1.2 (Paolo Insogna) #48981 * (SEMVER-MAJOR) events: validate options of `on` and `once` (Deokjin Kim) #46018 * (SEMVER-MAJOR) fs: adjust `position` validation in reading methods (Livia Medeiros) #42835 * (SEMVER-MAJOR) fs: add globSync implementation (Moshe Atlow) #47653 * (SEMVER-MAJOR) http: reduce parts in chunked response when corking (Robert Nagy) #50167 * (SEMVER-MAJOR) lib: mark URL/URLSearchParams as uncloneable and untransferable (Chengzhong Wu) #47497 * (SEMVER-MAJOR) lib: remove aix directory case for package reader (Yagiz Nizipli) #48605 * (SEMVER-MAJOR) lib: add `navigator.hardwareConcurrency` (Yagiz Nizipli) #47769 * (SEMVER-MAJOR) lib: runtime deprecate punycode (Yagiz Nizipli) #47202 * (SEMVER-MAJOR) module: harmonize error code between ESM and CJS (Antoine du Hamel) #48606 * (SEMVER-MAJOR) net: do not treat `server.maxConnections=0` as `Infinity` (ignoramous) #48276 * (SEMVER-MAJOR) net: only defer \_final call when connecting (Jason Zhang) #47385 * (SEMVER-MAJOR) node-api: rename internal NAPI\_VERSION definition (Chengzhong Wu) #48501 * (SEMVER-MAJOR) src: update NODE\_MODULE\_VERSION to 120 (Michaël Zasso) #49639 * (SEMVER-MAJOR) src: throw DOMException on cloning non-serializable objects (Chengzhong Wu) #47839 * (SEMVER-MAJOR) src: throw DataCloneError on transfering untransferable objects (Chengzhong Wu) #47604 * (SEMVER-MAJOR) stream: use private properties for strategies (Yagiz Nizipli) #47218 * (SEMVER-MAJOR) stream: use private properties for encoding (Yagiz Nizipli) #47218 * (SEMVER-MAJOR) stream: use private properties for compression (Yagiz Nizipli) #47218 * (SEMVER-MAJOR) test\_runner: disallow array in `run` options (Raz Luvaton) #49935 * (SEMVER-MAJOR) test\_runner: support passing globs (Moshe Atlow) #47653 * (SEMVER-MAJOR) tls: use `validateNumber` for `options.minDHSize` (Deokjin Kim) #49973 * (SEMVER-MAJOR) tls: use validateFunction for `options.checkServerIdentity` (Deokjin Kim) #49896 * (SEMVER-MAJOR) util: runtime deprecate `promisify`-ing a function returning a `Promise` (Antoine du Hamel) #49609 * (SEMVER-MAJOR) vm: freeze `dependencySpecifiers` array (Antoine du Hamel) #49720 PR-URL: #49870 Co-authored-by: Michaël Zasso <[email protected]>
This commit adds documentation and tests for the 'flush' option of the fs.appendFile family of functions. Technically, support was indirectly added in #50009, but this makes it more official. Refs: #49886 Refs: #50009 PR-URL: #50095 Reviewed-By: Matteo Collina <[email protected]>
This commit adds documentation and tests for the 'flush' option of the fs.appendFile family of functions. Technically, support was indirectly added in #50009, but this makes it more official. Refs: #49886 Refs: #50009 PR-URL: #50095 Reviewed-By: Matteo Collina <[email protected]>
This commit adds a 'flush' option to the fs.writeFile family of functions. Refs: nodejs#49886 PR-URL: nodejs#50009 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
Notable Changes: doc: * promote fetch/webstreams from experimental to stable (Steven) nodejs#45684 esm: * use import attributes instead of import assertions (Antoine du Hamel) nodejs#50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) nodejs#49869 * remove `globalPreload` hook (superseded by `initialize`) (Jacob Smith) nodejs#49144 fs: * add flush option to writeFile() functions (Colin Ihrig) nodejs#50009 * (SEMVER-MAJOR) add globSync implementation (Moshe Atlow) nodejs#47653 http: * (SEMVER-MAJOR) reduce parts in chunked response when corking (Robert Nagy) nodejs#50167 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) nodejs#49830 * (SEMVER-MAJOR) add `navigator.hardwareConcurrency` (Yagiz Nizipli) nodejs#47769 stream: * optimize Writable (Robert Nagy) nodejs#50012 test_runner: * (SEMVER-MAJOR) support passing globs (Moshe Atlow) nodejs#47653 vm: * use default HDO when importModuleDynamically is not set (Joyee Cheung) nodejs#49950 Semver-Major Commits: * (SEMVER-MAJOR) build: drop support for Visual Studio 2019 (Michaël Zasso) nodejs#49051 * (SEMVER-MAJOR) build: bump supported macOS and Xcode versions (Michaël Zasso) nodejs#49164 * (SEMVER-MAJOR) crypto: do not overwrite \_writableState.defaultEncoding (Tobias Nießen) nodejs#49140 * (SEMVER-MAJOR) deps: bump minimum ICU version to 73 (Michaël Zasso) nodejs#49639 * (SEMVER-MAJOR) deps: update V8 to 11.8.172.13 (Michaël Zasso) nodejs#49639 * (SEMVER-MAJOR) deps: update llhttp to 9.1.2 (Paolo Insogna) nodejs#48981 * (SEMVER-MAJOR) events: validate options of `on` and `once` (Deokjin Kim) nodejs#46018 * (SEMVER-MAJOR) fs: adjust `position` validation in reading methods (Livia Medeiros) nodejs#42835 * (SEMVER-MAJOR) fs: add globSync implementation (Moshe Atlow) nodejs#47653 * (SEMVER-MAJOR) http: reduce parts in chunked response when corking (Robert Nagy) nodejs#50167 * (SEMVER-MAJOR) lib: mark URL/URLSearchParams as uncloneable and untransferable (Chengzhong Wu) nodejs#47497 * (SEMVER-MAJOR) lib: remove aix directory case for package reader (Yagiz Nizipli) nodejs#48605 * (SEMVER-MAJOR) lib: add `navigator.hardwareConcurrency` (Yagiz Nizipli) nodejs#47769 * (SEMVER-MAJOR) lib: runtime deprecate punycode (Yagiz Nizipli) nodejs#47202 * (SEMVER-MAJOR) module: harmonize error code between ESM and CJS (Antoine du Hamel) nodejs#48606 * (SEMVER-MAJOR) net: do not treat `server.maxConnections=0` as `Infinity` (ignoramous) nodejs#48276 * (SEMVER-MAJOR) net: only defer \_final call when connecting (Jason Zhang) nodejs#47385 * (SEMVER-MAJOR) node-api: rename internal NAPI\_VERSION definition (Chengzhong Wu) nodejs#48501 * (SEMVER-MAJOR) src: update NODE\_MODULE\_VERSION to 120 (Michaël Zasso) nodejs#49639 * (SEMVER-MAJOR) src: throw DOMException on cloning non-serializable objects (Chengzhong Wu) nodejs#47839 * (SEMVER-MAJOR) src: throw DataCloneError on transfering untransferable objects (Chengzhong Wu) nodejs#47604 * (SEMVER-MAJOR) stream: use private properties for strategies (Yagiz Nizipli) nodejs#47218 * (SEMVER-MAJOR) stream: use private properties for encoding (Yagiz Nizipli) nodejs#47218 * (SEMVER-MAJOR) stream: use private properties for compression (Yagiz Nizipli) nodejs#47218 * (SEMVER-MAJOR) test\_runner: disallow array in `run` options (Raz Luvaton) nodejs#49935 * (SEMVER-MAJOR) test\_runner: support passing globs (Moshe Atlow) nodejs#47653 * (SEMVER-MAJOR) tls: use `validateNumber` for `options.minDHSize` (Deokjin Kim) nodejs#49973 * (SEMVER-MAJOR) tls: use validateFunction for `options.checkServerIdentity` (Deokjin Kim) nodejs#49896 * (SEMVER-MAJOR) util: runtime deprecate `promisify`-ing a function returning a `Promise` (Antoine du Hamel) nodejs#49609 * (SEMVER-MAJOR) vm: freeze `dependencySpecifiers` array (Antoine du Hamel) nodejs#49720 PR-URL: nodejs#49870 Co-authored-by: Michaël Zasso <[email protected]>
This commit adds documentation and tests for the 'flush' option of the fs.appendFile family of functions. Technically, support was indirectly added in nodejs#50009, but this makes it more official. Refs: nodejs#49886 Refs: nodejs#50009 PR-URL: nodejs#50095 Reviewed-By: Matteo Collina <[email protected]>
This commit adds a 'flush' option to the fs.writeFile family of functions. Refs: #49886 PR-URL: #50009 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
This commit adds documentation and tests for the 'flush' option of the fs.appendFile family of functions. Technically, support was indirectly added in #50009, but this makes it more official. Refs: #49886 Refs: #50009 PR-URL: #50095 Reviewed-By: Matteo Collina <[email protected]>
Notable changes: deps: * (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) #49908 doc: * add H4ad to collaborators (Vinícius Lourenço) #50217 esm: * (SEMVER-MINOR) detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) #50096 * use import attributes instead of import assertions (Antoine du Hamel) #50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869 fs: * (SEMVER-MINOR) add flush option to appendFile() functions (Colin Ihrig) #50095 * add flush option to writeFile() functions (Colin Ihrig) #50009 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) #49830 stream: * (SEMVER-MINOR) allow pass stream class to `stream.compose` (Alex Yang) #50187 * call helper function from push and unshift (Raz Luvaton) #50173 * optimize Writable (Robert Nagy) #50012 test_runner, cli: * (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) #49996 vm: * (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) #50141 * use default HDO when importModuleDynamically is not set (Joyee Cheung) #49950 wasi: PR-URL: #50682
Notable changes: deps: * (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) #49908 doc: * add H4ad to collaborators (Vinícius Lourenço) #50217 esm: * (SEMVER-MINOR) detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) #50096 * use import attributes instead of import assertions (Antoine du Hamel) #50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869 fs: * (SEMVER-MINOR) add flush option to appendFile() functions (Colin Ihrig) #50095 * add flush option to writeFile() functions (Colin Ihrig) #50009 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) #49830 stream: * (SEMVER-MINOR) allow pass stream class to `stream.compose` (Alex Yang) #50187 * call helper function from push and unshift (Raz Luvaton) #50173 * optimize Writable (Robert Nagy) #50012 test_runner, cli: * (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) #49996 vm: * (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) #50141 * use default HDO when importModuleDynamically is not set (Joyee Cheung) #49950 wasi: PR-URL: #50682
In nodejs#50009, the return value was accidentally made part of `flush` option bullet point.
In #50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: #50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
Notable changes: deps: * (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) #49908 doc: * add H4ad to collaborators (Vinícius Lourenço) #50217 esm: * (SEMVER-MINOR) detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) #50096 * use import attributes instead of import assertions (Antoine du Hamel) #50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869 fs: * (SEMVER-MINOR) add flush option to appendFile() functions (Colin Ihrig) #50095 * add flush option to writeFile() functions (Colin Ihrig) #50009 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) #49830 stream: * (SEMVER-MINOR) allow pass stream class to `stream.compose` (Alex Yang) #50187 * call helper function from push and unshift (Raz Luvaton) #50173 * optimize Writable (Robert Nagy) #50012 test_runner, cli: * (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) #49996 vm: * (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) #50141 * use default HDO when importModuleDynamically is not set (Joyee Cheung) #49950 wasi: PR-URL: #50682
Notable changes: deps: * (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) #49908 doc: * add H4ad to collaborators (Vinícius Lourenço) #50217 esm: * (SEMVER-MINOR) detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) #50096 * use import attributes instead of import assertions (Antoine du Hamel) #50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869 fs: * (SEMVER-MINOR) add flush option to appendFile() functions (Colin Ihrig) #50095 * add flush option to writeFile() functions (Colin Ihrig) #50009 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) #49830 stream: * (SEMVER-MINOR) allow pass stream class to `stream.compose` (Alex Yang) #50187 * call helper function from push and unshift (Raz Luvaton) #50173 * optimize Writable (Robert Nagy) #50012 test_runner, cli: * (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) #49996 vm: * (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) #50141 * use default HDO when importModuleDynamically is not set (Joyee Cheung) #49950 wasi: PR-URL: #50682
In #50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: #50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
In nodejs#50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: nodejs#50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
Notable changes: deps: * (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) nodejs#49908 doc: * add H4ad to collaborators (Vinícius Lourenço) nodejs#50217 esm: * (SEMVER-MINOR) detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) nodejs#50096 * use import attributes instead of import assertions (Antoine du Hamel) nodejs#50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) nodejs#49869 fs: * (SEMVER-MINOR) add flush option to appendFile() functions (Colin Ihrig) nodejs#50095 * add flush option to writeFile() functions (Colin Ihrig) nodejs#50009 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) nodejs#49830 stream: * (SEMVER-MINOR) allow pass stream class to `stream.compose` (Alex Yang) nodejs#50187 * call helper function from push and unshift (Raz Luvaton) nodejs#50173 * optimize Writable (Robert Nagy) nodejs#50012 test_runner, cli: * (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) nodejs#49996 vm: * (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) nodejs#50141 * use default HDO when importModuleDynamically is not set (Joyee Cheung) nodejs#49950 wasi: PR-URL: nodejs#50682
In nodejs#50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: nodejs#50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
Notable changes: deps: * (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) nodejs#49908 doc: * add H4ad to collaborators (Vinícius Lourenço) nodejs#50217 esm: * (SEMVER-MINOR) detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) nodejs#50096 * use import attributes instead of import assertions (Antoine du Hamel) nodejs#50140 * --experimental-default-type flag to flip module defaults (Geoffrey Booth) nodejs#49869 fs: * (SEMVER-MINOR) add flush option to appendFile() functions (Colin Ihrig) nodejs#50095 * add flush option to writeFile() functions (Colin Ihrig) nodejs#50009 lib: * (SEMVER-MINOR) add WebSocket client (Matthew Aitken) nodejs#49830 stream: * (SEMVER-MINOR) allow pass stream class to `stream.compose` (Alex Yang) nodejs#50187 * call helper function from push and unshift (Raz Luvaton) nodejs#50173 * optimize Writable (Robert Nagy) nodejs#50012 test_runner, cli: * (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) nodejs#49996 vm: * (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) nodejs#50141 * use default HDO when importModuleDynamically is not set (Joyee Cheung) nodejs#49950 wasi: PR-URL: nodejs#50682
In #50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: #50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
In #50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: #50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
In #50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: #50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
In #50009, the return value was accidentally made part of `flush` option bullet point. PR-URL: #50760 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
This commit adds a 'flush' option to the fs.writeFile family of functions. Refs: nodejs#49886 PR-URL: nodejs#50009 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
@@ -2217,7 +2217,7 @@ function lutimesSync(path, atime, mtime) { | |||
handleErrorFromBinding(ctx); |
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.
docker pull python
This commit adds a
'flush'
option to thefs.writeFile
family of functions.Refs: #49886
Notable change summary: When writing to files, it is possible that data is not immediately flushed to permanent storage. This allows subsequent read operations to see stale data. This PR adds a
'flush'
option to thefs.writeFile
family of functions which forces the data to be flushed at the end of a successful write operation.