Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
adinauer committed Aug 30, 2024
2 parents 8130fdc + 2127e30 commit 6c674f5
Show file tree
Hide file tree
Showing 828 changed files with 6,451 additions and 2,611 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/algolia-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ jobs:
name: Update Algolia index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0
- uses: actions/checkout@v4
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
id: setup-node
with:
node-version-file: 'package.json'
- uses: dorny/paths-filter@v3
id: filter
with:
Expand All @@ -20,7 +23,7 @@ jobs:
- 'platform-includes/**'
dev-docs:
- 'develop-docs/**'
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-preview-deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v3

- name: Install bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lint-404s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ jobs:
index:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0
- uses: actions/checkout@v4
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
id: setup-node
with:
node-version-file: 'package.json'
- uses: dorny/paths-filter@v3
id: filter
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0

- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
id: setup-node
with:
node-version-file: 'package.json'

- name: Install github-label-sync
run: yarn global add [email protected]
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
app_id: ${{ vars.SENTRY_INTERNAL_APP_ID }}
private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }}

- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
id: setup-node
with:
node-version-file: 'package.json'

- uses: actions/cache@v4
id: cache
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@ public/page-data
tsconfig.tsbuildinfo

public/mdx-images/*

# yalc
.yalc
yalc.lock
6 changes: 4 additions & 2 deletions app/[[...path]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
import {getDevDocsFrontMatter, getDocsFrontMatter, getFileBySlug} from 'sentry-docs/mdx';
import {mdxComponents} from 'sentry-docs/mdxComponents';
import {setServerContext} from 'sentry-docs/serverContext';
import {capitilize} from 'sentry-docs/utils';
import {formatGuideOrPlatformTitle} from 'sentry-docs/utils';

export async function generateStaticParams() {
const docs = await (isDeveloperDocs ? getDevDocsFrontMatter() : getDocsFrontMatter());
Expand Down Expand Up @@ -141,7 +141,9 @@ export async function generateMetadata({params}: MetadataProps): Promise<Metadat
const guideOrPlatform = getCurrentPlatformOrGuide(rootNode, params.path);
title =
pageNode.frontmatter.title +
(guideOrPlatform ? ` | Sentry for ${capitilize(guideOrPlatform.name)}` : '');
(guideOrPlatform
? ` | Sentry for ${formatGuideOrPlatformTitle(guideOrPlatform.name)}`
: '');
description = pageNode.frontmatter.description ?? '';
}
}
Expand Down
21 changes: 0 additions & 21 deletions app/api/auth/[...nextauth]/route.ts

This file was deleted.

24 changes: 22 additions & 2 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,29 @@

.radix-themes {
--cursor-button: pointer;
--iris-9: var(--accent-purple);
--iris-a9: var(--accent-purple);
--iris-9: var(--accent);
--iris-a9: var(--accent);
--shadow-6: 0px 4px 16px 0px rgba(31, 22, 51, 0.1);
--foreground-secondary: var(--gray-11);
--accent: var(--accent-purple);
--foreground: var(--gray-12);
::selection {
background-color: var(--accent-a7);
}
pre::selection {
background-color: rgba(106, 95, 193, 0.5);
}
}

.dark {
.radix-themes {
--accent: var(--accent-11);
}

--codeColor: #ff88b6 !important;
--border-color: var(--gray-a2) !important;
--tw-prose-bold: var(--foreground) !important;
--darkPurple: var(--foreground) !important;
}

.icon {
Expand Down
19 changes: 14 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type {Metadata} from 'next';
import {Rubik} from 'next/font/google';
import Script from 'next/script';

import {ThemeProvider} from 'sentry-docs/components/theme-provider';

const rubik = Rubik({
weight: ['400', '500', '700'],
style: ['normal', 'italic'],
Expand All @@ -28,11 +30,18 @@ export const metadata: Metadata = {

export default function RootLayout({children}: {children: React.ReactNode}) {
return (
<html lang="en" suppressHydrationWarning>
<body className={`${rubik.variable} text-darkPurple`}>
<Theme accentColor="iris" grayColor="sand" radius="large" scaling="95%">
{children}
</Theme>
<html lang="en">
<body className={`${rubik.variable}`}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<Theme accentColor="iris" grayColor="sand" radius="large" scaling="95%">
{children}
</Theme>
</ThemeProvider>
</body>
<Script
defer
Expand Down
11 changes: 11 additions & 0 deletions app/robots.txt/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';

export const GET = (_request: Request) => {
return new Response(
`
Sitemap: ${isDeveloperDocs ? 'https://develop.sentry.dev/sitemap.xml' : 'https://docs.sentry.io/sitemap.xml'}
User-agent: *
`.trim(),
{headers: {'content-type': 'text/plain'}}
);
};
2 changes: 2 additions & 0 deletions apps/changelog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"next-auth": "^4.24.5",
"next-mdx-remote": "^4.4.1",
"nextjs-toploader": "^1.6.6",
"nuqs": "^1.17.7",
"prism-sentry": "^1.0.2",
"react": "beta",
"react-dom": "beta",
Expand All @@ -47,6 +48,7 @@
"@types/react-dom": "^18.3.0",
"@types/rss": "^0.0.32",
"autoprefixer": "^10.4.17",
"dotenv-cli": "^7.4.2",
"eslint": "^8",
"eslint-config-next": "^15.0.0-canary.83",
"postcss": "^8.4.33",
Expand Down
2 changes: 1 addition & 1 deletion apps/changelog/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Sentry.init({
Sentry.replayIntegration(),
SentryCore.thirdPartyErrorFilterIntegration({
filterKeys: ['sentry-changelog'],
behaviour: 'drop-error-if-contains-third-party-frames',
behaviour: 'apply-tag-if-contains-third-party-frames',
}),
],
});
Expand Down
9 changes: 5 additions & 4 deletions apps/changelog/src/app/changelog/%5Fadmin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ export default async function ChangelogsListPage() {
<span className="text-gray-500">
<Text size="1">
{' '}
{new Date(changelog.publishedAt || '').toLocaleDateString(
undefined,
{month: 'long', day: 'numeric'}
)}
{new Date(changelog.publishedAt || '').toLocaleDateString('en-EN', {
month: 'long',
day: 'numeric',
timeZone: 'UTC',
})}
</Text>
<br />
</span>
Expand Down
4 changes: 2 additions & 2 deletions apps/changelog/src/app/changelog/[slug]/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Article from '@/client/components/article';
import {LoadingArticle} from '@/client/components/article';

export default function Loading() {
return (
<div className="relative min-h-[calc(100vh-8rem)] w-full mx-auto grid grid-cols-12 bg-gray-200">
<div className="col-span-12 md:col-start-3 md:col-span-8">
<div className="max-w-3xl mx-auto px-4 p-4 sm:px-6 lg:px-8 mt-16">
<Article loading />
<LoadingArticle />
</div>
</div>
</div>
Expand Down
46 changes: 21 additions & 25 deletions apps/changelog/src/app/changelog/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import { Fragment, Suspense } from "react";
import { type Changelog } from "@prisma/client";
import type { Metadata, ResolvingMetadata } from "next";
import { unstable_cache } from "next/cache";
import Link from "next/link";
import { notFound } from "next/navigation";
import { getServerSession } from "next-auth/next";
import { MDXRemote } from "next-mdx-remote/rsc";
import {Fragment, Suspense} from 'react';
import {type Changelog} from '@prisma/client';
import type {Metadata, ResolvingMetadata} from 'next';
import {unstable_cache} from 'next/cache';
import Link from 'next/link';
import {notFound} from 'next/navigation';
import {getServerSession} from 'next-auth/next';
import {MDXRemote} from 'next-mdx-remote/rsc';

import { prismaClient } from "@/server/prisma-client";
import Article from "@/client/components/article";
import ArticleFooter from "@/client/components/articleFooter";
import { authOptions } from "@/server/authOptions";
import { mdxOptions } from "@/server/mdxOptions";
import {prismaClient} from '@/server/prisma-client';
import {Article} from '@/client/components/article';
import ArticleFooter from '@/client/components/articleFooter';
import {authOptions} from '@/server/authOptions';
import {mdxOptions} from '@/server/mdxOptions';

export const dynamic = "force-dynamic";
export const dynamic = 'force-dynamic';

export async function generateMetadata(
{ params }: { params: { slug: string } },
{params}: {params: {slug: string}},
parent: ResolvingMetadata
): Promise<Metadata> {
let changelog: Changelog | null = null;
try {
changelog = await getChangelog(params.slug);
} catch (e) {
return { title: (await parent).title };
return {title: (await parent).title};
}

return {
Expand All @@ -39,7 +39,7 @@ export async function generateMetadata(
}

const getChangelog = unstable_cache(
async (slug) => {
async slug => {
try {
return await prismaClient.changelog.findUnique({
where: {
Expand All @@ -53,15 +53,11 @@ const getChangelog = unstable_cache(
return null;
}
},
["changelog-detail"],
{ tags: ["changelog-detail"] }
['changelog-detail'],
{tags: ['changelog-detail']}
);

export default async function ChangelogEntry({
params,
}: {
params: { slug: string };
}) {
export default async function ChangelogEntry({params}: {params: {slug: string}}) {
const changelog = await getChangelog(params.slug);

if (!changelog) {
Expand Down Expand Up @@ -112,7 +108,7 @@ export default async function ChangelogEntry({
>
<Suspense fallback={<Fragment>Loading...</Fragment>}>
<MDXRemote
source={changelog?.content || "No content found."}
source={changelog?.content || 'No content found.'}
options={
{
mdxOptions,
Expand Down
4 changes: 2 additions & 2 deletions apps/changelog/src/app/changelog/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Fragment} from 'react';

import Header from './header';
import Article from '@/client/components/article';
import {LoadingArticle} from '@/client/components/article';

export default function Loading() {
return (
Expand All @@ -24,7 +24,7 @@ export default function Loading() {
</div>
<div className="col-span-12 md:col-span-8">
<div className="max-w-3xl mx-auto px-4 pb-4 sm:px-6 md:px-8 mt-28">
<Article loading />
<LoadingArticle />
</div>
</div>
<div className="hidden md:block md:col-span-2 pl-5 pt-10">
Expand Down
Loading

0 comments on commit 6c674f5

Please sign in to comment.