Skip to content

Commit d268b14

Browse files
authored
Update CHANGELOG.md for 3.12.0 to include the notable spidermonkey changes
1 parent fccfa5d commit d268b14

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,41 @@
77
### Changed
88

99
* update to SpiderMonkey 123.0.1 ([#744](https://github.com/fastly/js-compute-runtime/issues/744)) ([32bf617](https://github.com/fastly/js-compute-runtime/commit/32bf61707f1133d4a2656913d726d66523398fb1))
10+
This update brings with it the below changes:
11+
- Performance improvements for `JSON.stringify()`
12+
- An optimisation for `Object.keys()` to take advantage of cached for-in iterators if available.
13+
- Optimisations for `Object.assign()`
14+
- RegExp `v` flag support
15+
- Improved JSON parsing to help avoid garbage collection time when parsing very large files
16+
- The `String.prototype.isWellFormed()` and `String.prototype.toWellFormed()` methods respectively can be used to check if a string contains well-formed Unicode text (i.e. contains no lone surrogates) and sanitise an ill-formed string to well-formed Unicode text.
17+
- The `Object.groupBy()` and `Map.groupBy()` static methods for grouping the elements of an iterable are now supported
18+
- `Date.parse()` now accepts several additional date formats:
19+
- Year > 9999 for `YYYY-MMM-DD` format (e.g. `19999-Jan-01`)
20+
- `MMM-DD-YYYY` (e.g. `Jan-01-1970`)
21+
- Milliseconds for non-ISO date formats (e.g. `Jan 1 1970 10:00:00.050`)
22+
- Day of week at the beginning of formats which were being rejected, such as:
23+
- `Wed, 1970-01-01`
24+
- `Wed, 1970-Jan-01`
25+
- The day of week does not need to be correct, or a day of week at all; for example, `foo 1970-01-01` works.
26+
- Numeric dashed dates which do not meet the formal ISO standard are now accepted, including:
27+
- `"01-12-1999"` (month first)
28+
- `"1999-1-5"` (single-digit month or day)
29+
- `"10000-01-12"` (year > 9999)
30+
- `"99-01-05"` or `"01-05-99"` (2-digit year, year must be >31 if it comes first)
31+
- `"1999-01-05 10:00:00"` (space between date and time).
32+
These dates will be parsed with behavior typical of other non-ISO dates, such as local time zone and month rollover (April 31 rolls over to May 1 since April 31 doesn’t exist).
33+
- Requirements for characters directly following numbers have been loosened to accept new formats, including:
34+
- `"DDMonYYYY"`
35+
- `"Mon.DD.YYYY"`
36+
- `"DD.Mon.YYYY"`
37+
- `"YYYY.MM.DD"`
38+
- `"Mon DD YYYY hh:mmXm"` (`am`/`pm` directly following time)
39+
- Timezone `'Z'` is now accepted for non-ISO formats (e.g. `Jan 1 1970 10:00Z`)
40+
- Other `Date.parse()` fixes:
41+
- `YYYY-M-DD` and `YYYY-MM-D` are no longer assumed GMT as an ISO date `YYYY-MM-DD` would be.
42+
- Milliseconds for all formats are truncated after 3 digits, rather than being rounded.
43+
- The `Promise.withResolvers()` static method is now supported. This exposes the `resolve` and `reject` callback functions in the same scope as the returned `Promise`, allowing code that resolves or rejects the promise to be defined after its construction.
44+
- The `ArrayBuffer.prototype.transfer()` and `ArrayBuffer.prototype.transferToFixedLength()` methods can now be used to transfer ownership of memory from one ArrayBuffer to another. After transfer, the original buffer is detached from its original memory and hence unusable; the state can be checked using `ArrayBuffer.prototype.detached`.
1045

1146
## 3.11.0 (2024-03-14)
1247

0 commit comments

Comments
 (0)