Skip to content

Commit

Permalink
Merge pull request #13852 from getsentry/prepare-release/8.33.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chargome authored Oct 2, 2024
2 parents 8fa2caf + b8f92a1 commit 83d319b
Show file tree
Hide file tree
Showing 80 changed files with 1,616 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ body:
label: Link to Sentry event
description:
If applicable, please provide a link to the affected event from your Sentry account. The event will only be
viewable by Sentry staff.
viewable by Sentry staff; however, the event URL will still appear on your public GitHub issue.
placeholder: https://sentry.io/organizations/<org-slug>/issues/<issue-id>/events/<event-id>/?project=<project-id>
- type: textarea
id: sdk-setup
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ jobs:
'nextjs-13',
'nextjs-14',
'nextjs-15',
'nextjs-t3',
'react-17',
'react-19',
'react-create-hash-router',
Expand Down Expand Up @@ -1067,6 +1068,10 @@ jobs:
'react-send-to-sentry',
'node-express-send-to-sentry',
'debug-id-sourcemaps',
'nextjs-app-dir',
'nextjs-13',
'nextjs-14',
'nextjs-15',
]
build-command:
- false
Expand All @@ -1081,6 +1086,30 @@ jobs:
- test-application: 'create-remix-app-legacy'
assert-command: 'test:assert-sourcemaps'
label: 'create-remix-app-legacy (sourcemaps)'
- test-application: 'nextjs-app-dir'
build-command: 'test:build-canary'
label: 'nextjs-app-dir (canary)'
- test-application: 'nextjs-app-dir'
build-command: 'test:build-latest'
label: 'nextjs-app-dir (latest)'
- test-application: 'nextjs-13'
build-command: 'test:build-canary'
label: 'nextjs-13 (canary)'
- test-application: 'nextjs-13'
build-command: 'test:build-latest'
label: 'nextjs-13 (latest)'
- test-application: 'nextjs-14'
build-command: 'test:build-canary'
label: 'nextjs-14 (canary)'
- test-application: 'nextjs-14'
build-command: 'test:build-latest'
label: 'nextjs-14 (latest)'
- test-application: 'nextjs-15'
build-command: 'test:build-canary'
label: 'nextjs-15 (canary)'
- test-application: 'nextjs-15'
build-command: 'test:build-latest'
label: 'nextjs-15 (latest)'

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release-comment-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Automation: Notify issues for release"
on:
release:
types:
- published
workflow_dispatch:
inputs:
version:
description: Which version to notify issues for
required: false

# This workflow is triggered when a release is published
jobs:
release-comment-issues:
runs-on: ubuntu-20.04
name: 'Notify issues'
steps:
- name: Get version
id: get_version
run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT

- name: Comment on linked issues that are mentioned in release
if: steps.get_version.outputs.version != ''
uses: getsentry/release-comment-issues-gh-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.get_version.outputs.version }}
2 changes: 1 addition & 1 deletion .github/workflows/release-size-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Update Github Release
if: steps.get_version.outputs.version != ''
uses: getsentry/size-limit-release@v1
uses: getsentry/size-limit-release@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.get_version.outputs.version }}
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,46 @@

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

## 8.33.0

### Important Changes

- **feat(nextjs): Support new async APIs (`headers()`, `params`, `searchParams`)
([#13828](https://github.com/getsentry/sentry-javascript/pull/13828))**

Adds support for [new dynamic Next.js APIs](https://github.com/vercel/next.js/pull/68812).

- **feat(node): Add `lru-memoizer` instrumentation
([#13796](https://github.com/getsentry/sentry-javascript/pull/13796))**

Adds integration for lru-memoizer using @opentelemetry/instrumentation-lru-memoizer.

- **feat(nuxt): Add `unstable_sentryBundlerPluginOptions` to module options
([#13811](https://github.com/getsentry/sentry-javascript/pull/13811))**

Allows passing other options from the bundler plugins (vite and rollup) to Nuxt module options.

### Other Changes

- fix(browser): Ensure `wrap()` only returns functions
([#13838](https://github.com/getsentry/sentry-javascript/pull/13838))
- fix(core): Adapt trpc middleware input attachment
([#13831](https://github.com/getsentry/sentry-javascript/pull/13831))
- fix(core): Don't return trace data in `getTraceData` and `getTraceMetaTags` if SDK is disabled
([#13760](https://github.com/getsentry/sentry-javascript/pull/13760))
- fix(nuxt): Don't restrict source map assets upload
([#13800](https://github.com/getsentry/sentry-javascript/pull/13800))
- fix(nuxt): Use absolute path for client config ([#13798](https://github.com/getsentry/sentry-javascript/pull/13798))
- fix(replay): Stop global event handling for paused replays
([#13815](https://github.com/getsentry/sentry-javascript/pull/13815))
- fix(sveltekit): add url param to source map upload options
([#13812](https://github.com/getsentry/sentry-javascript/pull/13812))
- fix(types): Add jsdocs to cron types ([#13776](https://github.com/getsentry/sentry-javascript/pull/13776))
- fix(nextjs): Loosen @sentry/nextjs webpack peer dependency
([#13826](https://github.com/getsentry/sentry-javascript/pull/13826))

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

## 8.32.0

### Important Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,31 @@ export default function Page() {
return <p>Hello World!</p>;
}

export async function generateMetadata({
searchParams,
}: {
searchParams: { [key: string]: string | string[] | undefined };
}) {
export async function generateMetadata({ searchParams }: { searchParams: any }) {
// We need to dynamically check for this because Next.js made the API async for Next.js 15 and we use this test in canary tests
const normalizedSearchParams = await searchParams;

Sentry.setTag('my-isolated-tag', true);
Sentry.setTag('my-global-scope-isolated-tag', getDefaultIsolationScope().getScopeData().tags['my-isolated-tag']); // We set this tag to be able to assert that the previously set tag has not leaked into the global isolation scope

if (searchParams['shouldThrowInGenerateMetadata']) {
if (normalizedSearchParams['shouldThrowInGenerateMetadata']) {
throw new Error('generateMetadata Error');
}

return {
title: searchParams['metadataTitle'] ?? 'not set',
title: normalizedSearchParams['metadataTitle'] ?? 'not set',
};
}

export function generateViewport({
searchParams,
}: {
searchParams: { [key: string]: string | undefined };
}) {
if (searchParams['shouldThrowInGenerateViewport']) {
export async function generateViewport({ searchParams }: { searchParams: any }) {
// We need to dynamically check for this because Next.js made the API async for Next.js 15 and we use this test in canary tests
const normalizedSearchParams = await searchParams;

if (normalizedSearchParams['shouldThrowInGenerateViewport']) {
throw new Error('generateViewport Error');
}

return {
themeColor: searchParams['viewportThemeColor'] ?? 'black',
themeColor: normalizedSearchParams['viewportThemeColor'] ?? 'black',
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export function makeHttpRequest(url: string) {
});
}

export function checkHandler() {
const headerList = headers();
export async function checkHandler() {
const headerList = await headers();

const headerObj: Record<string, unknown> = {};
headerList.forEach((value, key) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import * as Sentry from '@sentry/nextjs';
export default async function Page({
searchParams,
}: {
searchParams: { id?: string };
searchParams: any;
}) {
// We need to dynamically check for this because Next.js made the API async for Next.js 15 and we use this test in canary tests
const normalizedSearchParams = await searchParams;

try {
console.log(searchParams.id); // Accessing a field on searchParams will throw the PPR error
console.log(normalizedSearchParams.id); // Accessing a field on searchParams will throw the PPR error
} catch (e) {
Sentry.captureException(e); // This error should not be reported
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for any async event processors to run
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { use } from 'react';
import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';

export default function Page({ params }: { params: Record<string, string> }) {
export default function Page({ params }: any) {
// We need to dynamically check for this because Next.js made the API async for Next.js 15 and we use this test in canary tests
const normalizedParams = 'then' in params ? use(params) : params;

return (
<div style={{ border: '1px solid lightgrey', padding: '12px' }}>
<h2>Page (/client-component/[...parameters])</h2>
<p>Params: {JSON.stringify(params['parameters'])}</p>
<p>Params: {JSON.stringify(normalizedParams['parameters'])}</p>
<ClientErrorDebugTools />
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { use } from 'react';
import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';

export default function Page({ params }: { params: Record<string, string> }) {
export default function Page({ params }: any) {
// We need to dynamically check for this because Next.js made the API async for Next.js 15 and we use this test in canary tests
const normalizedParams = 'then' in params ? use(params) : params;

return (
<div style={{ border: '1px solid lightgrey', padding: '12px' }}>
<h2>Page (/client-component/[parameter])</h2>
<p>Parameter: {JSON.stringify(params['parameter'])}</p>
<p>Parameter: {JSON.stringify(normalizedParams['parameter'])}</p>
<ClientErrorDebugTools />
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { use } from 'react';
import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';

export const dynamic = 'force-dynamic';

export default async function Page({ params }: { params: Record<string, string> }) {
export default function Page({ params }: any) {
// We need to dynamically check for this because Next.js made the API async for Next.js 15 and we use this test in canary tests
const normalizedParams = 'then' in params ? use(params) : params;

return (
<div style={{ border: '1px solid lightgrey', padding: '12px' }}>
<h2>Page (/server-component/[...parameters])</h2>
<p>Params: {JSON.stringify(params['parameters'])}</p>
<p>Params: {JSON.stringify(normalizedParams['parameters'])}</p>
<ClientErrorDebugTools />
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { use } from 'react';
import { ClientErrorDebugTools } from '../../../../components/client-error-debug-tools';

export const dynamic = 'force-dynamic';

export default async function Page({ params }: { params: Record<string, string> }) {
export default function Page({ params }: any) {
// We need to dynamically check for this because Next.js made the API async for Next.js 15 and we use this test in canary tests
const normalizedParams = 'then' in params ? use(params) : params;

return (
<div style={{ border: '1px solid lightgrey', padding: '12px' }}>
<h2>Page (/server-component/[parameter])</h2>
<p>Parameter: {JSON.stringify(params['parameter'])}</p>
<p>Parameter: {JSON.stringify(normalizedParams['parameter'])}</p>
<ClientErrorDebugTools />
</div>
);
Expand Down
45 changes: 45 additions & 0 deletions dev-packages/e2e-tests/test-applications/nextjs-t3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

!*.d.ts

# Sentry
.sentryclirc

.vscode

test-results
2 changes: 2 additions & 0 deletions dev-packages/e2e-tests/test-applications/nextjs-t3/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
11 changes: 11 additions & 0 deletions dev-packages/e2e-tests/test-applications/nextjs-t3/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
await import('./src/env.js');

/** @type {import("next").NextConfig} */
const config = {};

import { withSentryConfig } from '@sentry/nextjs';

export default withSentryConfig(config, {
disableLogger: true,
silent: true,
});
Loading

0 comments on commit 83d319b

Please sign in to comment.