google / closure-compiler

A JavaScript checker and optimizer.
https://developers.google.com/closure/compiler/
Apache License 2.0
7.35k stars 1.14k forks source link

ECMAScript compatibility tracking issue #2899

Open teppeis opened 6 years ago

teppeis commented 6 years ago

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)

Syntax

default function parameters

rest parameters

spread syntax for iterable objects

object literal extensions

for..of loops

octal and binary literals

template literals

RegExp "y" and "u" flags

destructuring, declarations

destructuring, assignment

destructuring, parameters

Unicode code point escapes

new.target

Bindings

const

let

Functions

arrow functions

class

super

generators

Built ins

Map

Set

WeakMap

WeakSet

Reflect

Promise

Symbol

well-known symbols

Built in extensions

Object static methods

function "name" property

String static methods

String.prototype methods

RegExp.prototype properties

Array static methods

Array.prototype methods

Math methods

Date.prototype[Symbol.toPrimitive]

Misc

prototype of bound functions

Object static methods accept primitives

own property order

Updated identifier syntax

miscellaneous

Annex b

non-strict function semantics

proto in object literals

Object.prototype.proto

RegExp.prototype.compile

ES2016+

2016 features

Array.prototype.includes

2016 misc

generator functions can't be used with "new"

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

2017 features

Object static methods

async functions

2017 misc

RegExp "u" flag, case folding

2017 annex b

Object.prototype getter/setter methods

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

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

template literal revision

2019 features

Array.prototype.{flat, flatMap}

2019 misc

Symbol.prototype.description

Function.prototype.toString revision

Well-formed JSON.stringify

2020 features

BigInt

optional chaining operator (?.)

teppeis commented 6 years ago

Fixed in v20180506:

teppeis commented 6 years ago

Fixed in v20180610:

compat-table: https://github.com/kangax/compat-table/pull/1316

teppeis commented 6 years ago

Fixed in v20180716:

Fixed in v20180805:

compat-table: https://github.com/kangax/compat-table/pull/1334

teppeis commented 5 years ago

Fixed in v20180910 (https://github.com/kangax/compat-table/pull/1350)

Fixed in v20181008 (https://github.com/kangax/compat-table/pull/1359)

teppeis commented 5 years ago

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

teppeis commented 5 years ago

Fixed in v20181125 (https://github.com/kangax/compat-table/pull/1379)

teppeis commented 5 years ago

v20190121

v20190215

https://github.com/kangax/compat-table/pull/1422

lauraharker commented 5 years ago

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

teppeis commented 5 years ago

v20190301: https://github.com/kangax/compat-table/pull/1429

v20190325: https://github.com/kangax/compat-table/pull/1443

teppeis commented 4 years ago

v20190709: https://github.com/kangax/compat-table/pull/1482

v20191027: https://github.com/kangax/compat-table/pull/1531

l1bbcsg commented 4 years ago

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

teppeis commented 4 years ago

@l1bbcsg Not yet. https://github.com/google/closure-compiler/blob/6ca3b62990064488074a1a8931b9e8dc39b148b3/src/com/google/javascript/jscomp/parsing/parser/FeatureSet.java#L187-L188

l1bbcsg commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

v20200101: https://github.com/kangax/compat-table/pull/1565

brad4d commented 4 years ago

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 commented 4 years ago

v20200112: https://github.com/kangax/compat-table/pull/1571

teppeis commented 4 years ago

v20200315: https://github.com/kangax/compat-table/pull/1618