What’s New in ECMAScript 2025
June 30, 2025What’s New in ECMAScript 2025
On June 25, 2025, Ecma International officially approved ES2025, adding several useful features:
1. 📦 Import Attributes & JSON Modules
You can now import JSON directly with type annotations:
// Static import
import config from './config.json' with { type: 'json' };
// Dynamic import
const cfg = await import('./config.json', { with: { type: 'json' } });
console.log(cfg.default);
2. Iterator Helper Methods
New chaining helpers on iterators:
const arr = ['a','', 'b', '', 'c', '', 'd'];
const result = arr.values()
.filter(x => x.length > 0)
.drop(1)
.take(2)
.map(x => `=${x}=`)
.toArray();
// result: ['=b=', '=c=']
3. New Set
Methods
Set operations become built-in:
const a = new Set(['a','b','c']);
const b = new Set(['b','c','d']);
console.log([...a.union(b)]); // ['a','b','c','d']
console.log(a.isSubsetOf(b)); // false
4. RegExp.escape()
& Pattern Modifiers
const safe = RegExp.escape('hello?');
// inline flags example
/^x(?i:HELLO)x$/.test('xHELLOx'); // true
/^x(?i:HELLO)x$/.test('xhellox'); // true
5. Duplicate Named Capture Groups
const re = /(?a+)|(?b+)/v;
console.log(re.exec('aaa').groups.chars); // 'aaa'
console.log(re.exec('bb').groups.chars); // 'bb'
6. Promise.try()
Promise.try(() => {
const x = syncThatMightThrow();
return asyncWork(x);
}).then(...).catch(...);
7. float16 Support
Now built-in: Float16Array
, DataView.getFloat16/setFloat16
, and Math.f16round()
.
Blog
React Labs: View Transitions & Activity
Jun 17, 2025
React Labs: View Transitions & Activity Published April 23, 2025 by Ricky Hanlon. React Labs is sharing two new experimental featu...
How OAuth Works
Jun 29, 2025
How OAuth Works OAuth is a protocol that allows third-party applications to access user data without sharing passwords. It's the backbone of secure a...
React Native 0.80 & ExecuTorch: A Powerful Leap into Offline AI for Mobile Apps
Jul 28, 2025
🚀 What’s New in React Native 0.80? The React Native 0.80 release marks a pivotal moment in mobile development. This update not only enhances...
Laravel 12.19: Elegant Query Builders with PHP Attributes
Jul 07, 2025
Laravel 12.19: Elegant Query Builders with PHP Attributes In Laravel 12.19, you can now use the #[UseEloquentBuilder] PHP attribute to assign a cus...
Top Laravel & PHP Updates for Cleaner, Faster Code
Aug 17, 2025
Laravel Global Scopes: Automatic Query Filtering Eloquent Importance: Enforce consistent filters across all model queries (e.g., Soft Del...
Mastering Modern CSS: The Power of if(), Popover Hints, and Smart Styling
Jul 16, 2025
🌐 Mastering Modern CSS: The Power of if(), Popover Hints, and Smart Styling CSS is getting smarter. In this guide, we’ll explore how the new...
