Skip to content

Conversation

@JeremyVoisin
Copy link
Collaborator

snyk-top-banner

Snyk has created this PR to upgrade @astrojs/starlight from 0.14.0 to 0.32.1.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 74 versions ahead of your current version.

  • The recommended version was released a month ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
medium severity Improper Input Validation
SNYK-JS-NANOID-8492085
529 No Known Exploit
medium severity Cross-site Scripting (XSS)
SNYK-JS-PAGEFIND-7886960
529 No Known Exploit
medium severity Cross-site Scripting (XSS)
SNYK-JS-PAGEFINDDEFAULTUI-7886963
529 No Known Exploit
medium severity Improper Input Validation
SNYK-JS-POSTCSS-5926692
529 No Known Exploit
Release notes
Package name: @astrojs/starlight
  • 0.32.1 - 2025-02-19

    Patch Changes

  • 0.32.0 - 2025-02-15

    Minor Changes

    • #2390 f493361 Thanks @ delucis! - Moves route data to Astro.locals instead of passing it down via component props

      ⚠️ Breaking change:
      Previously, all of Starlight’s templating components, including user or plugin overrides, had access to a data object for the current route via Astro.props.
      This data is now available as Astro.locals.starlightRoute instead.

      To update, refactor any component overrides you have:

      • Remove imports of @ astrojs/starlight/props, which is now deprecated.
      • Update code that accesses Astro.props to use Astro.locals.starlightRoute instead.
      • Remove any spreading of {...Astro.props} into child components, which is no longer required.

      In the following example, a custom override for Starlight’s LastUpdated component is updated for the new style:

      ---
      import Default from '@ astrojs/starlight/components/LastUpdated.astro';
      - import type { Props } from '@ astrojs/starlight/props';

    - const { lastUpdated } = Astro.props;
    + const { lastUpdated } = Astro.locals.starlightRoute;

    const updatedThisYear = lastUpdated?.getFullYear() === new Date().getFullYear();
    ---

    {updatedThisYear && (
    - <Default {...Astro.props}><slot /></Default>
    + <Default><slot /></Default>
    )}

    Community Starlight plugins may also need to be manually updated to work with Starlight 0.32. If you encounter any issues, please reach out to the plugin author to see if it is a known issue or if an updated version is being worked on.

  • #2578 f895f75 Thanks @ HiDeoo! - Deprecates the Starlight plugin setup hook in favor of the new config:setup hook which provides the same functionality.

    ⚠️ BREAKING CHANGE:

    The Starlight plugin setup hook is now deprecated and will be removed in a future release. Please update your plugins to use the new config:setup hook instead.

    export default {
      name: 'plugin-with-translations',
      hooks: {
    -   'setup'({ config }) {
    +   'config:setup'({ config }) {
          // Your plugin configuration setup code
        },
      },
    };
  • #2578 f895f75 Thanks @ HiDeoo! - Exposes the built-in localization system in the Starlight plugin config:setup hook.

    ⚠️ BREAKING CHANGE:

    This addition changes how Starlight plugins add or update translation strings used in Starlight’s localization APIs.
    Plugins previously using the injectTranslations() callback function from the plugin config:setup hook should now use the same function available in the i18n:setup hook.

    export default {
      name: 'plugin-with-translations',
      hooks: {
    -   'config:setup'({ injectTranslations }) {
    +   'i18n:setup'({ injectTranslations }) {
          injectTranslations({
            en: {
              'myPlugin.doThing': 'Do the thing',
            },
            fr: {
              'myPlugin.doThing': 'Faire le truc',
            },
          });
        },
      },
    };
  • #2858 2df9d05 Thanks @ XREvo! - Adds support for Pagefind’s multisite search features

  • #2578 f895f75 Thanks @ HiDeoo! - Adds a new HookParameters utility type to get the type of a plugin hook’s arguments.

  • #2578 f895f75 Thanks @ HiDeoo! - Adds a new useTranslations() callback function to the Starlight plugin config:setup hook to generate a utility function to access UI strings for a given language.

  • #2578 f895f75 Thanks @ HiDeoo! - Adds a new absolutePathToLang() callback function to the Starlight plugin config:setup to get the language for a given absolute file path.

Patch Changes

  • 0.31.1 - 2025-01-17

    Patch Changes

  • 0.31.0 - 2025-01-13

    Minor Changes

    • #2777 88f4214 Thanks @ hippotastic! - Updates astro-expressive-code dependency to the latest version (0.40).

      This includes an update to the latest Shiki version (1.26.1), providing access to all current Shiki themes and syntax highlighting languages, and adding the config options shiki.engine, shiki.bundledLangs, shiki.langAlias and removeUnusedThemes. It also adds new style variants to the optional collapsible sections plugin.

      See the Expressive Code release notes for full details.

    • #2736 29a885b Thanks @ delucis! - ⚠️ BREAKING CHANGE: The minimum supported version of Astro is now 5.1.5

      Please update Astro and Starlight together:

      npx @ astrojs/upgrade
    • #2728 e187383 Thanks @ delucis! - Updates minimum Pagefind dependency to v1.3.0, sets new defaults for Pagefind’s ranking options, and adds support for manually configuring the ranking options

      The new ranking option defaults have been evaluated against Starlight’s own docs to improve the quality of search results. See “Customize Pagefind's result ranking” for more details about how they work.

    • #157 23bf960 Thanks @ tony-sull! - Adds a print stylesheet to improve the appearance of Starlight docs pages when printed

    • #2728 e187383 Thanks @ delucis! - Fixes Pagefind logging to respect the Astro log level. When using Astro’s --verbose or --silent CLI flags, these are now respected by Pagefind as well.

    Patch Changes

    • #2792 412effb Thanks @ dhruvkb! - Uses semantic var(--sl-color-hairline) for the page sidebar border instead of var(--sl-color-gray-6). This is visually the same as previously but makes it easier to override the hairline color consistently across a site.

    • #2736 29a885b Thanks @ delucis! - Updates internal dependencies @ astrojs/sitemap and @ astrojs/mdx to the latest versions

    • #2782 d9d415b Thanks @ delucis! - Fixes a documentation link in the JSDoc comment for the StarlightExpressiveCodeOptions type

    • #2708 442c819 Thanks @ delucis! - Fixes colour contrast correction in code blocks

  • 0.30.6 - 2025-01-10

    Patch Changes

  • 0.30.5 - 2025-01-07
  • 0.30.4 - 2025-01-06
  • 0.30.3 - 2024-12-19
  • 0.30.2 - 2024-12-16
  • 0.30.1 - 2024-12-14
  • 0.30.0 - 2024-12-13
  • 0.29.3 - 2024-12-11
  • 0.29.2 - 2024-11-19
  • 0.29.1 - 2024-11-19
  • 0.29.0 - 2024-11-08
  • 0.28.6 - 2024-11-04
  • 0.28.5 - 2024-11-01
  • 0.28.4 - 2024-10-28
  • 0.28.3 - 2024-10-07
  • 0.28.2 - 2024-09-19
  • 0.28.1 - 2024-09-18
  • 0.28.0 - 2024-09-18
  • 0.27.1 - 2024-09-08
  • 0.27.0 - 2024-09-06
  • 0.26.4 - 2024-09-06
  • 0.26.3 - 2024-09-04
  • 0.26.2 - 2024-09-02
  • 0.26.1 - 2024-08-16
  • 0.26.0 - 2024-08-16
  • 0.25.5 - 2024-08-13
  • 0.25.4 - 2024-08-06
  • 0.25.3 - 2024-07-29
  • 0.25.2 - 2024-07-23
  • 0.25.1 - 2024-07-10
  • 0.25.0 - 2024-07-05
  • 0.24.5 - 2024-06-28
  • 0.24.4 - 2024-06-20
  • 0.24.3 - 2024-06-18
  • 0.24.2 - 2024-06-12
  • 0.24.1 - 2024-06-09
  • 0.24.0 - 2024-06-05
  • 0.23.4 - 2024-06-05
  • 0.23.3 - 2024-06-04
  • 0.23.2 - 2024-05-28
  • 0.23.1 - 2024-05-18
  • 0.23.0 - 2024-05-17
  • 0.22.4 - 2024-05-16
  • 0.22.3 - 2024-05-14
  • 0.22.2 - 2024-05-06
  • 0.22.1 - 2024-05-01
  • 0.22.0 - 2024-04-30
  • 0.21.5 - 2024-04-09
  • 0.21.4 - 2024-04-05
  • 0.21.3 - 2024-04-01
  • 0.21.2 - 2024-03-20
  • 0.21.1 - 2024-03-04
  • 0.21.0 - 2024-03-01
  • 0.20.1 - 2024-02-24
  • 0.20.0 - 2024-02-23
  • 0.19.1 - 2024-02-20
  • 0.19.0 - 2024-02-16
  • 0.18.1 - 2024-02-14
  • 0.18.0 - 2024-02-09
  • 0.17.4 - 2024-02-08
  • 0.17.3 - 2024-02-06
  • 0.17.2 - 2024-01-31
  • 0.17.1 - 2024-01-29
  • 0.17.0 - 2024-01-26
  • 0.16.0 - 2024-01-19
  • 0.15.4 - 2024-01-17
  • 0.15.3 - 2024-01-09
  • 0.15.2 - 2024-01-02
  • 0.15.1 - 2023-12-18
  • 0.15.0 - 2023-12-06
  • 0.14.0 - 2023-11-29
  • from @astrojs/starlight GitHub release notes

    Important

    • Check the changes in this PR to ensure they won't cause issues with your project.
    • This PR was automatically created by Snyk using the credentials of a real user.
    • Max score is 1000. Note that the real score may have changed since the PR was raised.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    Snyk has created this PR to upgrade @astrojs/starlight from 0.14.0 to 0.32.1.
    
    See this package in npm:
    @astrojs/starlight
    
    See this project in Snyk:
    https://app.snyk.io/org/jeremyvoisin/project/c0080801-1e85-42b8-a1b7-3da286cee8e0?utm_source=github&utm_medium=referral&page=upgrade-pr
    @sonarqubecloud
    Copy link

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants