November 21, 2023
Turn on loading images 😉- Logo ECMAScript News

Vite 5.0: Rollup 4, API cleanups and more

vitejs.dev @vite@webtoo.ls

“Vite is now using Rollup 4, which already represents a big boost in build performance. And there are also new options to improve your dev server performance profile.”

“Vite 5 focuses on cleaning up the API (removing deprecated features) and streamlines several features closing long-standing issues, for example switching define to use proper AST replacements instead of regexes. We also continue to take steps to future-proof Vite (Node.js 18+ is now required, and the CommonJS Node API has been deprecated).”

Prettier 3.1: New experimental ternaries formatting and Angular control flow syntax

prettier.io github.com/sosukesuzuki github.com/prettier

“This release adds indentation back to nested ternaries along with a new --experimental-ternaries flag to try a more novel "curious ternary" format that scales better to deeply nested conditionals.” A separate blog post provides more information on --experimental-ternaries.

“We have also added support for the control flow syntax in Angular v17. For details on the syntax, please read the official Angular release post.”

Node v21.2.0 (current)

nodejs.org @targos@fosstodon.org @nodejs@social.lfx.dev

Highlights:
  • Better stack traces for module node:fs/promises
  • ESM modules: import.meta.dirname and import.meta.filename
  • navigator.language and navigator.languages
  • navigator.platform
  • Date supported by mock APIs
  • CLI flag --test-timeout

Bun v1.0.12

bun.sh github.com/Electroid github.com/oven-sh

Highlights:
  • bun -e <code> evaluates a CLI argument
  • bun --env-file <path> overrides the env file that is loaded by default
  • server.url: URL object with location of local HTP server
  • import.meta.env for accessing environment variables
  • expect.unreachable() fails if code is reachable
  • Improved CLI help output
  • Macros now support builtin modules
  • mock.module() now supports default exports and re-exports

Explicit resource management: Exploring JavaScript’s and TypeScript’s new feature

iliazeus.github.io @iliazeus@lor.sh

“One of my favorite new features of JavaScript and TypeScript is explicit resource management. It brings new syntax, using foobar = ..., that enables RAII [resource acquisition is initialization, a feature of C++, Rust, and other programming languages], reducing boilerplate when managing the lifecycle of various resources.”

Exploring V8’s strings: implementation and optimizations

iliazeus.github.io @iliazeus@lor.sh

“In this article, I will focus on V8’s implementation of [JavaScript] strings. I will demonstrate various string optimizations by beating C++ in a totally 100% legit benchmark. Finally, I will demonstrate the ways in which these implementation details might actually perform worse, and how to deal with that.”

This email was sent to {{ email | default }}. You can unsubscribe from this list here or update your preferences.