Skip to content

Commit bf052f6

Browse files
committed
Merge branch 'develop' into esm/again
2 parents 1e9ea30 + f51e826 commit bf052f6

File tree

142 files changed

+1052
-1394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+1052
-1394
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module.exports = {
77
root: true,
88
env: {
9-
es6: true,
9+
es2017: true,
1010
},
1111
parserOptions: {
1212
ecmaVersion: 2018,

.github/workflows/build.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ jobs:
336336
run: yarn lint:lerna
337337
- name: Lint C++ files
338338
run: yarn lint:clang
339-
- name: Validate ES5 builds
340-
run: yarn validate:es5
341339

342340
job_check_format:
343341
name: Check file formatting
@@ -627,28 +625,24 @@ jobs:
627625
matrix:
628626
bundle:
629627
- esm
630-
- bundle_es5
631-
- bundle_es5_min
632-
- bundle_es6
633-
- bundle_es6_min
634-
- bundle_replay_es6
635-
- bundle_replay_es6_min
636-
- bundle_tracing_es5
637-
- bundle_tracing_es5_min
638-
- bundle_tracing_es6
639-
- bundle_tracing_es6_min
640-
- bundle_tracing_replay_es6
641-
- bundle_tracing_replay_es6_min
628+
- bundle
629+
- bundle_min
630+
- bundle_replay
631+
- bundle_replay_min
632+
- bundle_tracing
633+
- bundle_tracing_min
634+
- bundle_tracing_replay
635+
- bundle_tracing_replay_min
642636
project:
643637
- chromium
644638
include:
645639
# Only check all projects for esm & full bundle
646640
# We also shard the tests as they take the longest
647-
- bundle: bundle_tracing_replay_es6_min
641+
- bundle: bundle_tracing_replay_min
648642
project: ''
649643
shard: 1
650644
shards: 2
651-
- bundle: bundle_tracing_replay_es6_min
645+
- bundle: bundle_tracing_replay_min
652646
project: ''
653647
shard: 2
654648
shards: 2
@@ -665,7 +659,7 @@ jobs:
665659
shards: 3
666660
exclude:
667661
# Do not run the default chromium-only tests
668-
- bundle: bundle_tracing_replay_es6_min
662+
- bundle: bundle_tracing_replay_min
669663
project: 'chromium'
670664
- bundle: esm
671665
project: 'chromium'
@@ -1057,7 +1051,6 @@ jobs:
10571051
'react-create-hash-router',
10581052
'react-router-6-use-routes',
10591053
'standard-frontend-react',
1060-
'standard-frontend-react-tracing-import',
10611054
'sveltekit',
10621055
'sveltekit-2',
10631056
'generic-ts3.8',

.size-limit.js

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,64 +76,55 @@ module.exports = [
7676
limit: '28 KB',
7777
},
7878

79-
// Browser CDN bundles (ES6)
79+
// Browser CDN bundles
8080
{
81-
name: '@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped)',
81+
name: '@sentry/browser (incl. Tracing, Replay, Feedback) - CDN Bundle (gzipped)',
8282
path: 'packages/browser/build/bundles/bundle.tracing.replay.feedback.min.js',
8383
gzip: true,
8484
limit: '90 KB',
8585
},
8686
{
87-
name: '@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped)',
87+
name: '@sentry/browser (incl. Tracing, Replay) - CDN Bundle (gzipped)',
8888
path: 'packages/browser/build/bundles/bundle.tracing.replay.min.js',
8989
gzip: true,
9090
limit: '75 KB',
9191
},
9292
{
93-
name: '@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped)',
93+
name: '@sentry/browser (incl. Tracing) - CDN Bundle (gzipped)',
9494
path: 'packages/browser/build/bundles/bundle.tracing.min.js',
9595
gzip: true,
9696
limit: '37 KB',
9797
},
9898
{
99-
name: '@sentry/browser - ES6 CDN Bundle (gzipped)',
99+
name: '@sentry/browser - CDN Bundle (gzipped)',
100100
path: 'packages/browser/build/bundles/bundle.min.js',
101101
gzip: true,
102102
limit: '28 KB',
103103
},
104104

105-
// browser CDN bundles (ES6 + non-gzipped)
105+
// browser CDN bundles (non-gzipped)
106106
{
107-
name: '@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed)',
107+
name: '@sentry/browser (incl. Tracing, Replay) - CDN Bundle (minified & uncompressed)',
108108
path: 'packages/browser/build/bundles/bundle.tracing.replay.min.js',
109109
gzip: false,
110110
brotli: false,
111111
limit: '260 KB',
112112
},
113113
{
114-
name: '@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed)',
114+
name: '@sentry/browser (incl. Tracing) - CDN Bundle (minified & uncompressed)',
115115
path: 'packages/browser/build/bundles/bundle.tracing.min.js',
116116
gzip: false,
117117
brotli: false,
118118
limit: '105 KB',
119119
},
120120
{
121-
name: '@sentry/browser - ES6 CDN Bundle (minified & uncompressed)',
121+
name: '@sentry/browser - CDN Bundle (minified & uncompressed)',
122122
path: 'packages/browser/build/bundles/bundle.min.js',
123123
gzip: false,
124124
brotli: false,
125125
limit: '80 KB',
126126
},
127127

128-
// Browser CDN bundles (ES5)
129-
// Replay is not supported in ES5 mode
130-
{
131-
name: '@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped)',
132-
path: 'packages/browser/build/bundles/bundle.tracing.es5.min.js',
133-
gzip: true,
134-
limit: '40 KB',
135-
},
136-
137128
// React
138129
{
139130
name: '@sentry/react (incl. Tracing, Replay) - Webpack (gzipped)',

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ With that, the repo is fully set up and you are ready to run all commands.
3131
Since we are using [`TypeScript`](https://www.typescriptlang.org/), you need to transpile the code to JavaScript to be
3232
able to use it. From the top level of the repo, there are three commands available:
3333

34-
- `yarn build:dev`, which runs a one-time build of ES5 and ES6 versions of every package
34+
- `yarn build:dev`, which runs a one-time build of every package
3535
- `yarn build:dev:filter <name of npm package>`, which runs `yarn build:dev` only in projects relevant to the given
3636
package (so, for example, running `yarn build:dev:filter @sentry/react` will build the `react` package, all of its
3737
dependencies (`utils`, `core`, `browser`, etc), and all packages which depend on it (currently `gatsby` and `nextjs`))

MIGRATION.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ stable release of `8.x` comes out).
2424
`@sentry/node` and all of our node-based server-side sdks (`@sentry/nextjs`, `@sentry/serverless`, etc.). We no longer
2525
test against Node 8, 10, or 12 and cannot guarantee that the SDK will work as expected on these versions.
2626

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

3131
New minimum supported browsers:
3232

33-
- Chrome 51
33+
- Chrome 58
3434
- Edge 15
35-
- Safari/iOS Safari 10
35+
- Safari/iOS Safari 11
3636
- Firefox 54
37-
- Opera 38
38-
- Samnsung Internet 5
37+
- Opera 45
38+
- Samsung Internet 7.2
3939

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

dev-packages/browser-integration-tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ To filter tests by their title:
6161
You can refer to [Playwright documentation](https://playwright.dev/docs/test-cli) for other CLI options.
6262

6363
You can set env variable `PW_BUNDLE` to set specific build or bundle to test against.
64-
Available options: `esm`, `cjs`, `bundle_es5`, `bundle_es5_min`, `bundle_es6`, `bundle_es6_min`
64+
Available options: `esm`, `cjs`, `bundle`, `bundle_min`
6565

6666
### Troubleshooting
6767

dev-packages/browser-integration-tests/package.json

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,12 @@
1717
"pretest": "yarn clean && yarn type-check",
1818
"test": "yarn test:all --project='chromium'",
1919
"test:all": "npx playwright test -c playwright.browser.config.ts",
20-
"test:bundle:es5": "PW_BUNDLE=bundle_es5 yarn test",
21-
"test:bundle:es5:min": "PW_BUNDLE=bundle_es5_min yarn test",
22-
"test:bundle:es6": "PW_BUNDLE=bundle_es6 yarn test",
23-
"test:bundle:es6:min": "PW_BUNDLE=bundle_es6_min yarn test",
24-
"test:bundle:replay:es6": "PW_BUNDLE=bundle_replay_es6 yarn test",
25-
"test:bundle:replay:es6:min": "PW_BUNDLE=bundle_replay_es6_min yarn test",
26-
"test:bundle:tracing:es5": "PW_BUNDLE=bundle_tracing_es5 yarn test",
27-
"test:bundle:tracing:es5:min": "PW_BUNDLE=bundle_tracing_es5_min yarn test",
28-
"test:bundle:tracing:es6": "PW_BUNDLE=bundle_tracing_es6 yarn test",
29-
"test:bundle:tracing:es6:min": "PW_BUNDLE=bundle_tracing_es6_min yarn test",
30-
"test:bundle:tracing:replay:es6": "PW_BUNDLE=bundle_tracing_replay_es6 yarn test",
31-
"test:bundle:tracing:replay:es6:min": "PW_BUNDLE=bundle_tracing_replay_es6_min yarn test",
20+
"test:bundle": "PW_BUNDLE=bundle yarn test",
21+
"test:bundle:min": "PW_BUNDLE=bundle_min yarn test",
22+
"test:bundle:replay": "PW_BUNDLE=bundle_replay yarn test",
23+
"test:bundle:replay:min": "PW_BUNDLE=bundle_replay_min yarn test",
24+
"test:bundle:tracing": "PW_BUNDLE=bundle_tracing yarn test",
25+
"test:bundle:tracing:min": "PW_BUNDLE=bundle_tracing_min yarn test",
3226
"test:cjs": "PW_BUNDLE=cjs yarn test",
3327
"test:esm": "PW_BUNDLE=esm yarn test",
3428
"test:loader": "npx playwright test -c playwright.loader.config.ts --project='chromium'",
@@ -40,8 +34,7 @@
4034
"test:loader:debug": "PW_BUNDLE=loader_debug yarn test:loader",
4135
"test:ci": "yarn test:all --reporter='line'",
4236
"test:update-snapshots": "yarn test:all --update-snapshots",
43-
"test:detect-flaky": "ts-node scripts/detectFlakyTests.ts",
44-
"validate:es5": "es-check es5 'fixtures/loader.js'"
37+
"test:detect-flaky": "ts-node scripts/detectFlakyTests.ts"
4538
},
4639
"dependencies": {
4740
"@babel/preset-typescript": "^7.16.7",

dev-packages/browser-integration-tests/suites/transport/offline/queued/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function delay(ms: number) {
1010

1111
sentryTest('should queue and retry events when they fail to send', async ({ getLocalTestPath, page }) => {
1212
// makeBrowserOfflineTransport is not included in any CDN bundles
13-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_')) {
13+
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle')) {
1414
sentryTest.skip();
1515
}
1616

dev-packages/browser-integration-tests/utils/generatePlugin.ts

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,38 +47,32 @@ const BUNDLE_PATHS: Record<string, Record<string, string>> = {
4747
browser: {
4848
cjs: 'build/npm/cjs/index.js',
4949
esm: 'build/npm/esm/index.js',
50-
bundle_es5: 'build/bundles/bundle.es5.js',
51-
bundle_es5_min: 'build/bundles/bundle.es5.min.js',
52-
bundle_es6: 'build/bundles/bundle.js',
53-
bundle_es6_min: 'build/bundles/bundle.min.js',
54-
bundle_replay_es6: 'build/bundles/bundle.replay.js',
55-
bundle_replay_es6_min: 'build/bundles/bundle.replay.min.js',
56-
bundle_tracing_es5: 'build/bundles/bundle.tracing.es5.js',
57-
bundle_tracing_es5_min: 'build/bundles/bundle.tracing.es5.min.js',
58-
bundle_tracing_es6: 'build/bundles/bundle.tracing.js',
59-
bundle_tracing_es6_min: 'build/bundles/bundle.tracing.min.js',
60-
bundle_tracing_replay_es6: 'build/bundles/bundle.tracing.replay.js',
61-
bundle_tracing_replay_es6_min: 'build/bundles/bundle.tracing.replay.min.js',
62-
loader_base: 'build/bundles/bundle.es5.min.js',
63-
loader_eager: 'build/bundles/bundle.es5.min.js',
64-
loader_debug: 'build/bundles/bundle.es5.debug.min.js',
65-
loader_tracing: 'build/bundles/bundle.tracing.es5.min.js',
50+
bundle: 'build/bundles/bundle.js',
51+
bundle_min: 'build/bundles/bundle.min.js',
52+
bundle_replay: 'build/bundles/bundle.replay.js',
53+
bundle_replay_min: 'build/bundles/bundle.replay.min.js',
54+
bundle_tracing: 'build/bundles/bundle.tracing.js',
55+
bundle_tracing_min: 'build/bundles/bundle.tracing.min.js',
56+
bundle_tracing_replay: 'build/bundles/bundle.tracing.replay.js',
57+
bundle_tracing_replay_min: 'build/bundles/bundle.tracing.replay.min.js',
58+
loader_base: 'build/bundles/bundle.min.js',
59+
loader_eager: 'build/bundles/bundle.min.js',
60+
loader_debug: 'build/bundles/bundle.debug.min.js',
61+
loader_tracing: 'build/bundles/bundle.tracing.min.js',
6662
loader_replay: 'build/bundles/bundle.replay.min.js',
6763
loader_tracing_replay: 'build/bundles/bundle.tracing.replay.debug.min.js',
6864
},
6965
integrations: {
7066
cjs: 'build/npm/cjs/index.js',
7167
esm: 'build/npm/esm/index.js',
72-
bundle_es5: 'build/bundles/[INTEGRATION_NAME].es5.js',
73-
bundle_es5_min: 'build/bundles/[INTEGRATION_NAME].es5.min.js',
74-
bundle_es6: 'build/bundles/[INTEGRATION_NAME].js',
75-
bundle_es6_min: 'build/bundles/[INTEGRATION_NAME].min.js',
68+
bundle: 'build/bundles/[INTEGRATION_NAME].js',
69+
bundle_min: 'build/bundles/[INTEGRATION_NAME].min.js',
7670
},
7771
wasm: {
7872
cjs: 'build/npm/cjs/index.js',
7973
esm: 'build/npm/esm/index.js',
80-
bundle_es6: 'build/bundles/wasm.js',
81-
bundle_es6_min: 'build/bundles/wasm.min.js',
74+
bundle: 'build/bundles/wasm.js',
75+
bundle_min: 'build/bundles/wasm.min.js',
8276
},
8377
};
8478

@@ -229,7 +223,7 @@ class SentryScenarioGenerationPlugin {
229223
});
230224
}
231225

232-
// Convert e.g. bundle_tracing_es5_min to bundle_es5_min
226+
// Convert e.g. bundle_tracing_min to bundle_min
233227
const integrationBundleKey = bundleKey
234228
.replace('loader_', 'bundle_')
235229
.replace('_replay', '')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* We can only test WASM tests in certain bundles/packages:
33
* - NPM (ESM, CJS)
4-
* - ES6 CDN bundles
4+
* - CDN bundles
55
* - On browsers other than WebKit
66
*
77
* @returns `true` if we should skip the replay test
@@ -11,5 +11,5 @@ export function shouldSkipWASMTests(browser: string): boolean {
1111
return true;
1212
}
1313
const bundle = process.env.PW_BUNDLE as string | undefined;
14-
return bundle != null && bundle.includes('es5');
14+
return bundle != null;
1515
}

dev-packages/e2e-tests/test-applications/create-next-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/create-react-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"include": ["index.ts"],
33
"compilerOptions": {
4-
"lib": ["es6", "DOM"],
4+
"lib": ["es2017", "DOM"],
55
"skipLibCheck": false,
66
"noEmit": true,
77
"types": [],
8-
"target": "es6",
8+
"target": "es2017",
99
"moduleResolution": "node"
1010
}
1111
}

dev-packages/e2e-tests/test-applications/nextjs-14/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/node-exports-test-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"types": ["node"],
44
"esModuleInterop": true,
5-
"lib": ["ES6"],
5+
"lib": ["es2017"],
66
"strict": true,
77
"outDir": "dist",
88
"target": "ESNext",

dev-packages/e2e-tests/test-applications/node-express-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"types": ["node"],
44
"esModuleInterop": true,
5-
"lib": ["ES6"],
5+
"lib": ["es2017"],
66
"strict": true,
77
"outDir": "dist"
88
},

dev-packages/e2e-tests/test-applications/react-create-hash-router/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2017",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

0 commit comments

Comments
 (0)