Skip to content

Commit

Permalink
add opera to more feature tables
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed May 15, 2022
1 parent 7009dc7 commit f0bef33
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Unreleased

* Add Opera to more internal feature compatibility tables ([#2247](https://github.com/evanw/esbuild/issues/2247), [#2252](https://github.com/evanw/esbuild/pull/2252))

The internal compatibility tables that esbuild uses to determine which environments support which features are derived from multiple sources. Most of it is automatically derived from [these ECMAScript compatibility tables](https://kangax.github.io/compat-table/), but missing information is manually copied from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/), GitHub PR comments, and various other websites. Version 0.14.35 of esbuild introduced Opera as a possible target environment which was automatically picked up by the compatibility table script, but the manually-copied information wasn't updated to include Opera. This release fixes this omission so Opera feature compatibility should now be accurate.

This was contributed by [@lbwa](https://github.com/lbwa).

## 0.14.39

* Fix code generation for `export default` and `/* @__PURE__ */` call ([#2203](https://github.com/evanw/esbuild/issues/2203))
Expand Down
17 changes: 9 additions & 8 deletions scripts/compat-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ mergeVersions('ExportStarAs', {
es2020: true,
firefox80: true,
node12: true, // From https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export
opera60: true,

// This feature has been implemented in Safari but I have no idea what version
// this bug corresponds to: https://bugs.webkit.org/show_bug.cgi?id=214379
Expand All @@ -190,6 +191,7 @@ mergeVersions('ImportMeta', {
firefox62: true,
ios12: true,
node10_4: true, // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta
opera51: true,
safari11_1: true,
})

Expand All @@ -209,6 +211,7 @@ mergeVersions('DynamicImport', {
edge79: true,
firefox67: true,
ios11: true,
opera50: true,
safari11_1: true,
})

Expand Down Expand Up @@ -269,18 +272,16 @@ mergeVersions('ImportAssertions', {
// From https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V16.md#16.14.0
node16_14: true,

// Not yet in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1668330
// Not yet in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1736059
})

// Manually copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Class_static_initialization_blocks
mergeVersions('ClassStaticBlocks', {
// From https://www.chromestatus.com/feature/6482797915013120
chrome91: true,

// https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V16.md
// combined with https://v8.dev/blog/v8-release-94
chrome91: true, // From https://www.chromestatus.com/feature/6482797915013120
edge94: true,
firefox93: true,
node16_11: true,

// Not yet in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1670018
opera80: true,
})

for (const test of [...es5.tests, ...es6.tests, ...stage4.tests, ...stage1to3.tests]) {
Expand Down

0 comments on commit f0bef33

Please sign in to comment.