Skip to content

Commit 334aaa8

Browse files
authored
Merge branch 'develop' into onur/fix-flaky-remix-e2e-tests
2 parents 2d8f3ae + 9fcbb84 commit 334aaa8

File tree

502 files changed

+9873
-3005
lines changed

Some content is hidden

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

502 files changed

+9873
-3005
lines changed

.github/workflows/build.yml

Lines changed: 98 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
137137
- name: Get PR labels
138138
id: pr-labels
139-
uses: mydea/pr-labels-action@update-core
139+
uses: mydea/pr-labels-action@fn/bump-node20
140140

141141
outputs:
142142
commit_label: '${{ env.COMMIT_SHA }}: ${{ env.COMMIT_MESSAGE }}'
@@ -165,8 +165,7 @@ jobs:
165165
runs-on: ubuntu-20.04
166166
timeout-minutes: 15
167167
if: |
168-
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false') &&
169-
(needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request')
168+
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false')
170169
steps:
171170
- name: 'Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})'
172171
uses: actions/checkout@v4
@@ -213,8 +212,10 @@ jobs:
213212
job_build:
214213
name: Build
215214
needs: [job_get_metadata, job_install_deps]
216-
runs-on: ubuntu-20.04
215+
runs-on: ubuntu-20.04-large-js
217216
timeout-minutes: 30
217+
if: |
218+
(needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request')
218219
steps:
219220
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
220221
uses: actions/checkout@v4
@@ -319,10 +320,33 @@ jobs:
319320
env:
320321
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
321322
- name: Lint source files
322-
run: yarn lint
323+
run: yarn lint:lerna
323324
- name: Validate ES5 builds
324325
run: yarn validate:es5
325326

327+
job_check_format:
328+
name: Check file formatting
329+
needs: [job_get_metadata, job_install_deps]
330+
timeout-minutes: 10
331+
runs-on: ubuntu-20.04
332+
steps:
333+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
334+
uses: actions/checkout@v4
335+
with:
336+
ref: ${{ env.HEAD_COMMIT }}
337+
- name: Set up Node
338+
uses: actions/setup-node@v4
339+
with:
340+
node-version-file: 'package.json'
341+
- name: Check dependency cache
342+
uses: actions/cache/restore@v3
343+
with:
344+
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
345+
key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
346+
fail-on-cache-miss: true
347+
- name: Check file formatting
348+
run: yarn lint:prettier && yarn lint:biome
349+
326350
job_circular_dep_check:
327351
name: Circular Dependency Check
328352
needs: [job_get_metadata, job_build]
@@ -381,7 +405,7 @@ jobs:
381405
name: Browser Unit Tests
382406
needs: [job_get_metadata, job_build]
383407
timeout-minutes: 10
384-
runs-on: ubuntu-latest
408+
runs-on: ubuntu-20.04
385409
steps:
386410
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
387411
uses: actions/checkout@v4
@@ -545,17 +569,16 @@ jobs:
545569
yarn test:integration
546570
547571
job_browser_playwright_tests:
548-
name: Playwright (${{ matrix.bundle }}) Tests
572+
name: Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/{1}', matrix.shard, matrix.shards) || ''}}) Tests
549573
needs: [job_get_metadata, job_build]
550574
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
551-
runs-on: ubuntu-20.04
575+
runs-on: ubuntu-20.04-large-js
552576
timeout-minutes: 25
553577
strategy:
554578
fail-fast: false
555579
matrix:
556580
bundle:
557581
- esm
558-
- cjs
559582
- bundle_es5
560583
- bundle_es5_min
561584
- bundle_es6
@@ -568,6 +591,36 @@ jobs:
568591
- bundle_tracing_es6_min
569592
- bundle_tracing_replay_es6
570593
- bundle_tracing_replay_es6_min
594+
project:
595+
- chromium
596+
include:
597+
# Only check all projects for esm & full bundle
598+
# We also shard the tests as they take the longest
599+
- bundle: bundle_tracing_replay_es6_min
600+
project: ''
601+
shard: 1
602+
shards: 2
603+
- bundle: bundle_tracing_replay_es6_min
604+
project: ''
605+
shard: 2
606+
shards: 2
607+
- bundle: esm
608+
project: ''
609+
shard: 1
610+
shards: 3
611+
- bundle: esm
612+
shard: 2
613+
shards: 3
614+
- bundle: esm
615+
project: ''
616+
shard: 3
617+
shards: 3
618+
exclude:
619+
# Do not run the default chromium-only tests
620+
- bundle: bundle_tracing_replay_es6_min
621+
project: 'chromium'
622+
- bundle: esm
623+
project: 'chromium'
571624

572625
steps:
573626
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -605,9 +658,8 @@ jobs:
605658
- name: Run Playwright tests
606659
env:
607660
PW_BUNDLE: ${{ matrix.bundle }}
608-
run: |
609-
cd dev-packages/browser-integration-tests
610-
yarn test:ci
661+
working-directory: dev-packages/browser-integration-tests
662+
run: yarn test:ci${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/{1}', matrix.shard, matrix.shards) || '' }}
611663

612664
job_browser_loader_tests:
613665
name: Playwright Loader (${{ matrix.bundle }}) Tests
@@ -670,7 +722,7 @@ jobs:
670722
name: Browser (${{ matrix.browser }}) Tests
671723
needs: [job_get_metadata, job_build]
672724
if: needs.job_get_metadata.outputs.changed_browser == 'true' || github.event_name != 'pull_request'
673-
runs-on: ubuntu-20.04
725+
runs-on: ubuntu-20.04-large-js
674726
timeout-minutes: 20
675727
strategy:
676728
fail-fast: false
@@ -727,6 +779,32 @@ jobs:
727779
cd packages/utils
728780
yarn test:package
729781
782+
job_check_for_faulty_dts:
783+
name: Check for faulty .d.ts files
784+
needs: [job_get_metadata, job_build]
785+
runs-on: ubuntu-20.04
786+
timeout-minutes: 5
787+
steps:
788+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
789+
uses: actions/checkout@v4
790+
with:
791+
ref: ${{ env.HEAD_COMMIT }}
792+
- name: Set up Node
793+
uses: actions/setup-node@v4
794+
with:
795+
node-version-file: 'package.json'
796+
- name: Restore caches
797+
uses: ./.github/actions/restore-cache
798+
env:
799+
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
800+
- name: Check for dts files that reference stuff in the temporary build folder
801+
run: |
802+
if grep -r --include "*.d.ts" --exclude-dir ".nxcache" 'import("@sentry(-internal)?/[^/]*/build' .; then
803+
echo "Found illegal TypeScript import statement."
804+
exit 1
805+
fi
806+
807+
730808
job_node_integration_tests:
731809
name:
732810
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
@@ -814,7 +892,7 @@ jobs:
814892
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
815893
github.actor != 'dependabot[bot]'
816894
needs: [job_get_metadata, job_build]
817-
runs-on: ubuntu-20.04
895+
runs-on: ubuntu-20.04-large-js
818896
timeout-minutes: 15
819897
steps:
820898
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -868,6 +946,7 @@ jobs:
868946
matrix:
869947
test-application:
870948
[
949+
'angular-17',
871950
'cloudflare-astro',
872951
'node-express-app',
873952
'create-react-app',
@@ -886,6 +965,7 @@ jobs:
886965
'generic-ts3.8',
887966
'node-experimental-fastify-app',
888967
'node-hapi-app',
968+
'node-exports-test-app',
889969
]
890970
build-command:
891971
- false
@@ -919,6 +999,9 @@ jobs:
919999
uses: actions/setup-node@v4
9201000
with:
9211001
node-version-file: 'dev-packages/e2e-tests/package.json'
1002+
- name: Set up Bun
1003+
if: matrix.test-application == 'node-exports-test-app'
1004+
uses: oven-sh/setup-bun@v1
9221005
- name: Restore caches
9231006
uses: ./.github/actions/restore-cache
9241007
env:
@@ -984,6 +1067,7 @@ jobs:
9841067
job_e2e_tests,
9851068
job_artifacts,
9861069
job_lint,
1070+
job_check_format,
9871071
job_circular_dep_check,
9881072
]
9891073
# Always run this, even if a dependent job failed

.github/workflows/flaky-test-detector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ concurrency:
2323

2424
jobs:
2525
flaky-detector:
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-20.04-large-js
2727
timeout-minutes: 60
2828
name: 'Check tests for flakiness'
2929
# Also skip if PR is from master -> develop

.size-limit.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ module.exports = [
4747
gzip: true,
4848
limit: '35 KB',
4949
},
50+
{
51+
name: '@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped)',
52+
path: 'packages/browser/build/npm/esm/index.js',
53+
import: '{ init, browserTracingIntegration }',
54+
gzip: true,
55+
limit: '35 KB',
56+
},
5057
{
5158
name: '@sentry/browser (incl. Feedback) - Webpack (gzipped)',
5259
path: 'packages/browser/build/npm/esm/index.js',

CHANGELOG.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,88 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 7.99.0
8+
9+
### Important Changes
10+
11+
#### Deprecations
12+
13+
This release includes some deprecations for span related methods and integrations in our Deno SDK, `@sentry/deno`. For
14+
more details please look at our
15+
[migration guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md).
16+
17+
- feat(core): Deprecate `Span.setHttpStatus` in favor of `setHttpStatus` (#10268)
18+
- feat(core): Deprecate `spanStatusfromHttpCode` in favour of `getSpanStatusFromHttpCode` (#10361)
19+
- feat(core): Deprecate `StartSpanOptions.origin` in favour of passing attribute (#10274)
20+
- feat(deno): Expose functional integrations to replace classes (#10355)
21+
22+
### Other Changes
23+
24+
- feat(bun): Add missing `@sentry/node` re-exports (#10396)
25+
- feat(core): Add `afterAllSetup` hook for integrations (#10345)
26+
- feat(core): Ensure `startSpan()` can handle spans that require parent (#10386)
27+
- feat(core): Read propagation context off scopes in `startSpan` APIs (#10300)
28+
- feat(remix): Export missing `@sentry/node` functions (#10385, #10391)
29+
- feat(serverless): Add missing `@sentry/node` re-exports (#10390)
30+
- feat(sveltekit): Add more missing `@sentry/node` re-exports (#10392)
31+
- feat(tracing): Export proper type for browser tracing (#10411)
32+
- feat(tracing): Expose new `browserTracingIntegration` (#10351)
33+
- fix: Ensure `afterAllSetup` is called when using `addIntegration()` (#10372)
34+
- fix(core): Export `spanToTraceContext` function from span utils (#10364)
35+
- fix(core): Make `FunctionToString` integration use SETUP_CLIENTS weakmap (#10358)
36+
- fix(deno): Call function if client is not setup (#10354)
37+
- fix(react): Fix attachReduxState option (#10381)
38+
- fix(spotlight): Use unpatched http.request (#10369)
39+
- fix(tracing): Only create request span if there is active span (#10375)
40+
- ref: Read propagation context off of scope and isolation scope when propagating and applying trace context (#10297)
41+
42+
Work in this release contributed by @AleshaOleg. Thank you for your contribution!
43+
44+
## 7.98.0
45+
46+
This release primarily fixes some type declaration errors:
47+
48+
- feat(core): Export `IntegrationIndex` type (#10337)
49+
- fix(nextjs): Fix Http integration type declaration (#10338)
50+
- fix(node): Fix type definitions (#10339)
51+
52+
## 7.97.0
53+
54+
Note: The 7.96.0 release was incomplete. This release is partially encompassing changes from `7.96.0`.
55+
56+
- feat(react): Add `stripBasename` option for React Router 6 (#10314)
57+
58+
## 7.96.0
59+
60+
Note: This release was incomplete. Not all Sentry SDK packages were released for this version. Please upgrade to 7.98.0
61+
directly.
62+
63+
### Important Changes
64+
65+
#### Deprecations
66+
67+
This release includes some deprecations for integrations in `@sentry/browser` and frontend framework SDKs
68+
(`@sentry/react`, `@sentry/vue`, etc.). Please take a look at our
69+
[migration guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md) for more details.
70+
71+
- feat(browser): Export functional integrations & deprecate classes (#10267)
72+
73+
#### Web Vitals Fix for LCP and CLS
74+
75+
This release fixes an issue with the Web Vitals integration where LCP and CLS were not being captured correctly,
76+
increasing capture rate by 10-30% for some apps. LCP and CLS capturing issues were introduced with version `7.75.0`.
77+
78+
- fix(tracing): Ensure web vitals are correctly stopped/captured (#10323)
79+
80+
### Other Changes
81+
82+
- fix(node): Fix `node-cron` types and add test (#10315)
83+
- fix(node): Fix downleveled types entry point (#10321)
84+
- fix(node): LocalVariables integration should use setupOnce (#10307)
85+
- fix(replay): Fix type for options of replayIntegration (#10325)
86+
87+
Work in this release contributed by @Shubhdeep12. Thank you for your contribution!
88+
789
## 7.95.0
890

991
### Important Changes
@@ -1058,7 +1140,7 @@ finished. This is useful for event emitters or similar.
10581140
function middleware(_req, res, next) {
10591141
return Sentry.startSpanManual({ name: 'middleware' }, (span, finish) => {
10601142
res.once('finish', () => {
1061-
span?.setHttpStatus(res.status);
1143+
setHttpStatus(span, res.status);
10621144
finish();
10631145
});
10641146
return next();

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ able to use it. From the top level of the repo, there are three commands availab
3737
dependencies (`utils`, `core`, `browser`, etc), and all packages which depend on it (currently `gatsby` and `nextjs`))
3838
- `yarn build:dev:watch`, which runs `yarn build:dev` in watch mode (recommended)
3939

40+
You can also run a production build via `yarn build`, which will build everything except for the tarballs for publishing
41+
to NPM. You can use this if you want to bundle Sentry yourself. The build output can be found in the packages `build/`
42+
folder, e.g. `packages/browser/build`. Bundled files can be found in `packages/browser/build/bundles`. Note that there
43+
are no guarantees about the produced file names etc., so make sure to double check which files are generated after
44+
upgrading.
45+
4046
## Testing SDK Packages Locally
4147

4248
To test local versions of SDK packages, for instance in test projects, you have a couple of options:

0 commit comments

Comments
 (0)