Skip to content

Commit f781d5a

Browse files
committed
build: drop support for legacy browsers (IE11, Safari 10)
BREAKING CHANGE: Drop support for browsers that don't correctly implement const/let and default arguments, 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.
1 parent 16f9c46 commit f781d5a

File tree

4 files changed

+82
-20
lines changed

4 files changed

+82
-20
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
1010
- **Cross-platform** - Support for ...
1111
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
1212
- Node 10, 12, 14, 16
13-
- Chrome, Safari, Firefox, Edge, IE 11 browsers
13+
- Chrome, Safari, Firefox, Edge browsers
1414
- Webpack and rollup.js module bundlers
1515
- [React Native / Expo](#react-native--expo)
1616
- **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
417417

418418
[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).
419419

420+
### IE 11 (Internet Explorer)
421+
422+
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/)).
423+
420424
## Upgrading From `uuid@7`
421425

422426
### Only Named Exports Supported When Using with Node.js ESM

README_js.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
2525
- **Cross-platform** - Support for ...
2626
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
2727
- Node 10, 12, 14, 16
28-
- Chrome, Safari, Firefox, Edge, IE 11 browsers
28+
- Chrome, Safari, Firefox, Edge browsers
2929
- Webpack and rollup.js module bundlers
3030
- [React Native / Expo](#react-native--expo)
3131
- **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
426426

427427
[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).
428428

429+
### IE 11 (Internet Explorer)
430+
431+
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/)).
432+
429433
## Upgrading From `uuid@7`
430434

431435
### Only Named Exports Supported When Using with Node.js ESM

babel.config.json

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,64 @@
33
"plugins": [],
44
"env": {
55
"commonjsNode": {
6-
"presets": [["@babel/preset-env", { "targets": { "node": "10" }, "modules": "commonjs" }]]
6+
"presets": [
7+
[
8+
"@babel/preset-env",
9+
{
10+
"targets": {
11+
"node": "10"
12+
},
13+
"modules": "commonjs"
14+
}
15+
]
16+
]
717
},
818
"esmNode": {
9-
"presets": [["@babel/preset-env", { "targets": { "node": "10" }, "modules": false }]]
19+
"presets": [
20+
[
21+
"@babel/preset-env",
22+
{
23+
"targets": {
24+
"node": "10"
25+
},
26+
"modules": false
27+
}
28+
]
29+
]
1030
},
1131
"commonjsBrowser": {
12-
"presets": [["@babel/preset-env", { "modules": "commonjs" }]]
32+
"presets": [
33+
[
34+
"@babel/preset-env",
35+
{
36+
"targets": {
37+
"chrome": "49",
38+
"edge": "15",
39+
"firefox": "53",
40+
"safari": "11"
41+
},
42+
"bugfixes": true,
43+
"modules": "commonjs"
44+
}
45+
]
46+
]
1347
},
1448
"esmBrowser": {
15-
"presets": [["@babel/preset-env", { "modules": false }]]
49+
"presets": [
50+
[
51+
"@babel/preset-env",
52+
{
53+
"targets": {
54+
"chrome": "49",
55+
"edge": "15",
56+
"firefox": "53",
57+
"safari": "11"
58+
},
59+
"bugfixes": true,
60+
"modules": false
61+
}
62+
]
63+
]
1664
}
1765
}
1866
}

wdio.conf.js

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,25 @@ const capabilities = [
3535
},
3636

3737
// Chrome
38-
// Chrome 92 introduced native support for crypto.randomUUID
38+
// Latest
3939
{
4040
'bstack:options': {
4141
...commonCapabilities,
4242
os: 'Windows',
43-
osVersion: '10',
43+
osVersion: '11',
4444
},
4545
browserName: 'Chrome',
46-
browserVersion: '92.0',
46+
browserVersion: '103.0',
4747
},
48+
// Chrome 92 introduced native support for crypto.randomUUID
4849
{
4950
'bstack:options': {
5051
...commonCapabilities,
5152
os: 'Windows',
52-
osVersion: '10',
53+
osVersion: '11',
5354
},
5455
browserName: 'Chrome',
55-
browserVersion: '81.0',
56+
browserVersion: '92.0',
5657
},
5758
// 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
5859
{
@@ -66,35 +67,39 @@ const capabilities = [
6667
},
6768

6869
// Firefox
70+
// Latest
6971
{
7072
'bstack:options': {
7173
...commonCapabilities,
7274
os: 'Windows',
73-
osVersion: '10',
75+
osVersion: '11',
7476
},
7577
browserName: 'Firefox',
76-
browserVersion: '75.0',
78+
browserVersion: '103.0',
7779
},
80+
// Firefox 51 was the first Firefox to correctly support const/let
7881
{
7982
'bstack:options': {
8083
...commonCapabilities,
8184
os: 'Windows',
8285
osVersion: '10',
8386
},
8487
browserName: 'Firefox',
85-
browserVersion: '44.0',
88+
browserVersion: '51.0',
8689
},
8790

8891
// Edge
8992
{
9093
'bstack:options': {
9194
...commonCapabilities,
9295
os: 'Windows',
93-
osVersion: '10',
96+
osVersion: '11',
9497
},
9598
browserName: 'Edge',
96-
browserVersion: '81.0',
99+
browserVersion: '103.0',
97100
},
101+
// While Edge 12 already supported const/let, Edge 15 is the earliest Edge available on
102+
// Browserstack
98103
{
99104
'bstack:options': {
100105
...commonCapabilities,
@@ -110,19 +115,20 @@ const capabilities = [
110115
'bstack:options': {
111116
...commonCapabilities,
112117
os: 'OS X',
113-
osVersion: 'Catalina',
118+
osVersion: 'Monterey',
114119
},
115120
browserName: 'Safari',
116-
browserVersion: '13.0',
121+
browserVersion: '15.0',
117122
},
123+
// Safari 11 was the first Safari to correctly support const/let
118124
{
119125
'bstack:options': {
120126
...commonCapabilities,
121127
os: 'OS X',
122-
osVersion: 'Sierra',
128+
osVersion: 'High Sierra',
123129
},
124130
browserName: 'Safari',
125-
browserVersion: '10.0',
131+
browserVersion: '11.0',
126132
},
127133
];
128134

0 commit comments

Comments
 (0)