From 43fc39c4dc2acb10849b9e5e419b818ad47a5ca7 Mon Sep 17 00:00:00 2001 From: Christoph Tavan Date: Thu, 2 Dec 2021 11:21:09 +0100 Subject: [PATCH] build: drop support for legacy browsers (IE11, Safari 10) BREAKING CHANGE: Drop support for browsers that don't correctly implement const/let and no longer transpile the browser build to ES2015. Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. --- README.md | 6 +++++- README_js.md | 6 +++++- babel.config.json | 15 ++++++++++++++- wdio.conf.js | 34 +++++++++++++++------------------- 4 files changed, 39 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index d00837f7..7d6d6d02 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs - **Cross-platform** - Support for ... - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) - Node 10, 12, 14, 16 - - Chrome, Safari, Firefox, Edge, IE 11 browsers + - Chrome, Safari, Firefox, Edge browsers - Webpack and rollup.js module bundlers - [React Native / Expo](#react-native--expo) - **Secure** - Cryptographically-strong random values @@ -417,6 +417,10 @@ Note: If you are using Expo, you must be using at least `react-native-get-random [In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). +### IE 11 (Internet Explorer) + +Support for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)). + ## Upgrading From `uuid@7` ### Only Named Exports Supported When Using with Node.js ESM diff --git a/README_js.md b/README_js.md index 74d05024..8bd0f363 100644 --- a/README_js.md +++ b/README_js.md @@ -25,7 +25,7 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs - **Cross-platform** - Support for ... - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) - Node 10, 12, 14, 16 - - Chrome, Safari, Firefox, Edge, IE 11 browsers + - Chrome, Safari, Firefox, Edge browsers - Webpack and rollup.js module bundlers - [React Native / Expo](#react-native--expo) - **Secure** - Cryptographically-strong random values @@ -426,6 +426,10 @@ Note: If you are using Expo, you must be using at least `react-native-get-random [In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). +### IE 11 (Internet Explorer) + +Support for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)). + ## Upgrading From `uuid@7` ### Only Named Exports Supported When Using with Node.js ESM diff --git a/babel.config.json b/babel.config.json index cd9b48ff..4edbcbc6 100644 --- a/babel.config.json +++ b/babel.config.json @@ -6,7 +6,20 @@ "presets": [["@babel/preset-env", { "targets": { "node": "10" }, "modules": "commonjs" }]] }, "esmBrowser": { - "presets": [["@babel/preset-env", { "modules": false }]] + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "chrome": "49", + "edge": "14", + "firefox": "51", + "safari": "11" + }, + "modules": false + } + ] + ] }, "esmNode": { "presets": [["@babel/preset-env", { "targets": { "node": "10" }, "modules": false }]] diff --git a/wdio.conf.js b/wdio.conf.js index ba65b528..cc1048e6 100644 --- a/wdio.conf.js +++ b/wdio.conf.js @@ -40,20 +40,11 @@ const capabilities = [ 'bstack:options': { ...commonCapabilities, os: 'Windows', - osVersion: '10', + osVersion: '11', }, browserName: 'Chrome', browserVersion: '92.0', }, - { - 'bstack:options': { - ...commonCapabilities, - os: 'Windows', - osVersion: '10', - }, - browserName: 'Chrome', - browserVersion: '81.0', - }, // Chrome 49 released on 2016-03-02 was the last version supported on Windows XP, Windows Vista, Mac OS X 10.6, 10.7, and 10.8 { 'bstack:options': { @@ -66,15 +57,17 @@ const capabilities = [ }, // Firefox + // Latest { 'bstack:options': { ...commonCapabilities, os: 'Windows', - osVersion: '10', + osVersion: '11', }, browserName: 'Firefox', - browserVersion: '75.0', + browserVersion: '94.0', }, + // Firefox 51 was the first Firefox to correctly support const/let { 'bstack:options': { ...commonCapabilities, @@ -82,7 +75,7 @@ const capabilities = [ osVersion: '10', }, browserName: 'Firefox', - browserVersion: '44.0', + browserVersion: '51.0', }, // Edge @@ -90,11 +83,13 @@ const capabilities = [ 'bstack:options': { ...commonCapabilities, os: 'Windows', - osVersion: '10', + osVersion: '11', }, browserName: 'Edge', - browserVersion: '81.0', + browserVersion: '96.0', }, + // While Edge 12 already supported const/let, Edge 15 is the earliest Edge available on + // Browserstack { 'bstack:options': { ...commonCapabilities, @@ -110,19 +105,20 @@ const capabilities = [ 'bstack:options': { ...commonCapabilities, os: 'OS X', - osVersion: 'Catalina', + osVersion: 'Monterey', }, browserName: 'Safari', - browserVersion: '13.0', + browserVersion: '15.0', }, + // Safari 11 was the first Safari to correctly support const/let { 'bstack:options': { ...commonCapabilities, os: 'OS X', - osVersion: 'Sierra', + osVersion: 'High Sierra', }, browserName: 'Safari', - browserVersion: '10.0', + browserVersion: '11.0', }, ];