2024-08-06 TSKaigi ãµãã¤ãã³ã #1 ããã³ãã¨ã³ã
2024-08-06 TSKaigi ãµãã¤ãã³ã #1 ããã³ãã¨ã³ã
tl;dr ã¯ããã« 2024 å¹´ã® 4 æ 24 æ¥ã« Node.js 22 ããªãªã¼ã¹ããã¾ãããESM ã æ¡ä»¶ä»ã㧠require ããæ©è½ãã--run ãã©ã°ã«ãã npm ã¹ã¯ãªããã®ããã©ã¼ãã³ã¹æ¹åãªã©ã v22 ã§è¿½å ããã2009 å¹´ã« Ryan Dahl ã Node.js ããªãªã¼ã¹ãã¦ãã 15 å¹´ãçµã¤ä»ããNode.js ã¯é²åãç¶ãã¦ãã¾ã[1]ã ããã㦠Node.js èªèº«ãå¼·åããã¦ããã«ã¤ãã以åã¯ãµã¼ããã¼ãã£ã¼ã®ããã±ã¼ã¸ã使ç¨ãã¦å®ç¾ãããã¨ãä¸è¬çã§ãã£ãæ©è½ã Node.js ã®ã¿ã§å®ç¾å¯è½ã¨ãªããå½è©²ããã±ã¼ã¸ãä¸è¦ã¨ãªããããªå ´åãããã¾ããåé ã«å¼ç¨ãã Ben Holmes ã®åç»ã§ã¯ããã®ããã«ä¸è¦ã¨ãªã£ãããã±ã¼ã¸ã¨ã㦠dotenv node-fetch chalk mocha ãæãããã¦ãã¾ããããã®è¨äºã§ã¯ãããã
å¼ç¨å : https://nodejs.org/en/about/branding 2024å¹´4æ24æ¥ã«ãªãªã¼ã¹ãããNode.js v22ã®ä¸»ãªå¤æ´ç¹ãç´¹ä»ãã¾ãã Node.js v22ã¯LTS(é·æãµãã¼ã)ã®ãã¼ã¸ã§ã³ã«ãªãã¾ãã10æã®å¾åã«LTSã¨ãã¦ãµãã¼ããå§ã¾ãã¾ãã nodejs.org require()ãESMããµãã¼ã V8 12.4 ã¢ãããã¼ãã«ãã JavaScript ã®æ©è½ Array.fromAsync() Set methods union() intersection() difference() symmetricDifference() isSubsetOf() isSupersetOf() isDisjointFrom() Iterator Helpers map() filter() reduce() --runãªãã·ã§ã³ã«ããpacka
æ¦è¦ æ¬è¨äºã§ã¯ãJavaScript ã¢ã¸ã¥ã¼ã«ãã³ãã©ã®ä¸ç¨®ã§ããã Rspack ã«ã¤ãã¦ãå ¬å¼ããã¥ã¡ã³ãããããããã¨ãè¦ç´ããèªåãªãã®ææãä»ãå ãã¦ç´¹ä»ãã¾ãã https://www.rspack.dev/misc/branding.html â» æ¬è¨äºã¯ãWebpack ã«é¢ããæä½éã®ç¥èãåæã¨ãã¦ãã¾ãã â» æ¬è¨äºã¯ã2023/03/12 æç¹ã®æ å ±ã§ãããå¤ãå 容ãæ®ã£ã¦ããå ´åãããã¾ã TL;DR; Rspack 㯠Webpack ã¨ã®äºææ§ã¨ããã©ã¼ãã³ã¹ã両ç«ããã¢ã¸ã¥ã¼ã«ãã³ãã© Webpack ãã5~10åé«é Webpack ã¨è¨å®ãã¡ã¤ã«ã loader, plugin ã«å åãªäºææ§ãæ㤠Webpack ã®ä¸è¬çãªè¨å®ãã¿ã¼ã³ããã«ãã¤ã³ã§ç¨æããã¦ãããã·ã³ãã«ã«ä½¿ãã ç¾å¨ã¯ã¢ã¼ãªã¼ã¹ãã¼ã¸ã§ãVue.js ã®ãµãã¼ããããããã¨ã
TechFeed Experts Night Pick up Node.jsã®2022å¹´ãæ¯ãè¿ããNode.jsã®æªæ¥ãè¦ã¤ãã¦ã¿ã ï½TechFeed Experts Night#8è¬æ¼ãã æ¬è¨äºã¯ã2022å¹´11æã«éå¬ããããTechFeed Experts Night#8 ï½ JavaScriptã©ã³ã¿ã¤ã æ¦äºæåç·ãã®ã»ãã·ã§ã³æ¸ãèµ·ããè¨äºãNode.jsã®2022å¹´ãæ¯ãè¿ããNode.jsã®æªæ¥ãè¦ã¤ãã¦ã¿ã by @shisama_ãã転è¼ãããã®ã§ãããªãªã¸ãã«ã¯TechFeedãã覧ãã ããã ãNode.jsã®2022å¹´ã¨æªæ¥ãã¨ããã¿ã¤ãã«ã§è©±ãã¾ãããããããé¡ããã¾ãããµã¤ãã¦ãºã§ããã³ãã¨ã³ãã¨ã³ã¸ãã¢ããã£ã¦ããshisamaã§ãã ä»æ¥ã¯Node.jsã®18ã¨19ã®ä¸»ãªå¤æ´ç¹ãç´¹ä»ãããã¨æãã¾ãããã®å¾ã¯ãç¾å¨å®è£ ä¸ã®æ©è½ãããããã¤ããããããã
ããããããããªã¦ã¼ã¹ã±ã¼ã¹ãªã®ã«ãã°ã°ã£ã¦ãä¸ã æ å ±ããªãã£ããããã¡ããã¨å ¬å¼ã® GitHub README ã«æ¸ãã¦ããã¾ãã import * as dotenv from 'dotenv' dotenv.config() import express from 'express' // ãã㯠express ãªã©ã®ç°å¢å¤æ°ã使ã£ã¦ãã©ã¤ãã©ãªããåã« import ãã¦ããã¨ããæå³ã§æ¸ãã¦ãã£ã½ã
Node.jsã¢ããªã®èªåèµ·åãããã ã¯ããã« AWSã§ã¤ã³ã¹ã¿ã³ã¹ãåèµ·åãããã³ã«ã¢ããªã±ã¼ã·ã§ã³ãåèµ·åããã®ãé常ã«é¢åã ã£ããããã¤ã³ã¹ã¿ã³ã¹ãèµ·åãããèªåçã«ã¢ããªã±ã¼ã·ã§ã³ãèµ·åããããã«ãã¾ããã ä»åã¯PM2ã¨ããããã»ã¹ããã¼ã¸ã£ã¼ãå©ç¨ãã¦ã¢ããªã®èªåèµ·åãè¡ãæ¹æ³ããä½æ¥ã¡ã¢ãå ¼ãã¦ç´¹ä»ãã¾ãã PM2ã¨ã¯ PM2ã¯ãã¼ã¢ã³ããã»ã¹ããã¼ã¸ã£ã¼ã§ãã ããã»ã¹ããã¼ã¢ã³åãã¦ããããã·ã§ã«ãæãããã¢ããªã±ã¼ã·ã§ã³ãçµäºãã¦ãããã¨ãã£ãçµé¨ã¯ã¿ãªããããã®ã§ã¯ãªãã§ããããã PM2ãå©ç¨ããã¨ããã»ã¹ããã¼ã¢ã³åãããã¨ã§ãã¢ããªã±ã¼ã·ã§ã³ãèµ·åããç¶æ ã«ä¿ã¤ãã¨ãã§ãã¾ãã ãã®ãããNode.jsã¢ããªã±ã¼ã·ã§ã³ã®æ¬çªéç¨ãªã©ã«å©ç¨ããã¦ããããã§ãã å ¬å¼ãµã¤ã: PM2 å°å ¥ ä¸è¨ã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã Node.jsãnpmã¯äºåã«nvm
ååããæ¢ã«ã¯ã¯ã¯ã¯ãããã®APIã¯ããªãã¨Promiseãè¿ãsetTimeoutãsetIntervalé¢æ°ãæä¾ãã¦ãã¾ãï¼æé«ã§ã⦠ã¨ããããã§ä»åã¯ããã®ç´¹ä»ã§ãã åºæ¬çãªä½¿ãæ¹ await setTimeout(1000) âãããã§ãããã§ãï¼ç´ æ´ããããªãã§ããï¼ï¼ top-level await ã for-awaitã¨çµã¿åãããã¨ãããªæãã§æ¸ãã¾ã import { setTimeout } from 'timers/promises'; console.log('start'); await setTimeout(1000); // ããã§ãããï¼ï¼ console.log('1s passed'); import { setInterval } from 'timers/promises'; console.log('start'); for await (
Wantedlyã§ã¯ãã®ãã³ãããã³ãã¨ã³ãã¢ããªã±ã¼ã·ã§ã³ã®ã²ã¨ã¤ãNative ESMåãã¾ãããæ¬è¨äºã§ã¯Native ESMåã®å¿ è¦æ§ã¨ãå¿ è¦ãªä½æ¥ã«ã¤ãã¦èª¬æãã¾ãã ãã®è¨äºã®æ¦è¦Node.jsã«ã¯Native ESMã¨ããã¢ã¼ãããããNative ESMã¯ã¾ã æ®åãã¦ããªãããã©ã¤ãã©ãªå´ã®æ´æ°ãé²ã¿ã移è¡ãå¿ è¦ã«ãªãã¤ã¤ãããNative ESMããããç¶æ³ã¯ (ãã®è¨äºã®é·ããããããããã«) è²ã è¤éã§ãæ¦å¿µãã¡ããã¨èª¬æããã ãã§ã大å¤ãNative ESMã¸ã®ç§»è¡ã«ããã£ã¦ã¯ãã¾ãã¾ãªå°é£ãå¾ ã¡åãã¦ãããNative ESMã¨ã¯æ´å²ççµç·¯ãããJavaScriptã«ã¯è¤æ°ã®ã¢ã¸ã¥ã¼ã«ã·ã¹ãã ãããã¾ãããã®ãã¡Node.jså¨è¾ºã§ãã使ãããã®ã¯CommonJS Modulesã¨ES Modulesã§ãã CommonJS Modules (CJS) ã¯å®è³ªçã«
Bun is a fast all-in-one JavaScript runtime - é«éãªâãªã¼ã«ã¤ã³ã¯ã³âã®JavaScriptã©ã³ã¿ã¤ã ã謳ããBunãã®ãã¼ã¿ç(v0.1.0)ãããã¤ã¿ãªã¢ã®éçºè ã«ãã£ã¦7æåæ¬ã«å ¬éããããã£ãããã¬ã¼ãºéãã®ããã©ã¼ãã³ã¹ã®é«ãã«å¤ãã®éçºè ã®èå³ãå¼ãã¦ãã¾ãã Bunã®Webãµã¤ã GitHub Node.jsãéå»ã®ç©ã«ããæéã®èã¾ã - Qiitaè¨äº ãµã¤ãã«ããã°ãBunã¯ä»¥ä¸ã®3ã¤ã«ãã©ã¼ã«ã¹ãã¦ãã¶ã¤ã³ãããJavaScriptã©ã³ã¿ã¤ã ã ã¨ããã¦ãã¾ãã èµ·åãéã JavaScriptCoreãæ¡å¼µããã¨ã³ã¸ã³(Zigã§æ¸ããã¦ãã)ã«ããæ°ããã¬ãã«ã®é«éæ§ ãããããã¼ã«é¡(ãã³ãã©ããã©ã³ã¹ãã¤ã©ãããã±ã¼ã¸ããã¼ã¸ã£) ãã®ã»ãã«ããfetchãWebSocketãReadableStreamãªã©ã®Web
Volta ã¨ã¯ Voltaã¨ã¯ãJavaScript ãã¼ã«ããã¼ã¸ã£ã¼ã§ãã ã¿ã¤ãã«ã§ã¯ Node.js ã®ãã¼ã¸ã§ã³ç®¡çã¨ãã¦ãã¾ããã npmã»yarn ã®ãã¼ã¸ã§ã³ç®¡çãè¡ããã¨ãã§ãã¾ãã å ¬å¼ãµã¤ãã§ã¯ããThe Hassle-Free JavaScript Tool Managerï¼æéã®ããããªã JavaScript ãã¼ã«ããã¼ã¸ã£ã¼ï¼ãã¨ç´¹ä»ããã¦ãã¾ãã ãã¼ã ã® Node.js ã®ãã¼ã¸ã§ã³ç®¡çã Volta ã«çµ±ä¸ããã¨ããé常㫠DX ãä¸ãããVolta ã®æ©æµãæãã¦ãã¾ãã ãã®è¨äºã§ã¯ãéçºè ã® Volta 人å£ãå¢ããã¹ã Volta ã®ç´¹ä»ã¨ä½¿ç¨æ¹æ³ã«ã¤ãã¦è§£èª¬ãã¦ããããã¨æãã¾ãã ãªããªã詳ãã解説ãã¦ããæ¥æ¬èªã®ã½ã¼ã¹ã¯ãªãã®ã§ãå ¬å¼ããã¥ã¡ã³ããèªãã§é©å®å訳ãã¦ãã¾ãã å ¬å¼ããã¥ã¡ã³ããèªãã®ãããã©ãããã¨ãã人ã«èªãã§ããã ã
ã¿ãªããããã«ã¡ã¯ã çªç¶ã§ããããã¸ã§ã¯ãã§ä½¿ç¨ãã¦ããã©ã¤ãã©ãªã®ã¢ãããã¼ãã£ã¦é¢åã§ãããã æ´»åãæ´»çºãªã©ã¤ãã©ãªã¯å¬ããåé¢ã¢ãããã¼ããè¾ãã£ãããã»ãã³ãã£ãã¯ãã¼ã¸ã§ãã³ã°ãæ¡ç¨ãã¦ããããã¬ã³ã¬ã³èªåã§ä¸ãã£ã¦ãããªããã¨æãã¾ãããã ãããªãæ©ã¿ã解決ããDependabotã¨ãããã®ãããã¾ããã®ã§å°å ¥ãã¦ã¿ã¾ããã Dependabotã¨ã¯ package.jsonãgo.modã¨ãã£ãããã¥ãã§ã¹ããã¡ã¤ã«ãã¿ã¦å¤ãã©ã¤ãã©ãªãã»ãã¥ã¢ã§ãªããã®ã調ã¹ã¦ããã¾ãã ããã¦å¿ è¦ã«å¿ãã¦ã©ã¤ãã©ãªã®æ´æ°ãè¡ãPull Requestãèªåã§ä½æãã¦ãããåªããã®ã§ããæã ã«æ®ãããä»äºã¯Pull Requestãmergeããã ããªã®ã§ãï¼ããã¦ãããããèªååã§ããï¼ã ãã¡ã ããã確èªã§ãã¾ããç¾å¨ãµãã¼ããã¦ããè¨èªã¯ä¸è¨ã®ããã«ãªã£ã¦ãã¾ãã Ruby
Nest.js x Session Nest.js ã«ããã session ã®æ©è½ã¯ãexpress-session ãå©ç¨ãã¦å®è£ å¯è½ã§ãã import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import * as session from 'express-session'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.use( session({ secret: 'my-secret', resave: false, saveUninitialized: false, cookie: { maxAge: 7 * 24 * 60 * 60 * 1
Get ready for a new faster web experience with Firebase. For the longest time you all have asked us to optimize the size of our JavaScript libraries, and weâve done just that. Weâve released brand new beta libraries that are significantly smaller in size. Some are even up to 80% smaller! Weâve managed to reduce the size all without removing any features from the previous version too! How did we do
AWSãã¨ãã¸ã«ãããJavaScriptå®è¡ç°å¢ã«æ¬æ ¼åå ¥ãCloudflare WorkersãDeno Deployãªã©ã¨ç«¶å㸠Amazon Web Servicesï¼AWSï¼ã¯ãã¨ãã¸ç°å¢ã§è»½éãªJavaScriptã«ããå¦çãå®è¡å¯è½ãªæ°ãµã¼ãã¹ãAmazon CloudFront Functionsããçºè¡¨ãã¾ããã AWSã§ã¯ãã§ã«ã¨ãã¸ã§å¦çãè¡ããLambda@Edgeããæä¾ãã¦ãããããã§Node.jsã¨Pythonã«ããã³ã¼ããå®è¡å¯è½ã§ãã ãããLambda@Edgeã¯13ã«æã®ãªã¼ã¸ã§ãã«ã¨ãã¸ãã£ãã·ã¥ã«ããã¦å¦çãè¡ãããã®ã«å¯¾ããCloudFront Functionsã¯218ã«æ以ä¸ã®CloudFront Edge Locationsã«ããã¦å¦çãè¡ããããããããã¦ã¼ã¶ã¼ã«è¿ãåºç¯å²ãªãã±ã¼ã·ã§ã³ã§å®è¡ããã¾ãã ã¾ããå®è¡æéãLambda@Ed
è¤æ°ã®ããã¹ããã¡ã¤ã«ï¼ãã¤ããªãã¡ã¤ã«ã®å対ã®æï¼ã«å«ã¾ããæååãä»ã®æååã«ä¸æ¬ã§ç½®ãæãããå ´é¢ã£ã¦å¶ã«ããã¾ãããã èªåã®å ´åã¯ãéå»ã«æ¸ããããã°è¨äºã®ã¨ããã½ã¼ã¹ãä¿®æ£ãããã¦ã試è¡é¯èª¤ãã¦ãã¾ãããWordPressãªã便å©ãªãã©ã°ã¤ã³ãããã¾ãããéçãµã¤ãã¸ã§ãã¬ã¼ã¿ã¼ã¨ãªãã¨ãããã¯ãããªãã®ã§â¦ çµå±Node.jsã§è§£æ±ºããã®ã§ãã®æ¹æ³ã®ã¡ã¢ã ãåããããã®ãã£ã¬ã¯ããªå ã®ãã¡ã¤ã«ãåæãã | ã¾ãã¾ãNode.jsãã¼ã 天æã¾ãã¾ããã¼ãããã®ä¸è¨ã®è¨äºã§é å¸ããã¦ããã¢ã¸ã¥ã¼ã«ãdirutil.jsï¼è¦ã¤ãã£ããã¡ã¤ã«ãé åã§è¿ããã¼ã¸ã§ã³ï¼ãããåããã¾ããããããã¨ããããã¾ãã ã³ã¼ããµã³ãã«ã¯httpãããã³ã«ãhttpsã«ç½®ãæãããã®ã§ãã var fs = require('fs'); var dirutil = require('./di
æ¦è¦ npm-scriptsãç¨ãã¦ãç»åã®è¿½å ã»å¤æ´ãç£è¦ã èªåã§å§ç¸®ãã¦ãããã¢ã¸ã¥ã¼ã«ãä½æããæ¹æ³ãç´¹ä»ãã¾ãï¼ å®æåã¯ãã¡ãã§ãã 使ç¨æ¹æ³ã¯README.mdã«è¨è¼ãã¦ããã¾ãã®ã§ããæ¥ãã®æ¹ã¯ä¸è¨ã使ç¨ãã¦ã¿ã¦ãã ããã Githubå¼·åä¸ãªã®ã§ãâ, ãã©ãã¼ããã ããã¨åã³ã¾ã nodeã¨linuxã³ãã³ãã«å¯¾ããåºç¤çãªç¥èã¯ãããã®ã¨ãã¦è§£èª¬ãé²ãã¦ããã¾ãã ç°å¢æ§ç¯ ä»å使ç¨ããnode_moduleéã¯ä¸è¨ã®éãã§ãã module description imagemin ç»åå§ç¸®ãã¦ããã imagemin-keep-folder ãã£ã¬ã¯ããªæ§é ãç¶æããã¾ã¾å§ç¸®ãã¦ããã imagemin-gifsicle gif ã®å§ç¸®ããã¦ããã imagemin-mozjpeg jpeg ã®å§ç¸®ããã¦ããã imagemin-pngquant png ã®å§ç¸®ã
2021/04/20ã«ãªãªã¼ã¹ãããNode.js v16ã®ä¸»ãªå¤æ´ç¹ãç´¹ä»ãã¾ãã nodejs.org M1 Macã§ãNode.jsã使ããããã«ãªãã¾ã V8 v9.0 Atomics.waitAsync RegExp match indices Timers Promises APIãå®å®çã«ãªãã¾ãã fs.rmdirã®recursiveãªãã·ã§ã³ãDeprecatedã«ãªãã¾ãã Node.js v15ã®æ©è½ãLTSã¨ãã¦ä½¿ããããã«ãªã æå¾ã« åèè¨äº å¤æ´å±¥æ´ M1 Macã§ãNode.jsã使ããããã«ãªãã¾ã Node.js v16.0.0ã¯ãApple SiliconãããããM1ãããã¨å¼ã°ããAppleã®æ°ãããããã«å¯¾å¿ããNode.jsã®å®è¡ãã¡ã¤ã«ãå ¬å¼ã§é å¸ãããæåã®ãã¼ã¸ã§ã³ã«ãªãã¾ãã v15.xã§ãã½ã¼ã¹ã³ã¼ãããã®ãã«ãã§M1 Macã§ãNo
ããã«ã¡ã¯@watildeã§ãã趣å³ã§npmã¸ã®ã³ãããããã¾ã«ãã¦ããã®ã§ãããæè¿ã¯Node.jså´ã«æ¯éãç½®ãã¦ããã®ã§v7ã®ãã£ããã¢ããã«å°ãé ãã¦ãã¾ãã¾ããããã£ããã¢ããã¤ãã§ã«èªåãªãã«æ å ±ãã¾ã¨ããã®ã§ãv7ã«ããã代表çãªæ°æ©è½ã¨ç ´å£çå¤æ´ã«ã¤ãã¦ãGitHubã®è¨äºãããå°ã詳ããã«ç´¹ä»ã¨è§£èª¬ãè¡ã£ã¦ã¿ã¾ãããªãã¹ãåèãªã³ã¯ãä»ãã¦ããã®ã§ã詳細ãæ°ã«ãªã£ãéã¯ãªã³ã¯ããä¸æ¬¡æ å ±ã«é£ãã§èªãã§ã¿ã¦ãã ããã ã¾ããæ å ±ã«èª¤ãããã£ãå ´åã¯Twitterã«ã¦æãã¦ããã ããã¨å©ããã¾ãã èæ¯ npmãã¼ã ããã2020/10/13ã«npmã®æ°ããã¡ã¸ã£ã¼ã¢ãããã¼ãã§ããã¨ããã®v7ã®å ¬å¼ãªãªã¼ã¹ãçºè¡¨ããã¾ããã8æããbetaçã®ãªãªã¼ã¹ãç¹°ãè¿ãã¦ãã¾ãããã2ã¶æããã¦å é¨çãªãªãã¡ã¯ã¿ãªã³ã°ã¨ã¹ã¢ã¼ã¯ãã¹ããç¹°ãè¿ãã¦ä»åã®çºè¡¨ã«è³ã£ãã®ãã¨æãã¾ããã¾
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}