Skip to content

Commit 8fa827d

Browse files
authored
Merge pull request #41106 from github/repo-sync
Repo sync
2 parents 53ecb17 + c86c157 commit 8fa827d

30 files changed

+853
-767
lines changed

data/tables/copilot/model-release-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
# xAI models
9595
- name: 'Grok Code Fast 1'
9696
provider: 'xAI'
97-
release_status: 'Public preview'
97+
release_status: 'GA'
9898
agent_mode: true
9999
ask_mode: true
100100
edit_mode: true

next.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ const config: NextConfig = {
2020
typescript: {
2121
ignoreBuildErrors: true,
2222
},
23-
eslint: {
24-
ignoreDuringBuilds: true,
25-
},
23+
2624
i18n: {
2725
locales: languageKeys,
2826
defaultLocale: 'en',
@@ -49,6 +47,10 @@ const config: NextConfig = {
4947
}
5048
})
5149
},
50+
// Turbopack is the default bundler in Next.js 16
51+
// Keep webpack config for now to support both bundlers
52+
turbopack: {},
53+
5254
webpack: (webpackConfig) => {
5355
webpackConfig.experiments = webpackConfig.experiments || {}
5456
webpackConfig.experiments.topLevelAwait = true

package-lock.json

Lines changed: 542 additions & 531 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"all-documents": "tsx src/content-render/scripts/all-documents/cli.ts",
1717
"analyze-text": "tsx src/search/scripts/analyze-text.ts",
1818
"analyze-comment": "tsx src/events/scripts/analyze-comment-cli.ts",
19-
"build": "next build",
19+
"build": "next build --webpack",
2020
"check-content-type": "tsx src/workflows/check-content-type.ts",
2121
"check-github-github-links": "tsx src/links/scripts/check-github-github-links.ts",
2222
"clone-translations": "./src/languages/scripts/clone-translations.sh",
@@ -161,7 +161,7 @@
161161
"@primer/live-region-element": "^0.7.2",
162162
"@primer/octicons": "^19.19.0",
163163
"@primer/octicons-react": "^19.14.0",
164-
"@primer/react": "^37.31.0",
164+
"@primer/react": "^38.0.0",
165165
"accept-language-parser": "^1.5.0",
166166
"ajv": "^8.17.1",
167167
"ajv-errors": "^3.0.0",
@@ -210,7 +210,7 @@
210210
"mdast-util-to-hast": "^13.2.0",
211211
"mdast-util-to-markdown": "2.1.2",
212212
"mdast-util-to-string": "^4.0.0",
213-
"next": "^15.4.7",
213+
"next": "^16.0.1",
214214
"ora": "^9.0.0",
215215
"parse5": "7.1.2",
216216
"quick-lru": "7.0.1",
@@ -316,7 +316,7 @@
316316
"typescript": "^5.8.3",
317317
"unist-util-remove": "^4.0.0",
318318
"unist-util-visit-parents": "6.0.1",
319-
"vitest": "^3.1.2",
319+
"vitest": "^4.0.4",
320320
"website-scraper": "^5.3.1"
321321
},
322322
"overrides": {

src/data-directory/lib/data-schemas/index.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ function loadTableSchemas(): DataSchemas {
2222
const schemaPath = path.join(schemasDir, `${name}.ts`)
2323

2424
if (fs.existsSync(schemaPath)) {
25-
tableSchemas[`data/tables/${yamlFile}`] = `@/data-directory/lib/data-schemas/tables/${name}`
25+
// Use relative path from test file for vitest 4.x compatibility with dynamic imports
26+
tableSchemas[`data/tables/${yamlFile}`] = `../lib/data-schemas/tables/${name}.ts`
2627
}
2728
}
2829
}
@@ -31,14 +32,15 @@ function loadTableSchemas(): DataSchemas {
3132
}
3233

3334
// Manual schema registrations for non-table data
35+
// Use relative paths from the test file for vitest 4.x compatibility with dynamic imports
3436
const manualSchemas: DataSchemas = {
35-
'data/features': '@/data-directory/lib/data-schemas/features',
36-
'data/variables': '@/data-directory/lib/data-schemas/variables',
37-
'data/learning-tracks': '@/data-directory/lib/data-schemas/learning-tracks',
38-
'data/release-notes': '@/data-directory/lib/data-schemas/release-notes',
39-
'data/code-languages.yml': '@/data-directory/lib/data-schemas/code-languages',
40-
'data/glossaries/candidates.yml': '@/data-directory/lib/data-schemas/glossaries-candidates',
41-
'data/glossaries/external.yml': '@/data-directory/lib/data-schemas/glossaries-external',
37+
'data/features': '../lib/data-schemas/features.ts',
38+
'data/variables': '../lib/data-schemas/variables.ts',
39+
'data/learning-tracks': '../lib/data-schemas/learning-tracks.ts',
40+
'data/release-notes': '../lib/data-schemas/release-notes.ts',
41+
'data/code-languages.yml': '../lib/data-schemas/code-languages.ts',
42+
'data/glossaries/candidates.yml': '../lib/data-schemas/glossaries-candidates.ts',
43+
'data/glossaries/external.yml': '../lib/data-schemas/glossaries-external.ts',
4244
}
4345

4446
// Combine manual registrations with auto-discovered table schemas

src/events/lib/analyze-comment.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ import { cuss } from 'cuss'
44
import { cuss as cussPt } from 'cuss/pt'
55
import { cuss as cussFr } from 'cuss/fr'
66
import { cuss as cussEs } from 'cuss/es'
7-
import { Language } from '@horizon-rs/language-guesser'
7+
let language: any = null
88

9-
const language = new Language()
9+
async function getLanguageInstance() {
10+
if (!language) {
11+
const { Language } = await import('@horizon-rs/language-guesser')
12+
language = new Language()
13+
}
14+
return language
15+
}
1016

1117
// Exported for the debugging CLI script
1218
export const SIGNAL_RATINGS = [
@@ -48,8 +54,8 @@ export const SIGNAL_RATINGS = [
4854
{
4955
reduction: 0.2,
5056
name: 'not-language',
51-
validator: (comment: string, commentLanguage: string) =>
52-
isNotLanguage(comment, commentLanguage),
57+
validator: async (comment: string, commentLanguage: string) =>
58+
await isNotLanguage(comment, commentLanguage),
5359
},
5460
{
5561
reduction: 0.3,
@@ -80,7 +86,8 @@ export async function getGuessedLanguage(comment: string) {
8086
return
8187
}
8288

83-
const bestGuess = language.guessBest(comment.trim(), [])
89+
const lang = await getLanguageInstance()
90+
const bestGuess = lang.guessBest(comment.trim(), [])
8491
if (!bestGuess) return // Can happen if the text is just whitespace
8592
// // @horizon-rs/language-guesser is based on tri-grams and can lead
8693
// // to false positives. For example, it thinks that 'Thamk you ❤️🙏' is
@@ -98,7 +105,7 @@ export async function analyzeComment(text: string, commentLanguage = 'en') {
98105
const signals = []
99106
let rating = 1.0
100107
for (const { reduction, name, validator } of SIGNAL_RATINGS) {
101-
if (validator(text, commentLanguage)) {
108+
if (await validator(text, commentLanguage)) {
102109
signals.push(name)
103110
rating -= reduction
104111
}
@@ -153,8 +160,9 @@ function isSingleWord(text: string) {
153160
return whitespaceSplit.length === 1
154161
}
155162

156-
function isNotLanguage(text: string, language_: string) {
157-
const bestGuess = language.guessBest(text.trim(), [])
163+
async function isNotLanguage(text: string, language_: string) {
164+
const lang = await getLanguageInstance()
165+
const bestGuess = lang.guessBest(text.trim(), [])
158166
if (!bestGuess) return true // Can happen if the text is just whitespace
159167
// @horizon-rs/language-guesser is based on tri-grams and can lead
160168
// to false positives. For example, it thinks that 'Thamk you ❤️🙏' is

src/frame/components/article/ArticleGridLayout.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import cx from 'classnames'
3-
import { Box } from '@primer/react'
43
import { SupportPortalVaIframe, SupportPortalVaIframeProps } from './SupportPortalVaIframe'
54

65
import styles from './ArticleGridLayout.module.scss'
@@ -26,32 +25,31 @@ export const ArticleGridLayout = ({
2625
const containerBoxStyles = fullWidth ? '' : styles.containerBox
2726
return (
2827
<div className={cx(containerBoxStyles, className)}>
29-
{topper && <Box gridArea="topper">{topper}</Box>}
28+
{topper && <div style={{ gridArea: 'topper' }}>{topper}</div>}
3029
{intro && (
31-
<Box id="article-intro" gridArea="intro" className="f4 pb-4">
30+
<div id="article-intro" style={{ gridArea: 'intro' }} className="f4 pb-4">
3231
{intro}
33-
</Box>
32+
</div>
3433
)}
3534

3635
{toc && (
37-
<Box
36+
<div
3837
data-container="toc"
39-
gridArea="sidebar"
40-
alignSelf="flex-start"
38+
style={{ gridArea: 'sidebar', alignSelf: 'flex-start' }}
4139
className={cx(styles.sidebarBox, 'border-bottom border-lg-0 pb-4 mb-5 pb-xl-0 mb-xl-0')}
4240
>
4341
{toc}
44-
</Box>
42+
</div>
4543
)}
4644

47-
<Box data-container="article" gridArea="content" data-search="article-body">
45+
<div data-container="article" style={{ gridArea: 'content' }} data-search="article-body">
4846
{supportPortalVaIframeProps &&
4947
supportPortalVaIframeProps.supportPortalUrl &&
5048
supportPortalVaIframeProps.vaFlowUrlParameter && (
5149
<SupportPortalVaIframe supportPortalVaIframeProps={supportPortalVaIframeProps} />
5250
)}
5351
{children}
54-
</Box>
52+
</div>
5553
</div>
5654
)
5755
}

src/frame/components/article/ArticleInlineLayout.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import cx from 'classnames'
3-
import { Box } from '@primer/react'
43
import { SupportPortalVaIframe, SupportPortalVaIframeProps } from './SupportPortalVaIframe'
54

65
import styles from './ArticleInlineLayout.module.scss'
@@ -28,39 +27,41 @@ export const ArticleInlineLayout = ({
2827
return (
2928
<div className={cx(styles.containerBox, className)}>
3029
{breadcrumbs && (
31-
<Box gridArea="breadcrumbs" className={cx('d-none d-xxl-block mt-3 mr-auto width-full')}>
30+
<div
31+
style={{ gridArea: 'breadcrumbs' }}
32+
className={cx('d-none d-xxl-block mt-3 mr-auto width-full')}
33+
>
3234
{breadcrumbs}
33-
</Box>
35+
</div>
3436
)}
3537
<div className={cx(styles.contentBox)}>
36-
{topper && <Box gridArea="topper">{topper}</Box>}
38+
{topper && <div style={{ gridArea: 'topper' }}>{topper}</div>}
3739

3840
{intro && (
39-
<Box id="article-intro" gridArea="intro" className="f4">
41+
<div id="article-intro" style={{ gridArea: 'intro' }} className="f4">
4042
{intro}
41-
</Box>
43+
</div>
4244
)}
4345

4446
{introCallOuts && (
45-
<Box gridArea="intro" className="f4 mb-4">
47+
<div style={{ gridArea: 'intro' }} className="f4 mb-4">
4648
{introCallOuts}
47-
</Box>
49+
</div>
4850
)}
4951

5052
{toc && (
51-
<Box
53+
<div
5254
data-container="toc"
53-
gridArea="sidebar"
54-
alignSelf="flex-start"
55+
style={{ gridArea: 'sidebar', alignSelf: 'flex-start' }}
5556
className={cx(styles.sidebarBox, 'border-bottom border-lg-0 pb-4 mb-5 pb-xl-0 mb-xl-0')}
5657
>
5758
{toc}
58-
</Box>
59+
</div>
5960
)}
6061

61-
<Box
62+
<div
6263
data-container="article"
63-
gridArea="content"
64+
style={{ gridArea: 'content' }}
6465
data-search="article-body"
6566
className={cx(styles.articleContainer, className)}
6667
>
@@ -70,7 +71,7 @@ export const ArticleInlineLayout = ({
7071
<SupportPortalVaIframe supportPortalVaIframeProps={supportPortalVaIframeProps} />
7172
)}
7273
{children}
73-
</Box>
74+
</div>
7475
</div>
7576
</div>
7677
)

src/graphql/scripts/utils/process-schemas.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,17 +401,17 @@ export default async function processSchemas(
401401
returnField.kind = fieldKind
402402
returnField.href = helpers.getFullLink(returnField.kind, returnField.id)
403403
returnField.description = await helpers.getDescription(
404-
field.description?.value || '',
404+
returnFieldDef.description?.value || '',
405405
)
406406
returnField.isDeprecated = helpers.getDeprecationStatus(
407-
(field.directives || []) as readonly ConstDirectiveNode[],
407+
(returnFieldDef.directives || []) as readonly ConstDirectiveNode[],
408408
)
409409
returnField.deprecationReason = await helpers.getDeprecationReason(
410-
(field.directives || []) as readonly ConstDirectiveNode[],
410+
(returnFieldDef.directives || []) as readonly ConstDirectiveNode[],
411411
returnField as ReturnFieldInfo,
412412
)
413413
returnField.preview = await helpers.getPreview(
414-
(field.directives || []) as readonly ConstDirectiveNode[],
414+
(returnFieldDef.directives || []) as readonly ConstDirectiveNode[],
415415
returnField as ReturnFieldInfo,
416416
previewsPerVersion,
417417
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.topicsList {
2+
list-style-type: none;
3+
}
4+
5+
.label {
6+
margin-right: 0.25rem;
7+
}

0 commit comments

Comments
 (0)