Skip to content

meta: Update CHANGELOG for 7.37.0 #7121

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 6 commits into from
Feb 9, 2023
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
38 changes: 38 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Gitflow - Auto prepare release
on:
pull_request:
types:
- closed
branches:
- master

# This workflow tirggers a release when merging a branch with the pattern `prepare-release/VERSION` into master.
jobs:
release:
runs-on: ubuntu-20.04
name: 'Prepare a new version'

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0

# https://github.com/actions-ecosystem/action-regex-match
- uses: actions-ecosystem/action-regex-match@v2
id: version
with:
# Parse version from head branch
text: ${{ github.head_ref }}
# match: refs/heads/preprare-release/xx.xx.xx
regex: '^refs\/heads\/preprare-release\/(\d+\.\d+\.\d+)$'

- name: Prepare release
uses: getsentry/action-prepare-release@v1
if: github.event.pull_request.merged == true && steps.version.outputs.match != ''
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
with:
version: ${{ steps.version.outputs.match != '' }}
force: false
merge_target: master
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ jobs:
# Note: These next three have to be checked as strings ('true'/'false')!
is_develop: ${{ github.ref == 'refs/heads/develop' }}
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
is_gitflow_sync: ${{ github.head_ref == 'refs/heads/develop' || github.head_ref == 'refs/heads/master' }}
# When merging into master, or from master
is_gitflow_sync: ${{ github.head_ref == 'refs/heads/master' || github.ref == 'refs/heads/master' }}
has_gitflow_label:
${{ github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' Gitflow ') }}
force_skip_cache:
Expand Down Expand Up @@ -468,7 +469,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18]
node: [10, 12, 14, 16, '18.13.0']
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/gitflow-sync-master.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
- feat: Add source map debug ids (#7068)
- feat(browser): Add IndexedDb offline transport store (#6983)
- feat(nextjs): Add auto-wrapping for server components (#6953)
- feat(nextjs): Improve client stack traces (#7097)
- feat(replay): Improve rrweb error ignoring (#7087 & #7094)
- feat(replay): Send client_report when replay sending fails (#7093)
- fix(node): `LocalVariables`, Improve frame matching for ESM (#7049)
- fix(node): Add lru cache to http integration span map (#7064)
- fix(replay): Export Replay from Sentry namespace in full CDN bundle (#7119)

Work in this release contributed by @JamesHenry. Thank you for your contribution!

Expand Down
16 changes: 8 additions & 8 deletions docs/publishing-a-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ _These steps are only relevant to Sentry employees when preparing and publishing
**If you want to release a new SDK for the first time, be sure to follow the [New SDK Release Checklist](./new-sdk-release-checklist.md)**

1. Determine what version will be released (we use [semver](https://semver.org)).
2. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release. (See details below.)
a. Merging the Changelog PR will automatically trigger a sync from `develop` -> `master`
3. Run the [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) workflow.
a. Wait for this until the sync to `master` is completed.
4. A new issue should appear in https://github.com/getsentry/publish/issues.
5. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release.
2. Create a branch `prepare-release/VERSION`, eg. `prepare-release/7.37.0`, off develop
3. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release. (See details below.)
4. Create a PR towards `master` branch
5. When the PR is merged, it will automatically trigger the [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) on master.
6. A new issue should appear in https://github.com/getsentry/publish/issues.
7. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release.
a. Once the release is completed, a sync from `master` ->` develop` will be automatically triggered

## Updating the Changelog

1. Create a new branch.
1. Create a new branch `prepare-release/VERSION` off of `develop`, e.g. `prepare-release/7.37.1`.
2. Run `yarn changelog` and copy everything
3. Create a new section in the changelog, deciding based on the changes whether it should be a minor bump or a patch release.
4. Paste in the logs you copied earlier.
5. Delete any which aren't user-facing changes.
7. If any of the PRs are from external contributors, include underneath the commits `Work in this release contributed by <list of external contributors' GitHub usernames>. Thank you for your contributions!`. If there's only one external PR, don't forget to remove the final `s`. If there are three or more, use an Oxford comma. (It's in the Sentry styleguide!)
8. Commit, push, and open a PR with the title `meta: Update changelog for <fill in relevant version here>` against `develop` branch.
8. Commit, push, and open a PR with the title `meta(changelog): Update changelog for VERSION` against `master` branch.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@
"typescript": "3.8.3"
},
"resolutions": {
"**/agent-base": "5",
"@types/express-serve-static-core": "4.17.30"
"**/agent-base": "5"
},
"version": "0.0.0",
"name": "sentry-javascript"
Expand Down
16 changes: 16 additions & 0 deletions packages/nextjs/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ function addClientIntegrations(options: BrowserOptions): void {
// Filename wasn't a properly formed URL, so there's nothing we can do
}

if (frame.filename && frame.filename.startsWith('app:///_next')) {
// We need to URI-decode the filename because Next.js has wildcard routes like "/users/[id].js" which show up as "/users/%5id%5.js" in Error stacktraces.
// The corresponding sources that Next.js generates have proper brackets so we also need proper brackets in the frame so that source map resolving works.
frame.filename = decodeURI(frame.filename);
}

if (
frame.filename &&
frame.filename.match(
/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/,
)
) {
// We don't care about these frames. It's Next.js internal code.
frame.in_app = false;
}

return frame;
},
});
Expand Down
11 changes: 11 additions & 0 deletions packages/nextjs/test/integration/pages/[id]/errorClick.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const ButtonPage = (): JSX.Element => (
<button
onClick={() => {
throw new Error('Sentry Frontend Error');
}}
>
Throw Error
</button>
);

export default ButtonPage;
44 changes: 43 additions & 1 deletion packages/nextjs/test/integration/test/client/errorClick.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Event } from '@sentry/types';
test('should capture error triggered on click', async ({ page }) => {
await page.goto('/errorClick');

const [_, events] = await Promise.all([
const [, events] = await Promise.all([
page.click('button'),
getMultipleSentryEnvelopeRequests<Event>(page, 1, { envelopeType: 'event' }),
]);
Expand All @@ -15,3 +15,45 @@ test('should capture error triggered on click', async ({ page }) => {
value: 'Sentry Frontend Error',
});
});

test('should have a non-url-encoded top frame in route with parameter', async ({ page }) => {
await page.goto('/some-param/errorClick');

const [, events] = await Promise.all([
page.click('button'),
getMultipleSentryEnvelopeRequests<Event>(page, 1, { envelopeType: 'event' }),
]);

const frames = events[0]?.exception?.values?.[0].stacktrace?.frames;

expect(frames?.[frames.length - 1].filename).toMatch(/\/\[id\]\/errorClick-[a-f0-9]+\.js$/);
});

test('should mark nextjs internal frames as `in_app`: false', async ({ page }) => {
await page.goto('/some-param/errorClick');

const [, events] = await Promise.all([
page.click('button'),
getMultipleSentryEnvelopeRequests<Event>(page, 1, { envelopeType: 'event' }),
]);

const frames = events[0]?.exception?.values?.[0].stacktrace?.frames;

expect(frames).toContainEqual(
expect.objectContaining({
filename: expect.stringMatching(
/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/,
),
in_app: false,
}),
);

expect(frames).not.toContainEqual(
expect.objectContaining({
filename: expect.stringMatching(
/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/,
),
in_app: true,
}),
);
});
2 changes: 1 addition & 1 deletion packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/mongodb": "^3.6.20",
"@types/mysql": "^2.15.21",
"@types/pg": "^8.6.5",
"apollo-server": "^3.6.7",
"apollo-server": "^3.11.1",
"axios": "^0.27.2",
"cors": "^2.8.5",
"express": "^4.17.3",
Expand Down
7 changes: 6 additions & 1 deletion packages/tracing/src/index.bundle.replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import { Replay } from '@sentry/browser';

import * as Sentry from './index.bundle';

// TODO (v8): Remove this as it was only needed for backwards compatibility
// We want replay to be available under Sentry.Replay, to be consistent
// with the NPM package version.
Sentry.Integrations.Replay = Replay;

export default Sentry;
export { Replay };

export * from './index.bundle';
3 changes: 2 additions & 1 deletion packages/tracing/test/index.bundle.replay.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Sentry from '../src/index.bundle.replay';
import * as Sentry from '../src/index.bundle.replay';

// Because of the way how we re-export stuff for the replay bundle, we only have a single default export
const { Integrations } = Sentry;
Expand All @@ -15,5 +15,6 @@ describe('Integrations export', () => {
});

expect(Integrations.Replay).toBeDefined();
expect(Sentry.Replay).toBeDefined();
});
});
Loading