1
0
Fork 0
Commit Graph

12 Commits

Author SHA1 Message Date
Mark Stacey 524ab66a16
Update minimum browser versions (#12847)
The minimum browser versions have been updated to Chromium v80 and
Firefox v78.

Chromium v80 is >3 years old, and very few users use older versions
than that.

Firefox v78 is two extended support releases ago (v91 and v102 ar the
previous and current ESR releases).
2023-02-24 11:39:56 -03:30
Brad Decker 7b42c54728
Update Babel and dependencies (#15392) 2022-08-05 10:04:44 -05:00
Elliot Winkler 53006d4cf0
Add TypeScript to the build system (#13489)
This commit modifies the build system so that TypeScript files can be
transpiled into ES5 just like JavaScript files.

Note that this commit does NOT change the build system to run TypeScript
files through the TypeScript compiler. In other words, no files will be
type-checked at the build stage, as we expect type-checking to be
handled elsewhere (live, via your editor integration with `tsserver`,
and before a PR is merged, via `yarn lint`). Rather, we merely instruct
Babel to strip TypeScript-specific syntax from any files that have it,
as if those files had been written using JavaScript syntax alone.

Why take this approach? Because it prevents the build process from being
negatively impacted with respect to performance (as TypeScript takes a
significant amount of time to run).

It's worth noting the downside of this approach: because we aren't
running files through TypeScript, but relying on Babel's [TypeScript
transform][1] to identify TypeScript syntax, this transform has to keep
up with any syntax changes that TypeScript adds in the future. In fact
there are a few syntactical forms that Babel already does not recognize.
These forms are rare or are deprecated by TypeScript, so I don't
consider them to be a blocker, but it's worth noting just in case it
comes up later. Also, any settings we place in `tsconfig.json` will be
completely ignored by Babel. Again, this isn't a blocker because there
are some analogs for the most important settings reflected in the
options we can pass to the transform. These and other caveats are
detailed in the [documentation for the transform][2].

[1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript
[2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
2022-03-28 16:33:40 -06:00
Erik Marks 8d9989cea0
Bump minimum Chrome version to 66 (#11995)
This PR updates our minimum supported Chrome version from 63 to 66, so that we may use the `AbortController` browser API without polyfilling it.

Our minimum Firefox version supports the `AbortController`, but our current minimum Chrome version (63, released in December 2017) does not. Chrome shipped the `AbortController` in version 66, in April 2018. We have determined that an extremely small number of users are on Chrome 63 < 66, and that this change is therefore acceptable.
2021-09-01 13:19:03 -07:00
Erik Marks 76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
Mark Stacey 408586aa4d
Increase minimum Firefox version to v68 (#10195)
Firefox v68 is the _previous_ Extended Support Release. We are
increasing this because our current minimum version doesn't support
async iterators, so some of our dependencies cause the extension to
crash.

Our metrics show that usage of Firefox versions older than this is
quite low (under 0.7% of Firefox users in the past month). These older
versions are also _very behind_ on security updates. Using the Extended
Support Release also makes it easier for us to test the minimum
version, and ensure our extension remains compatible with it.

Relates to #6805
2021-01-21 09:01:42 -06:00
Mark Stacey 4587e984f5
Increase Chrome minimum version (#10019)
The Chrome minimum version has been increased from v58 to v63. We found
that we had very few users on versions below v63, and v62 is
incompatible with our SES lockdown dependency.

This also makes us compatible with Object rest/spread syntax, so we
might not have to transpile that anymore. I'll revisit that separately.
2020-12-10 01:59:47 -03:30
Brad Decker 2ebf8756a4
[RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
Brad Decker 14416a796a
add support for nullish coalescing (#8935) 2020-07-07 15:15:04 -05:00
ricky 1f9e3b89d4
Add optional chaining (#8052)
* Add plugin-proposal-optional-chaining

* Use optional chaining to provide error fallback
2020-02-18 10:11:52 -05:00
Mark Stacey 34440d63eb
Set minimum Firefox version to v56.2 to support Waterfox (#7156)
The minimum compatible version of Firefox has been lowered from `60.0`
to `56.2`. It was originally set to `60.0` because that is Firefox ESR,
which currently the minimum Firefox version with security updates.
However Waterfox is based upon Firefox `56.0`, and has backported
security fixes from the ESR release.

This change in minimum version requires no additional transpiling, and
doesn't affect any browser APIs we use.

It does introduce one additional warning in the `addon-linter` about
Firefox for Android `56` lacking support for browser action popups.
However there is no version `56.2` of Firefox for Android, so the
minimum version remains `57` in practice (which does support browser
action popups).
2019-09-12 16:55:20 -03:00
Mark Stacey 6a0dbcdb31
Upgrade to Babel 7 (#6942)
Babel 7 moved to a new configuration format, and they've scoped all of
their packages under `@babel/`. This brings MetaMask in-line with
dependencies we use that _already_ use Babel 7, and it eliminates a
few unfortunate edge cases that can prevent dependencies from being
correctly transpiled.
2019-08-02 13:17:20 -02:30