-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
v22.8.0 proposal #54560
v22.8.0 proposal #54560
Conversation
Backport-PR-URL: #54455 PR-URL: #54383 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]>
PR-URL: #54399 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: #54409 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #54412 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
PR-URL: #54320 Reviewed-By: Yagiz Nizipli <[email protected]>
This commit updates the test runner to wait for suites to finish building before starting any tests. This is necessary when test filtering is enabled, as suites may transition from filtered to not filtered depending on what is inside of them. Fixes: #54084 Fixes: #54154 PR-URL: #54423 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]>
PR-URL: #54153 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: James M Snell <[email protected]>
The previous implementation was trying to follow both `require` and `import` conventions. It is not practical to try to follow both, and aligning with `import()` seems to be what makes the most sense. PR-URL: #54416 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
Source map is not necessary in strip-only mode. However, to map the source file in debuggers to the original TypeScript source, add a sourceURL magic comment to hint that it is a generated source. PR-URL: #54402 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Kohei Ueno <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
This commit updates the source mapping logic in the test runner to account for newline characters that are not included in line length calculations. Co-authored-by: Simon Chan <[email protected]> Fixes: #54240 PR-URL: #54444 Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit updates the way the test runner computes inherited hooks. Instead of computing them when the Test/Suite is constructed, they are now computed just prior to running the Test/Suite. The reason is because when multiple test files are run in the same process, it is possible for the inherited hooks to change as more files are loaded. PR-URL: #53927 Fixes: #51548 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Review requested:
|
Notable changes: net: * (SEMVER-MINOR) exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) #54264 test_runner: * (SEMVER-MINOR) add support for coverage thresholds (Aviv Keller) #54429 * (SEMVER-MINOR) support running tests in process (Colin Ihrig) #53927 * (SEMVER-MINOR) defer inheriting hooks until run() (Colin Ihrig) #53927 PR-URL: #54560
42e2b39
to
04d4796
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Nit: "Support to coverage thresholds" -> "Support for coverage thresholds" |
Is 22.8.0 still expected to go out today? We are awaiting it as (hopefully) a fix for #54518 (comment) |
Yes. We're doing our best. Currently, waiting for CI to finish. |
7096d14
to
729abbe
Compare
Notable changes: net: * (SEMVER-MINOR) exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) #54264 src: * (SEMVER-MINOR) add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE (Joyee Cheung) #54501 src,lib: * (SEMVER-MINOR) add performance.uvMetricsInfo (Rafael Gonzaga) #54413 test_runner: * (SEMVER-MINOR) add support for coverage thresholds (Aviv Keller) #54429 * (SEMVER-MINOR) support running tests in process (Colin Ihrig) #53927 * (SEMVER-MINOR) defer inheriting hooks until run() (Colin Ihrig) #53927 vm: * (SEMVER-MINOR) introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) #54394 PR-URL: #54560
Unlikely to be released today (02/09). CI still running. |
Notable changes: net: * (SEMVER-MINOR) exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) #54264 src: * (SEMVER-MINOR) add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE (Joyee Cheung) #54501 src,lib: * (SEMVER-MINOR) add performance.uvMetricsInfo (Rafael Gonzaga) #54413 test_runner: * (SEMVER-MINOR) add support for coverage thresholds (Aviv Keller) #54429 * (SEMVER-MINOR) support running tests in process (Colin Ihrig) #53927 * (SEMVER-MINOR) defer inheriting hooks until run() (Colin Ihrig) #53927 vm: * (SEMVER-MINOR) introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) #54394 PR-URL: #54560
729abbe
to
78ee90e
Compare
Hopefully this can be landed today (3/9) |
Notable changes: net: * (SEMVER-MINOR) exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) #54264 src: * (SEMVER-MINOR) add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE (Joyee Cheung) #54501 src,lib: * (SEMVER-MINOR) add performance.uvMetricsInfo (Rafael Gonzaga) #54413 test_runner: * (SEMVER-MINOR) add support for coverage thresholds (Aviv Keller) #54429 * (SEMVER-MINOR) support running tests in process (Colin Ihrig) #53927 * (SEMVER-MINOR) defer inheriting hooks until run() (Colin Ihrig) #53927 vm: * (SEMVER-MINOR) introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) #54394 PR-URL: #54560
Notable changes: net: * (SEMVER-MINOR) exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) nodejs#54264 src: * (SEMVER-MINOR) add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE (Joyee Cheung) nodejs#54501 src,lib: * (SEMVER-MINOR) add performance.uvMetricsInfo (Rafael Gonzaga) nodejs#54413 test_runner: * (SEMVER-MINOR) add support for coverage thresholds (Aviv Keller) nodejs#54429 * (SEMVER-MINOR) support running tests in process (Colin Ihrig) nodejs#53927 * (SEMVER-MINOR) defer inheriting hooks until run() (Colin Ihrig) nodejs#53927 vm: * (SEMVER-MINOR) introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) nodejs#54394 PR-URL: nodejs#54560
Notable changes: net: * (SEMVER-MINOR) exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) nodejs#54264 src: * (SEMVER-MINOR) add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE (Joyee Cheung) nodejs#54501 src,lib: * (SEMVER-MINOR) add performance.uvMetricsInfo (Rafael Gonzaga) nodejs#54413 test_runner: * (SEMVER-MINOR) add support for coverage thresholds (Aviv Keller) nodejs#54429 * (SEMVER-MINOR) support running tests in process (Colin Ihrig) nodejs#53927 * (SEMVER-MINOR) defer inheriting hooks until run() (Colin Ihrig) nodejs#53927 vm: * (SEMVER-MINOR) introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) nodejs#54394 PR-URL: nodejs#54560
2024-09-03, Version 22.8.0 (Current), @RafaelGSS
New JS API for compile cache
This release adds a new API
module.enableCompileCache()
that can be used to enable on-disk code caching of all modules loaded after this API is called.Previously this could only be enabled by the
NODE_COMPILE_CACHE
environment variable, so it could only set by end-users.This API allows tooling and library authors to enable caching of their own code.
This is a built-in alternative to the v8-compile-cache/v8-compile-cache-lib packages,
but have better performance and supports ESM.
Thanks to Joyee Cheung for working on this.
New option for vm.createContext() to create a context with a freezable globalThis
Node.js implements a flavor of
vm.createContext()
and friends that creates a context without contextifying its globalobject when vm.constants.DONT_CONTEXTIFY is used. This is suitable when users want to freeze the context
(impossible when the global is contextified i.e. has interceptors installed) or speed up the global access if they
don't need the interceptor behavior.
Thanks to Joyee Cheung for working on this.
Support for coverage thresholds
Node.js now supports requiring code coverage to meet a specific threshold before the process exits successfully.
To use this feature, you need to enable the
--experimental-test-coverage
flag.You can set thresholds for the following types of coverage:
--test-coverage-branches=<threshold>
--test-coverage-functions=<threshold>
--test-coverage-lines=<threshold>
<threshold>
should be an integer between 0 and 100. If an invalid value is provided, aTypeError
will be thrown.If the code coverage fails to meet the specified thresholds for any category, the process will exit with code
1
.For instance, to enforce a minimum of 80% line coverage and 60% branch coverage, you can run:
$ node --experimental-test-coverage --test-coverage-lines=80 --test-coverage-branches=60 example.js
Thanks Aviv Keller for working on this.
Other Notable Changes
1f2cc2fa47
] - (SEMVER-MINOR) src,lib: add performance.uvMetricsInfo (Rafael Gonzaga) #544131e01bdc0d0
] - (SEMVER-MINOR) net: exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) #5426497fa075c2e
] - (SEMVER-MINOR) test_runner: support running tests in process (Colin Ihrig) #53927858b583c88
] - (SEMVER-MINOR) test_runner: defer inheriting hooks until run() (Colin Ihrig) #53927Commits
94985df9d6
] - benchmark: fix benchmark for file path and URL conversion (Early Riser) #54190ac178b094b
] - buffer: truncate instead of throw when writing beyond buffer (Robert Nagy) #54524afd8c1eb4f
] - buffer: allow invalid encoding in from (Robert Nagy) #545336f0cf35cd3
] - build: reclaim disk space on macOS GHA runner (jakecastelli) #54658467ac3aec4
] - build: don't clean obj.target directory if it doesn't exist (Joyee Cheung) #5433771fdf961df
] - build: update required python version to 3.8 (Aviv Keller) #5435873604cf1c5
] - deps: update nghttp2 to 1.63.0 (Node.js GitHub Bot) #54589b00c087285
] - deps: V8: cherry-pick e74d0f437fcd (Joyee Cheung) #5427933a6b3c7a9
] - deps: backport ICU-22787 to fix ClangCL on Windows (Stefan Stojanovic) #54502fe56949cbb
] - deps: update c-ares to v1.33.1 (Node.js GitHub Bot) #54549290f6ce619
] - deps: update amaro to 0.1.8 (Node.js GitHub Bot) #54520b5843568b4
] - deps: update amaro to 0.1.7 (Node.js GitHub Bot) #544739c709209b4
] - deps: update undici to 6.19.8 (Node.js GitHub Bot) #54456a5ce24181b
] - deps: sqlite: fix Windows compilation (Colin Ihrig) #544333caf29ea88
] - deps: update sqlite to 3.46.1 (Node.js GitHub Bot) #5443368758d4b08
] - doc: add support me link for anonrig (Yagiz Nizipli) #54611f5c5529266
] - doc: add alert on REPL from TCP socket (Rafael Gonzaga) #54594bf824483cd
] - doc: fix typo in styleText description (Rafael Gonzaga) #54616825d933fd4
] - doc: add getHeapStatistics() property descriptions (Benji Marinacci) #5458480e5150160
] - doc: fix module compile cache description (沈鸿飞) #546257fd033fe56
] - doc: run license-builder (github-actions[bot]) #54562c499913732
] - doc: fix information about including coverage files (Aviv Keller) #54527c3dc83befc
] - doc: support collaborators - talk amplification (Michael Dawson) #54508fc57beaad3
] - doc: add note about shasum generation failure (Marco Ippolito) #544871800a58f49
] - doc: update websocket flag description to reflect stable API status (Yelim Koo) #5448261affd77a7
] - doc: fix capitalization in module.md (shallow-beach) #5448825419915c7
] - doc: add esm examples to node:https (Alfredo González) #5439983b5efeb54
] - doc: reserve ABI 130 for Electron 33 (Calvin) #543836ccbd32ae8
] - doc, meta: add missing,
toBUILDING.md
(Aviv Keller) #54409fc08a9b0cd
] - fs: refactor handleTimestampsAndMode to remove redundant call (HEESEUNG) #543694a664b5fcb
] - lib: respect terminal capabilities on styleText (Rafael Gonzaga) #54389a9ce2b6a28
] - lib: fix emit warning for debuglog.time when disabled (Vinicius Lourenço) #54275b5a23c9783
] - meta: remind users to use a supported version in bug reports (Aviv Keller) #544810d7171d8e9
] - meta: add more labels to dep-updaters (Aviv Keller) #54454c4996c189f
] - meta: run coverage-windows whenvcbuild.bat
updated (Aviv Keller) #544123cf645768e
] - module: use amaro default transform values (Marco Ippolito) #54517336496b90e
] - module: add sourceURL magic comment hinting generated source (Chengzhong Wu) #5440204f83b50ad
] - Revert "net: validate host name for server listen" (jakecastelli) #545541e01bdc0d0
] - (SEMVER-MINOR) net: exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) #542643cd10a3f40
] - node-api: remove RefBase and CallbackWrapper (Vladimir Morozov) #5359072c554abab
] - sqlite: return results with null prototype (Michaël Zasso) #54350e071651bb2
] - src: disable fast methods forbuffer.write
(Michaël Zasso) #54565f8cbbc685a
] - src: use v8::Isolate::GetDefaultLocale() to compute navigator.language (Joyee Cheung) #542794baf4637eb
] - (SEMVER-MINOR) src: add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE (Joyee Cheung) #54501101e299656
] - src: move more crypto_dh.cc code to ncrypto (James M Snell) #54459e6e1f4e8bd
] - src: remove redundant AESCipherMode (Tobias Nießen) #544381ff3f63f5e
] - src: handle errors correctly inpermission.cc
(Michaël Zasso) #545414938188682
] - src: returnv8::Object
from error constructors (Michaël Zasso) #545414578e9485b
] - src: use better return types in KVStore (Michaël Zasso) #545397d9e994791
] - src: change SetEncodedValue to return Maybe<void> (Tobias Nießen) #54443eef303028f
] - src: remove cached data tag from snapshot metadata (Joyee Cheung) #541223a74c400d5
] - src: improvebuffer.transcode
performance (Yagiz Nizipli) #54153909c5320fd
] - src: move more crypto code to ncrypto (James M Snell) #543209ba75faf5f
] - (SEMVER-MINOR) src,lib: add performance.uvMetricsInfo (Rafael Gonzaga) #54413fffc300c6d
] - stream: change stream to use index instead offor...of
(Wiyeong Seo) #54474a4a6ef8d29
] - test: fix test-tls-client-auth test for OpenSSL32 (Michael Dawson) #5461076345a5d7c
] - test: update TLS test for OpenSSL 3.2 (Richard Lau) #54612522d5a359d
] - test: run V8 Fast API tests in release mode too (Michaël Zasso) #54570edbecf5209
] - test: increase key size for ca2-cert.pem (Michael Dawson) #54599bc976cfc93
] - test: update test-abortsignal-cloneable to use node:test (James M Snell) #545819f1ce732a8
] - test: update test-assert-typedarray-deepequal to use node:test (James M Snell) #54585c74f2aeb92
] - test: update test-assert to use node:test (James M Snell) #54585a0be95e4cc
] - test: merge ongc and gcutil into gc.js (tannal) #54355c10aff665e
] - test: move a couple of tests over to using node:test (James M Snell) #54582dbbc790949
] - test: update test-aborted-util to use node:test (James M Snell) #5457864442fce6b
] - test: refactor test-abortcontroller to use node:test (James M Snell) #5457472345dee1c
] - test: fix embedding test for Windows (Vladimir Morozov) #53659846e2b2896
] - test: refactor test_runner tests to change default reporter (Colin Ihrig) #54547b5eb24c86a
] - test: force spec reporter in test-runner-watch-mode.mjs (Colin Ihrig) #5453866ae9f4c0a
] - test: use valid hostnames (Luigi Pinca) #5455602d664b75f
] - test: fix improper path to URL conversion (Antoine du Hamel) #545098a4f8a9eff
] - test: add tests for runner coverage with different stdout column widths (Pietro Marchini) #54494b0ed8dbb2f
] - test: prevent V8 from writing into the system's tmpdir (Michaël Zasso) #543955ee234a5a6
] - test,crypto: update WebCryptoAPI WPT (Filip Skokan) #54593a4bebf8559
] - test_runner: ensure test watcher picks up new test files (Pietro Marchini) #54225d4310fe9c1
] - (SEMVER-MINOR) test_runner: add support for coverage thresholds (Aviv Keller) #544290cf78aa24b
] - test_runner: refactormock_loader
(Antoine du Hamel) #5422397fa075c2e
] - (SEMVER-MINOR) test_runner: support running tests in process (Colin Ihrig) #53927858b583c88
] - (SEMVER-MINOR) test_runner: defer inheriting hooks until run() (Colin Ihrig) #5392745b0250692
] - test_runner: account for newline in source maps (Colin Ihrig) #544441c29e74d30
] - test_runner: makemock.module
'sspecifier
consistent withimport()
(Antoine du Hamel) #54416cbe30a02a3
] - test_runner: finish build phase before running tests (Colin Ihrig) #544238a4b26f00c
] - timers: fix validation (Paolo Insogna) #5440438798140c4
] - tools: remove unused python files (Aviv Keller) #53928da6c61def8
] - tools: add swc license (Marco Ippolito) #5446216d4c437e1
] - typings: provide internal types for wasi bindings (Andrew Moon) #54119fe5666f006
] - vm: return all own names and symbols in property enumerator interceptor (Chengzhong Wu) #54522db80eac496
] - (SEMVER-MINOR) vm: introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) #543948ffdd1e2b2
] - zlib: simplify validators (Yagiz Nizipli) #54442