Introduction Sometimes an epiphany comes after years of hard work. Other times, it's more like an asteroid crashing into you from the cosmos. My epiphany came shortly after a coworker posted an article about Node type stripping, which is a way to skip transpilation and run TypeScript files natively in Node. We started chatting about the significant impact this change could have on developer produc
In August 2024 Node.js introduced a new experimental feature, Type Stripping, aimed at addressing a longstanding challenge in the Node.js ecosystem: running TypeScript with no configuration. Enabled by default in Node.js v23.6.0, this feature is on its way to becoming stable. This article explores the motivations behind this feature, the problems it solves, and its implications for the Node.js com
2025-01-07, Version 23.6.0 (Current), @marco-ippolito Notable Changes Unflagging --experimental-strip-types This release enables the flag --experimental-strip-types by default. Node.js will be able to execute TypeScript files without additional configuration: There are some limitations in the supported syntax documented at https://nodejs.org/api/typescript.html#type-stripping This feature is exper
🌟 Highlights 🔥 Native ESM jiti v2 now natively supports ESM import and resolution with new API await jiti.import(id) and jiti.esmResolve(id). This allows top-level await and native+faster importing of ES-only modules with increased compatibility ⚛️ JSX Support You can now directly import .jsx/.tsx files with jiti! See examples with nano-js, preact, React and Vue. This feature is opt-in for now (
Node.js で型安全な環境変数を扱うスニペットを作りました。 next devのようなアプリケーションの起動、Playwright でのテストなどコマンドごとに渡したい環境変数のセットが異なるケースがあります。 この場合に環境変数をまとめたものを定義して、それをコマンドごとに読み込むセットを変えたいことがあります。 次のようにベタ書きしてもいいのですが、渡したい環境変数が増えると管理が大変になります。 NEXT_PUBLIC_LOCALHOST_URL=http://localhost:3000 NEXT_PUBLIC_API_URL=http://localhost:3001 NEXT_PUBLIC_IS_TEST_MODE=false FOO="bar" next dev そのため、.envのような環境変数をまとめたファイルを使いたくなります。 Node.js は--env-fil
こんにちは teppeis です。普段は開発本部長をやってますが、ブログフェスに駆り出されました! 本日は Node v22.3.0 に続いて v20.16.0 にもバックポートされた process.getBuiltinModule(id) について解説します。 問題: 同期的な条件付き require を ESM 化できない Node v22 にて、フラグ付きで CJS (CommonJS Modules) から ESM を require できるようになりました。いわゆる require(esm) です。これにより、今までは互換性の懸念で ESM 化を足踏みしていた著名ライブラリも ESM 化を試みる動きが出てきました。 TypeScript もその一つで、TypeScript チームは TypeScript 自体を ESM 化しようと試みました。しかしながら、今回の主題である条件付
README.md Node.jsのTypeScriptサポートについて Created: 2024-07-28 Updated: https://gist.github.com/azu/ac5dafbf211ef8b5ecf386930ac75250/revisions Node.jsのTypeScriptサポートに関する議論を時系列でまとめたものです。 Start Issue: Support typescript with --experimental-strip-types · Issue #208 · nodejs/loaders SWCを使ってTypeScriptの型を削除することで、Node.jsのTypeScriptサポートを実現するという提案からスタートした。 最初の懸念としては、Node.jsのLTSは3年保守する必要があるので、依存によってNode.jsのLTSサポー
Process# Source Code: lib/process.js The process object provides information about, and control over, the current Node.js process. import process from 'node:process';const process = require('node:process');copy Process events# The process object is an instance of EventEmitter. The 'beforeExit' event is emitted when Node.js empties its event loop and has no additional work to schedule. Normally, th
JSer.info #666 - Node.js 21がリリースされました。 Node.js 21 is now available! | Node.js 奇数バージョンはいわゆる開発バージョンとなりLTSにはなりません。 Node.js 21では、Fetch/WebStreams APIのStable化、V8 11.8へのアップデート、node --testでのglobのサポートが追加されています。 また、モジュールのデフォルトをESMにできる--experimental-default-type、Magic BytesでWasmを判定する--experimental-wasm-modulesの追加されています。 これらのフラグについては次の記事で解説しています。 Deep Dive: Node.jsのESMデフォルト化への道 - JSer.info また、fs.writeFileにfl
Published at September 3, 2023 Today, we are happy to announce the first stable release of nitrogql! nitrogql is a toolchain for using GraphQL in TypeScript projects. In this post, we will go over the main features of nitrogql and how to get started with it. What is nitrogql?Currently, nitrogql has two main features: code generation and static checking. Code generationCode generation is the proces
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く