Skip to content

Commit cd3b609

Browse files
author
Luca Forstner
authored
feat(changelog): Add back spotlight (#10894)
1 parent 5df6606 commit cd3b609

File tree

6 files changed

+54
-14
lines changed

6 files changed

+54
-14
lines changed

apps/changelog/next.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {withSentryConfig} from '@sentry/nextjs';
2+
import WebpackHookPlugin from 'webpack-hook-plugin';
23

34
/** @type {import('next').NextConfig} */
45
const nextConfig = {
@@ -7,6 +8,17 @@ const nextConfig = {
78
ignoreDuringBuilds: true,
89
},
910
transpilePackages: ['next-mdx-remote'],
11+
webpack: (config, {dev, nextRuntime}) => {
12+
if (dev && nextRuntime === 'nodejs') {
13+
config.plugins.push(
14+
new WebpackHookPlugin({
15+
onBuildStart: ['npx @spotlightjs/spotlight'],
16+
})
17+
);
18+
}
19+
20+
return config;
21+
},
1022
async redirects() {
1123
return [
1224
{

apps/changelog/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@radix-ui/react-toolbar": "^1.0.4",
2323
"@radix-ui/themes": "^2.0.3",
2424
"@sentry/nextjs": "8.20.0",
25+
"@spotlightjs/spotlight": "^2.1.1",
2526
"next": "^15.0.0-canary.83",
2627
"next-auth": "^4.24.5",
2728
"next-mdx-remote": "^4.4.1",
@@ -35,7 +36,8 @@
3536
"rehype-slug": "^6.0.0",
3637
"rss": "^1.2.2",
3738
"sass": "^1.69.5",
38-
"textarea-markdown-editor": "^1.0.4"
39+
"textarea-markdown-editor": "^1.0.4",
40+
"webpack-hook-plugin": "^1.0.7"
3941
},
4042
"devDependencies": {
4143
"@tailwindcss/forms": "^0.5.7",

apps/changelog/sentry.client.config.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,23 @@
44

55
import * as SentryCore from '@sentry/core';
66
import * as Sentry from '@sentry/nextjs';
7+
import * as Spotlight from '@spotlightjs/spotlight';
78

89
Sentry.init({
910
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
10-
11-
// Adjust this value in production, or use tracesSampler for greater control
11+
environment: process.env.NODE_ENV,
1212
tracesSampleRate: 1,
13-
1413
replaysOnErrorSampleRate: 1.0,
15-
16-
// This sets the sample rate to be 10%. You may want this to be 100% while
17-
// in development and sample at a lower rate in production
1814
replaysSessionSampleRate: 0.1,
19-
20-
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
2115
integrations: [
2216
Sentry.replayIntegration(),
2317
SentryCore.thirdPartyErrorFilterIntegration({
2418
filterKeys: ['sentry-changelog'],
2519
behaviour: 'drop-error-if-contains-third-party-frames',
2620
}),
2721
],
28-
29-
debug: process.env.NODE_ENV !== 'production',
3022
});
23+
24+
if (process.env.NODE_ENV === 'development') {
25+
Spotlight.init();
26+
}

apps/changelog/sentry.edge.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ Sentry.init({
44
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
55
tracesSampleRate: 1,
66
environment: process.env.NODE_ENV,
7-
debug: process.env.NODE_ENV !== 'production',
7+
spotlight: process.env.NODE_ENV === 'development',
88
});

apps/changelog/sentry.server.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ Sentry.init({
55
tracesSampleRate: 1,
66
environment: process.env.NODE_ENV,
77
integrations: [Sentry.prismaIntegration()],
8-
debug: process.env.NODE_ENV !== 'production',
8+
spotlight: process.env.NODE_ENV === 'development',
99
});

yarn.lock

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2898,11 +2898,21 @@
28982898
resolved "https://registry.npmjs.org/@spotlightjs/overlay/-/overlay-2.0.0-alpha.1.tgz"
28992899
integrity sha512-BJM8l9mJ6obTX/3xw1Erj9Pk/eVOP8oUtb3PoNjwQfnOrio7J8wlWjSETES22EslVPFI1kpl2UMtB+s91Ic8zQ==
29002900

2901+
"@spotlightjs/[email protected]":
2902+
version "2.1.0"
2903+
resolved "https://registry.yarnpkg.com/@spotlightjs/overlay/-/overlay-2.1.0.tgz#47f6f616c3401bbe4b2094936018e4c840a0a66f"
2904+
integrity sha512-4A718MNG81N1q81lH45BppN/Z94lEHa9U8dUtfjpBdnSngJnwz6Ku3gmFhQQfEOcei+xtPdLgCVP3ODfu0etsg==
2905+
29012906
"@spotlightjs/[email protected]":
29022907
version "1.4.0"
29032908
resolved "https://registry.npmjs.org/@spotlightjs/sidecar/-/sidecar-1.4.0.tgz"
29042909
integrity sha512-onj/phrNtDI8a79zc8jfxJ5BITQk5klO4xSoQXxiYeQWTZcegVeO8VftOVfWPBnMY/axnh+ltxJm/cHaV5SP6Q==
29052910

2911+
"@spotlightjs/[email protected]":
2912+
version "1.5.0"
2913+
resolved "https://registry.yarnpkg.com/@spotlightjs/sidecar/-/sidecar-1.5.0.tgz#b7afb8d0e4aaeaaa6d425b0f6a3eef97f78ae3e4"
2914+
integrity sha512-ASGHrRKQ40+kN/SAVEVD5GY3tt7gJM4lziEALHKb5rBXKHKIDqCckgEY4n8FhzpTo1N8azVFVHEIriPtpWTEsg==
2915+
29062916
"@spotlightjs/spotlight@^2.0.0-alpha.1":
29072917
version "2.0.0-alpha.1"
29082918
resolved "https://registry.npmjs.org/@spotlightjs/spotlight/-/spotlight-2.0.0-alpha.1.tgz"
@@ -2911,6 +2921,16 @@
29112921
"@spotlightjs/overlay" "2.0.0-alpha.1"
29122922
"@spotlightjs/sidecar" "1.4.0"
29132923

2924+
"@spotlightjs/spotlight@^2.1.1":
2925+
version "2.1.1"
2926+
resolved "https://registry.yarnpkg.com/@spotlightjs/spotlight/-/spotlight-2.1.1.tgz#c57a60c8a4164c2bf6cbf10c72fcf2dcaead8639"
2927+
integrity sha512-i67sfCEIXvsHMtGMfE7U0F0MQMcrMRc54ToyaqvzZZ4aRCcUpPdl50KChcixY1ksuI7KiiP0q4h+NbjOzrrX7w==
2928+
dependencies:
2929+
"@spotlightjs/overlay" "2.1.0"
2930+
"@spotlightjs/sidecar" "1.5.0"
2931+
import-meta-resolve "^4.1.0"
2932+
source-map "^0.7.4"
2933+
29142934
"@swc/counter@^0.1.3":
29152935
version "0.1.3"
29162936
resolved "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz"
@@ -6532,6 +6552,11 @@ import-local@^3.0.2:
65326552
pkg-dir "^4.2.0"
65336553
resolve-cwd "^3.0.0"
65346554

6555+
import-meta-resolve@^4.1.0:
6556+
version "4.1.0"
6557+
resolved "https://registry.yarnpkg.com/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz#f9db8bead9fafa61adb811db77a2bf22c5399706"
6558+
integrity sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==
6559+
65356560
imurmurhash@^0.1.4:
65366561
version "0.1.4"
65376562
resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz"
@@ -10722,7 +10747,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
1072210747
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
1072310748
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
1072410749

10725-
source-map@^0.7.0:
10750+
source-map@^0.7.0, source-map@^0.7.4:
1072610751
version "0.7.4"
1072710752
resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz"
1072810753
integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==
@@ -11809,6 +11834,11 @@ webidl-conversions@^7.0.0:
1180911834
resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz"
1181011835
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
1181111836

11837+
webpack-hook-plugin@^1.0.7:
11838+
version "1.0.7"
11839+
resolved "https://registry.yarnpkg.com/webpack-hook-plugin/-/webpack-hook-plugin-1.0.7.tgz#689c2a24e16df247be91d8649e9da048774308ec"
11840+
integrity sha512-8GJ+LiR+0rrShCSeeFMaKONX7xMMW3H9Hszmy5IsCereZUJ5AoLhJgn5BhySQChA4Q5lZ7/9KtidDypYHQDDmA==
11841+
1181211842
webpack-sources@^3.2.3:
1181311843
version "3.2.3"
1181411844
resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz"

0 commit comments

Comments
 (0)