関西Node学園 6時限目でNode.js v12の変更点について話しました。 https://nodejs.connpass.com/event/126358/
Node.js v12Notable ChangesؔNodeֶԂ 6࣌ݶMasashi Hirano(@shisama)
View Slide
ฏ ণ࢜ / Masashi Hiranoɹɹɹɹ Kyoto office@shisama_@shisamaNode.js Core CollaboratorؔNodeֶԂOrganizer
4/23ʹ12.0.0͕ϦϦʔε͞Ε·ͨ͠
https://nodejs.org/en/blog/release/v12.0.0/݄ʹ-54ʹ
https://nodejs.org/en/blog/release/v12.0.0/W&0-ʹ
Node.js v12ͷಛʹؾʹͳͬͨมߋΛհ͠·͢ʂ
https://nodejs.org/en/blog/release/v12.0.0//PEFKTͷެࣜϖʔδ(JU)VCͷ3FMFBTFϖʔδʹ1VMM3FRVFTUͷϦϯΫ͕షͬͯ͋Δ
https://github.com/nodejs/node/pull/26685
V8(JSΤϯδϯ)͕7.4ʹ• Node.js v10ͷV86.8• JavaScript(ECMAScript)৽ػೳ͕Ճ• async / await͕ߴԽ• async-stack-trace͕Ճ etc…
https://twitter.com/mathias/status/1120700101637353473JavaScript৽ػೳ
Array#{flat,flatMap}var arr1 = [1, 2, [3, 4]];arr1.flat();// [1, 2, 3, 4]arr1.flatMap(x => [x * 2]);// [2, 4, 6, 8]
Private Class Fieldclass Counter {#count = 0;get value() {return this.#count;}increment() {this.#count++;}}const counter = new Counter();counter.increment();counter.#counter; // Errorcounter.value; // OKQSJWBUFʹ͍ͨ͠ϑΟʔϧυʹΛ͚ͭΔ
https://twitter.com/mathias/status/1120700101637353473ଞʹͨ͘͞Μ͋Γ·͢ʂଓ͖WebͰʂ
https://speakerdeck.com/ajido/callback-to-promise-and-beyondલճˏAjido͞Μ͕ൃදͯ͘͠Ε·ͨ͠ʂ
https://blog.risingstack.com/node-js-12-new-features/Async Stack Trace
https://blog.risingstack.com/node-js-12-new-features/Async Stack Tracev11V12
llhttp• HTTPύʔαͷσϑΥϧτ͕http_parser͔Βllhttpʹ• http_parserվྑΛࢼΈ͚ͨͲ͔ͬͨ͠• llhttpTypeScriptͰॻ͔Ε͍ͯͯϝϯς͘͢͠ͳ͍ͬͯΔ• http_parserΑΓ࣮ߦ͕͍• llparseͰCݴޠLLVMϏοτίʔυʹม
llhttphttps://github.com/nodejs/llhttp
https://github.com/nodejs/node/pull/26209εΫϦʔϯγϣοτ 2019-05-08 02.51.41.png
https://github.com/nodejs/node/pull/23814
tls• TLS 1.3Λ৽͘͠αϙʔτ• TLS1.0ɺ1.1σϑΥϧτͰαϙʔτର֎ʹ• 2020/03ʹϝϯς͞Εͳ͘ͳΔ• v12LTSͰ2022/04ͰEOL
https://github.com/nodejs/node/pull/25576
σϑΥϧτͷheapͷ࠷େ• ैདྷ700MB(32bit) / 1400MB(64bit)ݻఆͩͬͨ• v12͔Β༻ՄೳͳϝϞϦ༰ྔʹ߹Θͤͯ૿ݮ
https://github.com/nodejs/node/pull/23027͜ͷޙɺొஃ༧ఆʂ
https://github.com/nodejs/node/pull/27361/PEFKTWͰྩରԠ͞Εͨ
Node.js v12ʹͳΔ͜ͱͰಈ͔ͳ͘ͳΔύοέʔδଘࡏ͢Δ
https://github.com/nodejs/node/issues/25060
Node.js v12ͰյΕΔύοέʔδ͕͋Δ• uglify-jsbcryptͳͲ༗໊ͳͱ͜Ζ͕ର• طʹରԠࡁͷͷ͋Δ• CITGMͱ͍͏Node.js CoreͷCIδϣϒͰᖰΓग़͍ͯ͠Δ• Α͘ΘΕΔύοέʔδͷςετ͕௨Δ͔ݕূ• https://github.com/nodejs/citgm• ੈͷதͷશͯͷnpmύοέʔδΛݕূ͍ͯ͠ΔΘ͚Ͱͳ͍
npmʹύοέʔδΛެ։͍ͯ͠ΔਓNode.jsͷϝδϟʔόʔδϣϯ͕ϦϦʔε͞ΕͨΒݕূͯ͠Έ·͠ΐ͏ʂ
·ͱΊ• V8ͷόʔδϣϯΞοϓͰJavaScriptͷ৽ػೳ͕Ճ͞Εͨ• Node.js Core෦తʹΞοϓσʔτ͞Ε͍ͯΔ• ϝδϟʔόʔδϣϯnpmύοέʔδ͕յΕͨΓ͢ΔͷͰݕূ͕ඞཁ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ@shisama_@shisama