Skip to content

Commit a2fdbab

Browse files
authored
Merge pull request #9052 from getsentry/prepare-release/7.70.0
meta(changelog): Update changelog for 7.70.0
2 parents ca7fc38 + bc2df49 commit a2fdbab

File tree

126 files changed

+3760
-1070
lines changed

Some content is hidden

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

126 files changed

+3760
-1070
lines changed

.craft.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,23 @@ targets:
5959
id: '@sentry/integrations'
6060
includeNames: /^sentry-integrations-\d.*\.tgz$/
6161

62-
## 4. Node-based Packages
62+
## 4. WinterCG Packages
63+
- name: npm
64+
id: '@sentry/vercel-edge'
65+
includeNames: /^sentry-vercel-edge-\d.*\.tgz$/
66+
67+
## 5. Node-based Packages
6368
- name: npm
6469
id: '@sentry/serverless'
6570
includeNames: /^sentry-serverless-\d.*\.tgz$/
6671
- name: npm
6772
id: '@sentry/opentelemetry-node'
6873
includeNames: /^sentry-opentelemetry-node-\d.*\.tgz$/
74+
- name: npm
75+
id: '@sentry/bun'
76+
includeNames: /^sentry-bun-\d.*\.tgz$/
6977

70-
## 5. Fullstack/Meta Frameworks (depending on Node and Browser or Framework SDKs)
78+
## 6. Fullstack/Meta Frameworks (depending on Node and Browser or Framework SDKs)
7179
- name: npm
7280
id: '@sentry/nextjs'
7381
includeNames: /^sentry-nextjs-\d.*\.tgz$/
@@ -81,28 +89,28 @@ targets:
8189
id: '@sentry/gatsby'
8290
includeNames: /^sentry-gatsby-\d.*\.tgz$/
8391

84-
## 6. Other Packages
85-
## 6.1
92+
## 7. Other Packages
93+
## 7.1
8694
- name: npm
8795
id: '@sentry-internal/typescript'
8896
includeNames: /^sentry-internal-typescript-\d.*\.tgz$/
8997
- name: npm
9098
id: '@sentry-internal/eslint-plugin-sdk'
9199
includeNames: /^sentry-internal-eslint-plugin-sdk-\d.*\.tgz$/
92-
## 6.2
100+
## 7.2
93101
- name: npm
94102
id: '@sentry-internal/eslint-config-sdk'
95103
includeNames: /^sentry-internal-eslint-config-sdk-\d.*\.tgz$/
96104

97-
## 7. Deprecated packages we still release (but no packages depend on them anymore)
105+
## 8. Deprecated packages we still release (but no packages depend on them anymore)
98106
- name: npm
99107
id: '@sentry/hub'
100108
includeNames: /^sentry-hub-\d.*\.tgz$/
101109
- name: npm
102110
id: '@sentry/tracing'
103111
includeNames: /^sentry-tracing-\d.*\.tgz$/
104112

105-
## 8. Experimental packages
113+
## 9. Experimental packages
106114
- name: npm
107115
id: '@sentry/node-experimental'
108116
includeNames: /^sentry-node-experimental-\d.*\.tgz$/

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ body:
3333
- '@sentry/browser'
3434
- '@sentry/angular'
3535
- '@sentry/angular-ivy'
36+
- '@sentry/bun'
3637
- '@sentry/ember'
3738
- '@sentry/gatsby'
3839
- '@sentry/nextjs'

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,34 @@ jobs:
391391
- name: Compute test coverage
392392
uses: codecov/codecov-action@v3
393393

394+
job_bun_unit_tests:
395+
name: Bun Unit Tests
396+
needs: [job_get_metadata, job_build]
397+
timeout-minutes: 10
398+
runs-on: ubuntu-20.04
399+
strategy:
400+
fail-fast: false
401+
steps:
402+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
403+
uses: actions/checkout@v3
404+
with:
405+
ref: ${{ env.HEAD_COMMIT }}
406+
- name: Set up Node
407+
uses: actions/setup-node@v3
408+
with:
409+
node-version: ${{ matrix.node }}
410+
- name: Set up Bun
411+
uses: oven-sh/setup-bun@v1
412+
- name: Restore caches
413+
uses: ./.github/actions/restore-cache
414+
env:
415+
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
416+
- name: Run tests
417+
run: |
418+
yarn test-ci-bun
419+
- name: Compute test coverage
420+
uses: codecov/codecov-action@v3
421+
394422
job_node_unit_tests:
395423
name: Node (${{ matrix.node }}) Unit Tests
396424
needs: [job_get_metadata, job_build]
@@ -787,6 +815,7 @@ jobs:
787815
'create-react-app',
788816
'create-next-app',
789817
'create-remix-app',
818+
'create-remix-app-v2',
790819
'nextjs-app-dir',
791820
'react-create-hash-router',
792821
'react-router-6-use-routes',
@@ -864,6 +893,7 @@ jobs:
864893
job_build,
865894
job_browser_build_tests,
866895
job_browser_unit_tests,
896+
job_bun_unit_tests,
867897
job_node_unit_tests,
868898
job_nextjs_integration_test,
869899
job_node_integration_tests,

.github/workflows/issue-package-label.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
"@sentry.angular-ivy": {
3939
"label": "Package: Angular"
4040
},
41+
"@sentry.bun": {
42+
"label": "Package: Bun"
43+
},
4144
"@sentry.ember": {
4245
"label": "Package: ember"
4346
},

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,36 @@
44

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

7+
## 7.70.0
8+
9+
### Important Changes
10+
11+
- **feat: Add Bun SDK (#9029)**
12+
13+
This release contains the beta version of `@sentry/bun`, our SDK for the [Bun JavaScript runtime](https://bun.sh/)! For details on how to use it, please see the [README](./packages/bun/README.md). Any feedback/bug reports are greatly appreciated, please [reach out on GitHub](https://github.com/getsentry/sentry-javascript/discussions/7979).
14+
15+
Note that as of now the Bun runtime does not support global error handlers. This is being actively worked on, see [the tracking issue in Bun's GitHub repo](https://github.com/oven-sh/bun/issues/5091).
16+
17+
- **feat(remix): Add Remix 2.x release support. (#8940)**
18+
19+
The Sentry Remix SDK now officially supports Remix v2! See [our Remix docs for more details](https://docs.sentry.io/platforms/javascript/guides/remix/).
20+
21+
### Other Changes
22+
23+
- chore(node): Upgrade cookie to ^0.5.0 (#9013)
24+
- feat(core): Introduce `processEvent` hook on `Integration` (#9017)
25+
- feat(node): Improve non-error messages (#9026)
26+
- feat(vercel-edge): Add Vercel Edge Runtime package (#9041)
27+
- fix(remix): Use `React.ComponentType` instead of `React.FC` as `withSentry`'s generic type. (#9043)
28+
- fix(replay): Ensure replay events go through `preprocessEvent` hook (#9034)
29+
- fix(replay): Fix typo in Replay types (#9028)
30+
- fix(sveltekit): Adjust `handleErrorWithSentry` type (#9054)
31+
- fix(utils): Try-catch monkeypatching to handle frozen objects/functions (#9031)
32+
33+
Work in this release contributed by @Dima-Dim, @krist7599555 and @lifeiscontent. Thank you for your contributions!
34+
35+
Special thanks for @isaacharrisholt for helping us implement a Vercel Edge Runtime SDK which we use under the hood for our Next.js SDK.
36+
737
## 7.69.0
838

939
### Important Changes

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
"postpublish": "lerna run --stream --concurrency 1 postpublish",
2828
"test": "lerna run --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\" test",
2929
"test:unit": "lerna run --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\" test:unit",
30-
"test-ci-browser": "lerna run test --ignore \"@sentry/{node,node-experimental,opentelemetry-node,serverless,nextjs,remix,gatsby,sveltekit}\" --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\"",
30+
"test-ci-browser": "lerna run test --ignore \"@sentry/{bun,node,node-experimental,opentelemetry-node,serverless,nextjs,remix,gatsby,sveltekit,vercel-edge}\" --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\"",
3131
"test-ci-node": "ts-node ./scripts/node-unit-tests.ts",
32+
"test-ci-bun": "lerna run test --scope @sentry/bun",
3233
"test:update-snapshots": "lerna run test:update-snapshots",
3334
"yalc:publish": "lerna run yalc:publish"
3435
},
@@ -41,6 +42,7 @@
4142
"packages/angular-ivy",
4243
"packages/browser",
4344
"packages/browser-integration-tests",
45+
"packages/bun",
4446
"packages/core",
4547
"packages/e2e-tests",
4648
"packages/ember",
@@ -68,6 +70,7 @@
6870
"packages/types",
6971
"packages/typescript",
7072
"packages/utils",
73+
"packages/vercel-edge",
7174
"packages/vue",
7275
"packages/wasm"
7376
],
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function callback() {
2+
throw new Error('setTimeout_error');
3+
}
4+
5+
setTimeout(callback, 0);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { expect } from '@playwright/test';
2+
import type { Event } from '@sentry/types';
3+
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
6+
7+
sentryTest('Instrumentation should capture errors in setTimeout', async ({ getLocalTestPath, page }) => {
8+
const url = await getLocalTestPath({ testDir: __dirname });
9+
10+
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
11+
12+
expect(eventData.exception?.values).toHaveLength(1);
13+
expect(eventData.exception?.values?.[0]).toMatchObject({
14+
type: 'Error',
15+
value: 'setTimeout_error',
16+
mechanism: {
17+
type: 'instrument',
18+
handled: false,
19+
},
20+
stacktrace: {
21+
frames: expect.any(Array),
22+
},
23+
});
24+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
Sentry.init({
6+
dsn: 'https://[email protected]/1337',
7+
debug: true,
8+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function callback() {
2+
throw new Error('setTimeout_error');
3+
}
4+
5+
setTimeout(Object.freeze(callback), 0);
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { expect } from '@playwright/test';
2+
import type { Event } from '@sentry/types';
3+
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
6+
7+
sentryTest(
8+
'Instrumentation does not fail when using frozen callback for setTimeout',
9+
async ({ getLocalTestPath, page }) => {
10+
const bundleKey = process.env.PW_BUNDLE || '';
11+
const hasDebug = !bundleKey.includes('_min');
12+
13+
const url = await getLocalTestPath({ testDir: __dirname });
14+
15+
const logMessages: string[] = [];
16+
17+
page.on('console', msg => {
18+
logMessages.push(msg.text());
19+
});
20+
21+
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
22+
23+
// It still captures the error
24+
expect(eventData.exception?.values).toHaveLength(1);
25+
expect(eventData.exception?.values?.[0]).toMatchObject({
26+
type: 'Error',
27+
value: 'setTimeout_error',
28+
mechanism: {
29+
type: 'instrument',
30+
handled: false,
31+
},
32+
stacktrace: {
33+
frames: expect.any(Array),
34+
},
35+
});
36+
37+
// We only care about the message when debug is enabled
38+
if (hasDebug) {
39+
expect(logMessages).toEqual(
40+
expect.arrayContaining([
41+
expect.stringContaining(
42+
'Sentry Logger [log]: Failed to add non-enumerable property "__sentry_wrapped__" to object function callback()',
43+
),
44+
]),
45+
);
46+
}
47+
},
48+
);

packages/browser/test/unit/index.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { getReportDialogEndpoint, SDK_VERSION } from '@sentry/core';
2+
import type { WrappedFunction } from '@sentry/types';
23
import * as utils from '@sentry/utils';
34

45
import type { Event } from '../../src';
@@ -391,4 +392,14 @@ describe('wrap()', () => {
391392

392393
expect(result2).toBe(42);
393394
});
395+
396+
it('should ignore frozen functions', () => {
397+
const func = Object.freeze(() => 42);
398+
399+
// eslint-disable-next-line deprecation/deprecation
400+
wrap(func);
401+
402+
expect(func()).toBe(42);
403+
expect((func as WrappedFunction).__sentry_wrapped__).toBeUndefined();
404+
});
394405
});

packages/bun/.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
},
5+
extends: ['../../.eslintrc.js'],
6+
rules: {
7+
'@sentry-internal/sdk/no-optional-chaining': 'off',
8+
'@sentry-internal/sdk/no-nullish-coalescing': 'off',
9+
'@sentry-internal/sdk/no-unsupported-es6-methods': 'off',
10+
'@sentry-internal/sdk/no-class-field-initializers': 'off',
11+
},
12+
};

packages/bun/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (c) 2023 Sentry (https://sentry.io) and individual contributors. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6+
persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9+
Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)