Skip to content

Commit 712bcbb

Browse files
authored
feat: enable faster Docusaurus builds and clarify beta rollback (#443)
## Summary - enable Docusaurus Faster with the required v4 compatibility flag and lockfile updates - fix the repo TypeScript/editor issues that surfaced while validating the config change - clarify the 7.3.0-beta.2 rollback guidance for TPM/internal boot users and update AGENTS.md so full builds are allowed when explicitly requested ## Validation - pnpm exec tsc --noEmit - pnpm run build ## Build notes - the full build now passes - Docusaurus still emits existing content warnings for broken links, broken anchors, and nested HTML tags in docs content across locales - Docusaurus also warns that `siteConfig.onBrokenMarkdownLinks` is deprecated and that `babel.config.js` can be removed when using the SWC loader <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated rollback guidance with more flexible recovery options for recent releases. * Clarified repository validation directives. * **Chores** * Enabled build performance optimizations and faster bundling. * Updated TypeScript configuration for improved type checking. * Added dependency to support optimized build processes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 6b3ba7c commit 712bcbb

9 files changed

Lines changed: 770 additions & 243 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
## Validation
44

5-
- Never validate changes in this repo by running the full build.
5+
- Do not validate changes in this repo by running the full build unless the user explicitly asks for it.
66
- The build is intentionally considered too expensive and inefficient for routine validation.
77
- Prefer targeted verification instead, such as reviewing the changed files, running narrow checks relevant to the edit, or using lightweight local validation where available.

docs/unraid-os/release-notes/7.3.0.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ See [Unraid OS Prerelease (Bugs & Feedback)](https://product.unraid.net/b/unraid
1818

1919
### Rolling back
2020

21-
- Once you enable internal boot or switch to TPM-based licensing, you cannot roll back to an earlier release.
21+
- If you already enabled internal boot or switched to TPM-based licensing while testing the 7.3 prerelease, you can roll back to `7.3.0-beta.1` without issue.
22+
- Do not roll back to `7.2.4` or earlier after enabling internal boot or TPM-based licensing.
2223
- If you upgrade ZFS pool features, earlier Unraid releases may not be able to import those pools.
2324
- If you need to roll back, follow the normal prerelease rollback process before moving between builds.
2425

25-
If rolling back earlier than 7.2.4, also see the [7.2.4 release notes](/unraid-os/release-notes/7.2.4/).
26+
If you are considering any rollback path below `7.3.0-beta.1`, also see the [7.2.4 release notes](/unraid-os/release-notes/7.2.4/).
2627

2728
## Changes vs. 7.3.0-beta.1
2829

docusaurus.config.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@ const config: Config = {
7676
defaultLocale: DEFAULT_LOCALE,
7777
locales: ["en", "es", "fr", "de", "zh"],
7878
},
79+
future: {
80+
v4: {
81+
removeLegacyPostBuildHeadAttribute: true,
82+
},
83+
experimental_faster: {
84+
swcJsLoader: true,
85+
swcJsMinimizer: true,
86+
swcHtmlMinimizer: true,
87+
lightningCssMinimizer: true,
88+
mdxCrossCompilerCache: true,
89+
rspackBundler: true,
90+
rspackPersistentCache: true,
91+
ssgWorkerThreads: true,
92+
},
93+
},
7994
scripts: [
8095
{
8196
src: "/js/redirects.js",
@@ -430,7 +445,7 @@ const config: Config = {
430445
},
431446
{
432447
from: "/unraid-os/faq/redeem-license-activation-code/",
433-
to: "/unraid-account/redeem-activation-code/",
448+
to: "/unraid-account/redeem-activation-code/",
434449
},
435450
{
436451
from: "/unraid-os/faq/unraid-account/",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"dependencies": {
2929
"@crowdin/cli": "^4.14.0",
3030
"@docusaurus/core": "3.9.2",
31+
"@docusaurus/faster": "3.9.2",
3132
"@docusaurus/plugin-client-redirects": "^3.9.2",
3233
"@docusaurus/plugin-content-docs": "3.9.2",
3334
"@docusaurus/plugin-ideal-image": "^3.9.2",

pnpm-lock.yaml

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

sidebar-semver-sort.d.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
declare module "./sidebar-semver-sort.js" {
2-
// Use the Docusaurus SidebarItem type when available so TypeScript understands
3-
// the shape of the items passed into the sorter.
4-
import type { SidebarItem } from "@docusaurus/plugin-content-docs";
1+
import type { SidebarItem } from "@docusaurus/plugin-content-docs";
52

6-
/**
7-
* Sorts the array of sidebar items. The implementation may return categories
8-
* (with nested items) or a flat list depending on the sortBySemver flag.
9-
*/
10-
export function sortSidebarItems(
11-
items: SidebarItem[],
12-
sortBySemver?: boolean
13-
): SidebarItem[];
14-
15-
export {};
16-
}
3+
export function sortSidebarItems(
4+
items: SidebarItem[],
5+
sortBySemver?: boolean,
6+
): SidebarItem[];

src/components/HomepageFeatures/index.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import React from 'react';
2-
import clsx from 'clsx';
3-
import styles from './styles.module.css';
1+
import React from "react";
2+
import clsx from "clsx";
3+
import styles from "./styles.module.css";
44

55
type FeatureItem = {
66
title: string;
7-
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
8-
description: JSX.Element;
7+
Svg: React.ComponentType<React.ComponentProps<"svg">>;
8+
description: React.ReactNode;
99
};
1010

1111
const FeatureList: FeatureItem[] = [
1212
{
13-
title: 'Easy to Use',
14-
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
13+
title: "Easy to Use",
14+
Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default,
1515
description: (
1616
<>
1717
Docusaurus was designed from the ground up to be easily installed and
@@ -20,8 +20,8 @@ const FeatureList: FeatureItem[] = [
2020
),
2121
},
2222
{
23-
title: 'Focus on What Matters',
24-
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
23+
title: "Focus on What Matters",
24+
Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default,
2525
description: (
2626
<>
2727
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
@@ -30,8 +30,8 @@ const FeatureList: FeatureItem[] = [
3030
),
3131
},
3232
{
33-
title: 'Powered by React',
34-
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
33+
title: "Powered by React",
34+
Svg: require("@site/static/img/undraw_docusaurus_react.svg").default,
3535
description: (
3636
<>
3737
Extend or customize your website layout by reusing React. Docusaurus can
@@ -41,9 +41,9 @@ const FeatureList: FeatureItem[] = [
4141
},
4242
];
4343

44-
function Feature({title, Svg, description}: FeatureItem) {
44+
function Feature({ title, Svg, description }: FeatureItem) {
4545
return (
46-
<div className={clsx('col col--4')}>
46+
<div className={clsx("col col--4")}>
4747
<div className="text--center">
4848
<Svg className={styles.featureSvg} role="img" />
4949
</div>
@@ -55,7 +55,7 @@ function Feature({title, Svg, description}: FeatureItem) {
5555
);
5656
}
5757

58-
export default function HomepageFeatures(): JSX.Element {
58+
export default function HomepageFeatures(): React.JSX.Element {
5959
return (
6060
<section className={styles.features}>
6161
<div className="container">

src/types/react-augmentations.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import "react";
2+
3+
declare module "react" {
4+
interface IframeHTMLAttributes<T> {
5+
credentialless?: boolean;
6+
}
7+
}

tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
// This file is not used in compilation. It is here just for a nice editor experience.
33
"extends": "@tsconfig/docusaurus/tsconfig.json",
44
"compilerOptions": {
5-
"baseUrl": "."
5+
"baseUrl": ".",
6+
"jsx": "react-jsx",
7+
"types": [
8+
"node",
9+
"react",
10+
"@docusaurus/module-type-aliases",
11+
"@docusaurus/theme-classic"
12+
]
613
}
714
}

0 commit comments

Comments
 (0)