Skip to content

Commit 11f1596

Browse files
authored
Merge branch 'source' into style-guide
2 parents 052acf7 + 49c0392 commit 11f1596

File tree

64 files changed

+3589
-1653
lines changed

Some content is hidden

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

64 files changed

+3589
-1653
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ module.exports = {
109109
rules: {
110110
"mdx/remark": "error",
111111
"no-unused-expressions": "off",
112+
"react/jsx-no-undef": "off",
112113
},
113114
},
114115
{

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ pnpm-lock.yaml
44
!src/pages/blog/2024-04-11-announcing-new-graphql-website/index.mdx
55
!src/pages/blog/2024-08-15-graphql-local-initiative.mdx
66
!src/pages/community/foundation/community-grant.mdx
7-
!src/pages/blog/2025-06-01-graphiql-4/index.mdx
7+
!src/pages/blog/2025-05-31-graphiql-4/index.mdx
8+
!src/pages/blog/2025-06-10-graphiql-5/index.mdx
89
*.jpg
910

1011
scripts/sync-sched/*.json

next.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ export default withLess(
2727
withNextra({
2828
// reactStrictMode: true, provoke duplicated codemirror editors
2929
webpack(config) {
30+
// #region MDX
31+
const mdxRule = config.module.rules.find(rule =>
32+
rule.test?.test?.(".mdx"),
33+
)
34+
if (mdxRule) {
35+
mdxRule.resourceQuery = {
36+
not: /raw/,
37+
}
38+
}
39+
// Instead of transforming MDX, with ?source we can get
40+
// the raw content to process in a Server Component.
41+
config.module.rules.push({
42+
test: /\.mdx$/i,
43+
resourceQuery: /raw/,
44+
type: "asset/source",
45+
})
46+
// #endregion MDX
47+
48+
// #region SVGs
3049
const fileLoaderRule = config.module.rules.find(rule =>
3150
rule.test?.test?.(".svg"),
3251
)
@@ -62,9 +81,11 @@ export default withLess(
6281
},
6382
},
6483
)
84+
// #endregion SVGs
6585

6686
return config
6787
},
88+
// Comment this out if you're working on OG images.
6889
output: "export",
6990
images: {
7091
loader: "custom",

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"repository": "graphql/graphql.github.io website",
55
"private": true,
6-
"packageManager": "[email protected].2",
6+
"packageManager": "[email protected].9",
77
"scripts": {
88
"build": "next build && next-image-export-optimizer",
99
"check:links": "lychee --verbose --no-progress './src/pages/**/*.mdx' --base https://graphql.org",
@@ -20,7 +20,7 @@
2020
"validate:snippets": "node scripts/validate-snippets.js"
2121
},
2222
"dependencies": {
23-
"@graphql-tools/schema": "10.0.15",
23+
"@graphql-tools/schema": "10.0.25",
2424
"@headlessui/react": "^2.2.4",
2525
"@radix-ui/react-radio-group": "^1.2.2",
2626
"@tailwindcss/container-queries": "^0.1.1",
@@ -33,6 +33,7 @@
3333
"codemirror-graphql": "1.3.2",
3434
"date-fns": "^2.30.0",
3535
"fast-glob": "^3.3.3",
36+
"github-slugger": "2.0.0",
3637
"graphql": "16.10.0",
3738
"gray-matter": "^4.0.3",
3839
"hast-util-to-string": "3.0.1",
@@ -68,7 +69,7 @@
6869
"use-query-params": "^2.2.1"
6970
},
7071
"devDependencies": {
71-
"@graphql-eslint/eslint-plugin": "4.3.0",
72+
"@graphql-eslint/eslint-plugin": "4.4.0",
7273
"@next/eslint-plugin-next": "^15.3.3",
7374
"@svgr/webpack": "^8.1.0",
7475
"@types/codemirror": "5.60.16",

patches/[email protected]

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,18 @@ index af0891e3c2084edd326f40e6e18107b193640e0b..885858fa17285fb75649cf0ebd2576d1
99
import { createElement } from "react";
1010
const DEFAULT_COMPONENTS = {
1111
img: (props) => createElement(
12+
diff --git a/package.json b/package.json
13+
index 0625691ebc1d79d7b7d22bb3b001f00a57519772..53d4b0c951a762ae056004789c9aca819e0ade62 100644
14+
--- a/package.json
15+
+++ b/package.json
16+
@@ -20,6 +20,10 @@
17+
"import": "./dist/server/remark-plugins/index.js",
18+
"types": "./dist/server/remark-plugins/index.d.ts"
19+
},
20+
+ "./rehype-plugins": {
21+
+ "import": "./dist/server/rehype-plugins/index.js",
22+
+ "types": "./dist/server/rehype-plugins/index.d.ts"
23+
+ },
24+
"./hooks": {
25+
"import": "./dist/client/hooks/index.js",
26+
"types": "./dist/client/hooks/index.d.ts"

0 commit comments

Comments
 (0)