Skip to content
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

src: make process.env.TZ setter clear tz cache #20026

Merged
merged 1 commit into from
May 23, 2019

Conversation

bnoordhuis
Copy link
Member

@bnoordhuis bnoordhuis commented Apr 14, 2018

Since the presence of the libc and V8 timezone caches seem to be
a perennial source of confusion to users ("why doesn't it work?!"),
let's try to support that pattern by intercepting assignments to
the TZ environment variable and reset the caches as a side effect.

Fixes: #19974
CI: https://ci.nodejs.org/job/node-test-pull-request/14278/ - I expect the results will be... interesting.
CI: https://ci.nodejs.org/job/node-test-pull-request/14280/ - with tweaks
CI: https://ci.nodejs.org/job/node-test-pull-request/14287/ - one more tweak
CI: https://ci.nodejs.org/job/node-test-pull-request/23223/
CI: https://ci.nodejs.org/job/node-test-pull-request/23228/
CI: https://ci.nodejs.org/job/node-test-pull-request/23249/

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Apr 14, 2018
@jeroenvollenbrock
Copy link

jeroenvollenbrock commented Apr 14, 2018

FWIW, i know chromium handles this by using OS specific code to hook into the OS’es notification system, and fire the V8 notification upon receiving a OS notification. I’m not sure if that approach completely obsoletes this one or if this one obsoletes that one, but i do think either both should be inside or outside the Node.JS feature scope to really avoid confusion. I’d be happy to make an additional PR if its deemed inside though :) Without this, issues like #4022 will probably continue to persist, while issues like #3449 will get resolved.

@bnoordhuis
Copy link
Member Author

If anyone has a clue on what the timezone names should be on Windows... MSDN is lacking on that front.

@jeroenvollenbrock Chromium (on Linux) uses DBus. That's not a dependency we'd take on.

@jeroenvollenbrock
Copy link

jeroenvollenbrock commented Apr 14, 2018

I understand, however i don't think a dbus dependency will be necessary for this. Even though it is the easiest interface to implement for these notifications, it may be not even be present on the target platform, and multiple alternatives exist. Changing the timezone through systemd involves the following steps:

  • change /etc/localtime symlink or copy file (could be watched, used by chromium, doesnt work in chrooted environments)
  • notify kernel using settimeofday (can be manually polled using gettimeofday when RTC is using localtime)
    • Update vdso pages with new tz data (might be usable, needs investigation)
    • wake all armed and polled/read timerfds with TFD_TIMER_CANCEL_ON_SET set and deliver -ECANCEL (fd can be polled)
  • notify subscribed dbus clients (can be subscribed to)

I know there has been a linux syscall in the works as well (time_change_notify), but i don't think it has been mainlined, and this one has also already been discussed as possible libuv notification (libuv/libuv#1176). The timerfds however, seem like an interesting possibility that uses very little resources. Just open a timerfd that is armed for a distant-future moment, poll for cancellations using libuv/poll, optionally check if /etc/localtime has changed, and reset the timezone caches.

As for the windows timezone names. I don't think there is a complete list, but there have also been changes in it's behaviour across different versions and updates. (you may want to check out v8/#6031 as well)

@targos
Copy link
Member

targos commented Apr 14, 2018

There's some documentation for Windows here: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset

@jeroenvollenbrock
Copy link

wake all armed and polled/read timerfds with TFD_TIMER_CANCEL_ON_SET set and deliver -ECANCEL (fd can be polled)

After taking a second look, i'm not sure if this also occurs when the system time itself doesnt change along with the timezone, probably needs more research as i'd guess a cancel is not required. (CLOCK_REALTIME is usually in UTC)

@bnoordhuis
Copy link
Member Author

There's some documentation for Windows here: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset

I've seen that but it doesn't name time zones except for one example that looks suspect (says GST is German Standard Time while the rest of the internet says it's Gulf or Georgia Standard Time.)

@jeroenvollenbrock You should open a new issue. To quickly address your points:

  • TFD_TIMER_CANCEL_ON_SET is too new for Node.js to use. That was added around Linux 3.0 but our baseline is 2.6.18.
  • We don't implement features unless there's a reasonable way to support it on all platforms. "Reasonable" implies "not a monumental effort."

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 23, 2018
@BridgeAR
Copy link
Member

New CI before landing: https://ci.nodejs.org/job/node-test-pull-request/14434/

@BridgeAR
Copy link
Member

I believe this is semver-major.

@BridgeAR BridgeAR added the semver-major PRs that contain breaking changes and should be released in the next major version. label Apr 23, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Apr 23, 2018
Since the presence of the libc and V8 timezone caches seem to be
a perennial source of confusion to users ("why doesn't it work?!"),
let's try to support that pattern by intercepting assignments to
the `TZ` environment variable and reset the caches as a side effect.

PR-URL: nodejs#20026
Fixes: nodejs#19974
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BridgeAR
Copy link
Member

Landed in 1d1ab76 🎉

@jasnell
Copy link
Member

jasnell commented Apr 23, 2018

Marking this dont-land-on-v10x because it's too late to pull it in to the release.

@BridgeAR
Copy link
Member

I missed CI failures before landing this. @bnoordhuis the Alpine builds fail with this.

@bnoordhuis bnoordhuis added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 20, 2019
@cjihrig
Copy link
Contributor

cjihrig commented May 20, 2019

Still LGTM. It would be nice to figure out what's up with the node-test-commit-custom-suites-freestyle issue though.

@addaleax
Copy link
Member

@bnoordhuis That build job is python tools/test.py --worker, i.e. runs each test inside a Worker. Setting environment variables in a Worker does not affect the global per-process environment (unless that’s explicitly specified), so I assume that that’s the issue there. I think it’s okay to just skip the test if (!common.isMainThread) like we do elsewhere.

@srl295
Copy link
Member

srl295 commented May 20, 2019

Still LGTM also. Presumably v8 manages ICU's default TZ if needed. (May not matter)

@bnoordhuis
Copy link
Member Author

bnoordhuis commented May 21, 2019

@addaleax Ah, that explains everything, thanks. :-)

I included your suggestion. New CI for good measure: https://ci.nodejs.org/job/node-test-pull-request/23249/

@nodejs-github-bot
Copy link
Collaborator

@nodejs nodejs deleted a comment from nodejs-github-bot May 21, 2019
Since the presence of the libc and V8 timezone caches seem to be
a perennial source of confusion to users ("why doesn't it work?!"),
let's try to support that pattern by intercepting assignments to
the TZ environment variable and reset the caches as a side effect.

Fixes: nodejs#19974
PR-URL: nodejs#20026
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Steven R Loomis <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
@bnoordhuis bnoordhuis closed this May 23, 2019
@bnoordhuis bnoordhuis deleted the fix19974 branch May 23, 2019 09:37
@bnoordhuis bnoordhuis merged commit eba348b into nodejs:master May 23, 2019
@bnoordhuis
Copy link
Member Author

It had to come a long way but this is merged in eba348b.

BethGriggs added a commit that referenced this pull request Oct 21, 2019
Notable changes:

- **assert**:
    - do not repeat .throws() code (Ruben Bridgewater)
        [#28263](#28263)
    - wrap validation function errors (Ruben Bridgewater)
        [#28263](#28263)
    - fix generatedMessage property (Ruben Bridgewater)
        [#28263](#28263)
    - improve class instance errors (Ruben Bridgewater)
        [#28263](#28263)
- **benchmark**:
    - use test/common/tmpdir consistently (João Reis)
        [#28858](#28858)
- **build**:
    - make full-icu the default for releases (Richard Lau)
        [#29887](#29887)
    - update minimum Xcode version for macOS (Michael Dawson)
        [#29622](#29622)
- **child_process**:
    - runtime deprecate \_channel (cjihrig)
        [#27949](#27949)
    - simplify spawn argument parsing (cjihrig)
        [#27854](#27854)
- **console**:
    - display timeEnd with suitable time unit (Xavier Stouder)
        [#29251](#29251)
- **deps**:
    - patch V8 to 7.8.279.14 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.12 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.10 (Myles Borins)
        [#29694](#29694)
    - update V8's postmortem script (cjihrig)
        [#29694](#29694)
    - V8: cherry-pick 716875d (Myles Borins)
        [#29694](#29694)
    - update V8 to 7.8.279.9 (Myles Borins)
        [#29694](#29694)
    - V8: cherry-pick b33af60 (Michaël Zasso)
        [#28016](#28016)
    - update V8 to 7.6.303.28 (Michaël Zasso)
        [#28016](#28016)
- **domain**:
    - error handler runs outside of its domain (Julien Gilli)
        [#26211](#26211)
- **fs**:
    - make FSWatcher.start private (Lucas Holmquist)
        [#29905](#29905)
    - add runtime deprecate for file stream open() (Robert Nagy)
    [#29061](#29061)
    - allow int64 offset in fs.write/writeSync/fd.write (Zach Bjornson)
    [#26572](#26572)
    - use IsSafeJsInt instead of IsNumber for ftruncate (Zach Bjornson)
    [#26572](#26572)
    - allow int64 offset in fs.read/readSync/fd.read (Zach Bjornson)
    [#26572](#26572)
    - close file descriptor of promisified truncate (João Reis)
    [#28858](#28858)
- **http**:
    - do not emit end after aborted (Robert Nagy)
        [#27984](#27984)
    - don't emit 'data' after 'error' (Robert Nagy)
        [#28711](#28711)
    - remove legacy parser (Anna Henningsen)
        [#29589](#29589)
    - throw if 'host' agent header is not a string value
        (Giorgos Ntemiris)
        [#29568](#29568)
    - replace superfluous connection property with getter/setter
        (Robert Nagy)
        [#29015](#29015)
    - fix test where aborted should not be emitted (Robert Nagy)
        [#20077](#20077)
    - remove default 'timeout' listener on upgrade (Luigi Pinca)
        [#26030](#26030)
- **http, http2**:
    - remove default server timeout (Ali Ijaz Sheikh)
        [#27558](#27558)
- **http2**:
    - remove security revert flags (Anna Henningsen)
        [#29141](#29141)
    - remove callback-based padding (Anna Henningsen)
        [#29144](#29144)
- **lib**:
    - rename validateInteger to validateSafeInteger (Zach Bjornson)
        [#26572](#26572)
    - correct error.errno to always be numeric (Joyee Cheung)
        [#28140](#28140)
    - no need to strip BOM or shebang for scripts (Refael Ackermann)
        [#27375](#27375)
    - rework logic of stripping BOM+Shebang from commonjs (Gus Caplan)
        [#27768](#27768)
- **module**:
    - runtime deprecate createRequireFromPath() (cjihrig)
        [#27951](#27951)
- **readline**:
    - error on falsy values for callback (Sam Roberts)
        [#28109](#28109)
- **repl**:
    - close file descriptor of history file (João Reis)
        [#28858](#28858)
- **src**:
    - bring 425 status code name into accordance with RFC 8470
        (Sergei Osipov)
        [#29880](#29880)
    - update NODE\_MODULE\_VERSION to 79 (Myles Borins)
        [#29694](#29694)
    - update NODE\_MODULE\_VERSION to 78 (Michaël Zasso)
        [#28918](#28918)
    - add error codes to errors thrown in C++ (Yaniv Friedensohn)
        [#27700](#27700)
    - use non-deprecated overload of V8::SetFlagsFromString
        (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 77 (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 74 (Refael Ackermann)
        [#27375](#27375)
    - make process.env.TZ setter clear tz cache (Ben Noordhuis)
        [#20026](#20026)
    - enable V8's WASM trap handlers (Gus Caplan)
        [#27246](#27246)
- **stream**:
    - throw unhandled error for readable with autoDestroy (Robert Nagy)
        [#29806](#29806)
    - always invoke callback before emitting error (Robert Nagy)
        [#29293](#29293)
    - invoke callback before emitting error always (Robert Nagy)
        [#29293](#29293)
    - do not flush destroyed writable (Robert Nagy)
        [#29028](#29028)
    - don't emit finish on error (Robert Nagy)
        [#28979](#28979)
    - disallow stream methods on finished stream (Robert Nagy)
        [#28687](#28687)
    - do not emit after 'error' (Robert Nagy)
        [#28708](#28708)
    - fix destroy() behavior (Robert Nagy)
        [#29058](#29058)
    - simplify `.pipe()` and `.unpipe()` in Readable (Weijia Wang)
        [#28583](#28583)
- **tools**:
    - patch V8 to run on older XCode versions (Ujjwal Sharma)
        [#29694](#29694)
    - update V8 gypfiles (Michaël Zasso)
        [#29694](#29694)
    - support full-icu by default (Steven R. Loomis)
        [#29522](#29522)
- **util**: validate formatWithOptions inspectOptions
    (Ruben Bridgewater)
    [#29824](#29824)

PR-URL: #29504
BethGriggs added a commit that referenced this pull request Oct 21, 2019
Notable changes:

- **assert**:
    - do not repeat .throws() code (Ruben Bridgewater)
        [#28263](#28263)
    - wrap validation function errors (Ruben Bridgewater)
        [#28263](#28263)
    - fix generatedMessage property (Ruben Bridgewater)
        [#28263](#28263)
    - improve class instance errors (Ruben Bridgewater)
        [#28263](#28263)
- **benchmark**:
    - use test/common/tmpdir consistently (João Reis)
        [#28858](#28858)
- **build**:
    - make full-icu the default for releases (Richard Lau)
        [#29887](#29887)
    - update minimum Xcode version for macOS (Michael Dawson)
        [#29622](#29622)
- **child_process**:
    - runtime deprecate \_channel (cjihrig)
        [#27949](#27949)
    - simplify spawn argument parsing (cjihrig)
        [#27854](#27854)
- **console**:
    - display timeEnd with suitable time unit (Xavier Stouder)
        [#29251](#29251)
- **deps**:
    - patch V8 to 7.8.279.14 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.12 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.10 (Myles Borins)
        [#29694](#29694)
    - update V8's postmortem script (cjihrig)
        [#29694](#29694)
    - V8: cherry-pick 716875d (Myles Borins)
        [#29694](#29694)
    - update V8 to 7.8.279.9 (Myles Borins)
        [#29694](#29694)
    - V8: cherry-pick b33af60 (Michaël Zasso)
        [#28016](#28016)
    - update V8 to 7.6.303.28 (Michaël Zasso)
        [#28016](#28016)
- **domain**:
    - error handler runs outside of its domain (Julien Gilli)
        [#26211](#26211)
- **fs**:
    - make FSWatcher.start private (Lucas Holmquist)
        [#29905](#29905)
    - add runtime deprecate for file stream open() (Robert Nagy)
    [#29061](#29061)
    - allow int64 offset in fs.write/writeSync/fd.write (Zach Bjornson)
    [#26572](#26572)
    - use IsSafeJsInt instead of IsNumber for ftruncate (Zach Bjornson)
    [#26572](#26572)
    - allow int64 offset in fs.read/readSync/fd.read (Zach Bjornson)
    [#26572](#26572)
    - close file descriptor of promisified truncate (João Reis)
    [#28858](#28858)
- **http**:
    - do not emit end after aborted (Robert Nagy)
        [#27984](#27984)
    - don't emit 'data' after 'error' (Robert Nagy)
        [#28711](#28711)
    - remove legacy parser (Anna Henningsen)
        [#29589](#29589)
    - throw if 'host' agent header is not a string value
        (Giorgos Ntemiris)
        [#29568](#29568)
    - replace superfluous connection property with getter/setter
        (Robert Nagy)
        [#29015](#29015)
    - fix test where aborted should not be emitted (Robert Nagy)
        [#20077](#20077)
    - remove default 'timeout' listener on upgrade (Luigi Pinca)
        [#26030](#26030)
- **http, http2**:
    - remove default server timeout (Ali Ijaz Sheikh)
        [#27558](#27558)
- **http2**:
    - remove security revert flags (Anna Henningsen)
        [#29141](#29141)
    - remove callback-based padding (Anna Henningsen)
        [#29144](#29144)
- **lib**:
    - rename validateInteger to validateSafeInteger (Zach Bjornson)
        [#26572](#26572)
    - correct error.errno to always be numeric (Joyee Cheung)
        [#28140](#28140)
    - no need to strip BOM or shebang for scripts (Refael Ackermann)
        [#27375](#27375)
    - rework logic of stripping BOM+Shebang from commonjs (Gus Caplan)
        [#27768](#27768)
- **module**:
    - runtime deprecate createRequireFromPath() (cjihrig)
        [#27951](#27951)
- **readline**:
    - error on falsy values for callback (Sam Roberts)
        [#28109](#28109)
- **repl**:
    - close file descriptor of history file (João Reis)
        [#28858](#28858)
- **src**:
    - bring 425 status code name into accordance with RFC 8470
        (Sergei Osipov)
        [#29880](#29880)
    - update NODE\_MODULE\_VERSION to 79 (Myles Borins)
        [#29694](#29694)
    - update NODE\_MODULE\_VERSION to 78 (Michaël Zasso)
        [#28918](#28918)
    - add error codes to errors thrown in C++ (Yaniv Friedensohn)
        [#27700](#27700)
    - use non-deprecated overload of V8::SetFlagsFromString
        (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 77 (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 74 (Refael Ackermann)
        [#27375](#27375)
    - make process.env.TZ setter clear tz cache (Ben Noordhuis)
        [#20026](#20026)
    - enable V8's WASM trap handlers (Gus Caplan)
        [#27246](#27246)
- **stream**:
    - throw unhandled error for readable with autoDestroy (Robert Nagy)
        [#29806](#29806)
    - always invoke callback before emitting error (Robert Nagy)
        [#29293](#29293)
    - invoke callback before emitting error always (Robert Nagy)
        [#29293](#29293)
    - do not flush destroyed writable (Robert Nagy)
        [#29028](#29028)
    - don't emit finish on error (Robert Nagy)
        [#28979](#28979)
    - disallow stream methods on finished stream (Robert Nagy)
        [#28687](#28687)
    - do not emit after 'error' (Robert Nagy)
        [#28708](#28708)
    - fix destroy() behavior (Robert Nagy)
        [#29058](#29058)
    - simplify `.pipe()` and `.unpipe()` in Readable (Weijia Wang)
        [#28583](#28583)
- **tools**:
    - patch V8 to run on older XCode versions (Ujjwal Sharma)
        [#29694](#29694)
    - update V8 gypfiles (Michaël Zasso)
        [#29694](#29694)
    - support full-icu by default (Steven R. Loomis)
        [#29522](#29522)
- **util**: validate formatWithOptions inspectOptions
    (Ruben Bridgewater)
    [#29824](#29824)

PR-URL: #29504
BethGriggs added a commit that referenced this pull request Oct 21, 2019
Notable changes:

- **assert**:
    - do not repeat .throws() code (Ruben Bridgewater)
        [#28263](#28263)
    - wrap validation function errors (Ruben Bridgewater)
        [#28263](#28263)
    - fix generatedMessage property (Ruben Bridgewater)
        [#28263](#28263)
    - improve class instance errors (Ruben Bridgewater)
        [#28263](#28263)
- **benchmark**:
    - use test/common/tmpdir consistently (João Reis)
        [#28858](#28858)
- **build**:
    - make full-icu the default for releases (Richard Lau)
        [#29887](#29887)
    - update minimum Xcode version for macOS (Michael Dawson)
        [#29622](#29622)
- **child_process**:
    - runtime deprecate \_channel (cjihrig)
        [#27949](#27949)
    - simplify spawn argument parsing (cjihrig)
        [#27854](#27854)
- **console**:
    - display timeEnd with suitable time unit (Xavier Stouder)
        [#29251](#29251)
- **deps**:
    - patch V8 to 7.8.279.14 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.12 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.10 (Myles Borins)
        [#29694](#29694)
    - update V8's postmortem script (cjihrig)
        [#29694](#29694)
    - V8: cherry-pick 716875d (Myles Borins)
        [#29694](#29694)
    - update V8 to 7.8.279.9 (Myles Borins)
        [#29694](#29694)
    - V8: cherry-pick b33af60 (Michaël Zasso)
        [#28016](#28016)
    - update V8 to 7.6.303.28 (Michaël Zasso)
        [#28016](#28016)
- **domain**:
    - error handler runs outside of its domain (Julien Gilli)
        [#26211](#26211)
- **fs**:
    - make FSWatcher.start private (Lucas Holmquist)
        [#29905](#29905)
    - add runtime deprecate for file stream open() (Robert Nagy)
    [#29061](#29061)
    - allow int64 offset in fs.write/writeSync/fd.write (Zach Bjornson)
    [#26572](#26572)
    - use IsSafeJsInt instead of IsNumber for ftruncate (Zach Bjornson)
    [#26572](#26572)
    - allow int64 offset in fs.read/readSync/fd.read (Zach Bjornson)
    [#26572](#26572)
    - close file descriptor of promisified truncate (João Reis)
    [#28858](#28858)
- **http**:
    - do not emit end after aborted (Robert Nagy)
        [#27984](#27984)
    - don't emit 'data' after 'error' (Robert Nagy)
        [#28711](#28711)
    - remove legacy parser (Anna Henningsen)
        [#29589](#29589)
    - throw if 'host' agent header is not a string value
        (Giorgos Ntemiris)
        [#29568](#29568)
    - replace superfluous connection property with getter/setter
        (Robert Nagy)
        [#29015](#29015)
    - fix test where aborted should not be emitted (Robert Nagy)
        [#20077](#20077)
    - remove default 'timeout' listener on upgrade (Luigi Pinca)
        [#26030](#26030)
- **http, http2**:
    - remove default server timeout (Ali Ijaz Sheikh)
        [#27558](#27558)
- **http2**:
    - remove security revert flags (Anna Henningsen)
        [#29141](#29141)
    - remove callback-based padding (Anna Henningsen)
        [#29144](#29144)
- **lib**:
    - rename validateInteger to validateSafeInteger (Zach Bjornson)
        [#26572](#26572)
    - correct error.errno to always be numeric (Joyee Cheung)
        [#28140](#28140)
    - no need to strip BOM or shebang for scripts (Refael Ackermann)
        [#27375](#27375)
    - rework logic of stripping BOM+Shebang from commonjs (Gus Caplan)
        [#27768](#27768)
- **module**:
    - runtime deprecate createRequireFromPath() (cjihrig)
        [#27951](#27951)
- **readline**:
    - error on falsy values for callback (Sam Roberts)
        [#28109](#28109)
- **repl**:
    - close file descriptor of history file (João Reis)
        [#28858](#28858)
- **src**:
    - bring 425 status code name into accordance with RFC 8470
        (Sergei Osipov)
        [#29880](#29880)
    - update NODE\_MODULE\_VERSION to 79 (Myles Borins)
        [#29694](#29694)
    - update NODE\_MODULE\_VERSION to 78 (Michaël Zasso)
        [#28918](#28918)
    - add error codes to errors thrown in C++ (Yaniv Friedensohn)
        [#27700](#27700)
    - use non-deprecated overload of V8::SetFlagsFromString
        (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 77 (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 74 (Refael Ackermann)
        [#27375](#27375)
    - make process.env.TZ setter clear tz cache (Ben Noordhuis)
        [#20026](#20026)
    - enable V8's WASM trap handlers (Gus Caplan)
        [#27246](#27246)
- **stream**:
    - throw unhandled error for readable with autoDestroy (Robert Nagy)
        [#29806](#29806)
    - always invoke callback before emitting error (Robert Nagy)
        [#29293](#29293)
    - invoke callback before emitting error always (Robert Nagy)
        [#29293](#29293)
    - do not flush destroyed writable (Robert Nagy)
        [#29028](#29028)
    - don't emit finish on error (Robert Nagy)
        [#28979](#28979)
    - disallow stream methods on finished stream (Robert Nagy)
        [#28687](#28687)
    - do not emit after 'error' (Robert Nagy)
        [#28708](#28708)
    - fix destroy() behavior (Robert Nagy)
        [#29058](#29058)
    - simplify `.pipe()` and `.unpipe()` in Readable (Weijia Wang)
        [#28583](#28583)
- **tools**:
    - patch V8 to run on older XCode versions (Ujjwal Sharma)
        [#29694](#29694)
    - update V8 gypfiles (Michaël Zasso)
        [#29694](#29694)
    - support full-icu by default (Steven R. Loomis)
        [#29522](#29522)
- **util**: validate formatWithOptions inspectOptions
    (Ruben Bridgewater)
    [#29824](#29824)

PR-URL: #29504
BethGriggs added a commit that referenced this pull request Oct 22, 2019
Notable changes:

- **assert**:
    - do not repeat .throws() code (Ruben Bridgewater)
        [#28263](#28263)
    - wrap validation function errors (Ruben Bridgewater)
        [#28263](#28263)
    - fix generatedMessage property (Ruben Bridgewater)
        [#28263](#28263)
    - improve class instance errors (Ruben Bridgewater)
        [#28263](#28263)
- **benchmark**:
    - use test/common/tmpdir consistently (João Reis)
        [#28858](#28858)
- **build**:
    - make full-icu the default for releases (Richard Lau)
        [#29887](#29887)
    - update minimum Xcode version for macOS (Michael Dawson)
        [#29622](#29622)
- **child_process**:
    - runtime deprecate \_channel (cjihrig)
        [#27949](#27949)
    - simplify spawn argument parsing (cjihrig)
        [#27854](#27854)
- **console**:
    - display timeEnd with suitable time unit (Xavier Stouder)
        [#29251](#29251)
- **deps**:
    - patch V8 to 7.8.279.14 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.12 (Myles Borins)
        [#29694](#29694)
    - patch V8 to 7.8.279.10 (Myles Borins)
        [#29694](#29694)
    - update V8's postmortem script (cjihrig)
        [#29694](#29694)
    - V8: cherry-pick 716875d (Myles Borins)
        [#29694](#29694)
    - update V8 to 7.8.279.9 (Myles Borins)
        [#29694](#29694)
    - V8: cherry-pick b33af60 (Michaël Zasso)
        [#28016](#28016)
    - update V8 to 7.6.303.28 (Michaël Zasso)
        [#28016](#28016)
- **domain**:
    - error handler runs outside of its domain (Julien Gilli)
        [#26211](#26211)
- **fs**:
    - make FSWatcher.start private (Lucas Holmquist)
        [#29905](#29905)
    - add runtime deprecate for file stream open() (Robert Nagy)
    [#29061](#29061)
    - allow int64 offset in fs.write/writeSync/fd.write (Zach Bjornson)
    [#26572](#26572)
    - use IsSafeJsInt instead of IsNumber for ftruncate (Zach Bjornson)
    [#26572](#26572)
    - allow int64 offset in fs.read/readSync/fd.read (Zach Bjornson)
    [#26572](#26572)
    - close file descriptor of promisified truncate (João Reis)
    [#28858](#28858)
- **http**:
    - do not emit end after aborted (Robert Nagy)
        [#27984](#27984)
    - don't emit 'data' after 'error' (Robert Nagy)
        [#28711](#28711)
    - remove legacy parser (Anna Henningsen)
        [#29589](#29589)
    - throw if 'host' agent header is not a string value
        (Giorgos Ntemiris)
        [#29568](#29568)
    - replace superfluous connection property with getter/setter
        (Robert Nagy)
        [#29015](#29015)
    - fix test where aborted should not be emitted (Robert Nagy)
        [#20077](#20077)
    - remove default 'timeout' listener on upgrade (Luigi Pinca)
        [#26030](#26030)
- **http, http2**:
    - remove default server timeout (Ali Ijaz Sheikh)
        [#27558](#27558)
- **http2**:
    - remove security revert flags (Anna Henningsen)
        [#29141](#29141)
    - remove callback-based padding (Anna Henningsen)
        [#29144](#29144)
- **lib**:
    - rename validateInteger to validateSafeInteger (Zach Bjornson)
        [#26572](#26572)
    - correct error.errno to always be numeric (Joyee Cheung)
        [#28140](#28140)
    - no need to strip BOM or shebang for scripts (Refael Ackermann)
        [#27375](#27375)
    - rework logic of stripping BOM+Shebang from commonjs (Gus Caplan)
        [#27768](#27768)
- **module**:
    - runtime deprecate createRequireFromPath() (cjihrig)
        [#27951](#27951)
- **readline**:
    - error on falsy values for callback (Sam Roberts)
        [#28109](#28109)
- **repl**:
    - close file descriptor of history file (João Reis)
        [#28858](#28858)
- **src**:
    - bring 425 status code name into accordance with RFC 8470
        (Sergei Osipov)
        [#29880](#29880)
    - update NODE\_MODULE\_VERSION to 79 (Myles Borins)
        [#29694](#29694)
    - update NODE\_MODULE\_VERSION to 78 (Michaël Zasso)
        [#28918](#28918)
    - add error codes to errors thrown in C++ (Yaniv Friedensohn)
        [#27700](#27700)
    - use non-deprecated overload of V8::SetFlagsFromString
        (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 77 (Michaël Zasso)
        [#28016](#28016)
    - update NODE\_MODULE\_VERSION to 74 (Refael Ackermann)
        [#27375](#27375)
    - make process.env.TZ setter clear tz cache (Ben Noordhuis)
        [#20026](#20026)
    - enable V8's WASM trap handlers (Gus Caplan)
        [#27246](#27246)
- **stream**:
    - throw unhandled error for readable with autoDestroy (Robert Nagy)
        [#29806](#29806)
    - always invoke callback before emitting error (Robert Nagy)
        [#29293](#29293)
    - invoke callback before emitting error always (Robert Nagy)
        [#29293](#29293)
    - do not flush destroyed writable (Robert Nagy)
        [#29028](#29028)
    - don't emit finish on error (Robert Nagy)
        [#28979](#28979)
    - disallow stream methods on finished stream (Robert Nagy)
        [#28687](#28687)
    - do not emit after 'error' (Robert Nagy)
        [#28708](#28708)
    - fix destroy() behavior (Robert Nagy)
        [#29058](#29058)
    - simplify `.pipe()` and `.unpipe()` in Readable (Weijia Wang)
        [#28583](#28583)
- **tools**:
    - patch V8 to run on older XCode versions (Ujjwal Sharma)
        [#29694](#29694)
    - update V8 gypfiles (Michaël Zasso)
        [#29694](#29694)
    - support full-icu by default (Steven R. Loomis)
        [#29522](#29522)
- **util**: validate formatWithOptions inspectOptions
    (Ruben Bridgewater)
    [#29824](#29824)

PR-URL: #29504
BethGriggs added a commit that referenced this pull request Oct 22, 2019
Notable changes:

* assert:
  * If the validation function passed to `assert.throws()` or
    `assert.rejects()` returns a value other than `true`, an assertion
    error will be thrown instead of the original error to highlight the
    programming mistake (Ruben Bridgewater).
    #28263
  * If a constructor function is passed to validate the instance of
    errors thrown in `assert.throws()` or `assert.reject()`, an
    assertion error will be thrown instead of the original error
    (Ruben Bridgewater).
    #28263
* build:
  * Node.js releases are now built with default full-icu support. This
    means that all locales supported by ICU are now included and
    Intl-related APIs may return different values than before
    (Richard Lau).
    #29887
  * The minimum Xcode version supported for macOS was increased to 10.
    It is still possible to build Node.js with Xcode 8 but this may no
    longer be the case in a future v13.x release (Michael Dawson).
    #29622
* child_process:
  * `ChildProcess._channel` (DEP0129) is now a Runtime deprecation
    (cjihrig).
    #27949
* console:
  * The output `console.timeEnd()` and `console.timeLog()` will now
    automatically select a suitable time unit instead of always using
    milliseconds (Xavier Stouder).
    #29251
* deps:
  * The V8 engine was updated to version 7.8. This includes performance
    improvements to object destructuring, memory usage and WebAssembly
    startup time (Myles Borins).
    #29694)
* domain:
  * The domain's error handler is now executed with the active domain
    set to the domain's parent to prevent inner recursion
    (Julien Gilli).
    #26211
* fs:
  * The undocumented method `FSWatcher.prototype.start()` was removed
    (Lucas Holmquist).
    #29905
  * Calling the `open()` method on a `ReadStream` or `WriteStream` now
    emits a runtime deprecation warning. The methods are supposed to be
    internal and should not be called by user code (Robert Nagy).
    #29061
  * `fs.read/write`, `fs.readSync/writeSync` and `fd.read/write` now
    accept any safe integer as their `offset` parameter. The value of
    `offset` is also no longer coerced, so a valid type must be passed
    to the functions (Zach Bjornson).
    #26572
* http:
  * Aborted requests no longer emit the `end` or `error` events after
    `aborted` (Robert Nagy).
    #27984
    #20077
  * Data will no longer be emitted after a socket error (Robert Nagy).
    #28711
  * The legacy HTTP parser (previously available under the
    `--http-parser=legacy` flag) was removed (Anna Henningsen).
    #29589
  * The `host` option for HTTP requests is now validated to be a string
    value (Giorgos Ntemiris).
    #29568
  * The `request.connection` and `response.connection` properties are now
    runtime deprecated. The equivalent `request.socket` and `response.socket`
    should be used instead (Robert Nagy).
    #29015
* http, http2:
  * The default server timeout was removed (Ali Ijaz Sheikh).
    #27558
  * Brought 425 status code name into accordance with RFC 8470. The name
    changed from "Unordered Collection" to "Too Early" (Sergei Osipov).
    #29880
* lib:
  * The `error.errno` property will now always be a number. To get the
    string value, use `error.code` instead (Joyee Cheung).
    #28140
* module:
  * `module.createRequireFromPath()` is deprecated. Use
    `module.createRequire()` instead (cjihrig).
    #27951
* src:
  * Changing the value of `process.env.TZ` will now clear the tz cache.
    This affects the default time zone used by methods such as
    `Date.prototype.toString` (Ben Noordhuis).
    #20026
* stream:
  * The timing and behavior of streams was consolidated for a number of
    edge cases. Please look at the individual commits below for more
    information.

PR-URL: #29504
BethGriggs added a commit that referenced this pull request Oct 22, 2019
Notable changes:

* assert:
  * If the validation function passed to `assert.throws()` or
    `assert.rejects()` returns a value other than `true`, an assertion
    error will be thrown instead of the original error to highlight the
    programming mistake (Ruben Bridgewater).
    #28263
  * If a constructor function is passed to validate the instance of
    errors thrown in `assert.throws()` or `assert.reject()`, an
    assertion error will be thrown instead of the original error
    (Ruben Bridgewater).
    #28263
* build:
  * Node.js releases are now built with default full-icu support. This
    means that all locales supported by ICU are now included and
    Intl-related APIs may return different values than before
    (Richard Lau).
    #29887
  * The minimum Xcode version supported for macOS was increased to 10.
    It is still possible to build Node.js with Xcode 8 but this may no
    longer be the case in a future v13.x release (Michael Dawson).
    #29622
* child_process:
  * `ChildProcess._channel` (DEP0129) is now a Runtime deprecation
    (cjihrig).
    #27949
* console:
  * The output `console.timeEnd()` and `console.timeLog()` will now
    automatically select a suitable time unit instead of always using
    milliseconds (Xavier Stouder).
    #29251
* deps:
  * The V8 engine was updated to version 7.8. This includes performance
    improvements to object destructuring, memory usage and WebAssembly
    startup time (Myles Borins).
    #29694)
* domain:
  * The domain's error handler is now executed with the active domain
    set to the domain's parent to prevent inner recursion
    (Julien Gilli).
    #26211
* fs:
  * The undocumented method `FSWatcher.prototype.start()` was removed
    (Lucas Holmquist).
    #29905
  * Calling the `open()` method on a `ReadStream` or `WriteStream` now
    emits a runtime deprecation warning. The methods are supposed to be
    internal and should not be called by user code (Robert Nagy).
    #29061
  * `fs.read/write`, `fs.readSync/writeSync` and `fd.read/write` now
    accept any safe integer as their `offset` parameter. The value of
    `offset` is also no longer coerced, so a valid type must be passed
    to the functions (Zach Bjornson).
    #26572
* http:
  * Aborted requests no longer emit the `end` or `error` events after
    `aborted` (Robert Nagy).
    #27984
    #20077
  * Data will no longer be emitted after a socket error (Robert Nagy).
    #28711
  * The legacy HTTP parser (previously available under the
    `--http-parser=legacy` flag) was removed (Anna Henningsen).
    #29589
  * The `host` option for HTTP requests is now validated to be a string
    value (Giorgos Ntemiris).
    #29568
  * The `request.connection` and `response.connection` properties are now
    runtime deprecated. The equivalent `request.socket` and `response.socket`
    should be used instead (Robert Nagy).
    #29015
* http, http2:
  * The default server timeout was removed (Ali Ijaz Sheikh).
    #27558
  * Brought 425 status code name into accordance with RFC 8470. The name
    changed from "Unordered Collection" to "Too Early" (Sergei Osipov).
    #29880
* lib:
  * The `error.errno` property will now always be a number. To get the
    string value, use `error.code` instead (Joyee Cheung).
    #28140
* module:
  * `module.createRequireFromPath()` is deprecated. Use
    `module.createRequire()` instead (cjihrig).
    #27951
* src:
  * Changing the value of `process.env.TZ` will now clear the tz cache.
    This affects the default time zone used by methods such as
    `Date.prototype.toString` (Ben Noordhuis).
    #20026
* stream:
  * The timing and behavior of streams was consolidated for a number of
    edge cases. Please look at the individual commits below for more
    information.

PR-URL: #29504
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V8 no longer resets the timezone cache upon invoking v8::Date::DateTimeConfigurationChangeNotification