7 principles for rich web apps And how next.js achieves these principles
7 principles for rich web apps And how next.js achieves these principles
Back in 2008, most people thought of JavaScript as just a client-side language. But when Google's V8 appeared, young developer Ryan Dahl made the connection between non-blocking servers, V8, and JavaScript. It was by combining these key elements that he was able to create the now hugely popular Node.js. What young Ryan Dahl probably didn't expect was how much forking drama would follow. Join us
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 が挙げられていますが、この記事では「これら
BatBadBut: You can't securely execute commands on Windows Posted on April 9, 2024 • 10 minutes • 2109 words Table of contents Introduction TL;DR CVSS Score Technical Details Root Cause Wrapping CreateProcess Parsing rule of cmd.exe Mitigation Escaping double quotes? As a Developer As a User As a Maintainer of the runtime Conclusion Appendix Appendix A: Flowchart to determine if your applications a
皆さんこんにちは。先月リリースされたNode.js 18.19.0の更新内容の一つに、node:module組み込みモジュールのregister APIがあります。これは、Node.js 20.6.0で先行実装されていたものが、Node.js 18系にバックポートされたものです。 これにより、現在サポートされているすべてのメジャーバージョンでこの機能が利用可能になりました。筆者は、このことによるインパクトは大きいと考えています。そこで、この記事ではregister APIについて解説します。 register APIについて この記事でregister APIと読んでいるのは、Node.jsの組み込みモジュールであるnode:module からエクスポートされる関数を指しています。 インパクトが大きいとは言いましたが、実は皆さんが日頃のアプリ開発で使うようなAPIではありません。このAPI
niという npm/yarn/pnpm/bun を同じコマンドでインストール/アンストールコマンドを実行できるツールがあります。 antfu/ni: 💡 Use the right package manager 仕組み的には、各パッケージのロックファイルやCorepackで決められたpackageManagerフィールドの値から、どのパッケージマネージャを使うかを判断しています。 たとえば、package-lock.jsonがあるプロジェクトなら npm を使ってるので、niコマンドは npm のコマンドを実行します。 また、packageManagerフィールドがyarn@<version>になっている場合は、niコマンドは yarn コマンドを実行します。 なぜこういうツールが必要になるかというと、npm や yarn などのパッケージマネージャは、それぞれのパッケージマネージャの
|はじめに こちらはCAM advent calendar 2022の14日目の記事です。 こんにちは、普段CAMでバックエンドの開発をしている吉瀬です。 Node.js デザインパターンという本を読み Node.js のアーキテクチャについて学んでいます。 その中でも今回は JavaScript 実行エンジンの一つである V8について紹介します。 出典(https://www.oreilly.co.jp/books/9784873118734/) |おことわり ・Parse と Compileの詳細な話はしません ・WebAssembly の話はしないので Liftoff の話はしません ・ブラウザ側の話はしません ・できる限り一次情報を参照するようにしていますが、誤っている箇所がある可能性があります |V8 とは V8 とは JavaScript 実行エンジンの一つで Google が
またしてもスケジュールきつめのプロジェクトに放り込まれた KrdLab です.Java ジャバしてます.IDE がないとコード書くのがしんどすぎて,もううんざりです. はじめに 何らかのプラットフォームを利用する場合,その仕組みについて知っておくことは,より適切な設計を行うという目的に対して有用な情報となるでしょう. というわけで,今回は少しだけ node.js の内部に潜ってみようと思います.対象は git repo から clone した 0.4.x です (2011/03/29 に clone したっぽい). なお,今回はイベント駆動に焦点を当て,V8 については割愛します. 見出し 全体像 メイン処理 イベントループで処理される各種 watcher tick 系のイベント処理 gc 系のイベント処理 eio 系のイベント処理 IOWatcher によるソケットの READ/WRIT
Recently I landed experimental support for require()-ing synchronous ES modules in Node.js, a feature that has been long overdue. In the pull request, I commented with my understanding about why it did not happen sooner before this pull request in 2024. This post expands on that comment a bit more. The opinions in this post are my own and reflect my perception of the ESM development in Node.js as
新しくCJSとESMの間での解決方法が変わる提案が出てきました。 まだマージされてませんが、すでに複数の承認があり、この方針から変わることはないように見えるので紹介したいと思います。 module: support require()ing synchronous ESM graphs by joyeecheung · Pull Request #51977 · nodejs/node Summary This patch adds require() support for synchronous ESM graphs under the flag --experimental-r... 新しい提案 この仕組みを利用する場合、--experimental-require-moduleフラグが必要となります。 以下は、わかりやすいようにpackage typeを指定せずにデフォルトはCJS
Node.js Community Debate Intensifies Over Enabling Corepack by Default and Potentially Unbundling npmThe Node community is wrestling with the decision to enable Corepack by default, which has sparked a debate about the potential of removing npm from the Node.js binary. A heated debate is happening in the Node.js community over a proposal to enable Corepack by default that was opened in November 20
The JavaScript APIs we have today are so much better than those we had even a decade ago. Consider the transition for XMLHttpRequest to fetch(): the developer experience is dramatically better, allowing us to write more succinct, functional code that accomplishes the same thing. The introduction of promises for asynchronous programming allowed this change, along with a series of other changes that
普段の開発では nodenv を使って各プロジェクトのバージョンに合わせた Node.js をインストールしています。その後、各プロジェクトの README や package.json を頼りに npm install -g yarn や npm install -g pnpm することが多いです。 先日、同僚から「最近は corepack 使ってますよ」と教えてもらったので、「おーもう実務で使えるのかー」と一気にモチベーションが上がったので corepack 使っていきたいと思います。 まずはこちらの鉄板記事でおさらい。 corepack を使っていくということは yarn や pnpm の管理を corepack に任せるということなので、まずは global install しているそれらを削除して実験してみます。 yarn を使っているプロジェクトで検証 とある yarn を使っ
2023年10月17日にリリースされたNode.js v21の主な変更点を紹介します。 この記事を書いている時点ではv21.4.0が最新版ですので、v21.0.0からv21.4.0までの変更点で注目の機能をまとめています。 nodejs.org fetchとWebStreamsが安定版へ WebSocketの実験的な実装 navigator.language/languages の追加 V8 11.8 による新しい JavaScript の機能 ESM をデフォルト化するフラグ 実行ファイルがESMなのか自動判定する実験的機能 import.meta.dirname/filename の追加 テストランナーがglobでのテストファイル指定に対応 警告(Warning)を無効化するフラグの追加 その他の変更点 まとめ 参考記事 fetchとWebStreamsが安定版へ github.com
In part 1 of this series we found a few ways to speed various libraries used in JavaScript tools. Whilst those low level patches moved the total build time number by a good chunk, I was wondering if there is something more fundamental in our tooling that can be improved. Something that has a greater impact on the total time of common JavaScript tasks like bundling, testing and linting. So over the
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く