Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .agents/skills/dependencies/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: Add, remove or upgrade npm dependencies in the Docusaurus monorepo.

## Catalogs

All the monorepo dependencies are declared in the [pnpm catalogs](https://pnpm.io/catalogs) of `pnpm-workspace.yaml`. Packages reference them with the catalog protocol instead of a version range:
All the monorepo dependencies are declared in the [pnpm catalogs](https://pnpm.io/catalogs) of `pnpm-catalogs.yaml`, which `pnpm-workspace.yaml` [includes](https://pnpm.io/config-includes). Packages reference them with the catalog protocol instead of a version range:

- `"catalog:"`: the default catalog, for dependencies used at runtime by at least one package (`dependencies`, `optionalDependencies` or `peerDependencies`).
- `"catalog:dev"`: the dev catalog, for dependencies only used as `devDependencies`.
Expand Down
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"package.json",
"pnpm-lock.yaml",
"pnpm-workspace.yaml",
"pnpm-catalogs.yaml",
"yarn.lock",
"project-words.txt",
"__snapshots__",
Expand Down
15 changes: 8 additions & 7 deletions admin/scripts/lintCatalogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/

// Checks the content of the pnpm catalogs of pnpm-workspace.yaml.
// Checks the content of the pnpm catalogs of pnpm-catalogs.yaml.
// Syncpack checks that dependencies use the catalogs, but it can't compare
// catalog entries with each other, nor with the explicit versions of the
// site templates and pnpm overrides, which can't use catalogs.
Expand Down Expand Up @@ -66,12 +66,13 @@ async function main() {
/** @returns {Promise<Monorepo>} */
async function loadMonorepo() {
const workspace = await readYaml('pnpm-workspace.yaml');
const catalogsFile = await readYaml('pnpm-catalogs.yaml');
const dependabot = await readYaml('.github/dependabot.yml');

return {
catalogs: {
default: workspace.catalog ?? {},
dev: workspace.catalogs?.dev ?? {},
default: catalogsFile.catalog ?? {},
dev: catalogsFile.catalogs?.dev ?? {},
},
overrides: workspace.overrides ?? {},
packages: await loadPackages([
Expand Down Expand Up @@ -123,7 +124,7 @@ function checkUnusedCatalogEntries({catalogs, packages}) {
.filter((name) => !usedNames.has(name))
.map(
(name) =>
`pnpm-workspace.yaml: ${name} isn't used by any package, remove it from the catalog`,
`pnpm-catalogs.yaml: ${name} isn't used by any package, remove it from the catalog`,
);
}

Expand Down Expand Up @@ -165,14 +166,14 @@ function checkCatalogsSplit({catalogs, packages}) {
.filter((name) => usedNames.has(name) && !runtimeDependencyNames.has(name))
.map(
(name) =>
`pnpm-workspace.yaml: ${name} is only used by devDependencies, move it to the dev catalog`,
`pnpm-catalogs.yaml: ${name} is only used by devDependencies, move it to the dev catalog`,
);

const inBothCatalogs = Object.keys(catalogs.dev)
.filter((name) => name in catalogs.default)
.map(
(name) =>
`pnpm-workspace.yaml: ${name} is declared in both the default and dev catalogs`,
`pnpm-catalogs.yaml: ${name} is declared in both the default and dev catalogs`,
);

return [
Expand Down Expand Up @@ -248,7 +249,7 @@ function checkDependencyGroups({catalogs, dependencyGroups}) {
? 'the same major version'
: 'the same version';
return [
`pnpm-workspace.yaml: the packages of the "${group.name}" Dependabot group must use ${expectedVersion}: ${membersDescription}`,
`pnpm-catalogs.yaml: the packages of the "${group.name}" Dependabot group must use ${expectedVersion}: ${membersDescription}`,
];
});
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@
"vite": "catalog:dev",
"vitest": "catalog:dev"
},
"packageManager": "pnpm@12.3.4",
"packageManager": "pnpm@12.15.0",
"engines": {
"node": ">=24.21",
"pnpm": ">=12.3.4"
"pnpm": ">=12.15.0"
}
}
219 changes: 219 additions & 0 deletions pnpm-catalogs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# Versions of all the monorepo dependencies, referenced with the catalog: protocol
# Dependencies used at runtime by at least one package
catalog:
'@11ty/gray-matter': ^3.0.0
'@algolia/autocomplete-core': ^1.19.10
'@argos-ci/cli': ^6.9.2
'@argos-ci/playwright': ^7.5.0
'@babel/core': ^7.29.7
'@babel/generator': ^7.29.8
'@babel/plugin-transform-runtime': ^7.29.7
'@babel/preset-env': ^7.29.7
'@babel/preset-react': ^7.29.7
'@babel/preset-typescript': ^7.29.7
'@babel/runtime': ^7.29.7
'@babel/traverse': ^7.29.8
'@crowdin/crowdin-api-client': ^1.57.0
'@docsearch/react': ^4.7.0
'@docusaurus/responsive-loader': ^1.7.1
'@mdx-js/mdx': ^3.1.1
'@mdx-js/react': ^3.1.1
'@playwright/test': ^1.63.0
'@rsdoctor/core': ^2.0.0
'@rsdoctor/webpack-plugin': ^1.6.3
'@rspack/core': ^2.3.0
'@rspack/dev-server': ^2.2.2
'@slorber/remark-comment': ^1.0.0
'@svgr/webpack': ^8.1.0
'@swc/core': ^1.16.2
'@swc/html': ^1.16.2
'@types/history': ^4.7.11
'@types/mdast': ^4.0.4
'@types/react': ^19.3.0
'@types/react-dom': ^19.3.0
'@types/react-router-config': ^5.0.11
'@types/react-router-dom': ^5.3.3
'@typescript-eslint/types': ^8.71.0
'@typescript-eslint/utils': ^8.71.0
'@vercel/analytics': ^2.0.1
algoliasearch: ^5.57.0
algoliasearch-helper: ^3.29.3
astring: ^1.9.0
babel-loader: ^10.1.1
babel-plugin-dynamic-import-node: ^2.3.3
boxen: ^9.0.0
browserslist: ^4.29.0
cheerio: ^1.2.0
chokidar: ^3.6.0
cli-table3: ^0.6.5
clsx: ^2.1.1
color: ^4.2.3
combine-promises: ^1.2.0
commander: ^15.0.0
copy-text-to-clipboard: ^3.2.2
cross-spawn: ^7.0.6
css-loader: ^7.1.5
detect-port: ^2.1.0
escape-html: ^1.0.3
estree-util-value-to-estree: ^3.5.0
eta: ^4.6.0
execa: ^10.0.1
feed: ^6.0.0
github-slugger: ^2.0.0
hast-util-to-estree: ^3.1.3
html-tags: ^5.1.0
image-size: ^2.0.4
infima: 0.2.0-alpha.45
jimp: ^1.6.1
jiti: ^2.7.0
joi: ^18.2.8
js-yaml: ^5.4.1
leven: ^4.1.0
lightningcss: ^1.33.0
lodash: ^4.18.1
mdast-util-directive: 3.1.1
mdast-util-mdx: ^3.0.0
mdast-util-to-string: ^4.0.0
mermaid: ^12.0.0
micromatch: ^4.0.8
mini-css-extract-plugin: ^2.10.2
minimizer-webpack-plugin: ^5.13.0
netlify-plugin-cache: ^1.0.3
npm-to-yarn: ^3.2.0
nprogress: ^0.2.0
open: ^11.0.2
oxfmt: ^0.74.0
p-map: ^7.0.8
p-queue: ^9.3.3
parse-numeric-range: ^1.3.0
postcss: ^8.5.28
postcss-loader: ^8.2.1
postcss-preset-env: ^11.5.2
prism-react-renderer: ^2.4.1
prismjs: ^1.30.0
prompts: ^2.4.2
raw-loader: ^4.0.2
react: ^19.3.0
react-dom: ^19.3.0
react-helmet-async: npm:@slorber/react-helmet-async@1.3.0
react-json-view-lite: ^2.5.0
react-lite-youtube-embed: ^3.7.0
react-live: ^5.0.0
react-loadable: npm:@docusaurus/react-loadable@6.0.0
react-loadable-ssr-addon-v5-slorber: ^1.0.3
react-medium-image-zoom: ^5.4.9
react-router: ^5.3.4
react-router-config: ^5.1.1
react-router-dom: ^5.3.4
recma-mdx-displayname: ^0.4.1
rehype-katex: ^7.0.1
rehype-raw: ^7.0.0
remark-directive: ^4.0.0
remark-emoji: ^5.0.2
remark-frontmatter: ^5.0.0
remark-gfm: ^4.0.1
remark-math: ^6.0.0
remark-mdx: ^3.1.1
resolve-pathname: ^3.0.0
rtlcss: ^4.3.0
schema-dts: ^1.1.5
semver: ^7.8.5
serve-handler: ^6.1.7
sharp: ^0.35.1
sitemap: ^9.0.1
srcset: ^5.0.3
stylelint: ^17.15.0
tinyglobby: ^0.2.17
tinypool: ^2.1.2
tslib: ^2.8.1
unified: ^11.0.5
unist-util-visit: ^5.1.0
update-notifier: ^7.3.1
utility-types: ^3.11.0
vfile: ^6.0.3
webpack: ^5.111.0
webpack-dev-server: ^6.0.0
webpack-merge: ^6.0.1
webpackbar: ^7.0.0
workbox-build: ^7.4.1
workbox-precaching: ^7.4.1
workbox-routing: ^7.4.1
workbox-strategies: ^7.4.1
workbox-window: ^7.4.1
xml-formatter: ^3.7.0

# Dependencies only used for development (devDependencies)
catalogs:
dev:
'@ai-sdk/react': ^3.0.280
'@crowdin/cli': ^5.0.2
'@eslint/js': ^10.0.1
'@svgr/core': ^8.1.0
'@svgr/plugin-jsx': ^8.1.0
'@svgr/plugin-svgo': ^8.1.0
'@testing-library/dom': ^10.4.1
'@testing-library/jest-dom': ^7.0.1
'@testing-library/react': ^16.3.3
'@total-typescript/shoehorn': ^0.1.2
'@types/babel__core': ^7.20.5
'@types/babel__generator': ^7.27.0
'@types/babel__traverse': ^7.28.0
'@types/color': ^3.0.7
'@types/cross-spawn': ^6.0.6
'@types/escape-html': ^1.0.4
'@types/estree': ^1.0.9
'@types/hast': ^3.0.5
'@types/lodash': ^4.17.25
'@types/micromatch': ^4.0.10
'@types/node': ^26.6.1
'@types/nprogress': ^0.2.3
'@types/picomatch': ^2.3.4
'@types/prismjs': ^1.26.6
'@types/prompts': ^2.4.9
'@types/rtlcss': ^3.5.4
'@types/semver': ^7.8.0
'@types/serve-handler': ^6.1.4
'@types/unist': ^3.0.3
'@types/update-notifier': ^6.0.8
'@types/webpack-env': ^1.18.8
'@typescript-eslint/rule-tester': ^8.71.0
'@vitejs/plugin-react': ^6.1.1
'@vitest/eslint-plugin': ^1.6.27
cross-env: ^10.1.0
cspell: ^10.3.3
dedent: ^1.7.2
eslint: ^9.39.5
eslint-config-prettier: ^10.1.8
eslint-plugin-eslint-plugin: ^7.6.2
eslint-plugin-header: ^3.1.1
eslint-plugin-import: ^2.32.0
eslint-plugin-jsx-a11y: ^6.10.2
eslint-plugin-react: ^7.37.5
eslint-plugin-react-hooks: ^7.1.1
eslint-plugin-react-you-might-not-need-an-effect: ^1.0.2
eslint-plugin-regexp: ^3.3.0
globals: ^17.12.0
husky: ^9.1.7
jest-serializer-ansi-escapes: ^5.0.0
jest-serializer-react-helmet-async: ^1.0.21
jsdom: ^30.1.0
knip: ^6.36.0
lerna: ^10.0.1
lerna-changelog: ^2.2.0
lint-staged: ^17.5.0
npm-run-all2: ^9.0.3
picomatch: ^2.3.2
pkg-pr-new: ^0.0.75
rehype-stringify: ^10.0.1
remark: ^15.0.1
remark-rehype: ^11.1.2
rimraf: ^6.1.3
search-insights: ^2.17.3
stylelint-config-standard: ^40.0.0
syncpack: ^15.3.3
to-vfile: ^8.0.0
tree-node-cli: ^3.0.0
typescript-eslint: ^8.71.0
unist-builder: ^4.0.0
vite: ^8.2.2
vitest: ^5.0.0
Loading
Loading