Skip to content

Commit d961280

Browse files
authored
fix(*): Switch the compilation target to es2019 for all client-side SDK (#3113)
This enables support for older iOS mobile browsers. The client-side Clerk SDK now support all webkit-based browsers from version iOS 12 and upwards. This change has minimal impact on the bundle-size and the generated code. From now on, changing the target to a newer version should be considered a breaking change that can only be released after a major version bump.
1 parent fd7328f commit d961280

File tree

8 files changed

+21
-13
lines changed

8 files changed

+21
-13
lines changed

.changeset/light-beers-share.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@clerk/localizations': patch
3+
'@clerk/clerk-js': patch
4+
'@clerk/nextjs': patch
5+
'@clerk/shared': patch
6+
'@clerk/clerk-react': patch
7+
---
8+
9+
Enable support for older browsers starting with Safari 12 by switching the compilation target to es2019 for all client-side SDKs

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/clerk-js/tsconfig.dev.json

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"sourceMap": true,
5-
"target": "ESNext",
65
"noImplicitReturns": true,
76
"noUnusedLocals": true,
87
"noUnusedParameters": true

packages/clerk-js/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"resolveJsonModule": true,
1717
"sourceMap": false,
1818
"strict": true,
19-
"target": "ES2020",
19+
"target": "ES2019",
2020
"useUnknownInCatchVariables": false,
2121
"declaration": false,
2222
"jsx": "react-jsx",

packages/localizations/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"esModuleInterop": true,
88
"skipLibCheck": true,
99
"allowJs": true,
10-
"target": "ES2020",
10+
"target": "ES2019",
1111
"emitDeclarationOnly": true,
1212
"declaration": true,
1313
"declarationMap": true,

packages/nextjs/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"skipLibCheck": true,
2020
"sourceMap": false,
2121
"strict": true,
22-
"target": "ES2020",
22+
"target": "ES2019",
2323
"types": ["jest"]
2424
},
2525
"include": ["src"]

packages/react/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"skipLibCheck": true,
1919
"sourceMap": false,
2020
"strict": true,
21-
"target": "ES2020"
21+
"target": "ES2019"
2222
},
2323
"include": ["src"],
2424
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]

packages/shared/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
3+
"target": "ES2019",
44
"esModuleInterop": true,
55
"forceConsistentCasingInFileNames": true,
66
"isolatedModules": true,

0 commit comments

Comments
 (0)