Node.js — Node v23.1.0 (Current)
Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine.
Antoine du Hamel
Node v23.1.0 (Current)
2024-10-24, Version 23.1.0 (Current), @aduh95
Notable Changes
Buffer now work with resizable ArrayBuffer
When a Buffer is created using a resizable ArrayBuffer, the Buffer length will now correctly change as the underlying ArrayBuffer size is changed.
const ab = new ArrayBuffer(10, { maxByteLength: 20 });const buffer = Buffer.from(ab);console.log(buffer.byteLength);10;ab.resize(15);console.log(buffer.byteLength);15;ab.resize(5);console.log(buffer.byteLength);5;JavaScriptCopier dans le Presse-papier Contributed by James M Snell in #55377.
MockTimers test runner API is now stable
MockTimers, introduced in April 2023, has just reached stable status. This API provides comprehensive support for mocking Date and all major timers in Node.js, including setTimeout, setInterval, and setImmediate, both from the node:timers, node:timers/promises modules and global objects. After months of refinement, developers can now fully rely on MockTimers for testing time-based operations with confidence, ensuring better control over asynchronous behavior in their Node.js applications.
Example usage with initial Date object as time set:
import { mock } from ’node:test’;mock.timers.enable({ apis: ‘Date’, now: new Date(‘1970-01-01’) });JavaScriptCopier dans le Presse-papier Contributed by Erick Wendel in #55398.
JSON modules and import attributes are now stable
The two proposals reached stage 4 of the TC39 process, at the October 2024 meeting. The Node.js implementation already matches exactly the semantics required by the proposals.
Contributed by Nicolò Ribaudo by #55333.
Other Notable Changes
- 4ba31b7f20 - (SEMVER-MINOR)assert: make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862
- dcbc5fbe65 - (SEMVER-MINOR)lib: add UV_UDP_REUSEPORT for udp (theanarkh) #55403
- ec867ac7ce - (SEMVER-MINOR)net: add UV_TCP_REUSEPORT for tcp (theanarkh) #55408
Commits
- 4ba31b7f20 - (SEMVER-MINOR)assert: make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862
- fe667bea28 - assert: fix deepEqual always return true on URL (Xuguang Mei) #50853
- aca03d9083 - benchmark: add –runs support to run.js (Rafael Gonzaga) #55158
- c5abf50692 - benchmark: adjust byte size for buffer-copy (Rafael Gonzaga) #55295
- d3618b2334 - benchmark: adjust config for deepEqual object (Rafael Gonzaga) #55254
- c05582da3d - (SEMVER-MINOR)buffer: make Buffer work with resizable ArrayBuffer (James M Snell) #55377
- 194bb0fca5 - build: fix GN build for cares/uv deps (Cheng) #55477
- 8eb5359592 - build: fix uninstall script for AIX 7.1 (Cloorc) #55438
- 32f7d5ad1c - build: conditionally compile bundled sqlite (Richard Lau) #55409
- 2147e496e7 - build: tidy up cares.gyp (Richard Lau) #55445
- 2beae50c77 - build: synchronize list of c-ares source files (Richard Lau) #55445
- f48d30eb9f - build: fix path concatenation (Mohammed Keyvanzadeh) #55387
- d42522eec5 - build: fix make errors that occur in Makefile (minkyu_kim) #55287
- 52da293471 - cli: add –heap-prof flag available to NODE_OPTIONS (Juan José) #54259
- adead26815 - crypto: include openssl/rand.h explicitly (Shelley Vohr) #55425
- df2f1adf9e - deps: V8: cherry-pick f915fa4c9f41 (Chengzhong Wu) #55484
- bfc10a975f - deps: update googletest to df1544b (Node.js GitHub Bot) #55465
- 45ef1809bd - deps: update c-ares to v1.34.2 (Node.js GitHub Bot) #55463
- c2b5ebfeca - deps: update ada to 2.9.1 (Node.js GitHub Bot) #54679
- 903863cafa - deps: update simdutf to 5.6.0 (Node.js GitHub Bot) #55379
- 008fb5f7f4 - deps: patch V8 to 12.9.202.28 (Node.js GitHub Bot) #55371
- 8b282228ae - deps: update c-ares to v1.34.1 (Node.js GitHub Bot) #55369
- 54d55f2337 - Revert “deps: disable io_uring support in libuv by default” (Santiago Gimeno) #55114
- bfb3c621c4 - deps: update libuv to 1.49.1 (Santiago Gimeno) #55114
- 055d2b8919 - deps: update amaro to 0.1.9 (Node.js GitHub Bot) #55348
- c028d21b44 - diagnostics_channel: fix unsubscribe during publish (simon-id) #55116
- b4b6ddb777 - dns: honor the order option (Luigi Pinca) #55392
- 37352cef7f - doc: changed the command used to verify SHASUMS256 (adriancuadrado) #55420
- 66bcf4c065 - doc: move dual package shipping docs to separate repo (Joyee Cheung) #55444
- 04b41bda03 - doc: add note about stdio streams in child_process (Ederin (Ed) Igharoro) #55322
- 689d3a3e41 - doc: add isBigIntObject to documentation (leviscar) #55450
- 784c825a27 - doc: remove outdated remarks about highWaterMark in fs (Ian Kerins) #55462
- 1ec25e8573 - doc: move Danielle Adams key to old gpg keys (RafaelGSS) #55399
- 7d5bb097eb - doc: move Bryan English key to old gpg keys (RafaelGSS) #55399
- 2967471f67 - doc: move Beth Griggs keys to old gpg keys (RafaelGSS) #55399
- 0be3a7505f - doc: add changelog for mocktimers (Erick Wendel) #55398
- e15f779794 - doc: spell out condition restrictions (Jan Martin) #55187
- c3f2216a7d - doc: add instructions for WinGet build (Hüseyin Açacak) #55356
- bdc2c3bb94 - doc: add missing return values in buffer docs (Karl Horky) #55273
- 41f68f59af - doc: fix ambasador markdown list (Rafael Gonzaga) #55361
- bbd5318729 - esm: add a fallback when importer in not a file (Antoine du Hamel) #55471
- 22d77773fd - esm: fix inconsistency with importAssertion in resolve hook (Wei Zhu) #55365
- 48bb87b059 - esm: mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
- 8ceefebaf2 - events: optimize EventTarget.addEventListener (Robert Nagy) #55312
- 45f960cab6 - fs: pass correct path to DirentFromStats during glob (Aviv Keller) #55071
- d9494a7641 - fs: use wstring on Windows paths (jazelly) #55171
- 0f1d13e359 - lib: ensure FORCE_COLOR forces color output in non-TTY environments (Pietro Marchini) #55404
- dcbc5fbe65 - (SEMVER-MINOR)lib: add UV_UDP_REUSEPORT for udp (theanarkh) #55403
- 714f272423 - lib: remove startsWith/endsWith primordials for char checks (Gürgün Dayıoğlu) #55407
- 4e5c90bb41 - lib: replace createDeferredPromise util with Promise.withResolvers (Yagiz Nizipli) #54836
- db18aca47a - lib: add flag to drop connection when running in cluster mode (theanarkh) #54927
- dd848f2d1e - lib: test_runner#mock:timers respeced timeout_max behaviour (BadKey) #55375
- a9473bb8e3 - lib: remove settled dependant signals when they are GCed (Edigleysson Silva (Edy)) #55354
- 07ad987aa1 - lib: convert transfer sequence to array in js (Jason Zhang) #55317
- d54d3b24c3 - meta: move one or more collaborators to emeritus (Node.js GitHub Bot) #55381
- 12d709bd27 - meta: assign CODEOWNERS for /deps/ncrypto/* (Filip Skokan) #55426
- 0130780eec - meta: change color to blue notify review-wanted (Rafael Gonzaga) #55423
- 335a507027 - meta: bump codecov/codecov-action from 4.5.0 to 4.6.0 (dependabotbot) #55222
- 5ffc721d09 - meta: bump github/codeql-action from 3.26.6 to 3.26.10 (dependabotbot) #55221
- d9fde2c45b - meta: bump step-security/harden-runner from 2.9.1 to 2.10.1 (dependabotbot) #55220
- 2c960a212e - module: include module information in require(esm) warning (Joyee Cheung) #55397
- a12dbf03d9 - module: simplify ts under node_modules check (Marco Ippolito) #55440
- ec867ac7ce - (SEMVER-MINOR)net: add UV_TCP_REUSEPORT for tcp (theanarkh) #55408
- 9e320279a2 - Revert “path: fix bugs and inconsistencies” (Aviv Keller) #55414
- 1ce8928db3 - sqlite: cache column names in stmt.all() (Fedor Indutny) #55373
- cc775d314a - src: switch from Get/SetPrototype to Get/SetPrototypeV2 (Aviv Keller) #55453
- 89c96ade53 - src: remove icu based ToASCII and ToUnicode (Yagiz Nizipli) #55156
- 57dbbf8402 - src: fix winapi_strerror error string (Hüseyin Açacak) #55207
- a490bb8745 - src: remove uv__node_patch_is_using_io_uring (Santiago Gimeno) #55114
- 0da1632937 - src,lib: introduce util.getSystemErrorMessage(err) (Juan José) #54075
- 6764273127 - stream: propagate AbortSignal reason (Marvin ROGER) #55473
- 4dc2791cdd - test: add repl preview timeout test (Chengzhong Wu) #55484
- 8634e054d4 - test: make test-node-output-v8-warning more flexible (Shelley Vohr) #55401
- 6c8564b55d - test: fix addons and node-api test assumptions (Antoine du Hamel) #55441
- 94e863cdb7 - test: update wpt test for webmessaging/broadcastchannel (devstone) #55205
- c10c6715cd - test: deflake test-cluster-shared-handle-bind-privileged-port (Aviv Keller) #55378
- 6f7379a048 - test: fix invalid file: URL in test-fs-path-dir (Antoine du Hamel) #55454
- dd5a08d022 - test: update console wpt (Aviv Keller) #55192
- 9b7b4a6b25 - test: remove duplicate tests (Luigi Pinca) #55393
- eb2fab3da1 - test: update test_util.cc for coverage (minkyu_kim) #55291
- 59923d137e - test: update compression wpt (Aviv Keller) #55191
- 1b63a822ac - test,crypto: update WebCryptoAPI WPT (Filip Skokan) #55427
- 97c6448f63 - test_runner: mark mockTimers as stable (Erick Wendel) #55398
- 69ee56aacd - test_runner: add support for scheduler.wait on mock timers (Erick Wendel) #55244
- d9f0407cf6 - test_runner: require –enable-source-maps for sourcemap coverage (Aviv Keller) #55359
- 2ac2c5a7e7 - tools: update lint-md-dependencies (Node.js GitHub Bot) #55470
- 10f6b90f7d - tools: update gyp-next to 0.18.3 (Node.js GitHub Bot) #55464
- 65936a8bb6 - tools: add script to synch c-ares source lists (Richard Lau) #55445
- 1da4168486 - tools: add polyfilled option to prefer-primordials rule (Antoine du Hamel) #55318
- 3b2b3a8df2 - tools: fix typos (Nathan Baulch) #55061
- 736c085a5d - typings: add missing type of ArrayBufferPrototypeGetByteLength (Wuli Zuo) #55439
- 7b3e38b855 - url: handle “unsafe” characters properly in pathToFileURL (Antoine du Hamel) #54545
Windows 64-bit Installer: https://nodejs.org/dist/v23.1.0/node-v23.1.0-x64.msi Windows ARM 64-bit Installer: https://nodejs.org/dist/v23.1.0/node-v23.1.0-arm64.msi Windows 64-bit Binary: https://nodejs.org/dist/v23.1.0/win-x64/node.exe Windows ARM 64-bit Binary: https://nodejs.org/dist/v23.1.0/win-arm64/node.exe macOS 64-bit Installer: https://nodejs.org/dist/v23.1.0/node-v23.1.0.pkg macOS Apple Silicon 64-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-darwin-arm64.tar.gz macOS Intel 64-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-darwin-x64.tar.gz Linux 64-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-linux-x64.tar.xz Linux PPC LE 64-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-linux-ppc64le.tar.xz Linux s390x 64-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-linux-s390x.tar.xz AIX 64-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-aix-ppc64.tar.gz ARMv7 32-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-linux-armv7l.tar.xz ARMv8 64-bit Binary: https://nodejs.org/dist/v23.1.0/node-v23.1.0-linux-arm64.tar.xz Source Code: https://nodejs.org/dist/v23.1.0/node-v23.1.0.tar.gz Other release files: https://nodejs.org/dist/v23.1.0/ Documentation: https://nodejs.org/docs/v23.1.0/api/
SHASUMS
—–BEGINPGPSIGNEDMESSAGE—–Hash:SHA256e153fef6a3e71d92b2314d2f56c4a9ca0699e8614493c246cf6be6a09f6197b1node-v23.1.0-aix-ppc64.tar.gz468a5d028cf09ab7dbf72e35acf892f801efca8f5aa0d8e4ca9c6b01b4b2b2b4node-v23.1.0-arm64.msi414d4b68299be0cbccfabfac59e53d0726151320e9ff71457ab0bb507fc0592dnode-v23.1.0-darwin-arm64.tar.gz16e6ed0cdf81d4f93e05b8287f89799be87033ff2eca7956daa1d3d1ea2ae680node-v23.1.0-darwin-arm64.tar.xzcb84bd83064ff75f63dd95f1a53b6f7f2d2d36c67e03e9e9c87cfa2b977511b6node-v23.1.0-darwin-x64.tar.gz2d4e9c12ed17c3fffff601cd042804636bddbc90f5455ca92576bf9760dbe52dnode-v23.1.0-darwin-x64.tar.xz53ac3b2d5375e5daa089176d5eeacfb0f842c7003cccdf4dcfc01b5ce795fcaanode-v23.1.0-headers.tar.gz42df72bd7391d404887581e6d96ea18b6f328a42e502c0f3bdb97eb3ecbfaaaanode-v23.1.0-headers.tar.xz21e20e961eb2f6ab3fcc24421d3975d1714b6a4525c8ecd4f3dbbee3938a95ccnode-v23.1.0-linux-arm64.tar.gzfde280a7fdf9dcf0ce827caed750d8a0d7f82a352df1f98c1830614c27718cadnode-v23.1.0-linux-arm64.tar.xz960287c96b4a13a7c2ba7eb71686550d1281aae0caf5d80afbd76f0c72044ae3node-v23.1.0-linux-armv7l.tar.gzb270287ed2a7e6235214b3d2e6ad76f0a6fb1269af8c1dac6d8aca34f5c6b22enode-v23.1.0-linux-armv7l.tar.xz51911fe95abce0d3866f436b3ba553252de1acf264369f3bcdd9aad4aad7454dnode-v23.1.0-linux-ppc64le.tar.gz0950991435d69662e5d9ce1c352a28b008ae41704fbce36955439f61483422b8node-v23.1.0-linux-ppc64le.tar.xzb38024a98852e16476351ce0258b0cf2a35e408e9cf50c2cfa2b361687bb16f1node-v23.1.0-linux-s390x.tar.gz5e40a0540785c885fc399313aad4dd2a0a4757228010d95bd5ececa3d753ad3bnode-v23.1.0-linux-s390x.tar.xz1c436b2ac33a4fef7cf08c08b8a33362325c0c8ac8d05d4054a79628d5d0b5aenode-v23.1.0-linux-x64.tar.gzccacff4f32e3c3729f5094d20e4089a16a3b8f1381e9730b19f1c16f7cf64da9node-v23.1.0-linux-x64.tar.xz7d4132d56bb852ddb2e85f51dbd10f8f2b0da363f992ef60a094dd88954c0a46node-v23.1.0-win-arm64.7z8209ccbcdb73395453c0f1065247a0d780bedbec95a6f79aa87692b5412fcc5anode-v23.1.0-win-arm64.zip3af98fb098d8801a93cc178a95cee2bb828cdac5f680413b7e43fd9a42824a73node-v23.1.0-win-x64.7z0e904430fa560b7666b48b0f7b9a6dddbb5a70613c00ea3f386edd64726ade70node-v23.1.0-win-x64.zip5836348cc939c43d6a520b57c52c69d744e86f777436535586cb4961e92c192cnode-v23.1.0-x64.msi5a686bd558cd9cdb0992f593103c46c9a90930f77b07f93de0bed298b358f21anode-v23.1.0.pkg4ccf155c703d53caf4e56624004782f106fce2b6935496b3ff29c6da4d6b6674node-v23.1.0.tar.gz57cbfd3dd51f9300ea2b8e60a8ed215b1eaa71fbde4c3903a7d31a443a4a4423node-v23.1.0.tar.xzf3491ab76eeb76c675199d53d31f756e6b8de56e24dd77de59ac942c597b9b41win-arm64/node.exe26f2d9ca9ec82df85c3cadee0de373a4836e46293149eec718ab716acbe4e1abwin-arm64/node.lib715c13e2459a7ff9fc7eeaed8efda7f42a30dee031eb3227da474f5f77030714win-arm64/node_pdb.7z4ac413502bc5d1a380f9a854f4986635c0a4f0aa7b53a697f6d70a9a8d3324a7win-arm64/node_pdb.zip60b05e773fd1c2e589e8e20af540ab17894dcae6482cfa0955fb36900efdad68win-x64/node.exe7ef14cabb18518a70e04ca067134d9a51beee11590ea3114e1baf68054124c62win-x64/node.libb9f393f2d3e72a0a2af20db517458c4525981ce2e9fc2cf7df4bf28a5bd4822bwin-x64/node_pdb.7z8c487589b9bad1c83e8f0d04fae57ea5e70862c68354063925fcc026bb8d79f7win-x64/node_pdb.zip—–BEGINPGPSIGNATURE—–iQIzBAEBCAAdFiEEwNYkhDnx1WBKr/tAIdkA/9sjN1YFAmcavBIACgkQIdkA/9sjN1bCVxAAux/68iV9NgaXXran5rsSvgFL0Kdyo1L/45KBLkwmXfLFg7RpMEU+AjoScuFm4PmWrYmgFb3eUmZLEsBtj+kC/IxUX/oO5ZiYiSlBXqnryOh4twBdxDSM999m/B2FgVxk3uvyYJtRHD4a2odgB9u7JWXYTmquhgIa2FqvVX6CPHQEFlZr2RogohhXbxkXe3gsLikHYZ+L3FIJcNwWPPDm2+R5twxad0WeyRTI5sTD21y+9Brv2AxCOrV+kk8tzsJU9Kn2CX4kJEJ1ERwZZeGoF0tHgilIm81z9ljvORFOn81YBT99Jz6qP8Dqu0wErVPaqrHRHWGoIMBEfHotVrG92CioeX0ei4oGCJxBVihxTiTAOFDmBlbAE2DpiKNe1wCObsih2rAzqWv9N/cVEVDljrtrRpe/sFVFwg+WMWioHcK5uXPpdvY1ldWCnGZplD5pbqAmbj2D7fo4Fe/GxQX2rAmWZNk4lpM/YbgVJePqLaLBjpPqMlEkaEM5QcTFN5vz2zGx1/6ZVRf+LqbBEW6rBq2ktJe2ZXVPsADNjhxzQVHUk1wpXYcKHDyxJnnpCuEHfhEpZA0oQueEbgml9rb2EeRDzfHKO8DLlkzRd0UDR99iadg7KwjX0yhBM5weTtX6qVeNH3KMOkYYsFPE4ZM2n9Hhnp+bJ/urvZQmrt8aXAg==kfDn—–ENDPGPSIGNATURE—–Préc.Node v22.11.0 (LTS)Suiv.Node v22.10.0 (Current)
FAQ
Công nghệ đã ảnh hưởng đến trò chơi roulette như thế nào?
Công nghệ đã ảnh hưởng đến trò chơi roulette như thế nào, chẳng hạn như với các phiên bản điện tử và tự động của trò chơi? Một trong những tiến bộ công nghệ quan trọng nhất trong trò chơi roulette là sự ra đời của các bàn roulette điện tử. Các bàn này có màn hình kỹ thuật số mô phỏng chuyển động quay của bánh xe roulette và người chơi có thể đặt cược trên giao diện màn hình cảm ứng.
Nguồn gốc của cái tên Roulette là gì?
Nguồn gốc của cái tên Roulette là gì? Nguồn gốc của cái tên ârouletteâ là tiếng Pháp và nó có nghĩa là “bánh xe nhỏ”. Cái tên này bắt nguồn từ thực tế là trò chơi được chơi trên một bánh xe nhỏ quay xung quanh, người chơi đặt cược vào vị trí quả bóng sẽ rơi xuống. Từ ârouletteâ lần đầu tiên được sử dụng trong bối cảnh hiện tại của nó vào thế kỷ 18, mặc dù bản thân trò chơi này đã xuất hiện sớm hơn nhiều.
Khi nào và tại sao số 0 kép được thêm vào bánh xe roulette của Mỹ?
Khi nào và tại sao số 0 kép được thêm vào bánh xe roulette của Mỹ? Số 0 kép đã được thêm vào bánh xe roulette của Mỹ vào giữa thế kỷ 19. Năm chính xác không rõ ràng, nhưng người ta cho rằng nó đã được thêm vào khoảng những năm 1860. Lý do bổ sung nó là để tăng tỷ lệ lợi nhuận nhà cái, giúp trò chơi mang lại nhiều lợi nhuận hơn cho sòng bạc.
Trò chơi roulette lần đầu tiên được chơi ở đâu và khi nào?
Trò chơi roulette lần đầu tiên được chơi ở đâu và khi nào? Trò chơi mà chúng ta biết ngày nay xuất hiện lần đầu tiên ở Paris vào năm 1796 và nhanh chóng trở nên phổ biến khắp châu Âu, đặc biệt là tại các sòng bạc ở Monte Carlo. Việc Francois và Louis Blanc bổ sung số 0 vào giữa thế kỷ 19 đã giúp tăng tỷ lệ lợi nhuận nhà cái và làm cho trò chơi mang lại nhiều lợi nhuận hơn cho các sòng bạc.
Một số vụ bê bối và tranh cãi nổi tiếng về roulette trong suốt lịch sử là gì?
Một số vụ bê bối và tranh cãi nổi tiếng về roulette trong suốt lịch sử là gì? 1. Eudaemons – Vào những năm 1970, một nhóm sinh viên vật lý tại Đại học California Santa Cruz đã sử dụng máy tính để dự đoán kết quả của trò chơi roulette tại sòng bạc Nevada. Họ tự gọi mình là “The Eudaemons” và kiếm được lợi nhuận đáng kể trước khi hoạt động của họ bị đóng cửa.
Poker trực tuyến nổi tiếng nhất thế giới - WPT Global! Đây là thiên đường cho những người yêu thích poker, click để tìm hiểu cách tải WPT Global
Trang web này chỉ thu thập các bài viết liên quan. Để xem bản gốc, vui lòng sao chép và mở liên kết sau:Node.js — Node v23.1.0 (Current)