fix(deps): update dependency astro to v4 - autoclosed #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.5.5
->^4.0.0
Release Notes
withastro/astro (astro)
v4.4.13
Compare Source
Patch Changes
a2e9b2b936666b2a4779feb00dcb8ff0ab82c2ec
Thanks @matthewp! - Fixes @astrojs/db loading TS in the fixturesv4.4.12
Compare Source
Patch Changes
f2e60a96754ed1d86001fe4d5d3a0c0ef657408d
Thanks @FredKSchott! - Fixes an issue where slotting interactive components within a "client:only" component prevented all component code in the page from running.v4.4.11
Compare Source
Patch Changes
#10281
9deb919ff95b1d2ffe5a5f70ec683e32ebfafd05
Thanks @lilnasy! - Fixes an issue where404.astro
was ignored withi18n
routing enabled.#10279
9ba3e2605daee3861e3bf6c5768f1d8bced4709d
Thanks @lilnasy! - Fixes an issue where returning redirect responses resulted in missing files with certain adapters.#10319
19ecccedaab6d8fa0ff23711c88fa7d4fa34df38
Thanks @lilnasy! - Fixes an issue where streaming SSR responses sometimes failed with "iterator.result
is not a function" on node-based adapters.#10302
992537e79f1847b590a2e226aac88a47a6304f68
Thanks @florian-lefebvre! - Fixes an issue that causes static entrypoints build to fail because of the path in certain conditions. Specifically, it failed if the path had an extension (like.astro
,.mdx
etc) and such extension would be also within the path (like./.astro/index.astro
).#10298
819d20a89c0d269333c2d397c1080884f516307a
Thanks @Fryuni! - Fix an incorrect conflict resolution between pages generated from static routes and rest parametersv4.4.10
Compare Source
Patch Changes
4bc360cd5f25496aca3232f6efb3710424a14a34
Thanks @sanman1k98! - Fixes jerky scrolling on IOS when using view transitions.v4.4.9
Compare Source
Patch Changes
#10278
a548a3a99c2835c19662fc38636f92b2bda26614
Thanks @Princesseuh! - Fixes original images sometimes being kept / deleted when they shouldn't in both MDX and Markdoc#10280
3488be9b59d1cb65325b0e087c33bcd74aaa4926
Thanks @bholmesdev! - Finalize db API to a shared db/ directory.v4.4.8
Compare Source
Patch Changes
5e3e74b61daa2ba44c761c9ab5745818661a656e
Thanks @Princesseuh! - Fixes dev toolbar warning about using the proper loading attributes on images usingdata:
URIsv4.4.7
Compare Source
Patch Changes
#10274
e556151603a2f0173059d0f98fdcbec0610b48ff
Thanks @lilnasy! - Fixes a regression introduced in v4.4.5 where image optimization did not work in dev mode when a base was configured.#10263
9bdbed723e0aa4243d7d6ee64d1c1df3b75b9aeb
Thanks @martrapp! - Adds auto completion forastro:
event names when adding or removing event listeners ondocument
.#10284
07f89429a1ef5173d3321e0b362a9dc71fc74fe5
Thanks @Princesseuh! - Fixes an issue where in Node SSR, the image endpoint could be used maliciously to reveal unintended information about the underlying system.Thanks to Google Security Team for reporting this issue.
v4.4.6
Compare Source
Patch Changes
#10247
fb773c9161bf8faa5ebd7e115f3564c3359e56ea
Thanks @martrapp! - Fixes an issue wheretransition:animate="none"
still allowed the browser-native morph animation.#10248
8ae5d99534fc09d650e10e64a09b61a2807574f2
Thanks @ematipico! - Fixes an issue where multiple injected routes with the sameentrypoint
but differentpattern
were incorrectly cached, causing some of them not being rendered in the dev server.#10250
57655a99db34e20e9661c039fab253b867013318
Thanks @log101! - Fixes the overwriting of localised index pages with redirects#10239
9c21a9df6b03e36bd78dc553e13c55b9ef8c44cd
Thanks @mingjunlu! - Improves the message ofMiddlewareCantBeLoaded
for clarity#10222
ade9759cae74ca262b988260250bcb202235e811
Thanks @martrapp! - Adds a warning in DEV mode when using view transitions on a device with prefer-reduced-motion enabled.#10251
9b00de0a76b4f4b5b808e8c78e4906a2497e8ecf
Thanks @mingjunlu! - Fixes TypeScript type definitions forCode
componenttheme
andexperimentalThemes
propsv4.4.5
Compare Source
Patch Changes
#10221
4db82d9c7dce3b73fe43b86020fcfa326c1357ec
Thanks @matthewp! - Prevents errors in templates from crashing the server#10219
afcb9d331179287629b5ffce4020931258bebefa
Thanks @matthewp! - Fix dynamic slots missing hydration scripts#10220
1eadb1c5290f2f4baf538c34889a09d5fcfb9bd4
Thanks @Princesseuh! - Fixes some built-in apps of the dev toolbar not closing when clicking the page#10154
e64bd0740b44aed5cfaf67e5c37a1c56ed4442f4
Thanks @Cherry! - Fixes an issue whereconfig.vite.build.assetsInlineLimit
could not be set as a function.#10196
8fb32f390d40cfa12a82c0645928468d27218866
Thanks @lilnasy! - Fixes an issue where a warning about headers being accessed in static mode is unnecessarily shown when i18n is enabled.#10199
6aa660ae7abc6841d7a3396b29f10b9fb7910ce5
Thanks @lilnasy! - Fixes an issue where prerendered pages had access to query params in dev mode.v4.4.4
Compare Source
Patch Changes
#10195
903eace233033998811b72e27a54c80d8e59ff37
Thanks @1574242600! - Fix build failure caused by read-only files under /public (in the presence of client-side JS).#10205
459f74bc71748279fe7dce0688f38bd74b51c5c1
Thanks @martrapp! - Adds an error message for non-string transition:name values#10208
8cd38f02456640c063552aef00b2b8a216b3935d
Thanks @log101! - Fixes custom headers are not added to the Node standalone server responses in preview modev4.4.3
Compare Source
Patch Changes
#10143
7c5fcd2fa817472f480bbfbbc11b9ed71a7210ab
Thanks @bluwy! - Improves the defaultoptimizeDeps.entries
Vite config to avoid globbing server endpoints, and respect thesrcDir
option#10197
c856c729404196900a7386c8426b81e79684a6a9
Thanks @Princesseuh! - Fixes errors being logged twice in some cases#10166
598f30c7cd6c88558e3806d9bc5a15d426d83992
Thanks @bluwy! - Improves Astro style tag HMR when updating imported styles#10194
3cc20109277813ccb9578ca87a8b0d680a73c35c
Thanks @matthewp! - Fixes an issue related to content collections usage in browser context caused bycsssec
v4.4.2
Compare Source
Patch Changes
a46249173edde66b03c19441144272baa8394fb4
Thanks @ematipico! - Fixes an issue with thei18n.routing
types, where an internal transformation was causing the generation of incorrect types for integrations.v4.4.1
Compare Source
Patch Changes
#9795
5acc3135ba5309a566def466fbcbabd23f70cd68
Thanks @lilnasy! - Refactors internals relating to middleware, endpoints, and page rendering.#10105
1f598b372410066c6fcd41cba9915f6aaf7befa8
Thanks @negativems! - Fixes an issue where some astro commands failed if the astro config file or an integration used the globalcrypto
object.#10165
d50dddb71d87ce5b7928920f10eb4946a5339f86
Thanks @ematipico! - Fixes an issue where thei18n.routing
object had all its fields defined as mandatory. Now they all are optionals and shouldn't break when usingastro.config.mts
.#10132
1da9c5f2f3fe70b0206d1b3e0c01744fa40d511c
Thanks @bluwy! - Simplifies internal Vite preview server teardown#10163
b92d35f1026f3e99abb888d1a845bdda4efdc327
Thanks @mingjunlu! - Fixes an issue where audit fails to initialize when encountered<a>
inside<svg>
#10079
80f8996514e6d0546e94bd927650cd4ab2f1fa2f
Thanks @ktym4a! - Fix integrationData fetch to always be called even if View Transition is enabled.#10139
3c73441eb2eaba767d6dad1b30c0353195d28791
Thanks @bluwy! - Fixes style-only change detection for Astro files if both the markup and styles are updatedv4.4.0
Compare Source
Minor Changes
#9614
d469bebd7b45b060dc41d82ab1cf18ee6de7e051
Thanks @matthewp! - Improves Node.js streaming performance.This uses an
AsyncIterable
instead of aReadableStream
to do streaming in Node.js. This is a non-standard enhancement by Node, which is done only in that environment.#10001
748b2e87cd44d8bcc1ab9d7e504703057e2000cd
Thanks @bholmesdev! - Removes content collection warning when a configured collection does not have a matching directory name. This should resolvei18n
collection warnings for Starlight users.This also ensures configured collection names are always included in
getCollection()
andgetEntry()
types even when a matching directory is absent. We hope this allows users to discover typos during development by surfacing type information.#10074
7443929381b47db0639c49a4d32aec4177bd9102
Thanks @Princesseuh! - Add a UI showing the list of found problems when using the audit app in the dev toolbar#10099
b340f8fe3aaa81e38c4f1aa41498b159dc733d86
Thanks @martrapp! - Fixes a regression where view transition names containing special characters such as spaces or punctuation stopped working.Regular use naming your transitions with
transition: name
is unaffected.However, this fix may result in breaking changes if your project relies on the particular character encoding strategy Astro uses to translate
transition:name
directives into values of the underlying CSSview-transition-name
property. For example,Welcome to Astro
is now encoded asWelcome_20to_20Astro_2e
.This mainly affects spaces and punctuation marks but no Unicode characters with codes >= 128.
#9976
91f75afbc642b6e73dd4ec18a1fe2c3128c68132
Thanks @OliverSpeir! - Adds a new optionalastro:assets
image attributeinferSize
for use with remote images.Remote images can now have their dimensions inferred just like local images. Setting
inferSize
totrue
allows you to usegetImage()
and the<Image />
and<Picture />
components without setting thewidth
andheight
properties.v4.3.7
Compare Source
Patch Changes
#9857
73bd900754365b006ee730df9f379ba924e5b3fa
Thanks @iamyunsin! - Fixes false positives in the dev overlay audit when multiplerole
values exist.#10075
71273edbb429b5afdba6f8ee14681b66e4c09ecc
Thanks @lilnasy! - Improves error messages for island hydration.#10072
8106178043050d142bf385bed2990730518f28e2
Thanks @lilnasy! - Clarifies error messages in endpoint routing.#9971
d9266c4467ca0faa1213c1a5995164e5655ab375
Thanks @mingjunlu! - Fixes an issue where ReadableStream wasn't canceled in dev modev4.3.6
Compare Source
Patch Changes
#10063
dac759798c111494e76affd2c2504d63944871fe
Thanks @marwan-mohamed12! - Movesshikiji-core
fromdevDependencies
todependencies
to prevent type errors#10067
989ea63bb2a5a670021541198aa70b8dc7c4bd2f
Thanks @ematipico! - Fixes a regression in theastro:i18n
module, where the functionsgetAbsoluteLocaleUrl
andgetAbsoluteLocaleUrlList
returned a URL with double slash with a certain combination of options.#10060
1810309e65c596266355c3b7bb36cdac70f3305e
Thanks @lilnasy! - Fixes an issue where custom client directives added by integrations broke builds with a custom root.#9991
8fb67c81bb84530b39df4a1449c0862def0854af
Thanks @ktym4a! - Increases compatibility with standard browser behavior by changing where view transitions occur on browser back navigation.v4.3.5
Compare Source
Patch Changes
#10022
3fc76efb2a8faa47edf67562a1f0c84a19be1b33
Thanks @lilnasy! - Fixes a regression where types for theastro:content
module did not include required exports, leading to typescript errors.#10016
037e4f12dd2f460d66f72c9f2d992b95e74d2da9
Thanks @ematipico! - Fixes a bug where routes with a name that start with the name of thei18n.defaultLocale
were incorrectly returning a 404 response.v4.3.4
Compare Source
Patch Changes
#10013
e6b5306a7de779ce495d0ff076d302de0aa57eaf
Thanks @delucis! - Fixes a regression in content collection types#10003
ce4283331f18c6178654dd705e3cf02efeef004a
Thanks @bholmesdev! - Adds support for.strict()
on content collection schemas when a customslug
is present.v4.3.3
Compare Source
Patch Changes
#9998
18ac0940ea1b49b6b0ddd9be1f96aef416e2d7ee
Thanks @ematipico! - Fixes a bug inAstro.currentLocale
that wasn't returning the correct locale when a locale is configured viapath
#9998
18ac0940ea1b49b6b0ddd9be1f96aef416e2d7ee
Thanks @ematipico! - Fixes a regression inAstro.currentLocale
where it stopped working properly with dynamic routes#9956
81acac24a3cac5a9143155c1d9f838ea84a70421
Thanks @matthewp! - Fixes HMR for MDX dependencies in Content Collections#9999
c53a31321a935e4be04809046d7e0ba3cc41b272
Thanks @MoustaphaDev! - Rollbacks the feature which allowed to dynamically generate slots with variable slot names due to unexpected regressions.#9906
3c0876cbed5033e6b5b42cc2b9d8b393d7e5a55e
Thanks @florian-lefebvre! - Improves the types for theastro:content
module by making low fidelity types available before runningastro sync
v4.3.2
Compare Source
Patch Changes
#9932
9f0d89fa7e9e7c08c8600b0c49c2cce7489a7582
Thanks @ematipico! - Fixes a case where a warning was logged even when the featurei18nDomains
wasn't enabled#9907
6c894af5ab79f290f4ff7feb68617a66e91febc1
Thanks @ktym4a! - Load 404.html on all non-existent paths on astro preview.v4.3.1
Compare Source
Patch Changes
#9841
27ea080e24e2c5cdc59b63b1dfe0a83a0c696597
Thanks @kristianbinau! - Makes the warning clearer when having a custombase
and requesting a public URL without it#9888
9d2fdb293d6a7323e10126cebad18ef9a2ea2800
Thanks @natemoo-re! - Improves error handling logic for theastro sync
command.#9918
d52529e09450c84933dd15d6481edb32269f537b
Thanks @LarryIVC! - Adds thename
attribute to the<details>
tag type#9938
1568afb78a163db63a4cde146dec87785a83db1d
Thanks @lilnasy! - Fixes a regression where middleware did not run for prerendered pages and endpoints.#9931
44674418965d658733d3602668a9354e18f8ef89
Thanks @lilnasy! - Fixes a regression where a response created withResponse.redirect
or containingnull
as the body never completed in node-based adapters.v4.3.0
Compare Source
Minor Changes
58f9e393a188702eef5329e41deff3dcb65a3230
Thanks @Princesseuh! - Adds a newComponentProps
type export fromastro/types
to get the props type of an Astro component.v4.2.8
Compare Source
Patch Changes
#9884
37369550ab57ca529fd6c796e5b0e96e897ca6e5
Thanks @lilnasy! - Fixes an issue where multiple cookies were sent in a single Set-Cookie header in the dev mode.#9876
e9027f194b939ac5a4d795ee1a2c24e4a6fbefc0
Thanks @friedemannsommer! - Fixes an issue where usingResponse.redirect
in an endpoint led to an error.#9882
13c3b712c7ba45d0081f459fc06f142216a4ec59
Thanks @natemoo-re! - Improves handling of YAML parsing errors#9878
a40a0ff5883c7915dd55881dcebd052b9f94a0eb
Thanks @lilnasy! - Fixes an issue where setting trailingSlash to "never" had no effect onAstro.url
.v4.2.7
Compare Source
Patch Changes
#9840
70fdf1a5c660057152c1ca111dcc89ceda5c8840
Thanks @delucis! - ExposeContentConfig
type fromastro:content
#9865
00ba9f1947ca9016cd0ee4d8f6048027fab2ab9a
Thanks @ematipico! - Fixes a bug inAstro.currentLocale
where the value was incorrectly computed during the build.#9838
0a06d87a1e2b94be00a954f350c184222fa0594d
Thanks @lilnasy! - Fixes an issue whereastro:i18n
could not be used in framework components.Updated dependencies [
44c957f893c6bf5f5b7c78301de7b21c5975584d
]:v4.2.6
Compare Source
Patch Changes
#9825
e4370e9e9dd862425eced25823c82e77d9516927
Thanks @tugrulates! - Fixes false positive aria role errors on interactive elements#9828
a3df9d83ca92abb5f08f576631019c1604204bd9
Thanks @ematipico! - Fixes a case where shared modules among pages and middleware were transformed to a no-op after the build.#9834
1885cea308a62b173a50967cf5a0b174b3c3f3f1
Thanks @Princesseuh! - Fixes third-party dev toolbar apps not loading correctly when using absolute paths on Windowsv4.2.5
Compare Source
Patch Changes
#9818
d688954c5adba75b0d676694fbf5fb0da1c0af13
Thanks @Princesseuh! - Improves the wording of a few confusing error messages#9680
5d7db1dbb0ff06db98e08b0ca241ff09d0b8b44d
Thanks @loucyx! - Fixes types generation from Content Collections config file#9822
bd880e8437ea2df16f322f604865c1148a9fd4cf
Thanks @liruifengv! - Applies the correct escaping to identifiers used withtransition:name
.#9830
f3d22136e53fd902310024519fc4de83f0a58039
Thanks @lilnasy! - Fixes an issue where 404 responses from endpoints were replaced with contents of 404.astro in dev mode.#9816
2a44c8f93201958fba2d1e83046eabcaef186b7c
Thanks @Princesseuh! - Adds telemetry for when apps are toggled in the dev toolbar. This data is completely anonymous and only the names of built-in apps are shared with us. This data will help us monitor how much the dev toolbar is used and which apps are used more. For more information on how Astro collects telemetry, visit the following page: https://astro.build/telemetry/#9807
b3f313138bb314e2b416c29cda507383c2a9f816
Thanks @bluwy! - Fixes environment variables replacement forexport const prerender
#9790
267c5aa2c7706f0ea3447f20a09d85aa560866ad
Thanks @lilnasy! - Refactors internals of theastro:i18n
module to be more maintainable.#9776
dc75180aa698b298264362bab7f00391af427798
Thanks @lilnasy! - Simplifies internals that handle middleware.v4.2.4
Compare Source
Patch Changes
#9792
e22cb8b10c0ca9f6d88cab53cd2713f57875ab4b
Thanks @tugrulates! - Accept aria roleswitch
on toolbar audit.#9606
e6945bcf23b6ad29388bbadaf5bb3cc31dd4a114
Thanks @eryue0220! - Fixes escaping behavior for.html
files and components#9786
5b29550996a7f5459a0d611feea6e51d44e1d8ed
Thanks @Fryuni! - Fixes a regression in routing priority for index pages in rest parameter folders and dynamic sibling trees.Considering the following tree:
The routes are sorted in this order:
This allows for index files to be used as overrides to rest parameter routes on SSR when the rest parameter matching
undefined
is not desired.#9775
075706f26d2e11e66ef8b52288d07e3c0fa97eb1
Thanks @lilnasy! - Simplifies internals that handle endpoints.#9773
9aa7a5368c502ae488d3a173e732d81f3d000e98
Thanks @LunaticMuch! - Raises the required vite version to address a vulnerability invite.server.fs.deny
that affected the dev mode.#9781
ccc05d54014e24c492ca5fddd4862f318aac8172
Thanks @stevenbenner! - Fix build failure when image file name includes special charactersv4.2.3
Compare Source
Patch Changes
eed0e8757c35dde549707e71c45862438a043fb0
Thanks @Princesseuh! - Fix apps being able to crash the dev toolbar in certain casesv4.2.2
Compare Source
Patch Changes
#9712
ea6cbd06a2580527786707ec735079ff9abd0ec0
Thanks @bluwy! - Improves HMR behavior for style-only changes in.astro
files#9739
3ecb3ef64326a8f77aa170df1e3c89cb5c12cc93
Thanks @ematipico! - Makes i18n redirects take thebuild.format
configuration into account#9762
1fba85681e86aa83d24336d4209cafbc76b37607
Thanks @ematipico! - Addspopovertarget" to the attribute that can be passed to the
button` element#9605
8ce40a417c854d9e6a4fa7d5a85d50a6436b4a3c
Thanks @MoustaphaDev! - Adds support for dynamic slot names#9381
9e01f9cc1efcfb938355829676d51b24818ab2bb
Thanks @martrapp! - Improves the CLI output ofastro preferences list
to include additional relevant information#9741
73d74402007896204ee965f6553dc83b3dec8d2f
Thanks @taktran! - Fixes an issue where dot files were not copied over from the public folder to the output folder, when build command was run in a folder other than the root of the project.#9730
8d2e5db096f1e7b098511b4fe9357434a6ff0703
Thanks @Blede2000! - Allow i18n routing utilities like getRelativeLocaleUrl to also get the default local path when redirectToDefaultLocale is falseUpdated dependencies [
53c69dcc82cdf4000aff13a6c11fffe19096cf45
,2f81cffa9da9db0e2802d303f94feaee8d2f54ec
,a505190933365268d48139a5f197a3cfb5570870
]:v4.2.1
Compare Source
Patch Changes
a4b696def3a7eb18c1ae48b10fd3758a1874b6fe
Thanks @Fryuni! - Fixes a regression in routing priority betweenindex.astro
and dynamic routes with rest parametersv4.2.0
Compare Source
Minor Changes
#9566
165cfc154be477337037185c32b308616d1ed6fa
Thanks @OliverSpeir! - Allows remark plugins to pass options specifying how images in.md
files will be optimized#9661
d6edc7540864cf5d294d7b881eb886a3804f6d05
Thanks @ematipico! - Adds new helper functions for adapter developers.Astro.clientAddress
can now be passed directly to theapp.render()
method.Request
andResponse
objects are now provided as static methods on theNodeApp
class.Astro.cookies.set()
can now be automatically added to theResponse
object by passing theaddCookieHeader
option toapp.render()
.#9638
f1a61268061b8834f39a9b38bca043ae41caed04
Thanks @ematipico! - Adds a newi18n.routing
config optionredirectToDefaultLocale
to disable automatic redirects of the root URL (/
) to the default locale whenprefixDefaultLocale: true
is set.In projects where every route, including the default locale, is prefixed with
/[locale]/
path, this property allows you to control whether or notsrc/pages/index.astro
should automatically redirect your site visitors from/
to/[defaultLocale]
.You can now opt out of this automatic redirection by setting
redirectToDefaultLocale: false
:#9671
8521ff77fbf7e867701cc30d18253856914dbd1b
Thanks @bholmesdev! - Removes the requirement for non-content files and assets inside content collections to be prefixed with an underscore. For files with extensions like.astro
or.css
, you can now remove underscores without seeing a warning in the terminal.Continue to use underscores in your content collections to exclude individual content files, such as drafts, from the build output.
#9567
3a4d5ec8001ebf95c917fdc0d186d29650533d93
Thanks @OliverSpeir! - Improves the a11y-missing-content rule and error message for audit feature of dev-overlay. This also fixes an error where this check was falsely reporting accessibility errors.#9643
e9a72d9a91a3741566866bcaab11172cb0dc7d31
Thanks @blackmann! - Adds a newmarkdown.shikiConfig.transformers
config option. You can use this option to transform the Shikiji hast (AST format of the generated HTML) to customize the final HTML. Also updates Shikiji to the latest stable version.See Shikiji's documentation for more details about creating your own custom transformers, and a list of common transformers you can add directly to your project.
#9644
a5f1682347e602330246129d4666a9227374c832
Thanks @rossrobino! - Adds an experimental flagclientPrerender
to prerender your prefetched pages on the client with the Speculation Rules API.Enabling this feature overrides the default
prefetch
behavior globally to prerender links on the client according to yourprefetch
configuration. Instead of appending a<link>
tag to the head of the document or fetching the page with JavaScript, a<script>
tag will be appended with the corresponding speculation rules.Client side prerendering requires browser support. If the Speculation Rules API is not supported,
prefetch
will fallback to the supported strategy.See the Prefetch Guide for more
prefetch
options and usage.#9439
fd17f4a40b83d14350dce691aeb79d87e8fcaf40
Thanks @Fryuni! - Adds an experimental flagglobalRoutePriority
to prioritize redirects and injected routes equally alongside file-based project routes, following the same route priority order rules for all routes.Enabling this feature ensures that all routes in your project follow the same, predictable route priority order rules. In particular, this avoids an issue where redirects or injected routes (e.g. from an integration) would always take precedence over local route definitions, making it impossible to override some routes locally.
The following table shows which route builds certain page URLs when file-based routes, injected routes, and redirects are combined as shown below:
/blog/post/[pid]
/[page]
/blog/[...slug]
/blog/tags/[tag]
->/[tag]
/posts
->/blog
URLs are handled by the following routes:
/blog/tags/astro
/blog/[...slug]
/tags/[tag]
/blog/post/0
/blog/[...slug]
/blog/post/[pid]
/posts
/[page]
/blog
In the event of route collisions, where two routes of equal route priority attempt to build the same URL, Astro will log a warning identifying the conflicting routes.
Patch Changes
#9719
7e1db8b4ce2da9e044ea0393e533c6db2561ac90
Thanks @bluwy! - Refactors Vite config to avoid Vite 5.1 warnings#9439
fd17f4a40b83d14350dce691aeb79d87e8fcaf40
Thanks @Fryuni! - Updates Astro's routing priority rules to prioritize the most specifically-defined routes.Now, routes with more defined path segments will take precedence over less specific routes.
For example,
/blog/posts/[pid].astro
(3 path segments) takes precedence over/blog/[...slug].astro
(2 path segments). This means that:/pages/blog/posts/[id].astro
will build routes of the form/blog/posts/1
and/blog/posts/a
/pages/blog/[...slug].astro
will build routes of a variety of forms, includingblog/1
and/blog/posts/1/a
, but will not build either of the previous routes.For a complete list of Astro's routing priority rules, please see the routing guide. This should not be a breaking change, but you may wish to inspect your built routes to ensure that your project is unaffected.
#9706
1539e04a8e5865027b3a8718c6f142885e7c8d88
Thanks @bluwy! - Simplifies HMR handling, improves circular dependency invalidation, and fixes Astro styles invalidationUpdated dependencies [
165cfc154be477337037185c32b308616d1ed6fa
,e9a72d9a91a3741566866bcaab11172cb0dc7d31
]:v4.1.3
Compare Source
Patch Changes
#9665
d02a3c48a3ce204649d22e17b1e26fb5a6a60bcf
Thanks @bluwy! - Disables internal file watcher for one-off Vite servers to improve start-up performance#9664
1bf0ddd2777ae5f9fde3fd854a9e75aa56c080f2
Thanks @bluwy! - Improves HMR for Astro style and script modules#9668
74008cc23853ed507b144efab02300202c5386ed
ThaConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.
This PR has been generated by Mend Renovate. View repository job log here.