Repository navigation
chore(infima): add the @docusaurus/infima package, compiled from the Infima sources - #13082
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
ae00f72 to
0645040
Compare
eb8fb7b to
fe31ed5
Compare
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
…Infima sources Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… build plugins Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of the sources Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b532216 to
05f9368
Compare
Motivation
Infima is dormant (last release
0.2.0-alpha.45), and only@docusaurus/theme-classicuses it. We move it into the monorepo as an implementation detail of the classic theme, published as@docusaurus/infima.This is PR 2 of a stack:
/infima, as the Argos baseline.@docusaurus/infima, keeping its current RTL logic (it loads the pre-flipped Infima RTL file, and its rtlcss plugin skips it). It must show no Argos diff.What the package contains:
styles/: the.pcsssources of the upstream repo at commit87bc1dbf, with their license headers. They are byte-identical to thestyles/folder of the publishedinfima@0.2.0-alpha.45. No git history import: the README links the pinned commit. The unuseddefault-darktheme and itsvariables-dark.pcssare left out.scripts/build.mjs: inlines the upstreampostcss-preset-infima(same plugins, same order, sametransitionmixin) and its gulptransformStylesand RTL tasks. It only compiles the default theme, todist/infima.css, and flips it withrtlcsstodist/infima-rtl.css, as upstream did withgulp-rtlcss: no.min, dark or JS files.postcss-css-variables, listed by the upstream preset but never used, is left out.package.json:exportslimited to./infima.css,./infima-rtl.cssand./package.json,files: ["dist"],sideEffects: ["*.css"]. The PostCSS plugins andrtlcssare devDependencies: the package ships only the compiled CSS.Dependency versions
The plugins use the versions of the upstream lockfile at the
0.2.0-alpha.45release commit, incatalog:dev, exceptpostcss, which uses the default catalog (^8.5.28).postcss-preset-envneeds v7: the catalog's^11changes the output (the expandedsystem-uifont stack, extra-webkit-text-decorationdeclarations, thearea[href]fallback of:any-link), which would show in Argos. A package can't be in both catalogs, so v7 is thepostcss-preset-env-v7npm alias, like the existingreact-helmet-asyncalias.The old plugins didn't hit
trustPolicy: no-downgrade: no exclusion needed.postcss-each,postcss-for,postcss-color-mod-functionand theirpostcss-simple-vars/postcss-values-parserdependencies depend on postcss 5 to 7, which Dependency Review flags (sourceMappingURL file disclosure, ReDoS…). Apostcss: ^8.5.28pnpm override, matching the catalog, makes them use postcss 8: it doesn't affect other packages, which already use 8.5.28. The output stays equivalent, but the build logs apostcss.plugin was deprecatedwarning per old plugin.Tooling
.pcssfiles stay unlinted, as.stylelintignoreonly lets*.cssthrough. They're the vendored upstream sources: the current config reports ~225 errors, mostly stylistic rules whose fixes (modern color and media range notations…) would change the output.dist/is ignored.styles/is ignored. oxfmt can't parse thepostcss-forinterpolations (h$(size) {), breaks thepostcss-nested-ancestorssyntax (^^&→^^ &) and rewraps custom property values, which changes the output.infima.cssandinfima-rtl.cssas text snapshots, in a separateinfimaArgos build, to catch any unexpected output change (like a dependency bump). They live outsidewebsite/build, and pointing the existingtext-snapshotsupload at another folder would rename all its snapshots. The first run has no baseline:maingets one once this PR is merged.autoprefixer(from/* autoprefixer: ignore next */comments) andnocaret(thedropdown--nocaretclass).Open questions
@docusaurus/infimapublish may need npm org permissions for the publishing account/token.ignorefor them? It needs one entry per package, since Dependabot only supports*wildcards.Test Plan
dist/infima.cssanddist/infima-rtl.cssare equivalent to the publishedinfima/dist/css/default/default.cssanddefault-rtl.css, with whitespace-only differences:diff -w -Bprint nothing. The LTR files also give the same output once minified with lightningcss, and the same PostCSS AST once the noderawsare stripped.diffs only remove blank lines. postcss 8.5.19 ("Fixed cleaningbeforefor new nodes inserted toRoot") changed how raws are stringified. Before the postcss override, the build withpostcss@8.5.18or the upstream8.4.41was byte-identical to the published file.Sample of the whitespace-only diff
/* Common */ - /**pnpm build:packagesbuilds the package through lerna, andpnpm packonly containsdist/infima.css,dist/infima-rtl.css,package.json,README.mdandLICENSE.The
infimaArgos build shows both files as new snapshots.Test links
Deploy preview: https://deploy-preview-13082--docusaurus-2.netlify.app/
Nothing changes on the site: no package uses
@docusaurus/infimayet.🤖 Generated with Claude Code
Summary by CodeRabbit