Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECMAScript compatibility tracking issue #2899

Open
teppeis opened this issue Apr 19, 2018 · 18 comments
Open

ECMAScript compatibility tracking issue #2899

teppeis opened this issue Apr 19, 2018 · 18 comments
Labels
internal-issue-created An internal Google issue has been created to track this GitHub issue triage-done Has been reviewed by someone on triage rotation.

Comments

@teppeis
Copy link
Contributor

teppeis commented Apr 19, 2018

This is a tracking issue for failed compat-table tests with links to each input, output, error and related issue (updated with v20200426).

These items are filtered out as "won't fix":


ES2015

Optimisation

proper tail calls (tail call optimisation)

  • direct recursion (in/out)
  • mutual recursion (in/out)

Syntax

default function parameters

  • arguments object interaction (in/out)

rest parameters

  • function 'length' property (in/out)
  • arguments object interaction (in/out)

spread syntax for iterable objects

  • with sparse arrays, in array literals (in/out)
  • with astral plane strings, in function calls (in/out)
  • with astral plane strings, in array literals (in/out)
  • spreading non-iterables is a runtime error (in/out)

object literal extensions

for..of loops

octal and binary literals

  • octal supported by Number() (in/out)
  • binary supported by Number() (in/out)

template literals

  • toString conversion (in/out)
  • tagged template literals (in/out)
  • passed array is frozen (in/out)
  • TemplateStrings call site caching (in/out)
  • TemplateStrings permanent caching (in/out)

RegExp "y" and "u" flags

  • "y" flag (in/out)
  • "y" flag, lastIndex (in/out)
  • "u" flag (in/out)
  • "u" flag, non-BMP Unicode characters (in/out)
  • "u" flag, Unicode code point escapes (in/out)
  • "u" flag, case folding (in/out)

destructuring, declarations

destructuring, assignment

destructuring, parameters

Unicode code point escapes

  • in identifiers (in/out)

new.target

Bindings

const

  • temporal dead zone (in/out)
  • temporal dead zone (strict mode) (in/out)

let

  • temporal dead zone (in/out)
  • temporal dead zone (strict mode) (in/out)

Functions

arrow functions

class

super

  • constructor calls use correct "new.target" binding (compile error)

generators

  • can't use "this" with new (in/out)
  • %GeneratorPrototype% (in/out)
  • %GeneratorPrototype% prototype chain (in/out)
  • %GeneratorPrototype%.constructor (in/out)
  • yield *, astral plane strings (in/out)
  • yield * on non-iterables is a runtime error (in/out)
  • yield *, iterator closing via throw() (in/out)
  • shorthand generators can't be constructors (compile error)

Built ins

Map

Set

WeakMap

WeakSet

Reflect

  • Reflect.ownKeys, symbol keys (in/out)
  • Reflect.construct sets new.target meta-property (compile error)
  • Reflect.construct, Promise subclassing (in/out)

Promise

  • Promise.prototype isn't an instance (in/out)
  • Promise[Symbol.species] (in/out)

Symbol

  • typeof support (in/out)
  • symbol keys are hidden to pre-ES6 code (in/out)
  • symbols inherit from Symbol.prototype (in/out)
  • cannot coerce to string or number (in/out)
  • can convert with String() (in/out)
  • Object(symbol) (in/out)
  • JSON.stringify ignores symbol primitives (in/out)
  • JSON.stringify ignores symbol objects (in/out)
  • global symbol registry (in/out)

well-known symbols

  • Symbol.hasInstance (in/out)
  • Symbol.isConcatSpreadable (in/out)
  • Symbol.iterator, arguments object (in/out)
  • Symbol.species, existence (in/out)
  • Symbol.species, Array.prototype.concat (in/out)
  • Symbol.species, Array.prototype.filter (in/out)
  • Symbol.species, Array.prototype.map (in/out)
  • Symbol.species, Array.prototype.slice (in/out)
  • Symbol.species, Array.prototype.splice (in/out)
  • Symbol.species, RegExp.prototype[Symbol.split] (in/out)
  • Symbol.species, Promise.prototype.then (in/out)
  • Symbol.replace (in/out)
  • Symbol.search (in/out)
  • Symbol.split (in/out)
  • Symbol.match (in/out)
  • Symbol.match, RegExp constructor (in/out)
  • Symbol.match, String.prototype.startsWith (in/out)
  • Symbol.match, String.prototype.endsWith (in/out)
  • Symbol.match, String.prototype.includes (in/out)
  • Symbol.toPrimitive (in/out)
  • Symbol.toStringTag (in/out)
  • Symbol.toStringTag affects existing built-ins (in/out)
  • Symbol.toStringTag, new built-ins (in/out)
  • Symbol.toStringTag, misc. built-ins (in/out)
  • Symbol.unscopables (compile error)

Built in extensions

Object static methods

  • Object.getOwnPropertySymbols (in/out)

function "name" property

  • function statements (in/out)
  • function expressions (in/out)
  • new Function (in/out)
  • bound functions (in/out)
  • variables (function) (in/out)
  • object methods (function) (in/out)
  • accessor properties (in/out)
  • shorthand methods (in/out)
  • symbol-keyed methods (in/out)
  • class statements (in/out)
  • class expressions (in/out)
  • variables (class) (in/out)
  • object methods (class) (in/out)
  • class prototype methods (in/out)
  • class static methods (in/out)
  • isn't writable, is configurable (in/out)

String static methods

String.prototype methods

  • String.prototype.normalize (in/out)
  • String.prototype[Symbol.iterator] (in/out)
  • String iterator prototype chain (in/out)

RegExp.prototype properties

  • RegExp.prototype.flags (in/out)
  • RegExp.prototype[Symbol.match] (in/out)
  • RegExp.prototype[Symbol.replace] (in/out)
  • RegExp.prototype[Symbol.split] (in/out)
  • RegExp.prototype[Symbol.search] (in/out)
  • RegExp[Symbol.species] (in/out)

Array static methods

  • Array.from, iterator closing (in/out)
  • Array[Symbol.species] (in/out)

Array.prototype methods

  • Array iterator prototype chain (in/out)
  • Array.prototype[Symbol.unscopables] (in/out)

Math methods

Date.prototype[Symbol.toPrimitive]

  • Date.prototype[Symbol.toPrimitive] (in/out)

Misc

prototype of bound functions

Object static methods accept primitives

  • Object.getPrototypeOf (in/out)
  • Object.getOwnPropertyDescriptor (in/out)
  • Object.getOwnPropertyNames (in/out)
  • Object.seal (in/out)
  • Object.freeze (in/out)
  • Object.preventExtensions (in/out)
  • Object.isSealed (in/out)
  • Object.isFrozen (in/out)
  • Object.isExtensible (in/out)
  • Object.keys (in/out)

own property order

  • Object.getOwnPropertyNames (in/out)
  • Reflect.ownKeys, string key order (in/out)
  • Reflect.ownKeys, symbol key order (in/out)

Updated identifier syntax

miscellaneous

  • duplicate property names in strict mode (compile error)
  • accessors aren't constructors (in/out)
  • RegExp constructor can alter flags (in/out)
  • RegExp.prototype.toString generic and uses "flags" property (in/out)
  • built-in prototypes are not instances (in/out)
  • function 'length' is configurable (in/out)

Annex b

non-strict function semantics

  • hoisted block-level function declaration (in/out)
  • labeled function statements (compile error)
  • function statements in if-statement clauses (compile error)

proto in object literals

  • basic support (in/out)
  • multiple proto is an error (in/out)
  • not a computed property (in/out)
  • not a shorthand property (in/out)
  • not a shorthand method (in/out)

Object.prototype.proto

  • absent from Object.create(null) (in/out)
  • present in hasOwnProperty() (in/out)
  • correct property descriptor (in/out)
  • present in Object.getOwnPropertyNames() (in/out)

RegExp.prototype.compile

ES2016+

2016 features

Array.prototype.includes

  • %TypedArray%.prototype.includes (in/out)

2016 misc

generator functions can't be used with "new"

  • generator functions can't be used with "new" (in/out)

strict fn w/ non-strict non-simple params is error

  • strict fn w/ non-strict non-simple params is error (in/out)

2017 features

Object static methods

  • Object.getOwnPropertyDescriptors doesn't provide undefined descriptors (in/out)

async functions

  • no line break between async and function (in/out)
  • no "prototype" property (in/out)
  • cannot await in parameters (compile error)
  • correct prototype chain (in/out)
  • async function prototype, Symbol.toStringTag (in/out)
  • async function constructor (in/out)

2017 misc

RegExp "u" flag, case folding

  • RegExp "u" flag, case folding (in/out)

2017 annex b

Object.prototype getter/setter methods

  • defineGetter, ToObject(this) (in/out)
  • defineSetter, ToObject(this) (in/out)
  • lookupGetter, ToObject(this) (in/out)
  • lookupGetter, data properties can shadow accessors (in/out)
  • lookupSetter, ToObject(this) (in/out)
  • lookupSetter, data properties can shadow accessors (in/out)

assignments allowed in for-in head in non-strict mode

  • assignments allowed in for-in head in non-strict mode (compile error)

2018 features

object rest/spread properties

s (dotAll) flag for regular expressions

RegExp named capture groups

RegExp Lookbehind Assertions

RegExp Unicode Property Escapes

2018 misc

Proxy "ownKeys" handler, duplicate keys for non-extensible targets

  • Proxy "ownKeys" handler, duplicate keys for non-extensible targets (in/out)

template literal revision

  • template literal revision (in/out)

2019 features

Array.prototype.{flat, flatMap}

  • flat and flatMap in Array.prototype[@@unscopables] (in/out)

2019 misc

Symbol.prototype.description

  • undefined description (in/out)

Function.prototype.toString revision

  • functions created with the Function constructor (in/out)
  • arrows (in/out)
  • [native code] (in/out)
  • class expression with implicit constructor (in/out)
  • class expression with explicit constructor (in/out)
  • unicode escape sequences in identifiers (in/out)
  • methods and computed property names (in/out)

Well-formed JSON.stringify

  • Well-formed JSON.stringify (in/out)

2020 features

BigInt

optional chaining operator (?.)

@teppeis
Copy link
Contributor Author

teppeis commented May 11, 2018

Fixed in v20180506:

@teppeis
Copy link
Contributor Author

teppeis commented Jun 18, 2018

Fixed in v20180610:

compat-table: compat-table/compat-table#1316

@teppeis
Copy link
Contributor Author

teppeis commented Aug 11, 2018

Fixed in v20180716:

  • no changes

Fixed in v20180805:

  • ES2018: Asynchronous Iterators / async generators: 02f59ac

compat-table: compat-table/compat-table#1334

@teppeis
Copy link
Contributor Author

teppeis commented Oct 17, 2018

Fixed in v20180910 (compat-table/compat-table#1350)

Fixed in v20181008 (compat-table/compat-table#1359)

  • ES2018: Template literal revision

@teppeis
Copy link
Contributor Author

teppeis commented Nov 6, 2018

In v20181028, "object rest properties" (in/out) is degraded: #3139

@brad4d brad4d added the triage-done Has been reviewed by someone on triage rotation. label Nov 16, 2018
@teppeis
Copy link
Contributor Author

teppeis commented Nov 29, 2018

Fixed in v20181125 (compat-table/compat-table#1379)

@teppeis
Copy link
Contributor Author

teppeis commented Feb 21, 2019

v20190121

v20190215

compat-table/compat-table#1422

@lauraharker
Copy link
Contributor

Created internal issue http://b/125851124 for bookkeeping

@lauraharker lauraharker added the internal-issue-created An internal Google issue has been created to track this GitHub issue label Feb 22, 2019
@teppeis
Copy link
Contributor Author

teppeis commented Apr 2, 2019

v20190301: compat-table/compat-table#1429

  • Support: ES2019 Symbol.prototype.description
  • Support: ES2019 Array.prototype.{flat, flatMap}
  • Support: ES6 new Symbol() throws
  • Degrade: ES6 Reflect.ownKeys with symbols

v20190325: compat-table/compat-table#1443

  • Support: Object.fromEntries
  • Support: String.prototype.trimStart / trimEnd depending on String.prototype.trimLeft / Right (they are not implemented yet)

@teppeis
Copy link
Contributor Author

teppeis commented Nov 17, 2019

v20190709: compat-table/compat-table#1482

  • Support: ES2019 string trimming

v20191027: compat-table/compat-table#1531

  • Support: ES2020 Promise.allSettled

@l1bbcsg
Copy link

l1bbcsg commented Dec 19, 2019

What's the status on Nullish Coalescing Operator (foo ?? bar) and Optional Chaining (foo?.bar)?

@teppeis
Copy link
Contributor Author

teppeis commented Dec 19, 2019

@l1bbcsg Not yet.

// ES 2020 Stage 4
NULL_COALESCE_OP("Nullish coalescing", LangVersion.ES_UNSUPPORTED),

@l1bbcsg
Copy link

l1bbcsg commented Dec 19, 2019

I saw that one actually 😀
I mean, is there a plan on how to deal with both of those? Can we expect them or are there some obstacles?
Neither of the operators is mentioned in this issue and Optional Chaining is also nowhere to be found either in code or other issues, gives an impression they're not tracked at all.

@brad4d
Copy link
Contributor

brad4d commented Dec 20, 2019

@vxlydia is actively working on implementing ?? now, and will likely start working on optional chaining in January.

At the moment I expect we'll have them available in ES_NEXT in 2020 Q1, and I hope to have ES_2020 LanguageMode available in Q2.

@teppeis
Copy link
Contributor Author

teppeis commented Jan 4, 2020

v20200101: compat-table/compat-table#1565

  • support: ES2020 globalThis
  • support: ES2020 String.prototype.matchAll

@brad4d
Copy link
Contributor

brad4d commented Jan 10, 2020

FYI, I've just created a "supported features" page here
https://github.com/google/closure-compiler/wiki/Supported-features

Hopefully it's not too out of sync with this issue.

I added a link to this issue at the top of it.

Thanks @teppeis for your continuing efforts to maintain this information.

@teppeis
Copy link
Contributor Author

teppeis commented Jan 24, 2020

v20200112: compat-table/compat-table#1571

  • support: ES6 Classes: computed static accessor properties (bd0832c)

@teppeis
Copy link
Contributor Author

teppeis commented May 4, 2020

v20200315: compat-table/compat-table#1618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-issue-created An internal Google issue has been created to track this GitHub issue triage-done Has been reviewed by someone on triage rotation.
Projects
None yet
Development

No branches or pull requests

4 participants