Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lforst-fix-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Jul 25, 2024
2 parents 246b597 + 1f5fd9f commit 3c6901d
Show file tree
Hide file tree
Showing 13 changed files with 243 additions and 160 deletions.
1 change: 1 addition & 0 deletions apps/changelog/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/changelog
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=secret
NEXT_PUBLIC_SENTRY_DSN=
27 changes: 26 additions & 1 deletion apps/changelog/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,29 @@ const nextConfig = {
},
};

export default withSentryConfig(nextConfig);
export default withSentryConfig(nextConfig, {
org: 'sentry',
project: 'changelog',

// Suppresses source map uploading logs during build
silent: !process.env.CI,

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

reactComponentAnnotation: {
enabled: true,
},

unstable_sentryWebpackPluginOptions: {
applicationKey: 'sentry-changelog',
},

automaticVercelMonitors: true,
});
23 changes: 12 additions & 11 deletions apps/changelog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,42 @@
"migrate:dev": "dotenv -e .env.development -- yarn prisma migrate reset"
},
"dependencies": {
"rehype-prism-plus": "^1.6.3",
"rehype-slug": "^6.0.0",
"@auth/prisma-adapter": "^1.2.0",
"nextjs-toploader": "^1.6.6",
"prism-sentry": "^1.0.2",
"@google-cloud/storage": "^7.7.0",
"@prisma/client": "^5.8.1",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-toolbar": "^1.0.4",
"@radix-ui/themes": "^2.0.3",
"@sentry/nextjs": "^8.8.0",
"@google-cloud/storage": "^7.7.0",
"@prisma/client": "^5.8.1",
"@spotlightjs/spotlight": "^2.1.1",
"next": "^14.2.5",
"next-auth": "^4.24.5",
"next-mdx-remote": "^4.4.1",
"nextjs-toploader": "^1.6.6",
"prism-sentry": "^1.0.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-select": "^5.7.3",
"sass": "^1.69.5",
"react-textarea-autosize": "^8.5.3",
"rehype-prism-plus": "^1.6.3",
"rehype-slug": "^6.0.0",
"rss": "^1.2.2",
"sass": "^1.69.5",
"textarea-markdown-editor": "^1.0.4"
},
"devDependencies": {
"autoprefixer": "^10.4.17",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18.3.0",
"prisma": "^5.8.1",
"@types/rss": "^0.0.32",
"autoprefixer": "^10.4.17",
"eslint": "^8",
"eslint-config-next": "^14.2.5",
"postcss": "^8.4.33",
"@tailwindcss/forms": "^0.5.7",
"prisma": "^5.8.1",
"tailwindcss": "^3.4.1",
"@tailwindcss/typography": "^0.5.10",
"typescript": "^5"
},
"volta": {
Expand Down
35 changes: 35 additions & 0 deletions apps/changelog/sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// This file configures the initialization of Sentry on the client.
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as SentryCore from '@sentry/core';
import * as Sentry from '@sentry/nextjs';
import * as Spotlight from '@spotlightjs/spotlight';

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,

replaysOnErrorSampleRate: 1.0,

// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,

// You can remove this option if you're not planning to use the Sentry Session Replay feature:
integrations: [
Sentry.replayIntegration(),
SentryCore.thirdPartyErrorFilterIntegration({
filterKeys: ['sentry-docs'],
behaviour: 'drop-error-if-contains-third-party-frames',
}),
],
});

if (process.env.NODE_ENV === 'development') {
Spotlight.init({
showClearEventsButton: true,
});
}
8 changes: 8 additions & 0 deletions apps/changelog/sentry.edge.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: 1,
debug: false,
environment: process.env.NODE_ENV,
});
10 changes: 10 additions & 0 deletions apps/changelog/sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: 1,
debug: false,
environment: process.env.NODE_ENV,
spotlight: process.env.NODE_ENV === 'development',
integrations: [Sentry.prismaIntegration()],
});
3 changes: 0 additions & 3 deletions apps/changelog/src/app/changelog/layout.module.css

This file was deleted.

2 changes: 1 addition & 1 deletion apps/changelog/src/app/changelog/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function ChangelogLayout({children}: {children: ReactNode}) {
return (
<Fragment>
<NextTopLoader color="#8d5494" />
<div className={styles.changelogContent}>
<div className="font-sans">
<Navbar />
<div className="bg-gray-100">{children}</div>
<div className="w-full mx-auto h-16 relative bg-darkPurple">
Expand Down
121 changes: 8 additions & 113 deletions apps/changelog/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@
@tailwind components;
@tailwind utilities;

.radix-themes {
--cursor-button: pointer;
--iris-9: var(--accent-purple);
--iris-a9: var(--accent-purple);
--shadow-6: 0px 4px 16px 0px rgba(31, 22, 51, 0.1);
}

.fancy-border {
transition-property: box-shadow, border-color;
transition-duration: 0.25s;
transition-timing-function: ease-out;
}

&:hover {
box-shadow:
0 2px 0 rgba(54, 45, 89, 0.15),
-0.1875rem -0.1875rem 0 0.1875rem #f2b712,
0 0 0 0.375rem #e1567c;
text-decoration: none;
cursor: pointer;
}
.fancy-border:hover {
box-shadow:
0 2px 0 rgba(54, 45, 89, 0.15),
-0.1875rem -0.1875rem 0 0.1875rem #f2b712,
0 0 0 0.375rem #e1567c;
text-decoration: none;
cursor: pointer;
}

.hero-top-left-down-slope {
Expand All @@ -38,105 +31,7 @@
clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
}

.icon {
margin-left: 0.25em;

svg {
display: inline;
width: 14px;
height: 14px;
}
}

.icon-external-link {
margin-left: 0;

svg {
margin-left: 0.15em;
}
}

:root {
/* Oranges */
--flame0: #df5128;
--flame1: #e55e32;
--flame2: #ea6b3c;
--flame3: #ef7846;
--flame4: #f4834f;
--flame5: #f79a4f;
--flame6: #faaf4e;
--flame7: #edcf9e;
--flame8: #ffefae;

/* A range of desaturated purples */
--desatPurple0: #0f0a1f;
--desatPurple1: #231c3d;
--desatPurple2: #362d59;
--desatPurple3: #473a67;
--desatPurple4: #584774;
--desatPurple5: #64517d;
--desatPurple6: #79628c;
--desatPurple7: #846e95;
--desatPurple8: #9481a4;
--desatPurple9: #a796b4;
--desatPurple10: #bbadc6;
--desatPurple11: #c3b6ce;
--desatPurple12: #d2c7da;
--desatPurple13: #e2d9e9;
--desatPurple14: #efe8f4;
--desatPurple15: #faf8ff;

/* saturated purples */
--brandPink: #e1557c;
--brandLink: var(--brandPink);
--darkPink: #c83852;
--codeColor: #9c5f99;
--brandDecoration: var(--desatPurple4);
/* accents */
--accent-purple: #6a5fc1;
--accent-md-violet: '#584774';
--accent-purple-light: #e1dff3;
--accent-yellow: #fedb4b;
--gray: #c7c5cc;
--dark-purple: #1f1633;
/* misc */
--jewel0: #69c289;
/* Sentry green */
--jewel1: #007a78;
/* Darkened Sentry green */
--lightBlue: #48a5db;
/* Sentry blue */

/*
Color variables
*/
--white: #ffffff;
--lightText: #9093c1;
--highlightPurple: var(--brandLink);
--lightPurple: var(--desatPurple11);
--lightestPurple: var(--desatPurple12);
--mediumPurple: var(--desatPurple6);
--darkestPurple: var(--desatPurple0);
--darkPurple: var(--desatPurple2);
--boldRed: var(--flame0);
--textDecorationPurple: var(--brandDecoration);
--lightestPurpleBackground: rgba(210, 199, 218, 0.2);
--successGreen: var(--jewel0);

--transition-time: 0.125s;

--headerHeight: 4rem;

--light-text: var(--lightText);
--lightest-purple-background: var(--lightestPurpleBackground);

--paragraph-margin-bottom: 1rem;
--border-color: #dee2e6;
--font-family-monospace: 'Roboto Mono', SFMono-Regular, Consolas, Liberation Mono, Menlo,
Courier, monospace;

--fade-in-animation: fadeIn;

/* https://storybook.sentry.dev/?path=/story/core-colors--page */
--gray-500: #2b2233;
--gray-400: #3e3446;
Expand Down
9 changes: 9 additions & 0 deletions apps/changelog/src/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('../sentry.server.config');
}

if (process.env.NEXT_RUNTIME === 'edge') {
await import('../sentry.edge.config');
}
}
Loading

0 comments on commit 3c6901d

Please sign in to comment.