DEV Community

This Week In JavaScript
This Week In JavaScript

Posted on

JavaScript temporal object, someone built a React.exe, faster websites on Google Chrome, and more

Hello JavaScript Enthusiasts!

Welcome to another edition of "This Week in JavaScript"!

We've got a lot to cover today: Oracle's latest trademark controversy, the new JavaScript temporal object receiving browser support, and some much needed updates to google chrome, along with some great developer tools.

Let’s get right into it!

Oracle vs. Deno

Oracle’s attempt to hold onto the "JavaScript" trademark is stirring up controversy. Ryan Dahl, creator of Node.js and Deno, has filed a petition to cancel the trademark, arguing that JavaScript is an open standard that shouldn't be controlled by Oracle.

Here's a quick breakdown:

  • Oracle’s Hold: Oracle renewed the trademark using a screenshot from Node.js (a project they don't own) back in 2019.

  • Ryan Dahl's Argument: He claims that JavaScript, maintained by various companies, should be a shared open standard.

  • Oracle’s Response: They’ve filed a motion to dismiss, stating consumers don’t view JavaScript as a generic term.

This debate is raising broader questions about whether widely used tech terms should be controlled by one entity. We’ll be watching this as it develops!

JavaScript Temporal: Simplifying Dates and Times

The Temporal object in JavaScript is here to replace the clunky Date object, making date and time management much more reliable and precise.

Key Highlights:

  • Time Zone & Calendar Support: Temporal handles time zones and calendars, unlike the Date object.

  • Built-in Methods: It includes methods for conversions, comparisons, and formatting.

  • Precision: Temporal ensures consistent handling of time-sensitive data and internationalization.

  • Experimental Browser Support: Firefox leads the way with support in its Nightly version, while Chrome and Safari are still in development.

  • Better Parsing: Temporal avoids the parsing issues that plagued Date, making it a more robust option for developers.

Long-Running Tasks in JavaScript: Breaking Them Up!

If you've ever had a web page freeze during heavy processing, you’ve encountered the main thread blocking issue in JavaScript. The browser can only do one thing at a time—if a task takes too long, everything else, like button clicks or screen updates, gets delayed.

Here's how you can fix this:

  • setTimeout(): Breaks up tasks by letting the event loop handle them bit by bit.

  • requestAnimationFrame(): Ensures smooth animations while offloading heavy work to background frames.

  • Web Workers: Offload tasks entirely to different threads, so your main UI stays responsive.

With these methods, you can keep your JavaScript tasks efficient and ensure a smoother user experience!

React EXE

React-EXE, a tool designed to execute React components on the fly, making it ideal for creating live code previews, interactive documentation, or code playgrounds.

Key highlights:

  • Real-time Execution: Execute React components on the fly, perfect for live code previews or interactive playgrounds.

  • External Dependencies: Seamlessly integrate external libraries like Tailwind CSS and Framer Motion.

  • Custom Styling: Customize component appearance with full support for custom styles and Tailwind CSS.

Chrome’s New moveBefore Method

Chrome's latest DOM manipulation feature, moveBefore, lets you move elements around the DOM tree without breaking their state.

Here’s why it matters:

  • Preserves State: Normally, moving DOM elements causes things like iframes to reload or lose focus—moveBefore fixes that.

  • Improves Performance: Popovers, animations, and elements maintain their state during moves, meaning fewer disruptions in your web apps.

React is already working to integrate this feature, promising smoother web apps without the usual DOM frustrations.

Ship high-performance Next.js apps in minutes with JStack

JStack is designed for building fast, lightweight, and end-to-end type-safe Next.js applications. With incredible developer experience, it offers automatic type-safety, autocompletion, and seamless deployment to platforms like Vercel and Cloudflare. Even beginners can build production-grade apps effortlessly.

Here’s what makes JStack stand out:

  • High Performance: Built on the Hono, Nextjs, Typescript and more such frameworks for optimal speed and reliability.

  • Deploy Anywhere: Instantly deploy to platforms like Vercel, Cloudflare, or Netlify.

  • End-to-End Type-Safe: First-class TypeScript support with clean APIs and auto-complete.

  • Serverless WebSockets: Add scalable real-time features with zero infrastructure management.

Tools & Releases You Should Know About

Let’s take a quick look at the latest tools making waves in the JavaScript world this week!

  • pnpm 10.2: The latest pnpm update, version 10.2, makes life easier for JavaScript devs. It now allows packages to run post-install scripts by default when using pnpm dlx or pnpm create. Plus, it introduces a new --allow-build flag for handling dependencies and fixes script execution and proxy issues.

  • Turborepo 2.4: Turborepo 2.4 revolutionizes monorepo management with the Boundaries feature, which prevents improper imports. Watch Mode now caches tasks for faster development, while circular dependency recommendations and native ESLint v9 support smooth the workflow. The new terminal UI remembers settings, making navigation much more efficient.

  • tinygradient 2.0: tinygradient 2.0 lets you create beautiful, customizable color gradients in JavaScript. It supports multiple formats like hex, RGB, and HSV, with unlimited color stops and steps. Ideal for UI design, data visualization, or creative projects, it also features an interactive playground to test gradient styles on the fly.

  • Fuse.js 7.1: Fuse.js 7.1 is a fast, zero-dependency fuzzy search library for JavaScript. It enhances search functionality by finding results even with typos or partial matches. It’s perfect for dynamic content in applications, and it works smoothly on both frontend and backend, improving user experience without requiring a server.

  • RE2JS: RE2JS is a JavaScript implementation of Google's RE2 engine, providing safer and more efficient regular expression handling. Unlike JavaScript’s RegExp, which can face performance issues, RE2JS guarantees linear time complexity, protecting against ReDoS attacks. It’s an excellent choice for safely processing user-generated patterns in web applications.

And that's it for the twenty-first issue of "This Week in JavaScript", brought to you by jam.dev—the tool that makes it impossible for your team to send you bad bug reports.

Feel free to share this newsletter with a fellow developer, and make sure you're subscribed to get notified about the next issue.

Until next time, happy coding!

Top comments (0)