Node.js 14.0 iri uye idzi ndidzo nhau dzayo

Kuburitswa kwe iyo nyowani vhezheni ye Node.js 14.0 izvo llega ine API yekuyedza nyowani yakanangana nekuchengetedza kwenzvimbo, iyo V8 injini kusimudzira (inoshandiswa mumabhurawuza akasiyana siyana) uye zvimwe zvishoma zvekuvandudza.

Iyi vhezheni itsva yeNode.js ichave iine chinzvimbo cheLTS asi ichapihwa kusvika Gumiguru mushure mekuidzikamisa. Tsigiro yeNode.js 14.0 ichave ichiwanikwa kusvika Kubvumbi 2023 uye kugadziriswa kweazvino LTS Node.js 12.0 vhezheni ichagara kusvika Kubvumbi 2022, nepo kwegore rinotevera kutsigirwa kweiyo Node.js 10 vhezheni kuchamiswa.Pamusoro peiyo 13.0 vhezheni, rutsigiro rwayo runogumiswa munaJune weiyi. gore.

Kune avo vasingazive nezve Node, vanofanirwa kuziva kuti izvi chikuva chinogona kushandiswa kune ese server rutsigiro yewebhu kunyorera pamwe nekugadzirwa kweserver network zvirongwa uye munhuwo mutengi.

Kuti uwedzere mashandiro ezvikumbiro zveNode.js, muunganidzwa muhombe wemamojuru wakagadzirirwa, maunogona kuwana mamodule nekumisikidza kweHTTP uye SMTP maseva nevatengi, XMPP, DNS, FTP, IMAP, POP3, ma module ekubatanidza. ine dzakasiyana siyana webhu masisitimu, WebSocket uye Ajax madhiraivha, DBMS zvinongedzo (MySQL, PostgreSQL, SQLite, MongoDB), template injini, CSS injini, kuiswa kwe cryptographic algorithms uye mvumo masisitimu (OAuth), XML parsers.

Chii chitsva muNode.js 14.0?

Mune iyi vhezheni itsva iyo kugona kuburitsa nhoroondo dzekuongorora pane nhunzi kana kana zvimwe zviitiko zvikagadzikana, zvichiratidza zviitiko zvinobatsira kuongorora matambudziko akadai sekupunzika, kudzikisira mashandiro, kudonhedza ndangariro, kukwirira kweCPU, kutadza kutadza kutarisirwa, nezvimwe.

Iyo mota V8 yakagadziridzwa kuita vhezheni 8.1, umo nyowani yekuita optimizations yakaunzwa uye hutsva hwakawedzerwa senge nyowani inonzwisisika yemubatanidzwa "??". (inodzosera operand yekurudyi kana iyo yekuruboshwe operand iri NULL kana isina kujekeswa, uye zvinopesana), anoshanda "?." yekutarisa-kamwe-kamwe kwechero chivakwa cheimba kana mafoni (semuenzaniso, "db? .user? .name? .length" isina chekutanga cheki), iyo Intl.DisplayName nzira yekuwana mazita enzvimbo, zvichingodaro.

Uyewo, kuwedzerwa kwerutsigiro rweyedzo yeiyo asynchronous yemuno yekuchengetedza API inosimbiswa pamwe nekuitwa kweiyo AsyncLocalStorage kirasi, iyo inogona kushandiswa kugadzira asynchronous nyika nevanobata zvichibva pakufona uye kuvimbisa mafoni.

Tsigiro yeAsyncLocalStorage kuitiswa inobvumira dhata kuti ichengetwe panguva yekugadziriswa kwewebhu webhu, yakafanana netambo dzemuno shinda yega mune mimwe mitauro.

Ukuwo, Kudzokororwa kweiyo Nzizi API kwakaitwa, nechinangwa chekuvandudza kusagadzikana yeiyo Rukova APIs uye kubvisa misiyano mumaitiro enhengo dzezvikamu zveNode.js.

Semuenzaniso, maitiro e http.OutgoingMessage ari padhuze kutenderera.Writable uye net.Socket iri padhuze kutenderera.Duplex. Iyo autoDestroy sarudzo inoiswa kuchokwadi nekusarudzika, zvinoreva kufona ku _destroy mushure mekupedza.

Izvo zvinotaurwa zvakare mune chiziviso chekuti yambiro nezvezvinhu zvekuyedza yakabviswa kana kurodha ECMAScript 6 module uye kuburitsa ma module uchishandisa import uye export expression. Panguva imwecheteyo, kuiswa kweESM module kunoramba kuri kuyedza.

Wakawedzera rutsigiro rwekuyedza rweWASI API (WebAssembly system interface), iyo inopa mapindiro epakati ekubatana kwakananga neiyo inoshanda system (POSIX API yekushanda nemafaira, zvigadziko, nezvimwewo).

Uye zvakare, izvo zvinodikanwa zveiyo shoma vhezheni yevagadziri uye mapuratifomu zvakawedzerwa: macOS 10.13 (High Sierra), GCC 6, Windows nyowani kupfuura 7 / 2008R2.

Maitiro ekuisa Node.JS paLinux?

Kuiswa kweNode.JS kuri nyore, kwazviri chete Ivo vanofanirwa kuvhura terminal mune ino system uye mairi ivo vari kuenda kunyorera imwe yeinotevera mirairo, zvinoenderana nedistro yako.

Muchiitiko cheavo vari D vashandisiebian, Ubuntu uye zvigadzirwa, ivo vanongofanira kunyora zvinotevera:

sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

Panguva yeavo vanoshandisa Arch Linux, Manjaro, Arco Linux kana chero chimwe chinobva paArch:

sudo pacman -S nodejs npm

Vashandisi veS OpenSUSE, ingo nyora zvinotevera:

sudo zypper ar \
http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ \
Node.js
sudo zypper in nodejs nodejs-devel

Pakupedzisira kune avo vanoshandisa Fedora, RHEL, Centos uye zvigadzirwa:

sudo dnf -i nodejs npm

Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako