Kubefeeds Team A dedicated and highly skilled team at Kubefeeds, driven by a passion for Kubernetes and Cloud-Native technologies, delivering innovative solutions with expertise and enthusiasm.

Deno’s Response to Node’s Recent Support for TypeScript

5 min read

Dev News logo

Node now supports TypeScript, which will bring it more in line with the alternative runtimes Deno and Bun, which offer native TypeScript support. TypeScript allows developers to define data types, which supports early error detection and prevents runtime issues that are common in JavaScript.

“Basically, TypeScript adds additional syntax to JavaScript to support a tighter integration with your editor,” Node wrote. “[It can] Catch errors early in your editor or in your CI/CD pipeline, and write more maintainable code.”

Native TypeScript support was among the most requested Node features developers have requested, according to InfoQ.  It was added as experimental last August, but has been enabled by default since January.

TypeScript offers other benefits to Node, including static typing, which is when the type of a variable is known and is checked at compile time before the program is executed. Adding types to JavaScript helps structure code as a project grows, according to a Deno blog post responding to the news. It was written by Deno’s creator Ryan Dahl and product marketing manager Andy Jiang.

It primarily handles two tasks, they noted:

  • Type checking, to ensure your variables match declared types.
  • Type stripping, for transpiling. In TypeScript, developers can add type annotations to their code to improve readability and catch potential errors.

Type stripping is the process of removing these type annotations, typically during a build process. It’s often done when converting code from a language with type annotations (like TypeScript) to a language without them (like plain JavaScript). Transpilers take source code written in one programming language and convert it into source code in another programming language.

Deno explained how the Node integration worked.

“This essentially integrates functionality previously provided by ts-node directly into Node, simplifying TypeScript execution,” they wrote. “Node’s TypeScript support replaces type annotations with whitespace, resulting in valid JavaScript…”

That said, Dahl and Jiang pointed out there are limitations to this approach including:

  • No built-in type checking, which means external tools like tsc are still required.
  • No JSX or TSX support: “Node handles .ts, .mts, and .cts, but React (.tsx) and JSX projects still require external transpilers or bundlers such as esbuild, Babel, or tsc,” they wrote.
  • Manual management of tsconfig.json: “Type checking still relies on external configuration via tsconfig.json,” they added. Node.js ignores tsconfig.json files, according to InfoQ.

They contrasted this with how Deno approaches the problem.

Deno simplifies web programming by providing a single executable with a fully integrated TypeScript toolchain,” Dahl and Jiang wrote. “This approach offers TypeScript’s benefits with minimal configuration, streamlining testing, formatting, and compilation workflows.”

Deno’s TypeScript integration is composed of three main parts:

  1. Execution: Google’s V8 engine executes JavaScript but not TypeScript directly.
  2. Type checking: Microsoft’s TypeScript compiler, implemented in JavaScript, is internally bundled.
  3. Type stripping: SWC, a high-performance parser built in Rust, efficiently strips types without running JavaScript.

They added that TypeScript is supported across Deno’s toolchain.

Nuxt.js Adds Lazy Hydration

Nuxt.js version 3.16 adds support for native delayed/lazy hydration support, which lets developers control exactly when components hydrate. Nuxt is an open source web application framework built upon Vue, an open source JavaScript framework used for building user interfaces.

Lazy hydration can improve initial load performance and time-to-interactive, wrote Daniel Roe, who leads the Nuxt core team.

Nuxt already offers the Islands architecture, which defines which parts of the page are static and which are interactive parts. Lazy hydration is about controlling the timing of when those interactive parts become active. The two are often used in conjunction since lazy hydration can optimize the hydration of individual “islands.”

The update also includes other features and performance enhancements.

For instance, Nuxt has simplified starting projects with the framework with create-nuxt, a new tool for starting Nuxt projects.

“It’s a streamlined version of nuxi init — just a sixth of the size and bundled as a single file with all dependencies inlined, to get you going as fast as possible,” Roe wrote.

Now, a new project can be started with:
npm create nuxt

The Nuxt team also made a number of performance improvements, such as:

  • Using exsolve for module resolution along with the rest of the unjs ecosystem (nitro, c12, pkg-types, and more), which “dramatically” speeds up module resolution, Roe said;
  • Smarter module resolution paths, which prioritize direct imports for better efficiency;
  • Eliminated duplicated Nitro alias resolution for leaner file handling, and
  • Streamlined loadNuxt by skipping unnecessary resolution steps for faster startups.

“To add some anecdotal evidence, my personal site at roe.dev loads 32% faster with v3.16, and Nuxt.com is 28% faster,” Roe wrote. “I hope you see similar results!”

Google Rolls Out Gemma 3, New AI Safety Checker

Google introduced Gemma 3, a collection of lightweight open models, this week. Gemma 3 is built with the same research and technology as the Gemini 2.0 models.

Google’s DeepMind Vice President of Research Clement Farabet and Director Tris Warkentin introduced the models in a blog post published Wednesday.

“They are designed to run fast, directly on devices — from phones and laptops to workstations — helping developers create AI applications, wherever people need them,” Warkentin and Farabet wrote.

The Gemma models are open sourced and provided with open weights. Gemma 3 comes in these sizes: 1B, 4B, 12B and 27B.

Smaller language models are becoming more popular as more organizations start to build out their own AI applications and AI agents.

Google also launched ShieldGemma2, which is a 4B image safety checker built on the Gemma 3 foundation.

“ShieldGemma 2 provides a ready-made solution for image safety, outputting safety labels across three safety categories: dangerous content, sexually explicit and violence,” the post stated. “Developers can further customize ShieldGemma for their safety needs and users.”

Academic researchers may want to take note that Google is also offering the Gemma 3 Academic Program, which allows academic researchers to apply for Google Cloud credits (worth $10,000 per award) to accelerate their Gemma 3-based research. The application process opened this week, and will remain open for four weeks.

OpenAI Releases Developer Tools for Building AI Agents

OpenAI released the “first set of building blocks” to help developers build agents more effectively on its platform. AI agents are defined as AI-enabled systems that can independently automate a task.

“Over the past year, we’ve introduced new model capabilities — such as advanced reasoning, multimodal interactions, and new safety techniques — that have laid the foundation for our models to handle the complex, multistep tasks required to build agents,” OpenAI’s team wrote in announcing the news. “However, customers have shared that turning these capabilities into production-ready agents can be challenging, often requiring extensive prompt iteration and custom orchestration logic without sufficient visibility or built-in support.”

To support the development of AI agents, this week the company released a new Responses API, which “combines the simplicity of the Chat Completions API with the tool use capabilities of the Assistants API to enable developers to build the core logic of agents,” OpenAI explained.

Tools built into the API include web search using the same underlying model that powers ChatGPT’s search, file search, and computer use with the same underlying model powering Operator. OpenAI added that this gives AI agents access to the information and tools they need to be useful.

There’s also a new Agents SDK to orchestrate single-agent and multi-agent workflows, as well as integrated observability tools to trace and inspect agent workflow execution.

For more, developers can check out this video of a live stream with some of the team members who worked on the tools.

New York Times Migrates from Enzyme into React Testing Library

The New York Times published a mini-case study of its biggest challenge in upgrading its core site’s React library from React 16 to React 18.

It turns out that one of the biggest problems they faced was transforming their codebase from the Enzyme test utility, a JavaScript testing utility specifically designed for React components, to the React Testing Library.

The React Testing Library is a popular JavaScript testing utility that focuses on testing React components from the user’s perspective. The story explains that there are major differences in unit testing between the two libraries. It details the New York Times upgrade process and includes code samples so developers can see the difference between Enzyme and the React Testing Library.

WordPress Plug-In Vulnerability Discovered

Word Fence discovered a vulnerability in the All-in-One WP Migration and Backup plugin — a plugin with over 5 million installations, according to SearchEngine Journal. The high-severity vulnerability was discovered and patched.

“The way this kind of vulnerability works is that the WordPress plugin processes potentially malicious data during backup restoration without properly verifying it,” reported SearchEngine Journal. “But because there’s a narrow attack opportunity, it makes exploiting it less straightforward.”

The post Deno’s Response to Node’s Recent Support for TypeScript appeared first on The New Stack.

Kubefeeds Team A dedicated and highly skilled team at Kubefeeds, driven by a passion for Kubernetes and Cloud-Native technologies, delivering innovative solutions with expertise and enthusiasm.