Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
3 changes: 0 additions & 3 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ const nextConfig = {
sassOptions: {
silenceDeprecations: ['legacy-js-api'],
},
experimental: {
nodeMiddleware: true,
},
};

module.exports = withSentryConfig(nextConfig, {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"mdx-bundler": "^10.0.1",
"mermaid": "^11.11.0",
"micromark": "^4.0.0",
"next": "15.5.12",
"next": "15.1.12",
"next-plausible": "^3.12.4",
"next-themes": "^0.3.0",
"nextjs-toploader": "^1.6.6",
Expand Down Expand Up @@ -184,4 +184,4 @@
"node": "22.16.0",
"pnpm": "10.30.0"
}
}
}
417 changes: 76 additions & 341 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/components/codeTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ const showSigninNote = (children: ReactNode) => {
};

export function CodeTabs({children}: CodeTabProps) {
const codeBlocks = (Array.isArray(children) ? [...children] : [children]).filter(
child => child?.props
);
const codeBlocks = Array.isArray(children) ? [...children] : [children];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed filter allows children without props to crash

Medium Severity

The .filter(child => child?.props) guard was removed from codeBlocks, but line 58 immediately destructures {props: {title, language}} from each element via .map(). If any child in the array lacks a props property (e.g., a whitespace text node, null, or undefined from MDX rendering), this will throw a TypeError at runtime. This filter may have been a bug fix bundled into the reverted PR rather than part of the middleware feature itself.

Fix in Cursor Fix in Web


// The title is what we use for sorting and also for remembering the
// selection. If there is no title fall back to the title cased language name
Expand Down
1 change: 0 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const config = {
// - favicon.ico (favicon file)
'/((?!api|_next/static|_next/image|favicon.ico).*)',
],
runtime: 'nodejs',
};

// This function can be marked `async` if using `await` inside
Expand Down
File renamed without changes.
File renamed without changes
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// "removeComments": true, /* Do not emit comments to output. */
"noEmit": true, /* Do not emit outputs. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ /* Strict Type-Checking Options */ // "strict": true /* Enable all strict type-checking options. */
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ /* Strict Type-Checking Options */// "strict": true /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
Expand Down Expand Up @@ -76,9 +76,9 @@
".cache"
],
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
".next/types/**/*.ts"
".next/types/**/*.ts",
"**/*.ts",
"**/*.tsx"
]
}
Loading