Skip to content

Commit 06c0c36

Browse files
committed
Merge branch 'master' into buenaflor-patch-1
2 parents 96c5645 + 7eda1a6 commit 06c0c36

File tree

585 files changed

+7825
-3536
lines changed

Some content is hidden

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

585 files changed

+7825
-3536
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "📝 Documentation on develop.sentry.dev"
2+
labels: ["Type: Content", "Develop"]
3+
description: Missing, incorrect, or unclear developer documentation.
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |-
8+
Is the documentation issue something you know how to fix? Consider contributing to Open Source by opening a PR to fix it instead!
9+
- type: input
10+
id: area-specific
11+
attributes:
12+
label: Which section?
13+
description: Which section of the developer documentation needs to be updated?
14+
validations:
15+
required: true
16+
- type: input
17+
id: page-url
18+
attributes:
19+
label: Page URL
20+
description: Please provide the URL of the page which should be changed (if applicable).
21+
- type: textarea
22+
id: description
23+
attributes:
24+
label: Description
25+
description: What were you looking for/trying to do/expecting?
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: solution
30+
attributes:
31+
label: Suggested Solution
32+
description: If you have an idea on how we can solve this, please share.
33+
- type: markdown
34+
attributes:
35+
value: |-
36+
## Thanks 🙏
37+
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
38+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Enforce Version Conventions
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
check-version-convention:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Install bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
21+
- name: Run script for checking conventions
22+
run: bun scripts/check-version-conventions.ts

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
with:
5858
github-token: ${{ steps.token.outputs.token }}
5959

60-
# TODO(mjq): Bring this back once tests are working.
6160
job_test:
6261
name: Test
6362
runs-on: ubuntu-latest
@@ -72,5 +71,4 @@ jobs:
7271
- run: yarn install --frozen-lockfile
7372
if: steps.cache.outputs.cache-hit != 'true'
7473
- name: Run Tests
75-
# run: yarn test
76-
run: true
74+
run: yarn test

app/[[...path]]/page.tsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@ import {
1616
nodeForPath,
1717
} from 'sentry-docs/docTree';
1818
import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
19-
import {getDevDocsFrontMatter, getDocsFrontMatter, getFileBySlug} from 'sentry-docs/mdx';
19+
import {
20+
getDevDocsFrontMatter,
21+
getDocsFrontMatter,
22+
getFileBySlug,
23+
getVersionsFromDoc,
24+
} from 'sentry-docs/mdx';
2025
import {mdxComponents} from 'sentry-docs/mdxComponents';
2126
import {setServerContext} from 'sentry-docs/serverContext';
27+
import {stripVersion} from 'sentry-docs/versioning';
2228

2329
export async function generateStaticParams() {
2430
const docs = await (isDeveloperDocs ? getDevDocsFrontMatter() : getDocsFrontMatter());
@@ -47,6 +53,7 @@ function MDXLayoutRenderer({mdxSource, ...rest}) {
4753
export default async function Page({params}: {params: {path?: string[]}}) {
4854
// get frontmatter of all docs in tree
4955
const rootNode = await getDocsRootNode();
56+
5057
setServerContext({
5158
rootNode,
5259
path: params.path ?? [],
@@ -88,6 +95,7 @@ export default async function Page({params}: {params: {path?: string[]}}) {
8895
}
8996

9097
const pageNode = nodeForPath(rootNode, params.path);
98+
9199
if (!pageNode) {
92100
// eslint-disable-next-line no-console
93101
console.warn('no page node', params.path);
@@ -108,8 +116,14 @@ export default async function Page({params}: {params: {path?: string[]}}) {
108116
}
109117
const {mdxSource, frontMatter} = doc;
110118

119+
// collect versioned files
120+
const allFm = await getDocsFrontMatter();
121+
const versions = getVersionsFromDoc(allFm, pageNode.path);
122+
111123
// pass frontmatter tree into sidebar, rendered page + fm into middle, headers into toc.
112-
return <MDXLayoutRenderer mdxSource={mdxSource} frontMatter={frontMatter} />;
124+
return (
125+
<MDXLayoutRenderer mdxSource={mdxSource} frontMatter={{...frontMatter, versions}} />
126+
);
113127
}
114128

115129
type MetadataProps = {
@@ -135,9 +149,13 @@ export async function generateMetadata({params}: MetadataProps): Promise<Metadat
135149
const rootNode = await getDocsRootNode();
136150

137151
if (params.path) {
138-
const pageNode = nodeForPath(rootNode, params.path);
152+
const pageNode = nodeForPath(
153+
rootNode,
154+
stripVersion(params.path.join('/')).split('/')
155+
);
139156
if (pageNode) {
140157
const guideOrPlatform = getCurrentPlatformOrGuide(rootNode, params.path);
158+
141159
title =
142160
pageNode.frontmatter.title +
143161
(guideOrPlatform ? ` | Sentry for ${guideOrPlatform.title}` : '');

app/platform-redirect/page.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {redirect} from 'next/navigation';
22

3+
import {Alert} from 'sentry-docs/components/alert';
34
import {DocPage} from 'sentry-docs/components/docPage';
45
import {PlatformIcon} from 'sentry-docs/components/platformIcon';
56
import {SmartLink} from 'sentry-docs/components/smartLink';
@@ -14,16 +15,31 @@ export default async function Page({
1415
if (Array.isArray(next)) {
1516
next = next[0];
1617
}
18+
1719
// discard the hash
1820
const [pathname, _] = next.split('#');
1921
const rootNode = await getDocsRootNode();
22+
const defaultTitle = 'Platform Specific Content';
23+
let description = '';
24+
const platformInfo =
25+
"The page you are looking for is customized for each platform. Select your platform below and we'll direct you to the most specific documentation on it.";
26+
let title = defaultTitle;
27+
2028
// get rid of irrelevant platforms for the `next` path
2129
const platformList = extractPlatforms(rootNode).filter(platform_ => {
22-
return !!nodeForPath(rootNode, [
30+
const node = nodeForPath(rootNode, [
2331
'platforms',
2432
platform_.key,
2533
...pathname.split('/').filter(Boolean),
2634
]);
35+
36+
// extract title and description for displaying it on page
37+
if (node && title === defaultTitle && pathname.length > 0) {
38+
title = node.frontmatter.title ?? title;
39+
description = node.frontmatter.description || '';
40+
}
41+
42+
return !!node;
2743
});
2844

2945
if (platformList.length === 0) {
@@ -42,18 +58,16 @@ export default async function Page({
4258
}
4359

4460
const frontMatter = {
45-
title: 'Platform Specific Content',
61+
title,
62+
description,
4663
};
4764

4865
// make the Sidebar aware of the current path
4966
setServerContext({rootNode, path: ['platform-redirect']});
5067

5168
return (
5269
<DocPage frontMatter={frontMatter}>
53-
<p>
54-
The page you are looking for is customized for each platform. Select your platform
55-
below and we&apos;ll direct you to the most specific documentation on it.
56-
</p>
70+
<Alert level="info">{platformInfo}</Alert>
5771

5872
<ul>
5973
{platformList.map(p => (

apps/changelog/package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
"@radix-ui/react-icons": "^1.3.0",
2222
"@radix-ui/react-toolbar": "^1.0.4",
2323
"@radix-ui/themes": "^2.0.3",
24-
"@sentry/nextjs": "8.29.0",
24+
"@sentry/nextjs": "8.36.0-beta.0",
2525
"@spotlightjs/spotlight": "^2.1.1",
26-
"next": "^15.0.0-canary.83",
26+
"next": "15.0.0-rc.1",
2727
"next-auth": "^4.24.5",
2828
"next-mdx-remote": "^4.4.1",
2929
"nextjs-toploader": "^1.6.6",
3030
"nuqs": "^1.17.7",
3131
"prism-sentry": "^1.0.2",
32-
"react": "beta",
33-
"react-dom": "beta",
32+
"react": "19.0.0-rc-cd22717c-20241013",
33+
"react-dom": "19.0.0-rc-cd22717c-20241013",
3434
"react-select": "^5.7.3",
3535
"react-textarea-autosize": "^8.5.3",
3636
"rehype-prism-plus": "^1.6.3",
@@ -44,8 +44,8 @@
4444
"@tailwindcss/forms": "^0.5.7",
4545
"@tailwindcss/typography": "^0.5.10",
4646
"@types/node": "^20",
47-
"@types/react": "^18",
48-
"@types/react-dom": "^18.3.0",
47+
"@types/react": "npm:[email protected]",
48+
"@types/react-dom": "npm:[email protected]",
4949
"@types/rss": "^0.0.32",
5050
"autoprefixer": "^10.4.17",
5151
"dotenv-cli": "^7.4.2",
@@ -58,5 +58,9 @@
5858
},
5959
"volta": {
6060
"extends": "../../package.json"
61+
},
62+
"resolutions": {
63+
"@types/react": "npm:[email protected]",
64+
"@types/react-dom": "npm:[email protected]"
6165
}
6266
}

apps/changelog/src/app/changelog/%5Fadmin/[id]/edit/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import Link from 'next/link';
44
import {prismaClient} from '@/server/prisma-client';
55
import {EditChangelogForm} from '@/client/components/forms/editChangelogForm';
66

7-
export default async function ChangelogCreatePage({params}: {params: {id: string}}) {
7+
export default async function ChangelogCreatePage(props: {
8+
params: Promise<{id: string}>;
9+
}) {
10+
const params = await props.params;
811
const categories = await prismaClient.category.findMany({
912
orderBy: {
1013
name: 'asc',

apps/changelog/src/app/changelog/[slug]/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ import {mdxOptions} from '@/server/mdxOptions';
1616
export const dynamic = 'force-dynamic';
1717

1818
export async function generateMetadata(
19-
{params}: {params: {slug: string}},
19+
props: {params: Promise<{slug: string}>},
2020
parent: ResolvingMetadata
2121
): Promise<Metadata> {
22+
const params = await props.params;
2223
let changelog: Changelog | null = null;
2324
try {
2425
changelog = await getChangelog(params.slug);
@@ -57,7 +58,8 @@ const getChangelog = unstable_cache(
5758
{tags: ['changelog-detail']}
5859
);
5960

60-
export default async function ChangelogEntry({params}: {params: {slug: string}}) {
61+
export default async function ChangelogEntry(props: {params: Promise<{slug: string}>}) {
62+
const params = await props.params;
6163
const changelog = await getChangelog(params.slug);
6264

6365
if (!changelog) {

develop-docs/application/config.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Configuration
3+
sidebar_order: 60
34
---
45

56
This document describes configuration available to the Sentry server itself.

develop-docs/backend/control-silo.mdx renamed to develop-docs/application/control-silo.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Control Silo
3+
sidebar_order: 30
34
---
45

56
Within the Control Silo are features that allow us to provide backwards compatibility for both customer API usage, and integrations

0 commit comments

Comments
 (0)