Skip to content

Commit

Permalink
fix(*): Switch the compilation target to es2019 for all client-side S…
Browse files Browse the repository at this point in the history
…DK (#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.
  • Loading branch information
nikosdouvlis authored Apr 4, 2024
1 parent fd7328f commit d961280
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 13 deletions.
9 changes: 9 additions & 0 deletions .changeset/light-beers-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@clerk/localizations': patch
'@clerk/clerk-js': patch
'@clerk/nextjs': patch
'@clerk/shared': patch
'@clerk/clerk-react': patch
---

Enable support for older browsers starting with Safari 12 by switching the compilation target to es2019 for all client-side SDKs
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/clerk-js/tsconfig.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": true,
"target": "ESNext",
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"resolveJsonModule": true,
"sourceMap": false,
"strict": true,
"target": "ES2020",
"target": "ES2019",
"useUnknownInCatchVariables": false,
"declaration": false,
"jsx": "react-jsx",
Expand Down
2 changes: 1 addition & 1 deletion packages/localizations/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"esModuleInterop": true,
"skipLibCheck": true,
"allowJs": true,
"target": "ES2020",
"target": "ES2019",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"skipLibCheck": true,
"sourceMap": false,
"strict": true,
"target": "ES2020",
"target": "ES2019",
"types": ["jest"]
},
"include": ["src"]
Expand Down
2 changes: 1 addition & 1 deletion packages/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"skipLibCheck": true,
"sourceMap": false,
"strict": true,
"target": "ES2020"
"target": "ES2019"
},
"include": ["src"],
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2020",
"target": "ES2019",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
Expand Down

0 comments on commit d961280

Please sign in to comment.