From f13685641dd82a41cb84607e845574ff567053ac Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Wed, 22 Jan 2025 10:23:35 +0100 Subject: [PATCH 01/12] JS discouraged feature --- features/javascript-discouraged.yml | 43 +++++++++++++++ features/javascript-discouraged.yml.dist | 69 ++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 features/javascript-discouraged.yml create mode 100644 features/javascript-discouraged.yml.dist diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml new file mode 100644 index 00000000000..fdaff2570dd --- /dev/null +++ b/features/javascript-discouraged.yml @@ -0,0 +1,43 @@ +name: JavaScript built-ins (legacy) +description: +spec: https://tc39.es/ecma262/multipage/ +group: javascript +discouraged: + according_to: + - https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers + - https://tc39.es/ecma262/#sec-object.prototype-legacy-accessor-methods + - https://tc39.es/ecma262/#sec-object.prototype.__proto__ +compat_features: + # The following properties are legacy according to: + # https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers + - javascript.builtins.escape + - javascript.builtins.unescape + - javascript.builtins.String.anchor + - javascript.builtins.String.big + - javascript.builtins.String.blink + - javascript.builtins.String.bold + - javascript.builtins.String.fixed + - javascript.builtins.String.fontcolor + - javascript.builtins.String.fontsize + - javascript.builtins.String.italics + - javascript.builtins.String.link + - javascript.builtins.String.small + - javascript.builtins.String.strike + - javascript.builtins.String.sub + - javascript.builtins.String.substr + - javascript.builtins.String.sup + - javascript.builtins.Date.getYear + - javascript.builtins.Date.setYear + - javascript.builtins.Date.toGMTString + - javascript.builtins.RegExp.compile + + # The following properties are legacy according to: + # https://tc39.es/ecma262/#sec-object.prototype-legacy-accessor-methods + - javascript.builtins.Object.defineGetter + - javascript.builtins.Object.defineSetter + - javascript.builtins.Object.lookupGetter + - javascript.builtins.Object.lookupSetter + + # The following properties are legacy according to: + # https://tc39.es/ecma262/#sec-object.prototype.__proto__ + - javascript.builtins.Object.proto \ No newline at end of file diff --git a/features/javascript-discouraged.yml.dist b/features/javascript-discouraged.yml.dist new file mode 100644 index 00000000000..ca1e072ba9a --- /dev/null +++ b/features/javascript-discouraged.yml.dist @@ -0,0 +1,69 @@ +# Generated from: javascript-discouraged.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "3.1" + safari_ios: "2" +compat_features: + # baseline: false + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "1" + # safari_ios: "1" + - javascript.builtins.Date.getYear + - javascript.builtins.Date.setYear + - javascript.builtins.Date.toGMTString + - javascript.builtins.String.anchor + - javascript.builtins.String.big + - javascript.builtins.String.blink + - javascript.builtins.String.bold + - javascript.builtins.String.fixed + - javascript.builtins.String.fontcolor + - javascript.builtins.String.fontsize + - javascript.builtins.String.italics + - javascript.builtins.String.link + - javascript.builtins.String.small + - javascript.builtins.String.strike + - javascript.builtins.String.sub + - javascript.builtins.String.substr + - javascript.builtins.String.sup + - javascript.builtins.escape + - javascript.builtins.unescape + + # baseline: false + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3" + # safari_ios: "1" + - javascript.builtins.Object.defineGetter + - javascript.builtins.Object.defineSetter + - javascript.builtins.Object.lookupGetter + - javascript.builtins.Object.lookupSetter + - javascript.builtins.Object.proto + + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3.1" + # safari_ios: "2" + - javascript.builtins.RegExp.compile From ad8c5d838d22fb16e227e75debf921b0307353f9 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Mon, 17 Feb 2025 16:18:44 +0100 Subject: [PATCH 02/12] Add discouraged feature for discouraged `escape()` and `unescape()` --- features/escape-unescape.yml | 13 +++++++++++++ features/escape-unescape.yml.dist | 16 ++++++++++++++++ features/javascript-discouraged.yml | 6 ++---- features/javascript-discouraged.yml.dist | 2 -- 4 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 features/escape-unescape.yml create mode 100644 features/escape-unescape.yml.dist diff --git a/features/escape-unescape.yml b/features/escape-unescape.yml new file mode 100644 index 00000000000..72960745d30 --- /dev/null +++ b/features/escape-unescape.yml @@ -0,0 +1,13 @@ +name: escape() and unescape() +description: The `escape()` and `unescape()` built-in Javascript methods encode and unencode strings using percent encoding, where certain characters are replaced by hexidecimal escape sequences. +spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-escape-string +group: javascript +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers + # No `alternatives` becuase it would be `alternatives: [javascript]`. In the + # future it'd be nice to have an internal reference to encodeURI(), + # decodeURI(), encodeURIComponent(), and decodeURIComponent() instead. +compat_features: + - javascript.builtins.escape + - javascript.builtins.unescape diff --git a/features/escape-unescape.yml.dist b/features/escape-unescape.yml.dist new file mode 100644 index 00000000000..5e46b0917f2 --- /dev/null +++ b/features/escape-unescape.yml.dist @@ -0,0 +1,16 @@ +# Generated from: escape-unescape.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "1" + safari_ios: "1" +compat_features: + - javascript.builtins.escape + - javascript.builtins.unescape diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml index fdaff2570dd..8cdf6d4e0a3 100644 --- a/features/javascript-discouraged.yml +++ b/features/javascript-discouraged.yml @@ -1,5 +1,5 @@ name: JavaScript built-ins (legacy) -description: +description: [This feature is being decomposed.] spec: https://tc39.es/ecma262/multipage/ group: javascript discouraged: @@ -10,8 +10,6 @@ discouraged: compat_features: # The following properties are legacy according to: # https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers - - javascript.builtins.escape - - javascript.builtins.unescape - javascript.builtins.String.anchor - javascript.builtins.String.big - javascript.builtins.String.blink @@ -40,4 +38,4 @@ compat_features: # The following properties are legacy according to: # https://tc39.es/ecma262/#sec-object.prototype.__proto__ - - javascript.builtins.Object.proto \ No newline at end of file + - javascript.builtins.Object.proto diff --git a/features/javascript-discouraged.yml.dist b/features/javascript-discouraged.yml.dist index ca1e072ba9a..bdb9b12a0a8 100644 --- a/features/javascript-discouraged.yml.dist +++ b/features/javascript-discouraged.yml.dist @@ -38,8 +38,6 @@ compat_features: - javascript.builtins.String.sub - javascript.builtins.String.substr - javascript.builtins.String.sup - - javascript.builtins.escape - - javascript.builtins.unescape # baseline: false # support: From f052c4fb64cce8fc914abcd8c3ef5e60d804c75d Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Mon, 17 Feb 2025 17:41:16 +0100 Subject: [PATCH 03/12] Add discouraged HTML wrapper methods feature --- features/html-wrapper-methods.yml | 24 ++++++++++++++++++++ features/html-wrapper-methods.yml.dist | 28 ++++++++++++++++++++++++ features/javascript-discouraged.yml | 14 ------------ features/javascript-discouraged.yml.dist | 14 ------------ 4 files changed, 52 insertions(+), 28 deletions(-) create mode 100644 features/html-wrapper-methods.yml create mode 100644 features/html-wrapper-methods.yml.dist diff --git a/features/html-wrapper-methods.yml b/features/html-wrapper-methods.yml new file mode 100644 index 00000000000..45ac41987f9 --- /dev/null +++ b/features/html-wrapper-methods.yml @@ -0,0 +1,24 @@ +name: HTML wrapper methods +description: JavaScript built-in methods such as, `String.bold()` and `String.italics()`, wrap strings in (often historic) HTML. +spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-properties-of-the-string.prototype-object +group: javascript +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers + alternatives: + - dom +compat_features: + - javascript.builtins.String.anchor + - javascript.builtins.String.big + - javascript.builtins.String.blink + - javascript.builtins.String.bold + - javascript.builtins.String.fixed + - javascript.builtins.String.fontcolor + - javascript.builtins.String.fontsize + - javascript.builtins.String.italics + - javascript.builtins.String.link + - javascript.builtins.String.small + - javascript.builtins.String.strike + - javascript.builtins.String.sub + - javascript.builtins.String.substr + - javascript.builtins.String.sup diff --git a/features/html-wrapper-methods.yml.dist b/features/html-wrapper-methods.yml.dist new file mode 100644 index 00000000000..a4c6ea216c9 --- /dev/null +++ b/features/html-wrapper-methods.yml.dist @@ -0,0 +1,28 @@ +# Generated from: html-wrapper-methods.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "1" + safari_ios: "1" +compat_features: + - javascript.builtins.String.anchor + - javascript.builtins.String.big + - javascript.builtins.String.blink + - javascript.builtins.String.bold + - javascript.builtins.String.fixed + - javascript.builtins.String.fontcolor + - javascript.builtins.String.fontsize + - javascript.builtins.String.italics + - javascript.builtins.String.link + - javascript.builtins.String.small + - javascript.builtins.String.strike + - javascript.builtins.String.sub + - javascript.builtins.String.substr + - javascript.builtins.String.sup diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml index 8cdf6d4e0a3..07783db8f35 100644 --- a/features/javascript-discouraged.yml +++ b/features/javascript-discouraged.yml @@ -10,20 +10,6 @@ discouraged: compat_features: # The following properties are legacy according to: # https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers - - javascript.builtins.String.anchor - - javascript.builtins.String.big - - javascript.builtins.String.blink - - javascript.builtins.String.bold - - javascript.builtins.String.fixed - - javascript.builtins.String.fontcolor - - javascript.builtins.String.fontsize - - javascript.builtins.String.italics - - javascript.builtins.String.link - - javascript.builtins.String.small - - javascript.builtins.String.strike - - javascript.builtins.String.sub - - javascript.builtins.String.substr - - javascript.builtins.String.sup - javascript.builtins.Date.getYear - javascript.builtins.Date.setYear - javascript.builtins.Date.toGMTString diff --git a/features/javascript-discouraged.yml.dist b/features/javascript-discouraged.yml.dist index bdb9b12a0a8..18eac033b70 100644 --- a/features/javascript-discouraged.yml.dist +++ b/features/javascript-discouraged.yml.dist @@ -24,20 +24,6 @@ compat_features: - javascript.builtins.Date.getYear - javascript.builtins.Date.setYear - javascript.builtins.Date.toGMTString - - javascript.builtins.String.anchor - - javascript.builtins.String.big - - javascript.builtins.String.blink - - javascript.builtins.String.bold - - javascript.builtins.String.fixed - - javascript.builtins.String.fontcolor - - javascript.builtins.String.fontsize - - javascript.builtins.String.italics - - javascript.builtins.String.link - - javascript.builtins.String.small - - javascript.builtins.String.strike - - javascript.builtins.String.sub - - javascript.builtins.String.substr - - javascript.builtins.String.sup # baseline: false # support: From 8ff33f6380c885104bb36a7e91e95a85f3ae7b0c Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Mon, 17 Feb 2025 17:51:57 +0100 Subject: [PATCH 04/12] Add discouraged feature for `Date.prototype.{get,set}Year()` --- features/date-get-year-set-year.yml | 13 +++++++++++++ features/date-get-year-set-year.yml.dist | 16 ++++++++++++++++ features/javascript-discouraged.yml | 2 -- features/javascript-discouraged.yml.dist | 2 -- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 features/date-get-year-set-year.yml create mode 100644 features/date-get-year-set-year.yml.dist diff --git a/features/date-get-year-set-year.yml b/features/date-get-year-set-year.yml new file mode 100644 index 00000000000..5d7c1e934de --- /dev/null +++ b/features/date-get-year-set-year.yml @@ -0,0 +1,13 @@ +name: getYear() and setYear() +description: The `getYear()` and `setYear()` methods of `Date` objects get and set the year offset to 1900, changing a date's year in way that is subject to the year 2000 problem. +spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-date.prototype.getyear +group: javascript +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers + # No `alternatives` becuase it would be `alternatives: [date]`. In the future + # it'd be nice to have an internal reference to getFullYear() and + # setFullYear() instead. +compat_features: + - javascript.builtins.Date.getYear + - javascript.builtins.Date.setYear diff --git a/features/date-get-year-set-year.yml.dist b/features/date-get-year-set-year.yml.dist new file mode 100644 index 00000000000..e99853bb88a --- /dev/null +++ b/features/date-get-year-set-year.yml.dist @@ -0,0 +1,16 @@ +# Generated from: date-get-year-set-year.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "1" + safari_ios: "1" +compat_features: + - javascript.builtins.Date.getYear + - javascript.builtins.Date.setYear diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml index 07783db8f35..93ab1654301 100644 --- a/features/javascript-discouraged.yml +++ b/features/javascript-discouraged.yml @@ -10,8 +10,6 @@ discouraged: compat_features: # The following properties are legacy according to: # https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers - - javascript.builtins.Date.getYear - - javascript.builtins.Date.setYear - javascript.builtins.Date.toGMTString - javascript.builtins.RegExp.compile diff --git a/features/javascript-discouraged.yml.dist b/features/javascript-discouraged.yml.dist index 18eac033b70..5155813e6ef 100644 --- a/features/javascript-discouraged.yml.dist +++ b/features/javascript-discouraged.yml.dist @@ -21,8 +21,6 @@ compat_features: # firefox_android: "4" # safari: "1" # safari_ios: "1" - - javascript.builtins.Date.getYear - - javascript.builtins.Date.setYear - javascript.builtins.Date.toGMTString # baseline: false From 5e32efdf2a294c3f37dc3b7b1a71cc7b0a4b504b Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Mon, 17 Feb 2025 18:05:55 +0100 Subject: [PATCH 05/12] Add discouraged feature for getter and setter defining methods --- features/accessor-methods.yml | 15 +++++++++++++++ features/accessor-methods.yml.dist | 18 ++++++++++++++++++ features/javascript-discouraged.yml | 7 ------- features/javascript-discouraged.yml.dist | 4 ---- 4 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 features/accessor-methods.yml create mode 100644 features/accessor-methods.yml.dist diff --git a/features/accessor-methods.yml b/features/accessor-methods.yml new file mode 100644 index 00000000000..a53b2b277ae --- /dev/null +++ b/features/accessor-methods.yml @@ -0,0 +1,15 @@ +name: Accessor methods +description: The `__defineGetter__()` and `__defineSetter__()` methods of objects bind a function to a property, which is called on setting or reading the property. +spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prototype-legacy-accessor-methods +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers + # No `alternatives` becuase it would be `alternatives: + # [object-object, functions]`. In the future it'd be nice to have an + # internal reference to the object defineProperty method and the function + # get/set syntax. +compat_features: + - javascript.builtins.Object.defineGetter + - javascript.builtins.Object.defineSetter + - javascript.builtins.Object.lookupGetter + - javascript.builtins.Object.lookupSetter diff --git a/features/accessor-methods.yml.dist b/features/accessor-methods.yml.dist new file mode 100644 index 00000000000..179d572c0a9 --- /dev/null +++ b/features/accessor-methods.yml.dist @@ -0,0 +1,18 @@ +# Generated from: accessor-methods.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "3" + safari_ios: "1" +compat_features: + - javascript.builtins.Object.defineGetter + - javascript.builtins.Object.defineSetter + - javascript.builtins.Object.lookupGetter + - javascript.builtins.Object.lookupSetter diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml index 93ab1654301..ff2924838a1 100644 --- a/features/javascript-discouraged.yml +++ b/features/javascript-discouraged.yml @@ -13,13 +13,6 @@ compat_features: - javascript.builtins.Date.toGMTString - javascript.builtins.RegExp.compile - # The following properties are legacy according to: - # https://tc39.es/ecma262/#sec-object.prototype-legacy-accessor-methods - - javascript.builtins.Object.defineGetter - - javascript.builtins.Object.defineSetter - - javascript.builtins.Object.lookupGetter - - javascript.builtins.Object.lookupSetter - # The following properties are legacy according to: # https://tc39.es/ecma262/#sec-object.prototype.__proto__ - javascript.builtins.Object.proto diff --git a/features/javascript-discouraged.yml.dist b/features/javascript-discouraged.yml.dist index 5155813e6ef..ab1db5ffe28 100644 --- a/features/javascript-discouraged.yml.dist +++ b/features/javascript-discouraged.yml.dist @@ -32,10 +32,6 @@ compat_features: # firefox_android: "4" # safari: "3" # safari_ios: "1" - - javascript.builtins.Object.defineGetter - - javascript.builtins.Object.defineSetter - - javascript.builtins.Object.lookupGetter - - javascript.builtins.Object.lookupSetter - javascript.builtins.Object.proto # ⬇️ Same status as overall feature ⬇️ From a429475e2abe9d99dcb404555712a2c50b2f9031 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Tue, 18 Feb 2025 12:57:57 +0100 Subject: [PATCH 06/12] Add discouraged feature for `__proto__` --- features/javascript-discouraged.yml | 4 ---- features/javascript-discouraged.yml.dist | 11 ----------- features/proto.yml | 11 +++++++++++ features/proto.yml.dist | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 features/proto.yml create mode 100644 features/proto.yml.dist diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml index ff2924838a1..ed024790698 100644 --- a/features/javascript-discouraged.yml +++ b/features/javascript-discouraged.yml @@ -12,7 +12,3 @@ compat_features: # https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers - javascript.builtins.Date.toGMTString - javascript.builtins.RegExp.compile - - # The following properties are legacy according to: - # https://tc39.es/ecma262/#sec-object.prototype.__proto__ - - javascript.builtins.Object.proto diff --git a/features/javascript-discouraged.yml.dist b/features/javascript-discouraged.yml.dist index ab1db5ffe28..44bb46660c9 100644 --- a/features/javascript-discouraged.yml.dist +++ b/features/javascript-discouraged.yml.dist @@ -23,17 +23,6 @@ compat_features: # safari_ios: "1" - javascript.builtins.Date.toGMTString - # baseline: false - # support: - # chrome: "1" - # chrome_android: "18" - # edge: "12" - # firefox: "1" - # firefox_android: "4" - # safari: "3" - # safari_ios: "1" - - javascript.builtins.Object.proto - # ⬇️ Same status as overall feature ⬇️ # baseline: false # support: diff --git a/features/proto.yml b/features/proto.yml new file mode 100644 index 00000000000..b66360ded69 --- /dev/null +++ b/features/proto.yml @@ -0,0 +1,11 @@ +name: __proto__ +description: The `__proto__` property of objects partially exposes the prototype of an object. +spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prototype.__proto__ +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers + # No `alternatives` becuase it would be `alternatives: [object]`. In the + # future it'd be nice to have an internal reference to `getPrototypeOf()` and + # `setPrototypeOf()` instead. +compat_features: + - javascript.builtins.Object.proto diff --git a/features/proto.yml.dist b/features/proto.yml.dist new file mode 100644 index 00000000000..8def5e653c7 --- /dev/null +++ b/features/proto.yml.dist @@ -0,0 +1,15 @@ +# Generated from: proto.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "3" + safari_ios: "1" +compat_features: + - javascript.builtins.Object.proto From 1f02a0560dc0111ce4721324fdbcbfc6ad6ce354 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Tue, 18 Feb 2025 13:05:42 +0100 Subject: [PATCH 07/12] Add discouraged feature for the `RegExp` `compile()` method --- features/javascript-discouraged.yml | 3 +-- features/regexp-compile.yml | 11 +++++++++++ features/regexp-compile.yml.dist | 15 +++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 features/regexp-compile.yml create mode 100644 features/regexp-compile.yml.dist diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml index ed024790698..8d4d6a2169c 100644 --- a/features/javascript-discouraged.yml +++ b/features/javascript-discouraged.yml @@ -10,5 +10,4 @@ discouraged: compat_features: # The following properties are legacy according to: # https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers - - javascript.builtins.Date.toGMTString - - javascript.builtins.RegExp.compile + - javascript.builtins.Date.toGMTString \ No newline at end of file diff --git a/features/regexp-compile.yml b/features/regexp-compile.yml new file mode 100644 index 00000000000..324e0c29f00 --- /dev/null +++ b/features/regexp-compile.yml @@ -0,0 +1,11 @@ +name: RegExp compile() +description: The `compile()` method of `RegExp` objects recompiles an existing regular expression object using a new pattern and flags. +spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-regexp.prototype.compile +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers + # No `alternatives` becuase it would be `alternatives: [regexp]`. In the + # future it'd be nice to have an internal reference to the RegExp() + # constructor instead. +compat_features: + - javascript.builtins.RegExp.compile diff --git a/features/regexp-compile.yml.dist b/features/regexp-compile.yml.dist new file mode 100644 index 00000000000..871d9e763f6 --- /dev/null +++ b/features/regexp-compile.yml.dist @@ -0,0 +1,15 @@ +# Generated from: regexp-compile.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "3.1" + safari_ios: "2" +compat_features: + - javascript.builtins.RegExp.compile From f9000431c0868d9677908f85adb2ef7237cdb0ab Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Tue, 18 Feb 2025 13:12:40 +0100 Subject: [PATCH 08/12] Add discouraged feature for `toGMTString()` method --- features/date-to-gmt-string.yml | 11 ++++++++ features/date-to-gmt-string.yml.dist | 15 ++++++++++ features/javascript-discouraged.yml | 13 --------- features/javascript-discouraged.yml.dist | 36 ------------------------ 4 files changed, 26 insertions(+), 49 deletions(-) create mode 100644 features/date-to-gmt-string.yml create mode 100644 features/date-to-gmt-string.yml.dist delete mode 100644 features/javascript-discouraged.yml delete mode 100644 features/javascript-discouraged.yml.dist diff --git a/features/date-to-gmt-string.yml b/features/date-to-gmt-string.yml new file mode 100644 index 00000000000..ad02d41fca7 --- /dev/null +++ b/features/date-to-gmt-string.yml @@ -0,0 +1,11 @@ +name: toGMTString() +description: The `toGMTSTring()` method of `Date` objects is an alias to the `toUTCString()` method. +spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-date.prototype.togmtstring +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers + # No `alternatives` becuase it would be `alternatives: [date]`. In the future + # it'd be nice to have an internal reference to the `toUTCString()` method + # instead. +compat_features: + - javascript.builtins.Date.toGMTString diff --git a/features/date-to-gmt-string.yml.dist b/features/date-to-gmt-string.yml.dist new file mode 100644 index 00000000000..b4f246110ed --- /dev/null +++ b/features/date-to-gmt-string.yml.dist @@ -0,0 +1,15 @@ +# Generated from: date-to-gmt-string.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "1" + chrome_android: "18" + edge: "12" + firefox: "1" + firefox_android: "4" + safari: "1" + safari_ios: "1" +compat_features: + - javascript.builtins.Date.toGMTString diff --git a/features/javascript-discouraged.yml b/features/javascript-discouraged.yml deleted file mode 100644 index 8d4d6a2169c..00000000000 --- a/features/javascript-discouraged.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: JavaScript built-ins (legacy) -description: [This feature is being decomposed.] -spec: https://tc39.es/ecma262/multipage/ -group: javascript -discouraged: - according_to: - - https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers - - https://tc39.es/ecma262/#sec-object.prototype-legacy-accessor-methods - - https://tc39.es/ecma262/#sec-object.prototype.__proto__ -compat_features: - # The following properties are legacy according to: - # https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers - - javascript.builtins.Date.toGMTString \ No newline at end of file diff --git a/features/javascript-discouraged.yml.dist b/features/javascript-discouraged.yml.dist deleted file mode 100644 index 44bb46660c9..00000000000 --- a/features/javascript-discouraged.yml.dist +++ /dev/null @@ -1,36 +0,0 @@ -# Generated from: javascript-discouraged.yml -# Do not edit this file by hand. Edit the source file instead! - -status: - baseline: false - support: - chrome: "1" - chrome_android: "18" - edge: "12" - firefox: "1" - firefox_android: "4" - safari: "3.1" - safari_ios: "2" -compat_features: - # baseline: false - # support: - # chrome: "1" - # chrome_android: "18" - # edge: "12" - # firefox: "1" - # firefox_android: "4" - # safari: "1" - # safari_ios: "1" - - javascript.builtins.Date.toGMTString - - # ⬇️ Same status as overall feature ⬇️ - # baseline: false - # support: - # chrome: "1" - # chrome_android: "18" - # edge: "12" - # firefox: "1" - # firefox_android: "4" - # safari: "3.1" - # safari_ios: "2" - - javascript.builtins.RegExp.compile From a969a021e3ccbdb0df3286753909343b61dd8000 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Thu, 20 Feb 2025 14:59:27 +0100 Subject: [PATCH 09/12] Fix typos --- features/accessor-methods.yml | 2 +- features/date-get-year-set-year.yml | 2 +- features/date-to-gmt-string.yml | 2 +- features/escape-unescape.yml | 2 +- features/proto.yml | 2 +- features/regexp-compile.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/features/accessor-methods.yml b/features/accessor-methods.yml index a53b2b277ae..5540d76782c 100644 --- a/features/accessor-methods.yml +++ b/features/accessor-methods.yml @@ -4,7 +4,7 @@ spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prot discouraged: according_to: - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers - # No `alternatives` becuase it would be `alternatives: + # No `alternatives` because it would be `alternatives: # [object-object, functions]`. In the future it'd be nice to have an # internal reference to the object defineProperty method and the function # get/set syntax. diff --git a/features/date-get-year-set-year.yml b/features/date-get-year-set-year.yml index 5d7c1e934de..10a6f299aae 100644 --- a/features/date-get-year-set-year.yml +++ b/features/date-get-year-set-year.yml @@ -5,7 +5,7 @@ group: javascript discouraged: according_to: - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers - # No `alternatives` becuase it would be `alternatives: [date]`. In the future + # No `alternatives` because it would be `alternatives: [date]`. In the future # it'd be nice to have an internal reference to getFullYear() and # setFullYear() instead. compat_features: diff --git a/features/date-to-gmt-string.yml b/features/date-to-gmt-string.yml index ad02d41fca7..4bc516ff03f 100644 --- a/features/date-to-gmt-string.yml +++ b/features/date-to-gmt-string.yml @@ -4,7 +4,7 @@ spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-b discouraged: according_to: - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers - # No `alternatives` becuase it would be `alternatives: [date]`. In the future + # No `alternatives` because it would be `alternatives: [date]`. In the future # it'd be nice to have an internal reference to the `toUTCString()` method # instead. compat_features: diff --git a/features/escape-unescape.yml b/features/escape-unescape.yml index 72960745d30..7189404faa6 100644 --- a/features/escape-unescape.yml +++ b/features/escape-unescape.yml @@ -5,7 +5,7 @@ group: javascript discouraged: according_to: - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers - # No `alternatives` becuase it would be `alternatives: [javascript]`. In the + # No `alternatives` because it would be `alternatives: [javascript]`. In the # future it'd be nice to have an internal reference to encodeURI(), # decodeURI(), encodeURIComponent(), and decodeURIComponent() instead. compat_features: diff --git a/features/proto.yml b/features/proto.yml index b66360ded69..220215e564a 100644 --- a/features/proto.yml +++ b/features/proto.yml @@ -4,7 +4,7 @@ spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prot discouraged: according_to: - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers - # No `alternatives` becuase it would be `alternatives: [object]`. In the + # No `alternatives` because it would be `alternatives: [object]`. In the # future it'd be nice to have an internal reference to `getPrototypeOf()` and # `setPrototypeOf()` instead. compat_features: diff --git a/features/regexp-compile.yml b/features/regexp-compile.yml index 324e0c29f00..029ef2b1107 100644 --- a/features/regexp-compile.yml +++ b/features/regexp-compile.yml @@ -4,7 +4,7 @@ spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-b discouraged: according_to: - https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers - # No `alternatives` becuase it would be `alternatives: [regexp]`. In the + # No `alternatives` because it would be `alternatives: [regexp]`. In the # future it'd be nice to have an internal reference to the RegExp() # constructor instead. compat_features: From 7ee30da142ac176c47c84a6f95b564112aae428b Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Thu, 20 Feb 2025 15:00:45 +0100 Subject: [PATCH 10/12] Cross-reference issue about feature subsetting for alternatives https://github.com/web-platform-dx/web-features/issues/2676 --- features/accessor-methods.yml | 1 + features/date-get-year-set-year.yml | 1 + features/date-to-gmt-string.yml | 1 + features/escape-unescape.yml | 1 + features/proto.yml | 1 + features/regexp-compile.yml | 1 + 6 files changed, 6 insertions(+) diff --git a/features/accessor-methods.yml b/features/accessor-methods.yml index 5540d76782c..133090d4936 100644 --- a/features/accessor-methods.yml +++ b/features/accessor-methods.yml @@ -8,6 +8,7 @@ discouraged: # [object-object, functions]`. In the future it'd be nice to have an # internal reference to the object defineProperty method and the function # get/set syntax. + # See https://github.com/web-platform-dx/web-features/issues/2676 compat_features: - javascript.builtins.Object.defineGetter - javascript.builtins.Object.defineSetter diff --git a/features/date-get-year-set-year.yml b/features/date-get-year-set-year.yml index 10a6f299aae..8c5609e8887 100644 --- a/features/date-get-year-set-year.yml +++ b/features/date-get-year-set-year.yml @@ -8,6 +8,7 @@ discouraged: # No `alternatives` because it would be `alternatives: [date]`. In the future # it'd be nice to have an internal reference to getFullYear() and # setFullYear() instead. + # See: https://github.com/web-platform-dx/web-features/issues/2676 compat_features: - javascript.builtins.Date.getYear - javascript.builtins.Date.setYear diff --git a/features/date-to-gmt-string.yml b/features/date-to-gmt-string.yml index 4bc516ff03f..ffc9335c809 100644 --- a/features/date-to-gmt-string.yml +++ b/features/date-to-gmt-string.yml @@ -7,5 +7,6 @@ discouraged: # No `alternatives` because it would be `alternatives: [date]`. In the future # it'd be nice to have an internal reference to the `toUTCString()` method # instead. + # See: https://github.com/web-platform-dx/web-features/issues/2676 compat_features: - javascript.builtins.Date.toGMTString diff --git a/features/escape-unescape.yml b/features/escape-unescape.yml index 7189404faa6..5ac841c28b9 100644 --- a/features/escape-unescape.yml +++ b/features/escape-unescape.yml @@ -8,6 +8,7 @@ discouraged: # No `alternatives` because it would be `alternatives: [javascript]`. In the # future it'd be nice to have an internal reference to encodeURI(), # decodeURI(), encodeURIComponent(), and decodeURIComponent() instead. + # See: https://github.com/web-platform-dx/web-features/issues/2676 compat_features: - javascript.builtins.escape - javascript.builtins.unescape diff --git a/features/proto.yml b/features/proto.yml index 220215e564a..6315909a6b1 100644 --- a/features/proto.yml +++ b/features/proto.yml @@ -7,5 +7,6 @@ discouraged: # No `alternatives` because it would be `alternatives: [object]`. In the # future it'd be nice to have an internal reference to `getPrototypeOf()` and # `setPrototypeOf()` instead. + # See: https://github.com/web-platform-dx/web-features/issues/2676 compat_features: - javascript.builtins.Object.proto diff --git a/features/regexp-compile.yml b/features/regexp-compile.yml index 029ef2b1107..f363a0776b7 100644 --- a/features/regexp-compile.yml +++ b/features/regexp-compile.yml @@ -7,5 +7,6 @@ discouraged: # No `alternatives` because it would be `alternatives: [regexp]`. In the # future it'd be nice to have an internal reference to the RegExp() # constructor instead. + # See: https://github.com/web-platform-dx/web-features/issues/2676 compat_features: - javascript.builtins.RegExp.compile From 4a1041d3aebeeeca21dae999df27db2f1f0e084c Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Thu, 20 Feb 2025 15:11:15 +0100 Subject: [PATCH 11/12] Add missing link --- features/accessor-methods.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/accessor-methods.yml b/features/accessor-methods.yml index 133090d4936..239ae0eff1a 100644 --- a/features/accessor-methods.yml +++ b/features/accessor-methods.yml @@ -8,7 +8,7 @@ discouraged: # [object-object, functions]`. In the future it'd be nice to have an # internal reference to the object defineProperty method and the function # get/set syntax. - # See https://github.com/web-platform-dx/web-features/issues/2676 + # See: https://github.com/web-platform-dx/web-features/issues/2676 compat_features: - javascript.builtins.Object.defineGetter - javascript.builtins.Object.defineSetter From 117674f753a19dbebcdf56652f814efe3eb1fd7f Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Sat, 1 Mar 2025 09:03:13 +0100 Subject: [PATCH 12/12] Update date-get-year-set-year.yml Co-authored-by: Daniel D. Beck --- features/date-get-year-set-year.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/date-get-year-set-year.yml b/features/date-get-year-set-year.yml index 8c5609e8887..bfed0819dd1 100644 --- a/features/date-get-year-set-year.yml +++ b/features/date-get-year-set-year.yml @@ -1,5 +1,5 @@ name: getYear() and setYear() -description: The `getYear()` and `setYear()` methods of `Date` objects get and set the year offset to 1900, changing a date's year in way that is subject to the year 2000 problem. +description: The `getYear()` and `setYear()` methods of `Date` objects get and set the year as an offset to 1900. spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-date.prototype.getyear group: javascript discouraged: