AstroEco is Contributing…
Example: Displaying GitHub pull requests using astro-loader-github-prs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.31.1
Patch Changes
- #2805
ed6f9fd
Thanks @HiDeoo! - Exposes theStarlightIcon
TypeScript type referencing the names of Starlight’s built-in icons.
Changes
Currently vite-plugin-import-meta-env
injects a runtime into any file that includes the string import.meta.env
, which enables the use of env vars. Unfortunately this meant it also did this to non-source files such as JSON, CSS and HTML files that include that string. This caused performance issues like #12999, but could also break builds entirely in some cases where the asset wasn't transformed to JS.
This PR filters the file types more comprehensively.
Fixes #12999
Testing
Adds test cases
Docs
This PR updates the Vitest version used in the monorepo to version 3.0.1
and unpins us from the 2.1.6
version.
Changes
- Fixes #12993
- Previously, the logic for calculating whether the image is above (below) the flow depends on
window.scrollY
- This will not work when the body element is not scrollable/ not the scrolling container (i.e.
window.scrollY
always 0) - The fix calculates the actual y position by adding
offsetTop
value of the target element itself and all the offest parent(s) - The fix is proposed by @hfournier in #10891
Testing
No tests are added (manual testing is done locally), as I am not familiar with playwright and the fix is trivial. Please help me to add some tests if it is necessary.
Docs
Docs update should not be necessary.
Changes
Helps with #12824 (not complete fix yet, needs to check cloudflare adapter support)
Removes the ssr.external
config as it's forcing them to be externalized even in builds for cloudflare where all dependencies should be bundled by default. (This is a similar change to #10601)
Testing
Existing tests should pass.
Docs
n/a. bug fix.
Changes
- Currently, we resolve the actions config to
${srcDir}/actions
. That meanssrc/actions.ts
is valid, just likesrc/actions/index.ts
. However, typegen was harcoding${srcDir}/actions/index.ts
. This PR updates the types to let TS figure out what file to resolve
Testing
Should still pass
Docs
N/A
Changes
When the trailingSlash
option is set to always
or never
, on-demand rendered pages will now redirect to the correct URL when the trailing slash is incorrect. This was previously the case for static pages, but now works for on-demand pages as well. There are some exceptions:
- when the request matches a static path or file, it is not redirected
- when
trailingSlash
isignore
then it is not redirected - when the request looks like it is for a file, it is not redirected, even if there is no matching file. e.g. a request for a nonexistent
/favicon.ico
will not redirect to/favicon.ico/
- requests for paths starting with
/_
with not redirect, because these are usually special internal paths
In dev we don't redirect so it's more obvious that a link is incorrect. Instead I have updated the 404 page to give a bit more information if there's a trailing slash mismatch, and suggest goign to the version with the correct slash:
Fixes #12532
Fixes #12833
Fixes #11575
Testing
Added a big test suite. Refer to it for more examples.
Docs
This will need docs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.1.8
Patch Changes
-
#12990
2e12f1d
Thanks @ascorbic! - Fixes a bug that caused references to be incorrectly reported as invalid -
#12984
2d259cf
Thanks @ascorbic! - Fixes a bug in dev where files would stop being watched if the Astro config file was edited -
#12984
2d259cf
Thanks @ascorbic! - Fixes a bug where the content layer would use an outdated version of the Astro config if it was edited in dev -
#12982
429aa75
Thanks @bluwy! - Fixes an issue where server islands do not work in projects that use an adapter but only have prerendered pages. If an adapter is added, the server island endpoint will now be added by default. -
#12995
78fd73a
Thanks @florian-lefebvre! - Fixes a case whereastro:actions
types would not work when usingsrc/actions.ts
-
#12733
bbf1d88
Thanks @ascorbic! - Fixes a bug that caused the dev server to return an error if requesting "//" -
#13001
627aec3
Thanks @ascorbic! - Fixes a bug that caused Astro to attempt to inject environment variables into non-source files, causing performance problems and broken builds
@astrojs/react@4.1.6
Patch Changes
Changes
Currently we attempt to validate references in schemas by checking the referenced entry exists. This causes a problem if a new referenced entry is added at the same time as the reference is added, because there can be a race condition where the referenced entry has not yet been added to the store when the reference is validated.
This PR removes that check. This is OK (and we already skip validation if the collection doesn't exist yet) because we also validate at runtime.
Testing
Adds a test
Docs
Changes
- Documentation on
AriaAttributes
type - Added all new roles to
AriaRole
type - Added missing roles from 1.1
command
,composite
,input
,landmark
,range
,roletype
,section
,sectionhead
,select
,structure
,widget
,window
Testing
No relevant tests
Docs
No existing mentions of either in the docs
Changes
- In a long session you might navigate between several pages, some contain the script and some not, but nevertheless the script should run a total of 1 time.
- This also helps with smaller bundled scripts in production, where some are inlined.
- Keeps track of scripts that have run, either by the src or by the inner text (for inline scripts) and uses that as a key, rather than the data attribute we previously adde.
Testing
- Updated the existing tests to navigate between more pages.
Docs
N/A, bug fix.
Changes
This PR makes a number of changes to the way that file watchers work in dev with the content layer. There have been a few bugs related to the way that dev server restarts are handled, which were due to the way we were handling file watchers.
When the Astro config is edited, it restarts the dev container to ensure the site is using the latest config. This was causing several bugs:
- when the server was restarted, it wasn't re-running the Astro sync. This meant that updates in the config were not reflected in the rendered config, for example changes to Markdown config wouldn't update the rendered content.
- the existing watcher was destroyed, but because the loaders weren't being re-run, the glob and file event listeners weren't being attached to the new watcher.
This PR correctly passes in the watcher, but has to handle various implications of this:
- it needs to ensure that the content layer is recreated when the server is restarted, otherwise it will use the old config even when it syncs the content. This fixes #12700
- it needs to detach the event listeners that the previous loader run added. We can't clear them all, because this is a shared watcher instance. To handle this, we now wrap the watcher with a Proxy that keeps track of which listeners were attached by the content layer, so they can be removed if the content layer is refreshed or disposed of. Fixes #12976
- it needs to ensure that the files themselves are still being watched, so it now manually adds them to the watcher rather than relying on them still being watched
Testing
Added new test cases
Docs
Changes
fix #12803
Summary of issue:
- Server islands work using endpoints.
- It's added if Astro detects a page is being server-rendered, or if pages are configured to server-render by default (
output: "server"
). - However, if the project happens to not set
output
(defaults to"static"
), and all pages insrc/pages
are statically built (noexport const prerender = false
), then because of no2, the server island endpoints will not be added. - As a result, the build output is missing the
/_server-islands/
handling and fails in the browser.
This PR:
- Fixes the issue by adding the server islands endpoint whenever it detects an adapter is being used. Should not be a problem for server-based adapters, but for static-based adapters, I believe it's still ok as they can specify in
adapterFeaturs.buildOutput: 'static'
and Astro will error that server islands won't work if they're used after building.
Testing
This one is a bit hard to write a test for, but I've updated some existing tests to match this new behaviour, and also manually ran the test in the adapters repo against this PR. It affects one Cloudflare test, but IIUC it's not breaking anything and should only require updating the code/test there to refine the output only. (This specific test)
Docs
n/a. bug fix.
Description
As discussed on Discord, this PR exposes a new TypeScript type for built-in icon names: StarlightIcon
. This type is a union of all built-in icon names.
When building an Astro component accepting an icon name, you could already use the ComponentProps<typeof Icon>['name']
approach, but importing the Astro component in a TypeScript file, which could also use ESLint with TypeScript type-aware rules, is not trivial.
A common use case is for example a plugin defining its configuration through a Zod schema where an icon name is required. This can now be validated as a string but still provide autocompletion and type checking for the end user using icon: z.string() as z.Schema<StarlightIcon>
.
Regarding the documentation change, I think I did the maximum number of changes so it's easy to remove some of them if there are not judged required or good.
Description
The PR adds a link to the starlight-to-pdf cli tool for converting Starlight into PDF into the Plugins and Integrations page, Community tools and integrations
section.
A solution to the following discussion: Export docs to PDF #964.
Description
- Support control over opening links in the current tab or a new tab (applies to links from Markdown/MDX
[]()
syntax and theLink
component) - Support with custom cursor or indicator icon for new tab links (applies to links from Markdown/MDX
[]()
syntax) - Update
rehype-external-links
config - Update
BaseLayout
to toggle--external-link-cursor
on body
Changes
Closes PLT-2745
This PR adds support for external directs in the redirects
configuration:
- Added a new error in case the user specify a URL that doesn't start with
http://
orhttps://
or the URL isn't parsable - No special handling for patterns. Astro can't know if the external an Astro site, so it's virtually impossible to handle route patterns e.g.
[...slug]
,[slug]
- No particular handling inside
underscore-redirects
(apart from tiny refactors)
Testing
Added new tests
Docs
/cc @withastro/maintainers-docs for feedback!
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.1.7
Patch Changes
-
#12361
3d89e62
Thanks @LunaticMuch! - Upgrades theesbuild
version to matchvite
-
#12980
1a026af
Thanks @florian-lefebvre! - Fixes a case where setting the status of a page to404
in development would show the default 404 page (or custom one if provided) instead of using the current page -
#12182
c30070b
Thanks @braden-w! - Improves matching of 404 and 500 routes -
Updated dependencies [
3d89e62
]:- @astrojs/markdown-remark@6.0.2
@astrojs/markdoc@0.12.6
Patch Changes
-
#12361
3d89e62
Thanks @LunaticMuch! - Upgrades theesbuild
version to matchvite
-
#12967
0ef1613
Thanks @bluwy! - Fixes rendering components when thenodes.document.render
Markdoc config is set tonull
-
Updated dependencies [
3d89e62
]:- @astrojs/markdown-remark@6.0.2
@astrojs/mdx@4.0.6
Patch Changes
- Updated dependencies [
3d89e62
]:- @astrojs/markdown-remark@6.0.2
@astrojs/preact@4.0.2
Patch Changes
- #12887
ea603ae
Thanks @louisescher! - Adds a warning message when multiple JSX-based UI frameworks are being used without either theinclude
orexclude
property being set on the integration.
@astrojs/react@4.1.5
Patch Changes
- #12887
ea603ae
Thanks @louisescher! - Adds a warning message when multiple JSX-based UI frameworks are being used without either theinclude
orexclude
property being set on the integration.
@astrojs/solid-js@5.0.3
Patch Changes
- #12887
ea603ae
Thanks @louisescher! - Adds a warning message when multiple JSX-based UI frameworks are being used without either theinclude
orexclude
property being set on the integration.
@astrojs/vue@5.0.5
Patch Changes
- #12887
ea603ae
Thanks @louisescher! - Adds a warning message when multiple JSX-based UI frameworks are being used without either theinclude
orexclude
property being set on the integration.
@astrojs/markdown-remark@6.0.2
Patch Changes
- #12361
3d89e62
Thanks @LunaticMuch! - Upgrades theesbuild
version to matchvite
Description
Updates EC version again, updating the existing changeset to reflect the latest update.
Description
- Closes #2790
- This PR updates the right sidebar to use the semantic color name (
--sl-color-hairline
) instead of an absolute color name (--sl-color-gray-6
). - This means that when a theme customises the hairline colors, the right sidebar will be automatically use that.
Description
- In several places in our documentation we were still linking to Expressive Code README documents on GitHub that predated the full https://expressive-code.com docs site (and mostly no longer contain the same content as it moved to the website).
- This PR fixes those links to point to relevant parts of the EC documentation site instead.
Description
- This PR adds links to some recent content about Starlight to the community content page
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.31.0
Minor Changes
-
#2777
88f4214
Thanks @hippotastic! - Updatesastro-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
andremoveUnusedThemes
. 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.5Please 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 optionsThe 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 semanticvar(--sl-color-hairline)
for the page sidebar border instead ofvar(--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 theStarlightExpressiveCodeOptions
type -
#2708
442c819
Thanks @delucis! - Fixes colour contrast correction in code blocks
Changes
fix #12964
It seems like renderTreeNodeToFactoryResult
shouldn't be calling itself, but it should re-create the ComponentNode
entirely as it handles nested component rendering. Same as how the const slots
are constructed below the updated code.
Testing
Added a new test
Docs
n/a. bug fix
Changes
While the glob loader handles deleting or renaming a file, it didn't previously handle the scenario where a slug was changed inside a file. This PR ensures that the old entry is deleted.
Fixes #12668
Testing
Adds new test cases
Docs
Changes
Add test for #12959. I couldn't figure out a fix for the react hook error at the meantime so I'm adding the test only for now.
Testing
This adds tests
Docs
n/a
Changes
- Fixed the React invalid hook call warning when using MDX and React integrations together in Astro.
- Updated the
check
function to correctly render React components usingjsx
andrenderJSX
, ensuring hooks are called within the proper context. - Removed the direct component invocation (
Component({...})
), which was causing React hooks to break. - Ensured compatibility with both React and MDX components without needing to import React.
Testing
- Manually tested by navigating between routes to confirm the React hook warning no longer appears.
- Verified that both React and MDX components render correctly with dynamic props and slots.
- No automated tests added since this is primarily a runtime integration fix, but manual checks cover the issue.
Docs
- No documentation updates required since this change is internal and does not affect public APIs.
Changes
When data has changed in the content layer, the data store needs to write several different files, including the data store itself, asset imports (e.g. images) and module imports (e.g. mdx). These are all in the module graph, so will trigger HMR if changed. #12751 reported that when editing MDX it would reload twice, and the second time would take a long time for large sites. The double reload was because there was initially HMR from the changed MDX module itself. The slow second reload was because it was writing the big imports file itself too, causing Vite to re-parse the whole big graph. This isn't needed, because the imports file itself hasn't changed, just the file it was referring to.
This PR changes the write function to first check the old file content before writing, and skip if it is unchanged.
This does not stop the double-reload in the example. The first update is instant, and is the HMR for the mdx module itself. The second is a full refresh, which is triggered by the data store changing. This in unavoidable, because the data has changed, and may need a full page refresh because we don't know how it's been used. What has been fixed though is that this is much faster, because the big imports file has not been invalidated so I'm going to count this as a fix.
Fixes #12751
Testing
Docs
Description
Personally - having some experience with translating the docs - I think that creating .mdx
files immediately, instead of renaming later (because often md files end up having to be mdx files because of components) has the benefit for translators, that the changes are better traceable. That's the first reason for this PR.
The second reason is more relatable for the maintainers probably: I think that the new route-data guide should use the Step component instead of having just the numbered list...
I also found a reasonable place in the route-data reference for a component: the slug
could have a badge label somewhere. Here I think the change to a .mdx
file is not that necessary because the Badge doesn't need to be there, further discussion maybe?
Description
-
Updates
astro-expressive-code
dependency to the latest version (0.39).This includes an update to the latest Shiki version (1.26.1), providing access to all current Shiki themes and syntax highlighting languages. It also adds the config options
shiki.engine
,shiki.bundledLangs
,shiki.langAlias
andremoveUnusedThemes
. See the Expressive Code release notes for full details.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.1.6
Patch Changes
-
#12956
3aff68a
Thanks @kaytwo! - Removes encryption of empty props to allow server island cacheability -
#12977
80067c0
Thanks @florian-lefebvre! - Fixes a case where accessingastro:env
APIs orimport.meta.env
inside the content config file would not work -
#12839
57be349
Thanks @mtwilliams-code! - Fix Astro.currentLocale returning the incorrect locale when using fallback rewrites in SSR mode -
#12962
4b7a2ce
Thanks @ascorbic! - Skips updating content layer files if content is unchanged -
#12942
f00c2dd
Thanks @liruifengv! - Improves the session error messages -
#12966
d864e09
Thanks @ascorbic! - Ensures old content collection entry is deleted if a markdown frontmatter slug is changed in dev
@astrojs/react@4.1.4
Patch Changes
- #12923
c7642fb
Thanks @bluwy! - Removes react-specific entrypoints inoptimizeDeps.include
and rely on@vitejs/plugin-react
to add
@astrojs/solid-js@5.0.2
Patch Changes
@astrojs/upgrade@0.4.3
Patch Changes
Changes
This change removes the encryption of {}
in the case of a server island with no props. Fixes #12949.
Testing
Added two tests: one test that ensures components with props keep getting them re-encrypted, and one where components without props don't have an empty encryption passed through to them.
Docs
Nominally a bugfix, brings the docs mention of caching in line with reality.
Changes
I missed the "blocking" attribute of the <link>
element.
Added it. Came across missing "disabled" attribute. Added that, too.
Started sorting, but did not complete, because I haven't found "charset" at MDN.
Testing
n/a
Docs
n/a
Improvements of the changeset are welcome as always.
Changes
The content layer data store is created in a different location according to whether it is running in dev or build, so that it is either cachable or watchable by the fs watcher. These are mutually exclusive for Reasons.
This needs to be the same locaiton for both writing (during sync) and reading (during runtime). Unfortunately knowing which of these we're running is not as simple as it could be, and there have been some bugs that have emerged due to conflicts.
We'd mostly fixed these cases in #12640, but it missed the case where dev was run programatically with NODE_ENV set to something other than development (mostly in a test environment).
Rather than playing whackamole for all of these scenarios, this PR changes the approach so that it never uses NODE_ENV, and always explicitly sets it. Either this is done via the command used (build and sync use production, dev uses development) or at runtime uses Vite's env.command (build uses production, serve uses development). This involved some refactoring around how files are handled by data stores (which was overdue, because it was needlessly complex as it was created when there were different requirements)
Fixes #12652
Testing
Added some tests to the astro mode suite, which helpfully messes around with these options.
Docs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.1.5
Patch Changes
-
#12934
673a518
Thanks @ematipico! - Fixes a regression where the Astro Container didn't work during the build, usingpnpm
-
#12955
db447f2
Thanks @martrapp! - Lets TypeScript know about the "blocking" and "disabled" attributes of the<link>
element. -
#12922
faf74af
Thanks @adamchal! - Improves performance of static asset generation by fixing a bug that caused image transforms to be performed serially. This fix ensures that processing uses all CPUs when running in a multi-core environment. -
#12947
3c2292f
Thanks @ascorbic! - Fixes a bug that caused empty content collections when running dev with NODE_ENV set
@astrojs/markdoc@0.12.5
Patch Changes
@astrojs/mdx@4.0.5
Patch Changes
- #12959
3a267f3
Thanks @bluwy! - Reverts 9a3b48c which caused a regression for rendering inline MDX components and MDX files from content collections
@astrojs/react@4.1.3
Patch Changes
Changes
The Starlog example was missing a viewport
meta tag, which was causing issues on mobile devices (media queries not working properly):
Adding a default one fixes the issue:
Note: I haven't included achangeset as it was said they're not needed for examples.
Testing
By emulating mobile device on Chrome (Toggle device toolbar in dev tools) and on a personal website 🙂
No tests added as this is an example template.
Docs
No updates or changes required - it affects only Starlog example users on mobile devices.
Changes
This is another fix in the saga of data store race conditions. When we changed the dev fs watcher to not start watching the data store file until after the content layer sync was complete, it was meanign that in some scenarios, newly-created data store files were not triggering a module reload. This PR adds a manual module invalidation at the same time as adding the file to the watcher.
Fixes #12866
Testing
This can't be reproduced when using pnpm (for some unclear reason), but I have manually tested it with the #12866 repro, using npm.
Docs
Changes
Closes #12931
Closes PLT-2736
The issue was that doing oldRequest.headers
during a rewrite was causing the warning to fire, because it triggers the .get
method.
This is fixed now by checking the isPrerendered
flag.
Also, I updated the method copyRequest
to use the internal method copyRequest
, which creates the headers
object based on isPrenredererd
. This should fix cases (not caught, probably) where users could have used Request.headers
during a rewrite.
Testing
I tested it locally using the reproduction provided.
Docs
N/A
Changes
- pass the original locals data to the render function of 404 pages
- fixing #12821 (applies to all type of contexts for 404 pages, not only cloudflare)
Docs
- no doc update required because this is probably expected behavior
Changes
Closes #12669
Closes PLT-2733
The main issue was that the astro container runtime was pulling vite
code, which is a forbidden behaviour. I managed, somehow, to understand that the code that was pulling vite
code was coming from manifest/create.ts
, so one of its modules (or modules of modules) was imported, eventually importing a runtime vite
function.
Unfortunately, I couldn't understand what's the culprit, so instead, I decided to move the functions needed by the container into two separate files.
Also, I tried to remove any occurrence of normalizePath
from vite
, and used our internal version, which is the same. That should reduce these mistakes in the future.
Testing
I used the production provided, which I didn't build. Now it builds
Docs
N/A
Changes
Fix #11656
The core of the issue is that sometimes Markdoc AST may return arrays within arrays (in node.children
), e.g. in if tags, content within the if tag are grouped as an array. This PR handles that and refactors the rendering code slightly.
Testing
Added tests
Docs
n/a. bug fix
Changes
Fix biome correctness checks so CI doesn't show them
Testing
n/a
Docs
n/a
Changes
Closes PLT-2724
Closes #12847
There are two issues:
- we decoded the pathname multiple times
- we didn't decode the pathname early in all the pipelines
I tracked down the issue and fixed, I also added some comments to help developers with the code.
Testing
Added a new test to cover the issue that we fixed
Docs
N/A
Changes
Store remote images in the cache as a standalone file instead of encoding the file as base64 inside of a json file.
- This improves the storage size of the image cache, as well as decreasing the performance overhead involved in encoding, decoding, reading and writing the base64 blob to a json file.
Automatically upgrade remote cached images to the new format.
- I've added some extra code to decode images in the old format and write them in the new format. This is optional - removing this section will cause the images to be re-downloaded instead of converted.
Testing
Ran pnpm run test:match "image"
Updated the 'has cache entries' test in core-image.test.js
as the change caused it to fail.
The test assumes that .webp.json
and .webp
files would each result in an output image, however after this change the cache contains two files per remote image leaving the test expecting duplicate outputs. The json files are no longer globbed and are ignored by this test.
Docs
This change should be transparent and not affect behaviour.
Changes
Responsive images need to include global styles, and currently these are being included even if responsive images are not enabled. This PR adds wrapper components that just add the styles to the main component, and conditionally export these according to whether the flag is enabled. This is temporary until the feature is unflagged.
Alongside #12921, this fixes #12868
Testing
Adds tests to ensure the styles aren't added to sites without the flag enabled. There are existing tests that check that they are added to pages that do have them enabled.
This also adds tests to the MDX integration that were needed for #12921 and are now possible. These check whether the styles are being applied to pages with no images.
Docs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.30.6
Patch Changes
Changes
- Closes PLT-2732
- Updates the API to accept routes from
astro:routes:resolved
and assets fromastro:build:done
- Doesn't use
config.output
as a fallback anymore
Testing
Updated, will need a preview release to test against the adapters repo
Docs
Undocumented, changeset
Changes
fix #12896
ref #12735 (revert)
- React:
@vitejs/plugin-react
will addoptimizeDeps.include
themselves - Vue: Added a comment of why we manually add
vue
tooptimizeDeps.include
- Solid: Different issue, but I noticed that we don't optimize
@astrojs/solid-js/client.js
by default like how the other integrations do.
I didn't do this for Preact as we're still pinning to an older version, but once we can update to the latest (tracked #12805), we can also do the same here for it.
Testing
Existing tests should pass
Docs
n/a. bug fix.
Description
This PR adds the translate
attribute to the header site title to indicates that the element must not be translated.
Although not all browsers recognize this attribute, it is respected by automatic translation systems such as Google Translate, and may also be respected by tools used by human translators. As such it's important that web authors use this attribute to mark content that should not be translated.
For example, commenting the logo
configuration option in the Astro config of the Starlight Docs and asking Google Translate to translate the English version of the website to French will result in the following:
After this PR, the header site title will no longer be translated:
Changes
Improve static asset generation performance by removing the await
in the for
loop. This change will allow the p-queue concurrency to limit the number of parallel tasks. Previously, the await
in the for
loop would cause all asset generation tasks to run serially.
core/build/generate.ts:
for (const [originalPath, transforms] of staticImageList) {
- await generateImagesForPath(originalPath, transforms, assetsCreationPipeline, queue);
+ queue.add(() => generateImagesForPath(originalPath, transforms, assetsCreationPipeline));
}
await queue.onIdle();
- Do not
await
in thisfor
loop so that tasks can execute based on the p-queueconcurrency
. - Do not pass
queue
togenerateImagesForPath
.
assets/build/generate.ts:
for (const [_, transform] of transformsAndPath.transforms) {
- await queue.add(async () => generateImage(transform.finalPath, transform.transform));
+ await generateImage(transform.finalPath, transform.transform);
}
- Continue processing transforms for a single image serially.
- Do not
queue.add
here, prevents unintentional adding to the queue after we expect the queue to be completeawait queue.onIdle();
Fixes #12845
Design Decision:
We have 3 source images (A.png, B.png, C.png) and 3 transforms for each:
A1.png A2.png A3.png
B1.png B2.png B3.png
C1.png C2.png C3.png
Option 1
Enqueue all transforms indiscriminantly
|_A1.png |_B2.png |_C1.png
|_B3.png |_A2.png |_C3.png
|_C2.png |_A3.png |_B1.png
- Advantage: Maximum parallelism, saturate CPU
- Disadvantage: Spike in context switching
Option 2
Enqueue all transforms, but constrain processing order by source image
|_A3.png |_B1.png |_C2.png
|_A1.png |_B3.png |_C1.png
|_A2.png |_B2.png |_C3.png
- Advantage: Maximum parallelism, saturate CPU (same as Option 1) in hope to avoid context switching
- Disadvantage: Context switching still occurs and performance still suffers
Option 3
Enqueue each source image, but perform the transforms for that source image sequentially
\_A1.png \_B1.png \_C1.png
\_A2.png \_B2.png \_C2.png
\_A3.png \_B3.png \_C3.png
- Advantage: Less context switching
- Disadvantage: If you have a low number of source images with high number of transforms then this is suboptimal.
Best Option:
Option 3. Most projects will have a higher number of source images with a few transforms on each. Even though Option 2 should be faster and should prevent context switching, this was not observed in nascent tests. Context switching was high and the overall performance was half of Option 3.
If looking to optimize further, please consider the following:
- Avoid
queue.add()
in an async for loop. Notice theawait queue.onIdle();
after this loop. We do not want to create a scenario where tasks are added to the queue afterqueue.onIdle()
resolves. This can break tests and create annoying race conditions. - Exposing a concurrency property in
astro.config.mjs
to allow users to override Node’sos.cpus().length
default. - Create a proper performance benchmark for asset transformations of projects in varying sizes of source images and transforms.
Testing
No additional tests required.
Docs
Static asset generation performance should increase by os.cpus().length
in most Astro projects with assets.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.30.5
Patch Changes
Changes
Currently the rehype plugin checks if imagePaths
is defined when deciding whether to inject the Image
import. However since Astro 5, imagePaths
is always defined, so the import was always being injected. This PR changes it to check if the list is empty.
Testing
There's a separate issuue related to responsive images that makes this hard to test correctly right now. I'll add tests as part of that.
Docs
Description
As discussed on Discord, this PR adds new icons to the Starlight icon set:
left-carret
so we have all caret directionsup-arrow
anddown-arrow
so we have all arrow directionsdownload
andcloud-download
Ran all SVGs through SVGOMG to optimize them.
Changes
fix #12800
Process empty markdown content as remark or rehype plugins may add content or frontmatter that may be used by end-users.
Testing
Added a new test
Docs
n/a. bug fix
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/underscore-redirects@0.6.0
Minor Changes
-
#12924
3caa337
Thanks @florian-lefebvre! - Updates how the output is determined increateRedirectsFromAstroRoutes
. Sincev0.5.0
, the output would use thebuildOutput
property andconfig.output
as a fallback. It no longer uses this fallback. -
#12924
3caa337
Thanks @florian-lefebvre! - Updates the input requirements ofcreateRedirectsFromAstroRoutes
:routeToDynamicTargetMap
keys areIntegrationResolvedRoute
instead ofIntegrationRouteData
(obtained from theastro:routes:resolved
hook)- There's a new
assets
property, that can be obtained from theastro:build:done
hook
function myIntegration() { let routes; let buildOutput; let config; return { name: 'my-integration', hooks: { 'astro:routes:resolved': (params) => { routes = params.routes; }, 'astro:config:done': (params) => { buildOutput = params.buildOutput; config = params.config; }, 'astro:build:done': (params) => { const redirects = createRedirectsFromAstroRoutes({ config, buildOutput, routeToDynamicTargetMap: new Map(routes.map((route) => [route, ''])), dir: params.dir, assets: params.assets, }); }, }, }; }
astro@5.1.4
Patch Changes
-
#12927
ad2a752
Thanks @ematipico! - Fixes a bug where Astro attempted to decode a request URL multiple times, resulting in an unexpected behaviour when decoding the character%
-
#12912
0c0c66b
Thanks @florian-lefebvre! - Improves the config error for invalid combinations ofcontext
andaccess
properties underenv.schema
-
#12935
3d47e6b
Thanks @AirBorne04! - Fixes an issue whereAstro.locals
coming from an adapter weren't available in the404.astro
, when using theastro dev
command, -
#12925
44841fc
Thanks @ascorbic! - Ensures image styles are not imported unless experimental responsive images are enabled -
#12926
8e64bb7
Thanks @oliverlynch! - Improves remote image cache efficiency by separating image data and metadata into a binary and sidecar JSON file. -
#12920
8b9d530
Thanks @bluwy! - Processes markdown with empty body as remark and rehype plugins may add additional content or frontmatter -
#12918
fd12a26
Thanks @lameuler! - Fixes a bug where the logged output path does not match the actual output path when usingbuild.format: 'preserve'
-
#12676
2ffc0fc
Thanks @koyopro! - Allows configuring Astro modules TypeScript compilation with thevite.esbuild
config -
#12938
dbb04f3
Thanks @ascorbic! - Fixes a bug where content collections would sometimes appear empty when first running astro dev -
#12937
30edb6d
Thanks @ematipico! - Fixes a bug where users could useAstro.request.headers
during a rewrite inside prerendered routes. This an invalid behaviour, and now Astro will show a warning if this happens. -
#12937
30edb6d
Thanks @ematipico! - Fixes an issue where the use ofAstro.rewrite
would trigger the invalid use ofAstro.request.headers
@astrojs/mdx@4.0.4
Patch Changes
Description
- Closes withastro/docs#10630
This PR fixes an issue for languages with a region subtag (e.g. zh-CN
) where custom UI strings are not properly translated. On top of the linked issue, this issue is also visible in https://starlight.astro.build/zh-cn/components/asides/ where the component.preview
label shows "Preview" instead of "预览" even tho a translation exists (same page in the deploy preview link to compare and see the fix).
The issue is related to the fact that the loadTranslations()
function loading user translations was not properly updated for Astro v5 changes regarding the id
property, which means our userCollections
dictionary would contain an zh-cn
key instead of zh-CN
.
This PR fixes the issue by using the new filePath
property instead of the old id
property when not using legacy collections.
We had tests supposed to cover this, unfortunately, like I missed this spot during the Astro v5 migration, I also missed updating our mocking helper for dictionaries (mockDict()
) like I did for documents (mockDoc()
) so everything was passing even tho the issue was present.
Changes
- fixes #12910
- handle
build.format: 'preserve'
case when logging output path to ensure logged path actually paths the output path - previously the
getOutputFilename
util only did a check for'file'
build format, and otherwise always returned the path as if it was with'directory'
build format
Testing
change is just a logging change which was tested using one of the examples
Docs
no need for docs update
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.30.4
Patch Changes
-
#2747
474c27e
Thanks @bbag! - Ensures<Tab>
component toggling is stable when smooth scrolling is enabled via custom CSS -
#2740
0e169c9
Thanks @HiDeoo! - Fixes an issue preventing Pagefind to be disabled using thepagefind
frontmatter field. -
#2732
a10b466
Thanks @Sidnioulz! - Adds Storybook, Confluence and Jira social icons
Changes
fix #12802
Not completely fixing React 19 support yet, but I think a good step with other perf too.
Testing
Existing tests, especially mdx, should pass
Docs
n/a. refactor
Changes
- Improves the config error for invalid combinations of
context
andaccess
properties underenv.schema
Testing
Added test
Docs
N/A
Changes
- Closes #12901
- We only generate a reference instead of the stub, which was overriding the generated types in rare cases
Testing
Should pass
Docs
N/A
Description
- Support automatic highlighting of corresponding item in Toc based on user's browsing position
- Ref: #6
Changes
This PR improves the error messages for IDs in content collections.
IDs in content collections have always been required to be strings, however the error message when passing (for example) a number would look like this:
[ContentLoaderInvalidDataError] todos entry is missing an ID.
Entry missing ID:
{
"userId": 1,
"title": "delectus aut autem",
"completed": false
}
This would even be the case if the original entry looked like this:
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
}
This PR changes these error messages so that they throw a new and more verbose AstroError based on the Zod validation.
For this to work, the parsing logic had to be moved from the functions return type schema to an external schema, and the validation had to be moved into the simpleLoader
function itself due to performance issues with Zod when using z.function().returns(...)
.
Testing
The changes in this PR should be covered by the existing tests as no behavior has been added or changed.
Docs
/cc @withastro/maintainers-docs for feedback!
A docs PR has been made here
Changes
- Adds warnings to all common JSX renderer integrations if multiple known JSX renderer integrations are used at the same time. This is meant to combat the common mistake of not setting the
include
orexclude
options when using multiple UI frameworks together.
Testing
As this is just a warning printed to console, no tests have been added.
Docs
As this is just a warning printed to console, no docs have been added.
Changes
The generated astro:content
runtime includes a render
function, which has types that are created using typegen. However these types are missing from the stub types used before the first sync. This PR adds a stub declaration.
Fixes #12837
Testing
Tested a preview build. It's hard to test in the monorepo because it tends to find random content.d.ts
files scattered throughout the repo.
Docs
Changes
- Fixes #12881 by saving a clone of the set()'d object at time of set()
- Refactor unflatten and stringify so that the stringify check works for URL objects
I chose to use parse(stringify(value))
instead of anything like structuredClone
or trying to get fancy with the store to ensure correctness, the extra parse should not be a significant performance issue unless people start storing pathologically large session data.
Testing
Added a new test in sessions.test.js
that fails on main and succeeds on this branch.
That test could probably use a helper function to maintain a "cookie jar" for session, but I don't quite know the cleanest way to do that.
Docs
No update necessary, just a bugfix. However if the powers that be decide #12881 is wontfix
, the docs definitely need to be updated to remind users to clone their objects before calling set, or be careful with updating them after doing so.
Description
-
Closes: #2746
-
What does this PR change? Give us a brief description.
This ensures the scroll behavior will be instant as expected whenever clicking a synced tab triggers a window scroll, which fixes the odd "smooth scroll jump" on Starlight sites which usehtml { scroll-behavior: smooth; }
in their global CSS. This provides a nicer UX on sites which use smooth scrolling, where e.g. clicking an item in the ToC smooth scrolls to that section on the page, but clicking a new synced tab doesn't cause an awkward jump as it scrolls to the new tab's position. It should be a non-breaking change to existing Starlight sites since the default scroll behavior is already instant. 🙂 -
Did you change something visual? A before/after screenshot can be helpful.
Nope, just a tiny quality-of-life improvement for tabs on pages which use smooth scrolling!
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.1.3
Patch Changes
-
#12877
73a0788
Thanks @bluwy! - Fixes sourcemap warning generated by theastro:server-islands
Vite plugin -
#12906
2d89492
Thanks @ascorbic! - Fixes a bug that caused pages that return an empty array from getStaticPath to match every path -
011fa0f
Thanks @florian-lefebvre! - Fixes a case whereastro:content
types would be erased when restarting the dev server -
#12907
dbf1275
Thanks @florian-lefebvre! - Fixes a regression around the server islands route, which was not passed to the adaptersastro:build:done
hook -
#12818
579bd93
Thanks @ascorbic! - Fixes race condition where dev server would attempt to load collections before the content had loaded -
#12883
fbac92f
Thanks @kaytwo! - Fixes a bug where responses can be returned before session data is saved -
#12815
3acc654
Thanks @ericswpark! - Some non-index files that were incorrectly being treated as index files are now excluded -
#12884
d7e97a7
Thanks @ascorbic! - Addsrender()
to stub content types -
#12883
fbac92f
Thanks @kaytwo! - Fixes a bug where session data could be corrupted if it is changed after calling .set() -
#12827
7b5dc6f
Thanks @sinskiy! - Fixes an issue when crawlers try to index Server Islands thinking that Server Islands are pages
@astrojs/underscore-redirects@0.5.1
Patch Changes
- #12904
7fdbd43
Thanks @florian-lefebvre! - Fixes the type offorce
Changes
Fix sourcemap warning in server islands plugin
fix #12703
Testing
tested manually
Docs
n/a. bug fix
Changes
fix #12662
While it's still in beta, I think it's probably the best middleground to make the vitest template work ootb as its the main supported version that works with Vite 6.
Also this fixes the CI fail in main for the vitest example typecheck.
Testing
CI should pass. Also ran the test in with-vitest
manually and worked.
Docs
n/a
Changes
When emulating legacy collections, entries have extra fields applied, such as slug
and the render function. Currently getCollection
filter functions are being passed the non-emulated version of the entry. This PR ensures that the entry is the same one that is returned from the collection.
Fixes #12873
Testing
Added a test case
Docs
Changes
- What does this change?
Ensures that session IDs get regenerated when regenerate()
is called. This fixes #12863.
- Don't forget a changeset!
pnpm exec changeset
Testing
Built astro with this change locally and ran it against https://stackblitz.com/edit/github-muwk6ati-gxwf5xkb?file=src%2Fpages%2Findex.astro and it functions as expected (new uuid shown on every refresh).
Docs
Docs should not be needed - this aligns the code's functionality with the current docs.
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
htmlparser2 | ^9.1.0 -> ^10.0.0 |
Release Notes
fb55/htmlparser2 (htmlparser2)
v10.0.0
Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Changes
- Changed the frontmatter parsing in
@astrojs/markdown-remark
to accept TOML format - Uses
+++
as the delimiters - Doesn't require configuration
- If the TOML delimiters are used it will parse as TOML
- Otherwise defaults to YAML
Testing
Updated the frontmatter.test.js
file, adding TOML equivalent tests alongside the existing YAML tests. Worth noting that the TOML test run notably faster, owing to the faster parsing
Docs
This is certainly something that should be documented. It allows you to use TOML based frontmatter, which is particularly useful if migrating from Hugo or another system that preferred TOML and you don't want to convert potentially thousands of files.
Works for content collections, or with standalone markdown files.
/cc @withastro/maintainers-docs for feedback!
Changes
This fixes an issue where the RSS XML file generated by @astrojs/rss
is displayed in plaintext due to a faulty Content-Type
header by reverting the #12644 pull request.
For more information, you can view the #12828 issue that I filed.
Example screenshots
Before (current, Content-Type
header is set to application/rss+xml; charset=utf-8
since astro@5.0.3
)
After (manually overriding the Content-Type
header to application/xml
which was the value used by @astrojs/rss
before the PR change)
Testing
A reproducible example can be found here: https://codesandbox.io/p/devbox/kind-hugle-27v5l?on=codesandbox
Or, if you want to reproduce it yourself:
- Go to https://astro.new and find the Blog template
- Open the Blog template in CodeSandbox
- Visit the
/rss.xml
RSS XML page
You should see the XML page being displayed in plaintext.
Reproducible example screenshot for the "Blog" Template in CodeSandbox
Changes
Sets X-Robots-Tag: noindex
to Server Island headers
Fixes #12806
Testing
Added tests that check X-Robots-Tag: noindex
of Server Island in both production and development environments
Docs
No changes needed? This just fixes a bug
Description
- Closes #2739
This PR fixes an issue preventing to disable Pagefind using the pagefind
frontmatter field.
With the Astro 5 change to non-boolean HTML attribute values, disabling pagefind using the pagefind
frontmatter field would render data-pagefind-body="false"
in the HTML instead of omitting the attribute entirely.
Changes
Currently we're not passing any options to cookie.delete() when destroying a session. This was meaning the cookie wasn't being properly deleted, because when created it passes some default options.
This PR ensures that the same options are passed to both create and delete the cookie.
This bug was reported in a comment on the RFC
Testing
Added test cases
Docs
Changes
Currently the dev server was started before content layer sync. This caused race conditions such as #12773, where the dev server would try to load a collection before it had synced.
This PR switches the order, waiting for the sync to complete before starting the dev server.
Testing
Tested with snapshot release.
The PR also has some changes to e2e tests. It seems that quite a few tests relied on the fact that the ordering of the content layer sync gave a bit of time after the dev server started before starting running tests. With this PR there's no longer that delay, causing some test failures. This PR adds a short delay in the test utils after the dev server starts so that the tests pass again.
Docs
Changes
Myself and @HiDeoo found an issue in his starlight-blog, which I encountered when using the integration in the Biome website.
There are cases now where the resolved paths from rollup contain a query parameter in their URL
. This breaks some cases, and this was one of them.
We fixed a similar bug before .
Testing
I tested it with the project where I found the issue. It works now
Docs
N/A
The previous code would cause file names like index.xml.ts
to be treated as index files, when they aren't (the file basename excluding the extension .ts
is index.xml
, and index
should be the index file). To match index files only, match the entire first half of the basename when splitting by the last occurrence of the period/file extension delimiter.
Pedantically this might not be correct -- i.e. some file extensions actually span multiple delimiters, like index.tar.gz
. But in that case it's not an index file as well, so I think this is fine.
Fixes #12675
Changes
- What does this change?
- Be short and concise. Bullet points can help!
- Before/after screenshots can help as well.
- Don't forget a changeset!
pnpm exec changeset
Testing
This was tested with my website repository that I'm using to migrate to Astro. This may need more tests to make sure it is not a breaking change.
Docs
Possibly -- files that were considered index files may not be and vice versa. Although I think this change should only include files that were previously excluded by the .startswith("index.")
check.
/cc @withastro/maintainers-docs for feedback!
Changes
Astro adds a log when a file isn't created when a Response
has not body
Testing
Docs
/cc @withastro/maintainers-docs for feedback!
Description
- Add
FEATURE.slideEnterAnim
for global slide enter animation control and speed configuration - Update
BaseLayout
to managedata-no-sliding
and animation speed viaslideEnterAnim
- Update
StandardLayout
withisCentered
prop, slot-based layout control, and remove redundant styles - Remove
WideLayout
by merging styles intoStandardLayout
- Modify
main.css
to disable or exclude slide enter animation - Unify the slide enter animation's
enterStep
to 60ms for consistency
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
@preact/signals (source) | ^1.3.0 -> ^2.0.0 |
||||
@preact/signals (source) | 1.3.0 -> 2.0.0 |
Release Notes
preactjs/signals (@preact/signals)
v2.0.0
Major Changes
-
#604
fea3e8d
Thanks @JoviDeCroock! - Defer all DOM updates by an animation frame, this should make it so
that any previously synchronous DOM update will be instead delayed by an
animation frame. This allows Preact to first perform its own render
cycle and then our direct DOM updates to occur. These will now
be performed in a batched way which is more performant as the browser
is prepared to handle these during the animation frame.This does impact how Preact based signals are tested, when
you perform a signal update, you'll need to wrap it inact
. In a way
this was always the case, as a signal update that resulted in
a Preact state update would require it to be wrapped inact
, but
now this is the norm.
Minor Changes
- #595
499428a
Thanks @JoviDeCroock! - Align signal effects with animation-frames for better performance
Patch Changes
- #609
8e6e2de
Thanks @JoviDeCroock! - Change timing to a double microtask so we are behind the Preact render queue but can't delay as much as a user-input coming in.
v1.3.1
Patch Changes
-
#620
4cda002
Thanks @developit! - Simplify text update patch to avoid using new internals -
#618
021c726
Thanks @JoviDeCroock! - Ensure that the Effects versions are updated when using it as a JSX Signal
Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Changes
- This PR fixes an issue where the client-side script injected for server islands would fail if the content-type header was modified from an external source, for example a reverse proxy.
Testing
- Added a new server island to the server islands tests which sets a header with a media type. The test checks if the island gets inserted even with the media type present (
content-type: text/html;charset=utf-8
). Normal cases are automatically handled by the other server islands which do not set the header and instead have the default header (content-type: text/html
)
Docs
No docs needed as this is a bug fix and doesn't change the default behavior.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/underscore-redirects@0.5.0
Minor Changes
- #12768
524c855
Thanks @ematipico! - Adds a newbuildOutput
property to the APIcreateRedirectsFromAstroRoutes
astro@5.1.2
Patch Changes
-
#12798
7b0cb85
Thanks @ascorbic! - Improves warning logs for invalid content collection configuration -
#12781
96c4b92
Thanks @ascorbic! - Fixes a regression that causeddefault()
to not work withreference()
-
#12820
892dd9f
Thanks @ascorbic! - Fixes a bug that caused cookies to not be deleted when destroying a session -
#12864
440d8a5
Thanks @kaytwo! - Fixes a bug where the session ID wasn't correctly regenerated -
#12768
524c855
Thanks @ematipico! - Fixes an issue where Astro didn't print error logs when Astro Islands were used in incorrect cases. -
#12814
f12f111
Thanks @ematipico! - Fixes an issue where Astro didn't log anything in case a file isn't created during the build. -
#12875
e109002
Thanks @ascorbic! - Fixes a bug in emulated legacy collections where the entry passed to the getCollection filter function did not include the legacy entry fields. -
#12768
524c855
Thanks @ematipico! - Fixes an issue where Astro was printing the incorrect output format when running theastro build
command -
#12810
70a9f0b
Thanks @louisescher! - Fixes server islands failing to check content-type header under certain circumstancesSometimes a reverse proxy or similar service might modify the content-type header to include the charset or other parameters in the media type of the response. This previously wasn't handled by the client-side server island script and thus removed the script without actually placing the requested content in the DOM. This fix makes it so the script checks if the header starts with the proper content type instead of exactly matching
text/html
, so the following will still be considered a valid header:text/html; charset=utf-8
-
#12816
7fb2184
Thanks @ematipico! - Fixes an issue where an injected route entrypoint wasn't correctly marked because the resolved file path contained a query parameter.This fixes some edge case where some injected entrypoint were not resolved when using an adapter.
@astrojs/rss@4.0.11
Patch Changes
- #12829
ebe2aa9
Thanks @SapphicMoe! - Revert incorrect Content-Type header applied for RSS XML file
@astrojs/partytown@2.1.3
Patch Changes
- #12822
1fab2f2
Thanks @stdavis! - Updates the partytown dependency to the new npm org name and latest version.
@astrojs/svelte@7.0.3
Patch Changes
- #12776
8809b85
Thanks @aminevg! - Fixes an issue where TypeScript couldn't infer the correct types of theserver.mjs
file
@astrojs/vue@5.0.4
Patch Changes
Description
- New
/prs
page - New
astro-loader-github-prs
dependency - Add a new button on the
/projects
page to navigate to/prs
Changes
This makes a number of improvements to logging for content layer config errors:
- warns if glob base dir doesn't exist
- warns if glob matches no files
- updates warning for empty collection to be more accurate in content layer era
- logs a warning if there's an error when loading content config
Fixes #12795
Testing
Added tests
Docs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.1.1
Patch Changes
-
#12782
f3d8385
Thanks @fhiromasa! - update comment in packages/astro/src/types/public/common.ts -
#12789
f632b94
Thanks @ascorbic! - Pass raw frontmatter to remark plugins in glob loader -
#12799
739dbfb
Thanks @ascorbic! - Upgrades Vite to pin esbuild
@astrojs/db@0.14.5
Patch Changes
-
#12799
739dbfb
Thanks @ascorbic! - Upgrades Vite to pin esbuild -
Updated dependencies [
739dbfb
]:- @astrojs/studio@0.1.3
@astrojs/alpinejs@0.4.1
Patch Changes
@astrojs/markdoc@0.12.4
Patch Changes
@astrojs/mdx@4.0.3
Patch Changes
@astrojs/preact@4.0.1
Patch Changes
@astrojs/react@4.1.2
Patch Changes
@astrojs/solid-js@5.0.1
Patch Changes
@astrojs/svelte@7.0.2
Patch Changes
@astrojs/tailwind@5.1.4
Patch Changes
@astrojs/vue@5.0.3
Patch Changes
@astrojs/studio@0.1.3
Patch Changes
Changes
Fixes a regression where the glob loader is passing the parsed data to the markdown renderer, rather than raw frontmatter. This was breaking plugins.
Fixes #12778
Testing
Add new fixture and test
Docs
Changes
update JSDoc in packages/astro/src/types/public/common.ts
next: string | undefined;
/** url of the first page (if the current page is not the first page) */
first: string | undefined;
- /** url of the next page (if the current page in not the last page) */
+ /** url of the last page (if the current page is not the last page) */
last: string | undefined;
};
}
- What does this change?
- Be short and concise. Bullet points can help!
- Before/after screenshots can help as well.
- Don't forget a changeset!
pnpm exec changeset
Testing
I don't think test is needed for this change.
Docs
Changes
Currently the transform used in reference()
is async. This was a change with content collections to allow the store to be loaded. However this caused an issue during JSON schema generation when combined with default()
. See withastro/docs#10362 where this reported as part of a docs PR.
This PR updates the transform to instead preload the store and then make the transform itself sync.
Testing
Updated fixture to use the reference().default()
syntax that previously broke.
Docs
Changes
When using Astro's container API outside of vite/vitest, renderers have to be manually imported and stored inside the container (as per docs).
import reactRenderer from "@astrojs/react/server.js";
import vueRenderer from "@astrojs/vue/server.js";
import mdxRenderer from "@astrojs/mdx/server.js";
const container = await experimental_AstroContainer.create();
container.addServerRenderer({renderer: vueRenderer});
container.addServerRenderer({renderer: mdxRenderer});
container.addServerRenderer({ renderer: reactRenderer });
container.addClientRenderer({ name: "@astrojs/react", entrypoint: "@astrojs/react/client.js" });
However, importing the Vue and Svelte server renderers results in a Typescript error:
import reactRenderer from "@astrojs/react/server.js"; // no error
import vueRenderer from "@astrojs/vue/server.js"; // error: 'vueRenderer' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
import svelteRenderer from "@astrojs/svelte/server.js"; // error: 'vueRenderer' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
const container = await experimental_AstroContainer.create();
container.addServerRenderer({renderer: reactRenderer}); // no error
container.addServerRenderer({renderer: vueRenderer}); // error: Argument of type '{ renderer: any; }' is not assignable to parameter of type 'AddServerRenderer'.
container.addServerRenderer({renderer: svelteRenderer}); // error: Argument of type '{ renderer: any; }' is not assignable to parameter of type 'AddServerRenderer'.
This PR fixes the Vue & Svelte server renderer types (server.d.ts
) to be more in line with React's types and fix the Typescript errors.
Testing
This was tested with a local project using the above code snippets.
(Could a test be written for the types?)
Docs
No documentation change needed as far as I can tell.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to 4-legacy, this PR will be updated.
Releases
astro@4.16.18
Patch Changes
Description
- This PR updates Starlight’s Pagefind dependency to 1.3.0.
- Thanks to CloudCannon/pagefind#745 we can now forward Astro’s logging level to Pagefind to reduce (or increase) log verbosity in line with user preference.
- This PR tweaks Pagefind’s default ranking options to preserve result quality, based on testing with Starlight’s own docs site. We ended up going with the config developed for git-scm.com.
- It also exposes Pagefind’s ranking configuration for users who want to tweak it.
To-do
- Consider the bundle size changes
Description
- Closes #2699
- What does this PR change? Changes the icon used when the menu is open to
close
("X") to improve the visual indication that the behavior of clicking the button is different. The current approach is to change the background color and drop the box shadow, however darkening the button gives the appearance that the button is disabled and dropping the box shadow is difficult to discern in dark theme. The state of the button is not changing when the menu opens/closes, only its behavior is which is more commonly represented with a change in icon vs. a change in style. - Did you change something visual? A before/after screenshot can be helpful.
Dark Theme
Open | Closed | |
---|---|---|
Current | ||
Proposed |
Light Theme
Open | Closed | |
---|---|---|
Current | ||
Proposed |
Description
- Closes #2725
- What does this PR change? Adds social link icon for phone
- Did you change something visual?
- Icon Source: https://iconscout.com/unicons/free-line-icons/phone
- Processed through SVGOMG
Description
This PR should allow 'farcaster'
to be used as an option in the social icons schema. This is so that starlight users can add a social link to their farcaster site (eg. warpcast) like so:
social: {
...
farcaster: 'https://warpcast.com/@someone`
}
Do I need to add a changeset..?
Description
- Closes #2715
- What does this PR change? Ensure that when site title logo/text extends beyond viewport, the search icon is visible and the mobile menu toggle does not overlay the site title text/logo.
- Did you change something visual? A before/after screenshot can be helpful.
Splash
Doc
Changes
- Adds errors logs when Astro Islands are incorrectly used
- Absence of an adapter
- Incorrect buld output
- Fixes the logs, where the output format was incorrect
- Adds a new parameter to
underscore-redirects
package. Sinceconfig.output
isn't reliable anymore, I added a new field, so we can update the adapters to pass the correct value
Testing
I tested the logs locally.
Docs
/cc @withastro/maintainers-docs for feedback!
Changes
Currently the content layer cache is invalidated if the content config or Astro version changes. However this causes problems if there are changes in the Astro config that also affect the stored data. This can include things like markdown settings, but potentially lots of other things.
The apporach this PR takes is to hash everything except integrations, adapters and vite config. It switches the digest function to use a safe stringify function in case the Astro config includes circular refs.
Closes #12761
Testing
Adds a test case
Docs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.30.3
Patch Changes
-
#2717
c5fcbb3
Thanks @delucis! - Fixes a list item spacing issue where line break elements (<br>
) could receive a margin, breaking layout in Firefox -
#2724
02d7ac6
Thanks @dionysuzx! - Adds social link support for Farcaster -
#2635
ec4b851
Thanks @HiDeoo! - Fixes an issue where the language picker in multilingual sites could display the wrong language when navigating between pages with the browser back/forward buttons.
Description
-
Firefox renders margins applied to
<br>
unlike other browsers. -
We had a style which unintentionally applied
margin-bottom
to<br>
inside list items, which would cause odd spacing in lists only in Firefox. For example, in the Astro docs: -
This PR fixes this by excluding
<br>
from that style, and also adds<code>
to avoid the same issue impacting list items with a last child that is an inline code element.
…ld:setup hook when target is "client"
Changes
- Make
astro:build:setup
hook actually consume and use the updated configuration provided by integrations using theupdateConfig
function when building forclient
target.
Testing
Manual tests only for now.
Docs
Complementary changes in docs by @ematipico on withastro/docs#10410
/cc @withastro/maintainers-docs
Closes #12372
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.1.0
Minor Changes
-
#12441
b4fec3c
Thanks @ascorbic! - Adds experimental session supportSessions are used to store user state between requests for server-rendered pages, such as login status, shopping cart contents, or other user-specific data.
--- export const prerender = false; // Not needed in 'server' mode const cart = await Astro.session.get('cart'); --- <a href="/checkout">🛒 {cart?.length ?? 0} items</a>
Sessions are available in on-demand rendered/SSR pages, API endpoints, actions and middleware. To enable session support, you must configure a storage driver.
If you are using the Node.js adapter, you can use the
fs
driver to store session data on the filesystem:// astro.config.mjs { adapter: node({ mode: 'standalone' }), experimental: { session: { // Required: the name of the unstorage driver driver: "fs", }, }, }
If you are deploying to a serverless environment, you can use drivers such as
redis
,netlify-blobs
,vercel-kv
, orcloudflare-kv-binding
and optionally pass additional configuration options.For more information, including using the session API with other adapters and a full list of supported drivers, see the docs for experimental session support. For even more details, and to leave feedback and participate in the development of this feature, the Sessions RFC.
-
#12426
3dc02c5
Thanks @oliverlynch! - Improves asset caching of remote imagesAstro will now store entity tags and the Last-Modified date for cached remote images and use them to revalidate the cache when it goes stale.
-
#12721
c9d5110
Thanks @florian-lefebvre! - Adds a newgetActionPath()
helper available fromastro:actions
Astro 5.1 introduces a new helper function,
getActionPath()
to give you more flexibility when calling your action.Calling
getActionPath()
with your action returns its URL path so you can make afetch()
request with custom headers, or use your action with an API such asnavigator.sendBeacon()
. Then, you can handle the custom-formatted returned data as needed, just as if you had called an action directly.This example shows how to call a defined
like
action passing theAuthorization
header and thekeepalive
option:<script> // src/components/my-component.astro import { actions, getActionPath } from 'astro:actions'; await fetch(getActionPath(actions.like), { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: 'Bearer YOUR_TOKEN', }, body: JSON.stringify({ id: 'YOUR_ID' }), keepalive: true, }); </script>
This example shows how to call the same
like
action using thesendBeacon
API:<script> // src/components/my-component.astro import { actions, getActionPath } from 'astro:actions'; navigator.sendBeacon( getActionPath(actions.like), new Blob([JSON.stringify({ id: 'YOUR_ID' })], { type: 'application/json', }), ); </script>
Patch Changes
-
#12786
e56af4a
Thanks @ematipico! - Fixes an issue where Astro i18n didn't properly show the 404 page when using fallback and the optionprefixDefaultLocale
set totrue
. -
#12758
483da89
Thanks @delucis! - Adds types for?url&inline
and?url&no-inline
import queries added in Vite 6 -
#12763
8da2318
Thanks @rbsummers! - Fixed changes to vite configuration made in the astro:build:setup integration hook having no effect when target is "client" -
#12767
36c1e06
Thanks @ascorbic! - Clears the content layer cache when the Astro config is changed
Description
- Closes #2696
- What does this PR change? #2704 improved the cosmetic of focus ring in site title, however there were a couple of remaining issues as described here. This PR eliminates the
overflow: hidden
and appliesmin-width
to ensure thetitle-wrapper
is constrained to available space by flexbox. Additionally, it styles the title text (if its displayed) with elipses providing an improved UI so that text is no longer abruptly cut-off but rather gives an indication that there is more text that just isn't visible. If a logo is present, it will be automatically scaled and therefore doesn't require a container withoverflow: hidden
. Tested in Edge, Chrome & Firefox. - Did you change something visual? A before/after screenshot can be helpful.
With a forced outline of 10px solid green
:
Important
In performing testing on this PR, I identified other issues related to the way the header is displayed with large images and/or long text. Will create a separate issue to track those. Created #2715.
Description
- Addresses a colour contrast issue reported in #2693
- Expressive Code performs colour contrast correction automatically, but we had misconfigured a background colour setting, so Starlight’s default theme was not being properly taken into account in these calculations.
- This PR fixes that and ensures code blocks have sufficient text contrast.
- Shout out to @hippotastic for helping with the solution.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.9
Patch Changes
Changes
- Vite 6 added import queries to explicitly control asset inlining behaviour
- Vite declares types for these, but we didn’t add them to Astro’s client types when updating to Vite 6
Testing
Docs
Changes
- Logging added while working on bug but not removed!
- Want to get a patch out so users don't see this.
Testing
- N/A
Docs
- N/A
Changes
- Adds a changeset that was forgotten in #12735
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.8
Patch Changes
@astrojs/react@4.1.1
Patch Changes
Changes
- During cleanup be sure to remove any
.map
files created from server JavaScript output. Otherwise these are left in and expose server source code to the client.
Testing
- Added a new test to our basics fixture.
Docs
N/A, bug fix
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.7
Patch Changes
This reverts commit e6b8017.
This change caused source maps to be left in the client folder, exposing them into the server.
Reverting because the old logic was flawed in that it assumed that everything that gets put into the assets folder comes from inside of the vite build and is an "asset" type, but that's not true for sourcemaps. What other sorts of files might be created during the build that we are not cleaning?
Description
- New
TocButton
comps: Show a button at the bottom-right for screens under 1024px to open TOC panel - Modify
ToTopButton
UI on mobile to align withTocButton
- Adjust the slide enter animation settings to exclude the
TocButton
comp
Changes
Temporarily removes the session.flash()
feature. The plan is to re-introduce it a bit later once there has been a bit more work on the API
Testing
Docs
Description
- Closes #2696
- Adds space inside the title wrapper element to avoid clipping the site title focus indicator
Examples in Firefox, Safari, and Chrome respectively (macOS):
Browser | Before | After |
---|---|---|
Firefox | ||
Safari | ||
Chrome |
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.30.2
Patch Changes
Description
This PR is very similar to #2688 but applies the same fix to user-defined autogenerated sidebar group whereas the previous PR only fixed the issue for the default autogenerated sidebar group.
For user-defined autogenerated sidebar groups, before calling treeify()
, we filter routes but that filtering was always based on IDs. Similar to #2688, this PR computes an equivalent of legacy IDs before filtering routes when using a loader.
Changes
- Updated the upgrade messaging to show both current and target versions
- Added arrow symbol (→) to visually represent the version change
Before:
@astrojs/tailwind can be updated to v5.1.3
After:
@astrojs/tailwind can be updated v4.0.0 → v5.1.3
Testing
Updated existing test suite by modifying test assertions to verify new message format
Docs
Should be self-explanatory
Additional
Coming from withastro/roadmap#1069
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight@0.30.1
Patch Changes
Description
As reported on Discord, this PR fixes an issue with autogenerated sidebar when using Starlight with Astro's new Content Layer API where nested group names would be sluggified.
I made a mistake two times when porting the treeify()
and getBreadcrumbs()
functions to Astro v5, the first time when I implemented it and the second time when Chris asked me clarifications about the changes. I convinced myself that these functions were dealing with slugs instead of paths (legacy ID), which is not the case and makes no sense in retrospect.
This PR reverts the changes I made to these functions and now, when using a loader, before sorting and treeifying the routes, it computes a localized file path relative to the collection's root. This mimics the behavior of the legacy ID. I also added a test with an autogenerated sidebar for a folder containing uppercase letters and spaces to make sure it works as expected as we didn't have one before.
Changes
Adds support for libraries publishing code pre-compiled with the React Compiler
Testing
Don't know enough about astro internals to add a test 🤷
Docs
Don't think docs need to change, support for react-compiler-runtime
is just expected to work, same way the react/jsx-runtime
is.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/starlight-tailwind@3.0.0
Major Changes
-
#2612
8d5a4e8
Thanks @HiDeoo! -⚠️ BREAKING CHANGE: The minimum supported version of Starlight is now 0.30.0Please use the
@astrojs/upgrade
command to upgrade your project:npx @astrojs/upgrade
Patch Changes
- #2664
62ff007
Thanks @HiDeoo! - Publishes provenance containing verifiable data to link a package back to its source repository and the specific build instructions used to publish it.
@astrojs/starlight-docsearch@0.4.0
Minor Changes
-
#2612
8d5a4e8
Thanks @HiDeoo! -⚠️ BREAKING CHANGE: The minimum supported version of Starlight is now 0.30.0Please use the
@astrojs/upgrade
command to upgrade your project:npx @astrojs/upgrade
Patch Changes
- #2664
62ff007
Thanks @HiDeoo! - Publishes provenance containing verifiable data to link a package back to its source repository and the specific build instructions used to publish it.
@astrojs/starlight-markdoc@0.2.0
Minor Changes
-
#2612
8d5a4e8
Thanks @HiDeoo! -⚠️ BREAKING CHANGE: The minimum supported version of Starlight is now 0.30.0Please use the
@astrojs/upgrade
command to upgrade your project:npx @astrojs/upgrade
Patch Changes
- #2664
62ff007
Thanks @HiDeoo! - Publishes provenance containing verifiable data to link a package back to its source repository and the specific build instructions used to publish it.
@astrojs/starlight@0.30.0
Minor Changes
-
#2612
8d5a4e8
Thanks @HiDeoo! - Adds support for Astro v5, drops support for Astro v4.Upgrade Astro and dependencies
⚠️ BREAKING CHANGE: Astro v4 is no longer supported. Make sure you update Astro and any other official integrations at the same time as updating Starlight:npx @astrojs/upgrade
Community Starlight plugins and Astro integrations may also need to be manually updated to work with Astro v5. If you encounter any issues, please reach out to the plugin or integration author to see if it is a known issue or if an updated version is being worked on.
Update your collections
⚠️ BREAKING CHANGE: Starlight's internal content collections, which organize, validate, and render your content, have been updated to use Astro's new Content Layer API and require configuration changes in your project.-
Move the content config file. This file no longer lives within the
src/content/config.ts
folder and should now exist atsrc/content.config.ts
. -
Edit the collection definition(s). To update the
docs
collection, aloader
is now required:// src/content.config.ts import { defineCollection } from "astro:content"; +import { docsLoader } from "@astrojs/starlight/loaders"; import { docsSchema } from "@astrojs/starlight/schema"; export const collections = { - docs: defineCollection({ schema: docsSchema() }), + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), };
If you are using the
i18n
collection to provide translations for additional languages you support or override our default labels, you will need to update the collection definition in a similar way and remove the collectiontype
which is no longer available:// src/content.config.ts import { defineCollection } from "astro:content"; +import { docsLoader, i18nLoader } from "@astrojs/starlight/loaders"; import { docsSchema, i18nSchema } from "@astrojs/starlight/schema"; export const collections = { - docs: defineCollection({ schema: docsSchema() }), + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), - i18n: defineCollection({ type: 'data', schema: i18nSchema() }), + i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }), };
-
Update other collections. To update any other collections you may have, follow the “Updating existing collections” section in the Astro 5 upgrade guide.
If you are unable to make any changes to your collections at this time, including Starlight's default
docs
andi18n
collections, you can enable thelegacy.collections
flag to upgrade to v5 without updating your collections. This legacy flag exists to provide temporary backwards compatibility, and will allow you to keep your collections in their current state until the legacy flag is no longer supported. -
Patch Changes
-
#2669
310df7d
Thanks @aaronperezaguilera! - Adds Catalan UI translations -
#2664
62ff007
Thanks @HiDeoo! - Publishes provenance containing verifiable data to link a package back to its source repository and the specific build instructions used to publish it. -
#2670
0223b42
Thanks @aaronperezaguilera! - Adds Spanish UI translations for the Pagefind search modal
Description
- Follow up to #2664 to fix the permission to create PRs
Changes
There were some accessibility issues related to the labels of icons and buttons in our toolbar. This PR should fix it.
Testing
CI should pass
Docs
N/A
Changes
Fixes a bug caused by the fact that new URL("//", "http://localhost")
is invalid: it treats the double slash as an empty protocol-relative URL. This caused a 500 error if there was a request for http://localhost//
. Now it handles that type of URL correctly, and also redirects to /
. This redirect is only implemented for dev, because support for it in platforms is poor, and needs special handling. For that reason we can defer rto the adapters to handle it.
Fixes #12722
Testing
Adds tests
Docs
Changes
The tailwind test suite became unstable, this PR should help with that.
Testing
All CI should be green
Docs
N/A
Changes
- Addresses #12727 by adding
inert
tohtmlBooleanAttributes
Testing
No functional changes, just adding a missing boolean attribute to be handled in the correct manner.
Docs
Simply addresses a minor defect.
Standards status https://chromestatus.com/feature/5097714453577728
Description
While working in a workflow that involves strict security requirements, I noticed that Starlight public packages do not include any provenance. This PR fixes that by adding a publishConfig
block to public packages.
Changes
- Removes try/catch around
sync
inastro check
- Closes #12724
- Closes PLT-2709
Testing
Manually
Docs
This PR is auto-generated by a GitHub action to update the file icons and file tree definitions available in Starlight.
Changes
- Adds a new
getActionPath()
helper
Testing
Adds a test case
Docs
Changeset and withastro/docs#10353
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.6
Patch Changes
-
#12597
564ac6c
Thanks @florian-lefebvre! - Fixes an issue where image and server islands routes would not be passed to theastro:routes:resolved
hook during builds -
#12718
ccc5ad1
Thanks @ematipico! - Fixes an issue where Astro couldn't correctly handle i18n fallback when using the i18n middleware -
#12728
ee66a45
Thanks @argyleink! - Adds type support for theclosedby
attribute for<dialog>
elements -
#12709
e3bfd93
Thanks @mtwilliams-code! - Fixes a bug where Astro couldn't correctly parseparams
andprops
when receiving i18n fallback URLs -
#12657
14dffcc
Thanks @darkmaga! - Trailing slash support for actions -
#12715
029661d
Thanks @ascorbic! - Fixes a bug that caused errors in dev when editing sites with large numbers of MDX pages -
#12729
8b1cecd
Thanks @JoeMorgan! - "Addedinert
to htmlBooleanAttributes" -
#12726
7c7398c
Thanks @florian-lefebvre! - Fixes a case where failing content entries inastro check
would not be surfaced
@astrojs/db@0.14.4
Patch Changes
Changes
The data store has to write a number of different files to disk, which are in turn watched by the filesystem watcher. In some very large sites this was causing issues where the watcher would report the changed file before it had finished writing to disk.
This PR changes all data store file operations to use atomic writes: files are first written to a tmp dir, and then moved.
Fixes #12702
Testing
This is hard to reproduce. Tested manually using a reproduction with 50k pages and a deliberately shortened debounce time.
Docs
Changes
Currently the markdown vite plugin just checks if the id ends in a makrdown extension. This breaks if the id includes a query param. This PR strips the query string before checking.
Fixes #12711
Testing
Added test
Docs
Changes
Closes #12690
The middleware was always imported during the build, even before its execution.
This PR changes that by assigning a function that does the loading.
Testing
CI should pass. I created a new test case. In the test case the middleware imports a file that throws an error at runtime. In the test case the middleware isn't used because all pages SSR, so no errors should be thrown.
Docs
N/A
Changes
@astrojs/upgrade
checks if it's online by doign a DNS lookup for the registry host. This was broken for registries that have a port in the URL (mostly local ones like Verdaccio) because it was using url.host, which includes the port. This PR fixes that by using url.hostname.
Fixes #12660
Testing
Docs
Changes
Escapes the genrated keys for content modules imports. They are keyed by the filename, which was meaning builds would fail if they contained some characters.
Testing
Added to fixture
Docs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/react@4.1.0
Minor Changes
- #12678
97c9265
Thanks @bskimball! - Add React 19 stable to peer dependencies
astro@5.0.5
Patch Changes
-
#12705
0d1eab5
Thanks @ascorbic! - Fixes a bug where MDX files with certain characters in the name would cause builds to fail -
#12707
2aaed2d
Thanks @ematipico! - Fixes a bug where the middleware was incorrectly imported during the build -
#12697
1c4a032
Thanks @ascorbic! - Fix a bug that caused builds to fail if an image had a quote mark in its name -
#12694
495f46b
Thanks @ematipico! - Fixes a bug where the experimental featureexperimental.svg
was incorrectly used when generating ESM images -
#12658
3169593
Thanks @jurajkapsz! - Fixes astro info copy to clipboard process not returning to prompt in certain cases. -
#12712
b01c74a
Thanks @ascorbic! - Fixes a bug which misidentified pages as markdown if a query string ended in a markdown extension
@astrojs/markdoc@0.12.3
Patch Changes
- #12694
495f46b
Thanks @ematipico! - Fixes a bug where the experimental featureexperimental.svg
was incorrectly used when generating ESM images
@astrojs/vue@5.0.2
Patch Changes
@astrojs/upgrade@0.4.2
Patch Changes
Changes
Correctly quotes the imports for content layer images
Testing
Added to fixture
Docs
Changes
Currently we're not correctly throwing when images can't be resolved, because we weren't awaiting the result of this.resolve
. This meant resolution was failing in unexpected ways, leading to reports such as #12682
Testing
Docs
Changes
A user that tried to upgrade to Astro v5 detected a memory leak during the build. The issue was discovered by @HiDeoo , and this PR fixes the issue.
The PR passes a boolean called experimentaSvgEnabled
down to the three lines that cause the memory leak.
Testing
CI should pass
Docs
N/A
Changes
Adds support for session data expiry. This includes:
- a new
ttl
config option - support for a
ttl
argument toset
- support for
session.flash()
, which expires the data after the next request
Testing
Added unit tests
Docs
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
@astrojs/node (source) | ^8.3.4 -> ^9.0.0 |
Release Notes
withastro/adapters (@astrojs/node)
v9.0.0
Major Changes
-
#375
e7881f7
Thanks @Princesseuh! - Updates internal code to works with Astro 5 changes to hybrid rendering. No changes are necessary to your project, apart from using Astro 5 -
#397
776a266
Thanks @Princesseuh! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release.Starting from this release, no breaking changes will be introduced unless absolutely necessary.
To learn how to upgrade, check out the Astro v5.0 upgrade guide in our beta docs site.
-
#392
3a49eb7
Thanks @Princesseuh! - Updates internal code for Astro 5 changes. No changes is required to your project, apart from using Astro 5 -
#451
167b369
Thanks @ematipico! - Updatessend
dependency to v1.1.0
Minor Changes
- #385
bb725b7
Thanks @florian-lefebvre! - Cleans upastro:env
support
Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
@types/react (source) | ^18.3.12 -> ^19.0.3 |
||||
@types/react-dom (source) | ^18.3.1 -> ^19.0.2 |
||||
react (source) | ^18.3.1 -> ^19.0.0 |
||||
react-dom (source) | ^18.3.1 -> ^19.0.0 |
Release Notes
Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Changes
Closes #12684
React 19 renamed react.element to react.transitional.element. (facebook/react#2881)
@astro/react is updated to take this the new name into account, in addition to supporting the previous one.
Testing
Ran automated tests on React 18.3.1. They still pass. Upgraded to React 19.0.0, then they all fail due to another issue. Using the build from this pr in the stackblitz from #12684 causes it to render fine.
Docs
No changes in user behavior.
Description
Related to #1701. There has been a comment expressing a concern about the accessibility of this redesign, but I'm not sure what exactly was the problem. However, I did find it helpful to increase the thickness of the highlight to make it visually stand out more. I tested without colors and still found it pretty easy to tell which entry is selected. However, I do not have any visual impairments, so my word should not be the last here.
This PR removes the bright background of a selected item in the left sidebar and replaces it with an accent text color and an accent line on the left.
Description
Related to #1701, but not explicitly proposed there. The original proposal suggests to increase the space between the social icons, but I believe the icons themselves should be larger too.
This PR changes the appearance of social icons and the icons in language/theme selects to be larger. It also increases the touch area of the social icons to align it with the touch area of selects (~44.5px on desktop, ~48px on mobile). Finally, it marginally increases the space between the icon and the label, just something that's been bugging me visually a little bit.
Changes
Add React 19 as peer dependency so it can be installed without peer dependency flag
Testing
tested locally but React beta was already supported. This does not update the actual React dev dependency
Docs
does not require a doc update but allows user to upgrade to react 19 stable without peer dependency warnings
Description
Related to #1701
Again, building on HiDeoo's experience from the prototype, I made the header the same color as the background and then did the same for the sidebar in dark mode.
Description
Related to #1701
This PR changes the appearance of aside blocks to make them stand out less. This was done by changing the -low
version of the color palette to be less prominent. This change also affected the Card component.
I based my changes off of HiDeoo's WIP branch, but left off some changes:
- decided not to round the corners of asides, since this is something that should be done separately and consistently
- decided not to reduce the icon size because it didn't seem necessary
- instead of using
color-mix
to add transparency to existing-low
colors, I decided to change the low colors to keep consistency
Changes
I modified compileAstro to reflect the settings in viteConfig.esbuild.
This change ensures that when vite.esbuild.target
is specified in the Astro config, it is reflected during the compilation of Astro files. Previously, while the vite.build.target
value would affect the build
command output of an Astro project, it did not impact the dev
command output. As a result, the esbuild target was effectively fixed to esnext
. This update addresses and resolves that issue.
For example, by setting the configuration as follows, you can specify the esbuild target during the compilation of Astro files.
// astro.config.mjs
export default {
vite: {
esbuild: {
target: 'es2018',
},
},
};
Fixes: The vite.build.target setting does not take effect in dev mode. · Issue #12655
Testing
Added tests with code that includes syntax targeted by esbuild, confirming the following two points:
- No transformation occurs if
esbuild.target
is not present in ViteConfig. - Transformation occurs if
esbuild.target
is specified as anything other thanesnext
in ViteConfig.- Tested with
esbuild.target
set toes2018
.
- Tested with
Docs
No documentation changes are necessary.
Changes
Added 2 extra typings to the content layer generated typings for reference entries.
Whenever you are using referenced collections the output is a combination of collection + id/slug.
However there are no exported typings for this, meaning users either have to create their own typings for this object, or use some way to extract the typing from any of the exposed functions.
I can still change the names of the 2 added typings if someone has better phrasing for it, it's just what I came up with.
Testing
I used the blog example with minor temporary modifications to see if this worked as intended. Screenshots below
I got no build errors when doing this.
Docs
I do not think this warrants a docs update as this is a relatively niche usecase, only for people that want to pass referenced objects along components. People that are this invested into doing something like this have probably discovered the typings files themselves and are proficient enough with Typescript.
This won't affect anything for the average user.
Changes
fix #12656
The regex didn't account for file encoded in utf8 with bom. The bom character is now part of the regex.
Also, I'm not sure what I was smoking with #12646, but I supported spaces before the ---
which doesn't makes sense as ---
should only be used on new lines. This is also fixed here.
Testing
Updated tests reflecting changes above.
Docs
n/a. bug fix.
Description
- Closes #2655
The integration expects an object for its configuration and we assume that this user input is always an object and we unpack it into variables from the integration parameters.
This can lead to confusing error messages when the user inputs an invalid configuration or even no configuration at all, e.g. after running npx astro add starlight
.
This PR adds an extra check to ensure that the configuration is an object and throws a more helpful error message if it is not.
xclip
process on OS Linux made spawnSync
not to return. Further info at Stack Overflow.
Also updated the xclip
arguments as per man pages for better familiarity, although the used arguments worked.
Changes
- Fixes this issue comment.
- Needs review - not sure if it's a legit fix, as it globaly adds new settings to
spawnSync
. Could be changed to apply only forxclip
if needed.
Testing
Tested locally, with linux and xclip/X11.
Docs
No docs update needed.
Changes
Closes withastro/adapters#464
Problem: node adapter doesnt pass astro actions request and always redirect this to path with the / in the end
Solution: add trailing slash to actions url in case trailingSlash: "always"
to pass node adapter static handler
Testing
Tested with node adapter and add new test for server actions handler
Docs
Probably no need to update docs
Changes
based on sessions feature branch
This updates the sessions feature to inject the driver import into the manifest, instead of using a virtual module. Using a virtual module breaks edge middleware - even if the feature is not enabled.
Testing
Tested against the Netlify and Node adapters
Docs
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.4
Patch Changes
-
#12653
e21c7e6
Thanks @sarah11918! - Updates a reference in an error message -
#12585
a9373c0
Thanks @florian-lefebvre! - Fixes a case whereprocess.env
would be frozen despite changes made to environment variables in development -
#12695
a203d5d
Thanks @ascorbic! - Throws a more helpful error when images are missing -
Updated dependencies [
f13417b
,87231b1
,a71e9b9
]:- @astrojs/markdown-remark@6.0.1
@astrojs/markdoc@0.12.2
Patch Changes
@astrojs/mdx@4.0.2
Patch Changes
@astrojs/markdown-remark@6.0.1
Patch Changes
-
#12646
f13417b
Thanks @bluwy! - Avoids parsing frontmatter that are not at the top of a file -
#12570
87231b1
Thanks @GrimLink! - Removes trailing new line in code blocks to prevent generating a trailing empty<span />
tag -
#12664
a71e9b9
Thanks @bluwy! - Fixes frontmatter parsing if file is encoded in UTF8 with BOM
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to 4-legacy, this PR will be updated.
Releases
astro@4.16.17
Patch Changes
- #12632
e7d14c3
Thanks @ematipico! - Fixes an issue where thecheckOrigin
feature wasn't correctly checking thecontent-type
header
Changes
This PR refactors how we internally handle the locals
. The use of the symbol on Request
has been limited only to the dev server, because that's the only way for adapters to send us locals
in dev.
Technically, this isn't a breaking change for the adapters because the App.render
function already provides the APIs for passing initial locals. Plus, the RenderContext
class already holds the locals when it's created, so it's safe to remove the places where Reflect.set
/Reflect.get
is used.
The only place where we need to keep the Request
usage is a runtime, public API called createContext
, which is only used my the edge middleware.
Testing
The CI should pass
Docs
N/A
Changes
fix #12637
Updates the regex so it only does so.
We should also update the regex used for astro files frontmatter:
export const frontmatterRE = /^---(.*?)^---/ms; |
But I prefer to follow up on that separately and fix the markdown case first.
Testing
Added new unit tests to ensure this behaviour.
Docs
n/a. bug fix.
Changes
According to https://www.rssboard.org/rss-mime-type-application.txt
The default content type for RSS should be application/rss+xml
Testing
Docs
Changes
astro info
copy to clipboard has not been working on Mac because piping the input to pbcopy
using execSync
seems to not work. This PR fixes that by switching to spawnSync
instead of execSync
. It also adds a helper to read from the clipboard so we can check it works across platforms, and adds support for a --copy
flag to avoid needing to prompt.
Fixes #12639
Testing
Adds a new test suite.
Docs
Changes
The content layer needs to know if it is running in dev, so that it knows whether to find the datastore in the .astro
folder (so it can be watched for changes) or in node_modules
(so it is cached between builds in production environments). Previously it was incorrectly detecting this in the Vite plugin by using the isProduction
flag, which reports as false in a test enviornment. This PR changes it to instead use the env.command
.
Fixes #12612
Testing
Docs
Changes
-
Upstreams improvements to the Zod error map that we made in Starlight. We initially copied Astro’s error map and then iterated on it. It’s still similar, just with better handling for complex types like unions, and more consistent formatting (e.g. if you look at the changed tests you’ll see we’d report errors where some stuff was wrapped with backticks and other stuff wasn’t within the same error message and that that is now fixed).
-
Updates error handling for user config parse errors to use the error map. With the v5 release, we’re seeing a fair amount of the rather confusing
output Invalid input
error when people leaveoutput: "hybrid"
in their config and this aims to improve that.- This also updates the styling for these messages as they can now contain a bit more useful information. Open to feedback/suggestions on the design there. It reuses the Markdown formatter we already use for error rendering and adds some additional details for this specific context.
-
Fixes a broken docs link in one of our error messages.
Example
Example error message with this change when adding output: 'hybrid', experimental: { contentLayer: true }
to an astro.config file:
Currently
After this PR
Testing
- I’ve updated our existing error message tests to test for the updated message format
- I manually ran
astro dev
in the blog example using invalid configurations to test output.
Docs
n/a — error message improvements only
Changes
In build (and sync()
programmatic API), the content layer singleton is disposed since we only usually need to init and sync it once. This could free a bit of memory (but I think not by a lot).
Testing
Existing tests should pass
Docs
n/a. refactor
Changes
This PR ports a fix of checkOrigin
to v4
Testing
CI should pass
Docs
N/A
Changes
Fixes a bug where the class attribute was rendered twice on images during builds
Fixes #12629
Testing
Adds more tests for images during build, including tests of the raw HTML without cheerio
Docs
Changes
In Astro DB we eagerly load the virtual module at startup. Currently we load the resolved virtual module ID, which is prefixed with a null byte. This worked fine previously, but fails in Vite 6/Astro 5. This PR changes the import to use the base virtual module ID (astro:db
).
Fixes #12474
Testing
Docs
Changes
Closes #12626
This PR fixes an issue where experimental.svg
had incorrect types.
The previous types allowed having an empty object {}
but it failed with a boolean value, which how we document it.
This was reported on Discord: https://discord.com/channels/830184174198718474/1313850696126431263
Testing
There was a failing test, which is now fixed
Docs
Changes
Fixes a regression where images in content layer were not processed if they have uppercase file extensions, because we were using a case-senstitive comparison when checking the format
Fixes #12621
Testing
Added test
Docs
Changes
This PR updates:
- the CI message for requesting a reproduction, by sending users straight to stackblitz.
- the issue template to redirect users straight to stackblitz
Unfortunately, we can't use IDX for reproduction
Testing
N/A
Docs
N/A
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.3
Patch Changes
-
#12641
48ca399
Thanks @ascorbic! - Fixes a bug whereastro info --copy
wasn't working correctly onmacOS
systems. -
#12461
62939ad
Thanks @kyr0! - Removes the misleading log message telling that a custom renderer is not recognized while it clearly is and works. -
#12642
ff18b9c
Thanks @ematipico! - Provides more information when logging a warning for accessingAstro.request.headers
in prerendered pages -
#12634
03958d9
Thanks @delucis! - Improves error message formatting for user config and content collection frontmatter -
#12547
6b6e18d
Thanks @mtwilliams-code! - Fixes a bug where URL search parameters weren't passed when using the i18nfallback
feature. -
#12449
e6b8017
Thanks @apatel369! - Fixes an issue where the customassetFileNames
configuration caused assets to be incorrectly moved to the server directory instead of the client directory, resulting in 404 errors when accessed from the client side. -
#12518
e216250
Thanks @ematipico! - Fixes an issue where SSR error pages would return duplicated custom headers. -
#12625
74bfad0
Thanks @ematipico! - Fixes an issue where theexperimental.svg
had incorrect type, resulting in some errors in the editors. -
#12631
dec0305
Thanks @ascorbic! - Fixes a bug where the class attribute was rendered twice on the image component -
#12623
0e4fecb
Thanks @ascorbic! - Correctly handles images in content collections with uppercase file extensions -
#12633
8a551c1
Thanks @bluwy! - Cleans up content layer sync during builds and programmaticsync()
calls -
#12640
22e405a
Thanks @ascorbic! - Fixes a bug that caused content collections to be returned empty when run in a test environment -
#12613
306c9f9
Thanks @matthewp! - Fix use of cloned requests in middleware with clientAddressWhen using
context.clientAddress
orAstro.clientAddress
Astro looks up the address in a hidden property. Cloning a request can cause this hidden property to be lost.The fix is to pass the address as an internal property instead, decoupling it from the request.
@astrojs/rss@4.0.10
Patch Changes
- #12644
5b9b618
Thanks @kunyan! - Sends the standard RSS content type response header, with UTF-8 charset
@astrojs/db@0.14.1
Patch Changes
-
#12628
348c71e
Thanks @ascorbic! - Fixes a bug that caused an error to be logged about invalid entrypoints -
Updated dependencies []:
- @astrojs/studio@0.1.2
@astrojs/upgrade@0.4.1
Patch Changes
- #12576
19b3ac0
Thanks @apatel369! - Fixes an issue where runningupgrade
in a directory withoutastro
installed shows a false success message
User observed that calling actions resulted in an error about not having clientRequest available.
This is because the user had a middleware that cloned the request, which loses all of the symbols.
Changes
- The fix is to pass the clientAddress directly into the RenderContext. This deprecates the
clientAddressSymbol
, but we need to keep it for now because some adapters set the clientAddress that way. - Note that similar fixes should be done for other symbol usage on the Request object (locals is one).
Testing
- Middleware added to the client address fixture which recreates the problem.
Docs
N/A, bug fix.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.2
Patch Changes
Changes
This PR refactors our benchmarks to use vitest
. I was advised by the people who maintain CodSpeed that benchmarks are more reliable because Vite allows them to better rewrite the instrumentation and make the tests more reliable and less flaky.
This isn't possible with tinybench
Testing
CI should pass, and CodSpeed should work
Docs
N/A
Changes
Currently the types for getEntry
exclude undefined if the key passed is a key in the type. This works for the old system where there were types for every entry, but now they are types as Record<string, {//...the type }>
, it means any key will match (because they're all strings), meaning the entries are incorrectly returned as not nullable. This PR changes this so that if the key type is string
(i.e. the type does not have specific entries), then the return type is nullable.
This is technically a breaking change but I think we can slip it in in 5.0.x
Fixes #12598
Testing
Docs
Our migration guide already says that the types for getEntry have been loosened.
Changes
Make the link point to the final article url
Testing
N/A
Docs
N/A
Changes
- Fixes an issue where some special routes would not be included early enough in the route manifest, and so not passed to the
astro:routes:resolved
hook - I used this opportunity to refactor some things around default routes
Testing
- Tests should still pass
- Manual test
- Preview release for withastro/adapters#454
Docs
N/A
This PR follows up on a post from Chris on Discord.
Vite now issues warnings because of some changes in Sass. This PR fixes that.
Changes
- Adds
@use
statements when needed for built-in modules (e.g.sass:color
) - Replaces all Sass
@import
with@use
(I choose to reuse the filename as namespace... this can be a bit confusing for colors... since we also havecolor
forsass:color
.) - Moves all top-level declaration before nested rules
Do I need to add a changeset? I wasn't sure since it is an example and not a package.
Testing
Manually by running the example. I haven't seen any changes in the browser so I think everything works as before. And with these changes, no warnings related to Sass in the console!
Docs
N/A, this PR only updates an example to avoid warnings in the console.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
astro@5.0.1
Patch Changes
@astrojs/markdoc@0.12.1
Patch Changes
- #12594
4f2fd0a
Thanks @Princesseuh! - Fixes compatibility with Astro 5
@astrojs/mdx@4.0.1
Patch Changes
- #12594
4f2fd0a
Thanks @Princesseuh! - Fixes compatibility with Astro 5
@astrojs/svelte@7.0.1
Patch Changes
- #12594
4f2fd0a
Thanks @Princesseuh! - Fixes compatibility with Astro 5
@astrojs/tailwind@5.1.3
Patch Changes
- #12594
4f2fd0a
Thanks @Princesseuh! - Fixes compatibility with Astro 5
@astrojs/vue@5.0.1
Patch Changes
- #12594
4f2fd0a
Thanks @Princesseuh! - Fixes compatibility with Astro 5
@astrojs/web-vitals@3.0.1
Patch Changes
- #12594
4f2fd0a
Thanks @Princesseuh! - Fixes compatibility with Astro 5
Changes
Some peer deps ranges still referred to alphas and betas, we don't support those.
Testing
N/A
Docs
N/A
Changes
The sitemap
tests are currently failing because it uses an outdated version of @astrojs/node
.
This PR updates it
Testing
CI should pass
Docs
N/A
Changes
Ensures that the image endpoint is highest priority, by adding it to the start of the route array rather than the end
Testing
Tested locally with repro site
Fixes #12589. Thanks @MathiasGmeiner
Docs
Changes
This is some super niche change but I think it would be useful.
Chrome DevTools has a Issues tab which detects "A form field element should have an id or name attribute" in Astro's dev toolbar. This pull request adds appropriate name attributes to fix the warnings.
While the warnings do not matter for the dev toolbar itself, it may cause potential confusion and makes it difficult to identify issues in actual pages at a glance.
Testing
Docs
Description
- New
/releases
page - New
astro-loader-github-releases
dependency - New
GithubView
,GithubItem
comps;github.ts
,page.css
,scheduled-vercel-deploy.yml
(AddVERCEL_DEPLOY_HOOK
env var to repository secrets for scheduled rebuilds) - Update
src/config.ts
:- Add
UI.groupView
with settings formonorepos
,mainLogoOverrides
,subLogoMatches
for/releases
UI - Integrate
maxGroupColumns
andshowGroupItemColorOnHover
into newUI.groupView
- Add
- Modify
.prettierignore
to excludereleases.mdx
files, preventing unexpected<p>
elements in HTML output
Changes
- This PR reverts #12557 so that examples are pointing to the latest beta again
- This PR updates the blog, portfolio, and starlog examples to use the v5 style of content collections
Testing
Tested the changed examples locally and existing tests should still pass.
Docs
No docs, we have enough v5 docs I think! 😁
Changes
This PR updates the tests to pass
Testing
CI should pass
Docs
N/A
Changes
- In dev, inline env in the virtual module
- Cleans up unused stuff
- Closes PLT-2684
- Closes #12618
Testing
- Tests should still pass
- Test manually
- Test on a private project
Docs
N/A
Changes
Normalises boolean HTML attributes to boolean literals, because Markdoc treats ''
as falsy.
Fixes #12409
Testing
Adds a test
Docs
Description
This PR moves the @types/js-yaml
package into a normal dependency in the @astrojs/starlight
package.
Because we export TypeScript files directly in the exports
field in a package.json
file of the @astrojs/starlight
package, we need to include all dependencies' @types/*
packages in normal dependencies. Otherwise, we get following errors on type check of, for example, astro.config.ts
even with skipLibCheck: true
in tsconfig.json
:
node_modules/@astrojs/starlight/utils/translations-fs.ts:4:18 - error TS7016: Could not find a declaration file for module 'js-yaml'. '/Users/raviqqe/src/github.com/raviqqe/stak/doc/node_modules/js-yaml/dist/js-yaml.mjs' implicitly has an 'any' type.
Try `npm i --save-dev @types/js-yaml` if it exists or add a new declaration (.d.ts) file containing `declare module 'js-yaml';`
4 import yaml from 'js-yaml';
This PR contains the following updates:
Release Notes
microsoft/playwright (@playwright/test)
v1.49.1
Highlights
https://github.com/microsoft/playwright/issues/33802 - [Bug]: Codegen's Clear button doesn't work if not recordinghttps://github.com/microsoft/playwright/issues/338066 - [Bug]: playwright hangs while waiting for pending navigationhttps://github.com/microsoft/playwright/issues/3378787 - [Bug]: VSC extension isn't capturing all entered tehttps://github.com/microsoft/playwright/issues/33788788 - [Regression]: Double clicking the steps in trace viewer doesn't filter actihttps://github.com/microsoft/playwright/issues/337723772 - [Bug]: aria_snapshot generates invalid yaml when combined with an aria-label attrhttps://github.com/microsoft/playwright/issues/3379133791 - [Bug]: text input with number value raises "container is not iterable" with to_match_aria_snahttps://github.com/microsoft/playwright/issues/33644/33644 - [Bug]: getByRole can't find element with the accessible name from label element when aria-labelledby is nothttps://github.com/microsoft/playwright/issues/33660s/33660 - [Regression]: Unable to open Playwright UI in Dark Mode
Browser Versions
- Chromium 131.0.6778.33
- Mozilla Firefox 132.0
- WebKit 18.2
This version was also tested against the following stable channels:
- Google Chrome 130
- Microsoft Edge 130
preactjs/signals (@preact/signals)
v2.0.1
Patch Changes
-
#647
655905b
Thanks @jviide! - Ensure that text effects get disposed -
#630
4b9144f
Thanks @JoviDeCroock! - Change the way we deal with state settling hooks, when we know we are dealing with hooks that can settle their A -> B -> A state (and wind up at the same value). We should not verbatim rerender in our custom shouldComponentUpdate. Instead we should trust that hooks have handled their own state settling.
rollup/plugins (@rollup/pluginutils)
v5.1.4
2024-12-15
Updates
- refactor: replace
test
withincludes
(#1787)
sveltejs/vite-plugin-svelte (@sveltejs/vite-plugin-svelte)
v5.0.3
Patch Changes
- fix errorhandling to work with errors that don't have a code property (#1054)
v5.0.2
Patch Changes
- adapt internal handling of warning and error
code
property to changes in svelte5 (#1044)
alpinejs/alpine (alpinejs)
v3.14.8
Fixed
- Fix x-mask triggering update requests on load #4481
v3.14.7
Fixed
- Fix x-teleport by removing clone x-ignore #4469
v3.14.6
Fixed
- Fix regression on x-ignore when removed #4458
v3.14.5
Changed
- Optimize mutation observer to better handle move operations - ref #4450 #4451
- 🐛 Fixes Regression in Mutation handling #4450
v3.14.4
What's Changed
- Fix deep morphdom key bug by @calebporzio in https://github.com/alpinejs/alpine/pull/4423
- Don't init trees within ignore elements (x-ignore) by @calebporzio in https://github.com/alpinejs/alpine/pull/4428
- Adjust mutation observer to be faster and still account for moving and wrapping nodes by @calebporzio in https://github.com/alpinejs/alpine/pull/4447
Full Changelog: alpinejs/alpine@v3.14.3...v3.14.4
guybedford/es-module-lexer (es-module-lexer)
v1.6.0
[Compare Source](https://redirect.github.com/guyb
Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Description
I noticed the last file icons generator run failed.
The issue is related to the fact that when icons are added (or modified) to the Seti UI theme in https://github.com/jesseweed/seti-ui, the font is not automatically updated in their repository and they basically let consumers do it (e.g. that's what Visual Studio Code does).
This PR updates the file icons generator to no longer download files from their GitHub repository, but instead clone the repository, install dependencies, and build the font locally which is then used to generate the icons.
Note that this PR only includes the changes necessary to fix the file icons generator. The icons themselves are not updated in this PR. With these changes, the following icon changes are expected once the script is triggered:
- New Vite icon + its definitions (jesseweed/seti-ui#709)
- Updated Java icon (jesseweed/seti-ui#651)
- Updated Terraform icon (jesseweed/seti-ui#657)
Changes
This updates the template that generates .astro/actions.d.ts
file to make sure types work when moduleResolution: "NodeNext"
is used on tsconfig.json.
Testing
I haven't added tests because I am not familiar on how to do so for type tests that require a different tsconfig.json.
Docs
No behavior changes.
Closes #12575
Changes
Closes #12455
This change fixes an issue where @astrojs/upgrade
announces integration updates for already up-to-date packages by removing the prefix from targetVersion
while comparing.
Screen.Recording.2024-12-01.at.12.25.46.AM.mov
Testing
Manually Tested
Docs
N/A bug fix
Last fetched: | Scheduled refresh: Every Saturday
See Customizing GitHub Activity Pages to configure your own
Inspired by prs.atinux.com