並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 11 件 / 11件

新着順 人気順

node.jsの検索結果1 - 11 件 / 11件

  • Node.js + TypeScriptのモジュールを整理してみる

    はじめにlink 最近受けるNode.js + TypeScript環境の相談の中で、CommonJSやECMAScript Modulesのあたりで落とし穴にはまっている人が多いという事に気づいた。 Node.jsは歴史的にCommonJSとECMAScript Modules(以後ESMと表記)がどうしても入り乱れる環境にあり、これにTypeScriptのモジュールが加わると組み合わせでさらに複雑度が増すのが現状である。 説明する際に口頭より整理した文章が欲しいと思ったので記事にする。 以下のリポジトリで検証コードを管理している。 https://github.com/koh110/module_test Node.jsモジュールチェックシートlink まず最初にNode.jsにおけるCommonJSとESMの挙動について整理する。 いきなり書かれても把握できないかもしれないが、一旦こ

      Node.js + TypeScriptのモジュールを整理してみる
    • Node.js の進化に伴い不要となったかもしれないパッケージたち

      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 が挙げられていますが、この記事では「これら

        Node.js の進化に伴い不要となったかもしれないパッケージたち
      • Node.js v22 で変わること

        2024/04/24 令和トラベルで発表した Node.js v22 で変わることの話です。

          Node.js v22 で変わること
        • JSR の紹介

          JSR の紹介

            JSR の紹介
          • PHPやNode.jsなどに任意コマンド実行の脆弱性、原因はWindows仕様の理解不足

            多くのプログラミング言語の処理系に、攻撃者が任意のコマンドを実行できる深刻な脆弱性が見つかった。JPCERTコーディネーションセンター(JPCERT/CC)と情報処理推進機構(IPA)が共同運営する脆弱性対策情報ポータルサイト「JVN(Japan Vulnerability Notes)」で2024年4月15日に公開された。 脆弱性が確認されたのは「PHP」「Rust」「Haskell」の各言語処理系とJavaScript/TypeScriptの処理系「Node.js」、音声や動画をダウンロードできる高機能なコマンド「yt-dlp」である。ただし、この脆弱性の影響を受けるOSはWindowsだけで、LinuxやmacOSなどの他のOSには影響しない。 多くのプログラミング言語は、プログラムの中からOS上でコマンドを実行する機能を持つ。Windowsでは言語処理系が「CreateProces

              PHPやNode.jsなどに任意コマンド実行の脆弱性、原因はWindows仕様の理解不足
            • Node.js、ロケットに乗った亀「Rocket Turtle」が正式マスコットに

              Node.jsのマスコットキャラクターが2月に決まり、発表されていました。 先週発表されたNode.js 22の記事を書くに当たり、資料を調べているうちに気がつきましたので紹介したいと思います(「Node.js v22 で変わること - Speaker Deck」というスライドで知りました。ありがとうございます)。 Node.jsのマスコットキャラクターはGitHubのIssue「Have a mascot · Issue #828 · nodejs/admin」で議論されて……

                Node.js、ロケットに乗った亀「Rocket Turtle」が正式マスコットに
              • 次のLTS版となる「Node.js 22」正式リリース。WebAssembly GCがデフォルトで利用可能に

                次のLTS版となる「Node.js 22」正式リリース。WebAssembly GCがデフォルトで利用可能に JavaScriptランタイム「Node.js」の最新バージョンとなる「Node.js 22」正式版がリリースされました。 Node.jsは偶数バージョンがリリースされてから6カ月の後に、30カ月の長期サポート期間(LTS:Long Term Support)に入ります。Node.js 22も、6カ月後の2024年10月にLTSとなる予定です。 Node.js 22 is here Featuring: require()ing ESM graphs, WebSocket client, updates of the V8 JavaScript engine, and more. Big thank you to @_rafaelgss and @satanacchio for t

                  次のLTS版となる「Node.js 22」正式リリース。WebAssembly GCがデフォルトで利用可能に
                • Node.js — Node.js 22 is now available!

                  We're excited to announce the release of Node.js 22! Highlights include require()ing ES modules, a WebSocket client, updates of the V8 JavaScript engine, and more! Node.js 22 will enter long-term support (LTS) in October, but until then, it will be the "Current" release for the next six months. We encourage you to explore the new features and benefits offered by this latest release and evaluate th

                    Node.js — Node.js 22 is now available!
                  • Node.js — Trip report: Node.js collaboration summit (2024 London)

                    About twice per year, Node.js contributors and community members get together in an unconference called the Node.js collaboration summit. At the summit, we share knowledge about the project and the ecosystem, brainstorm solutions to technical and non-technical issues, make progress in decision-making discussions, and push forward new initiatives. The first collaboration summit of 2024 was held on

                      Node.js — Trip report: Node.js collaboration summit (2024 London)
                    • TypeScriptの環境構築から分かる、Jestを使用したテストの方法 | DevelopersIO

                      こんにちは、戸田です。 このブログではTypeScriptの環境構築からJestを使用した簡単な四則演算のテストの方法を解説します。 環境構築 まずは環境構築をします。 今回はかなりシンプルな環境を構築します。 今回使用した環境は以下です。 Node.js v21.5.0 TypeScript v5.4.0 Jest v29.7.0 TypeScriptのインストール package.jsonをセットアップする npm init -y TypeScriptをインストールする npm install typescript --save-dev Node.jsのプログラムに必要な型宣言ファイルnode.d.tsをインストール npm install @types/node --save-dev TypeScriptの設定ファイルtsconfig.jsonを初期化 npx tsc --init

                        TypeScriptの環境構築から分かる、Jestを使用したテストの方法 | DevelopersIO
                      • Migrating 500+ tests from Mocha to Node.js | Astro

                        Over a month ago, we discussed a possible migration to the Node.js test runner. While we were sufficiently happy with Mocha, we are always looking to make our CI jobs faster. Relying on a test runner baked inside our runtime had some advantages for our main monorepo: Two fewer dependencies to install and maintain in our monorepo: mocha and chai. Maintainability: there are more people involved in t

                          Migrating 500+ tests from Mocha to Node.js | Astro
                        1