Skip to content

build(bundles): Use ES2018 for bundles #11201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ stable release of `8.x` comes out).
to `@sentry/node` and all of our node-based server-side sdks (`@sentry/nextjs`, `@sentry/serverless`, etc.). We no
longer test against Node 8, 10, or 12 and cannot guarantee that the SDK will work as expected on these versions.

**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES2017+ compatible
**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES2018+ compatible
browsers. This means that we no longer support IE11 (end of an era). This also means that the Browser SDK requires the
fetch API to be available in the environment.

New minimum supported browsers:

- Chrome 58
- Edge 15
- Safari/iOS Safari 11
- Firefox 54
- Opera 45
- Samsung Internet 7.2
- Chrome 63
- Edge 79
- Safari/iOS Safari 12
- Firefox 58
- Opera 50
- Samsung Internet 8.2

For IE11 support please transpile your code to ES5 using babel or similar and add required polyfills.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"include": ["index.ts"],
"compilerOptions": {
"lib": ["es2017", "DOM"],
"lib": ["es2018", "DOM"],
"skipLibCheck": false,
"noEmit": true,
"types": [],
"target": "es2017",
"target": "es2018",
"moduleResolution": "node"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"types": ["node"],
"esModuleInterop": true,
"lib": ["es2017"],
"lib": ["es2018"],
"strict": true,
"outDir": "dist",
"target": "ESNext",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"types": ["node"],
"esModuleInterop": true,
"lib": ["es2017"],
"lib": ["es2018"],
"strict": true,
"outDir": "dist"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/rollup-utils/npmHelpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function makeBaseNPMConfig(options = {}) {
// output individual files rather than one big bundle
preserveModules: true,

// Allow wrappers or helper functions generated by rollup to use any ES6 features except symbols. (Symbols in
// Allow wrappers or helper functions generated by rollup to use any ES2015 features except symbols. (Symbols in
// general are fine, but the `[Symbol.toStringTag]: 'Module'` which Rollup adds alongside `__esModule:
// true` in CJS modules makes it so that Jest <= 29.2.2 crashes when trying to mock generated `@sentry/xxx`
// packages. See https://github.com/getsentry/sentry-javascript/pull/6043.)
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/tsconfig.ngc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es2017",
"target": "es2018",
"declarationMap": false,
"lib": ["dom", "es2017"],
"lib": ["dom", "es2018"],
"baseUrl": "./"
},
"angularCompilerOptions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/test/integration/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["dom", "es2017"],
"lib": ["dom", "es2018"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/node-experimental/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"include": ["src/**/*"],

"compilerOptions": {
"lib": ["es2017"],
"lib": ["es2018"],
"module": "Node16"
}
}
2 changes: 1 addition & 1 deletion packages/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"include": ["src/**/*"],

"compilerOptions": {
"lib": ["es2017"]
"lib": ["es2018"]
}
}
2 changes: 1 addition & 1 deletion packages/profiling-node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"module": "esnext",
"lib": ["es2017"],
"lib": ["es2018"],
"outDir": "lib",
"types": ["node"]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/replay-worker/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"lib": ["webworker", "scripthost"],
"esModuleInterop": true,
"target": "es2017",
"target": "es2018",
"strictPropertyInitialization": false
},
"include": ["src/**/*.ts"]
Expand Down
2 changes: 1 addition & 1 deletion packages/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"include": ["src/**/*"],

"compilerOptions": {
"lib": ["es2017"]
"lib": ["es2018"]
}
}
4 changes: 2 additions & 2 deletions packages/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"importHelpers": true,
"inlineSources": true,
"isolatedModules": true,
"lib": ["es2017", "dom"],
"lib": ["es2018", "dom"],
"moduleResolution": "node",
"noErrorTruncation": true,
"noFallthroughCasesInSwitch": true,
Expand All @@ -19,6 +19,6 @@
"sourceMap": true,
"strict": true,
"strictBindCallApply": false,
"target": "es2017"
"target": "es2018"
}
}
2 changes: 2 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6713,6 +6713,7 @@
"@types/unist" "*"

"@types/history-4@npm:@types/[email protected]", "@types/history-5@npm:@types/[email protected]", "@types/history@*":
name "@types/history-4"
version "4.7.8"
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934"
integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==
Expand Down Expand Up @@ -25288,6 +25289,7 @@ react-is@^18.0.0:
"@remix-run/router" "1.0.2"

"react-router-6@npm:[email protected]", [email protected]:
name react-router-6
version "6.3.0"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.3.0.tgz#3970cc64b4cb4eae0c1ea5203a80334fdd175557"
integrity sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==
Expand Down