Opened 16 months ago

Closed 9 months ago

#15368 closed enhancement (fixed)

JS91, gjs-1.71.90, patch polkit-1.120 for JS91

Reported by: ken@… Owned by: Xi Ruoyao
Priority: normal Milestone: 11.2
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

A placeholder - the upstream ticket for using JS91 in gnome is at https://gitlab.gnome.org/GNOME/gjs/-/issues/413 - I assume that as well as gjs, polkit may require changes.

Change History (11)

comment:2 by Xi Ruoyao, 15 months ago

Milestone: 11.1x-future
Priority: normallow
Summary: JS91JS91 (wait until something needs it)

comment:3 by Xi Ruoyao, 10 months ago

Milestone: x-future99-Waiting

comment:4 by Xi Ruoyao, 10 months ago

The next polkit and gjs release will use it.

If the next polkit comes too early, we have an option to use sed s/91/78/ to keep using JS 78 (I'm sure because I authored the JS91 MR).

comment:5 by Xi Ruoyao, 9 months ago

Milestone: 99-Waiting11.2
Priority: lownormal

Milestone to 11.2 as GNOME 42 release is scheduled in this month, and new gjs will require js91.

comment:6 by Xi Ruoyao, 9 months ago

Owner: changed from blfs-book to Xi Ruoyao
Status: newassigned
Summary: JS91 (wait until something needs it)JS91

comment:7 by Xi Ruoyao, 9 months ago

JS 91:

  • Intl.DateTimeFormat.prototype.formatRange() and Intl.DateTimeFormat.prototype.formatRangeToParts() are now supported in release builds. The formatRange() method returns a localized and formatted string for the range between two Date objects (e.g. "1/05/21 – 1/10/21"). The formatRangeToParts() method returns an array containing the locale-specific parts of a formatted date range (bug 1653024).
  • The Intl.DateTimeFormat() constructor allows four new timeZoneName options for formatting how the timezone is displayed. These include the localized GMT formats shortOffset and longOffset, and the generic non-location formats shortGeneric and longGeneric (bug 1653024).
  • The Error() constructor can now take the error cause as value in the option parameter. This allows code to catch errors and throw new/modified versions that retain the original error and stack trace (bug 1679653).

JS 90:

  • Private class static and instance fields and methods are now supported by default (bug 1708235 and bug 1708236).
  • The in operator can now be used to check if a class private method or field has been defined. This offers a more compact approach for handling potentially undefined features, as oppose to wrapping code in try/catch blocks (bug 1648090).
  • Custom date/time formats specified as options to the Intl.DateTimeFormat() constructor can now include dayPeriod — a value indicating that the approximate time of day (e.g. "in the morning", "at night", etc.) should be included as a narrow, short, or long string (bug 1645115).
  • The relative indexing method at() has been added to the Array, String and TypedArray global objects. (bug 1681371)

JS 89:

  • Top-level await is now enabled by default (bug 1681046).
  • ArrayBuffers can now be created with a length greater than 2GB-1 (up to 8GB) on 64-bit systems (bug 1703505).

JS 88:

  • Added support for RegExp match indices (bug 1519483).
  • Intl.DisplayNames() and Intl.ListFormat() now have stricter checking that options passed to the constructor are objects, and will throw an exception if a string or other primitive is used instead (bug 1696881).

JS 87: No changes.

JS 86:

  • The Intl.DisplayNames built-in object has been enabled by default. This enables the consistent translation of language, region, and script display names. For more information see bug 1654116:
    // Get English currency code display names
    let currencyNames = new Intl.DisplayNames(['en'], {type: 'currency'});
    // Get currency names
    currencyNames.of('USD'); // "US Dollar"
    currencyNames.of('EUR'); // "Euro"
    

JS 85:

  • The collation property can now be specified in the options passed to the Intl.Collator() constructor (bug 1670062). This allows developers to write code with greater clarity:
    // Old method
    let pinyin = new Intl.Collator(["zh-u-co-pinyin"]);
    // New method
    let pinyin = new Intl.Collator("zh", {collation: "pinyin"});
    

JS 84:

  • Custom date/time formats specified as options to the Intl.DateTimeFormat() constructor can now include fractionalSecondDigits — the number of digits used to represent fractions of a second (bug 1645107).

JS 83:

  • Intl[@@toStringTag] has been added, returning a default value of Intl (recent addition to the ECMA spec). (bug 1670053)

JS 82: No changes

JS 81: No changes

JS 80:

  • The ECMAScript 2021 export * as namespace syntax for the export statement is now supported (bug 1496852).

JS 79:

  • SharedArrayBuffer has been re-enabled in a post-Spectre-safe manner. It is available to cross-origin isolated sites (bug 1619649).
  • To cross-origin isolate your site, you need to set the new Cross-Origin-Embedder-Policy (COEP) and Cross-Origin-Opener-Policy (COOP) headers.
  • Promise.any() is now available (bug 1599769).
  • WeakRef objects have been implemented (bug 1639246).
  • Logical assignment operators are now supported (bug 1639591)
  • Logical nullish assignment (??=)
  • Logical AND assignment (&&=)
  • Logical OR assignment (||=)
  • Atomics objects now also work with non-shared memory (bug 1630706).
  • The Intl.DateTimeFormat() constructor now supports the dateStyle and timeStyle options (bug 1557718).
  • The Intl.NumberFormat() constructor now supports more numbering systems (bug 1413504).

comment:8 by Xi Ruoyao, 9 months ago

Summary: JS91JS91, gjs-1.71.1, patch polkit-1.120 for JS91

comment:9 by Xi Ruoyao, 9 months ago

Summary: JS91, gjs-1.71.1, patch polkit-1.120 for JS91JS91, gjs-1.71.90, patch polkit-1.120 for JS91

comment:10 by Xi Ruoyao, 9 months ago

gjs-1.71.90:

  • Closed bugs and merge requests:
    • Cairo test broken with commit ea52cf92 [#461, !724, Philip Chimento]
    • native: Convert to singleton class [!725, Nasah Kuma]
    • Checking instanceof for primitive types may lead to a crash or error [#464, !726, Marco Trevisan]
    • Change the GObject Introspection development branch [!727, Emmanuele Bassi]
    • gi_marshalling_tests_long_in_max test fails on i686 [#462, !728, Philip Chimento, Evan Welsh]
    • GNOME Shell crashes at startup with the AppIndicator extension enabled [#466, !729, Marco Trevisan]
    • Instances of classes implementing interfaces can override functions for all implentations of an interface [#467, !730, Evan Welsh]
    • package: Reverse order of running-from-source checks [!734, Philip Chimento]
    • Various maintenance [!735, Philip Chimento]
    • Various maintenance [!736, Evan Welsh]

gjs-1.71.1:

  • New JavaScript features! This version of GJS is based on SpiderMonkey 91, an upgrade from the previous ESR (Extended Support Release) of SpiderMonkey 78. Here are the highlights of the new JavaScript features. For more information, look them up on MDN or devdocs.io.
  • New syntax
    • Private class fields and methods are now supported. They start with # and are not accessible outside the class in which they are defined.
    • The ??= logical nullish assignment operator, which assigns the right-hand side value to the left-hand side variable if the variable is null or undefined.
    • The &&= logical-and assignment operator, which assigns the right-hand side value to the left-hand side variable if the variable is truthy.
    • The ||= logical-or assignment operator, which assigns the right-hand side value to the left-hand side variable if the variable is falsey.
    • export * as ... from ... can be used to aggregate modules.
    • Regular expressions add the d flag, which if defined causes the resulting match object to have an indices property giving the positions in the string where capturing and named groups matched.
    • static { ... } blocks in classes allow initialization of classes at the time of creation of the class.
  • New APIs
    • Arrays, strings, and typed arrays have gained the at() method, which does the same thing as indexing with square brackets but also allows negative numbers, which count from the end, as in Python.
    • Promise.any(), which is similar to Promise.race() but resolves on the first successful sub-promise, instead of the first to resolve.
    • Error() now takes an options object as its second parameter, which may contain a cause property. This option is used to indicate when an error is caused by another error, but the first error is caught during error handling.
    • WeakRef, which allows you to hold a reference to an object while still allowing it to be garbage collected.
    • dateStyle, timeStyle, fractionalSecondDigits, and dayPeriod are now accepted as options in Intl.DateTimeFormat() and Date.prototype.toLocaleString().
    • collation is now accepted as an option in Intl.Collator().
    • Intl.DisplayNames has been added, which allows you to get translations of language, region, currency, and script names.
    • Intl.DateTimeFormat has gained the formatRange() and formatRangeToParts() methods.
  • New behaviour
    • More numbering systems are supported in Intl.NumberFormat.
    • Top-level await (https://v8.dev/features/top-level-await) allows you to use await statements outside of an async function in an ES module.
    • There are a lot of minor behaviour changes as SpiderMonkey's JS implementation conforms ever closer to existing ECMAScript standards and adopts new ones. For complete information, read the Firefox developer release notes.
  • It's now possible to pass BigInt values to GObject-introspected functions with 64-bit parameters. This way, you can finally work with large numbers that cannot be accurately stored as a JS Number value and pass them correctly into
    1. For example, GLib.Variant.new_int64(2n ** 62n).
  • New API: GJS now has a standards-compliant setTimeout() and setInterval(). These can now be used as in web browsers, while still integrating with GLib's main loop.
  • New API: Cairo.Context.prototype.textExtents() which makes the cairo_text_extents() C function available to JavaScript.
  • New overrides: GLib.MAXINT64_BIGINT, GLib.MININT64_BIGINT, and GLib.MAXUINT64_BIGINT are BigInt-typed versions of GLib.MAXINT64 etc.
  • It's now possible to use a regular constructor() in GObject classes instead of an _init() method.
  • It's now possible to use class fields in GObject classes.
  • Gio._promisify() now tries to guess the name of the finish function, if it is omitted.
  • It's now possible to monkeypatch methods on the prototype of a GObject interface. The most common use case for this is probably promisifying methods on Gio.File, so you can now do things like Gio._promisify(Gio.File.prototype, 'read_async') without resorting to the Gio._LocalFilePrototype workaround.
  • GObject interfaces are now enumerable, so you can now do things like Object.keys(Gio.File.prototype) and get a list of the methods, like you can with other GObject types.
  • Improvements to the performance of promises, making them more predictable under higher load.
  • Several performance and type-safety improvements.
Last edited 9 months ago by Xi Ruoyao (previous) (diff)

comment:11 by Xi Ruoyao, 9 months ago

Resolution: fixed
Status: assignedclosed

Fixed at b5b1af6.

Note: See TracTickets for help on using tickets.