Update the copied Starlight components
With hyper: true, starlight-aurora replaces two Starlight components with
copies that add hyper: ThemeProvider and ThemeSelect.
components/upstream.json records the Starlight version that they came from
and a SHA-256 hash of each upstream file.
CI runs npm run check:upstream on each pull request and each week. It
downloads the newest Starlight release and fails when either file differs from
the recorded hash:
@astrojs/starlight 0.43.0 changed, since 0.42.6: dist/components/ThemeSelect.astro.Procedure
Section titled “Procedure”-
Install the new Starlight release in a clone of starlight-aurora:
Terminal window npm --prefix docs install @astrojs/starlight@0.43.0 -
Compare the upstream files with the copies:
Terminal window diff docs/node_modules/@astrojs/starlight/dist/components/ThemeSelect.astro components/ThemeSelect.astrodiff docs/node_modules/@astrojs/starlight/dist/components/ThemeProvider.astro components/ThemeProvider.astro -
Put the upstream changes into the copies. Keep the hyper parts: the
hypervalue, thesyncCodefunction, and the order Light, Dark, Hyper, Auto. -
Write the new version and the new hashes into
components/upstream.json:Terminal window shasum -a 256 docs/node_modules/@astrojs/starlight/dist/components/ThemeProvider.astro docs/node_modules/@astrojs/starlight/dist/components/ThemeSelect.astro -
Check the result:
Terminal window npm run check:upstreamnpm run docs:build && npm run docs:check -
Open a pull request, and release a new version of starlight-aurora.