packages/astro/CHANGELOG-v1.md
bf210f784 Thanks @bholmesdev! - Correctly handle spaces and capitalization in src/content/ file names. This introduces github-slugger for slug generation to ensure slugs are usable by getStaticPaths. Changes:
collection/Entry With Spaces.md becomes collection/entry-with-spaces./index paths to base URL: collection/index.md becomes collection#5720 fe316be86 Thanks @umarov! - Do not add base path to a hoisted script body
#5706 c2844a79c Thanks @bluwy! - Add preact and sitemap integration to config load external list
#5700 3aa3e00a6 Thanks @bholmesdev! - Fix import.meta.env.DEV always being set to true when using Content Collections
d72da5290 Thanks @bholmesdev! - Add astro sync CLI command for type generation#5668 9674cf56c Thanks @bholmesdev! - Remove stray console.log from content collections error message
#5652 0b5098758 Thanks @bluwy! - Use acorn to postprocess Astro globs
#5648 853081d1c Thanks @bholmesdev! - Prevent relative image paths in src/content/
#5678 f8f576829 Thanks @bluwy! - Fix code generation quotes handling
#5635 376f67011 Thanks @SegaraRai! - Add server.headers typing
Updated dependencies [853081d1c, 2c65b433b]:
#5641 62580ed07 Thanks @chenxsan! - Fix "Maximum call stack size exceeded" error in vite-plugin-head-propagation
#5644 d5aff85db Thanks @natemoo-re! - Fix static build regression where chunks would not be generated
#5639 1ac1ed86e Thanks @bluwy! - Fix client:only imports with "importsNotUsedAsValues": "error" tsconfig
33dcaa05b Thanks @bholmesdev! - Fix error message when using Content Collections and an out-of-date @astrojs/mdx integration#5297 d2960984c Thanks @natemoo-re! - Introduces the experimental Prerender API.
Note This API is not yet stable and is subject to possible breaking changes!
pages/ at build time.Usage
astro build --experimental-prerender or enable experimental: { prerender: true } in your astro.config.mjs file.export const prerender = true in any file in the pages/ directory that you wish to prerender.#5495 31ec84797 Thanks @Princesseuh! - Add a new error overlay designed by @doodlemarks! This new overlay should be much more informative, clearer, astro-y, and prettier than the previous one.
#5291 5ec0f6ed5 Thanks @bholmesdev! - Introduce Content Collections experimental API
#5341 6b156dd3b Thanks @alexpdraper! - Allow setting domain when deleting cookies
d85ec7484 Thanks @natemoo-re! - Sanitize dynamically rendered tags to strip out any attributes#5572 b2f0210c4 Thanks @matthewp! - Include base in 'page' stage injected scripts
#5554 02bb0a1cc Thanks @natemoo-re! - Update @astrojs/compiler to latest
#5577 2bd23e454 Thanks @jerzakm! - Updated magic-string to 0.27.0
#5545 9082a850e Thanks @bluwy! - Exclude astro from Vite optimization
#5446 4f7f20616 Thanks @jyasskin! - Fix redirect() typing to allow all redirection status codes.
#5511 05915fec0 Thanks @matthewp! - Low-level head propagation
This adds low-level head propagation ability within the Astro runtime. This is not really usable within an Astro app at the moment, but provides the APIs necessary for renderEntry to do head propagation.
#5553 1aeabe417 Thanks @matthewp! - Fix Astro.params not having values when using base in SSR
#5549 795f00f73 Thanks @matthewp! - Use accumulated sort order when order production CSS
#5539 2c836b9d1 Thanks @wulinsheng123! - Error reporting fails on undefined error index
#5548 8f3f67c96 Thanks @ido-pluto! - Removed premature optimization
#5506 f536a34e5 Thanks @bluwy! - Dedupe Astro package when resolving
#5506 f536a34e5 Thanks @bluwy! - Refactor Astro compile flow
#5533 58188e053 Thanks @bluwy! - Refactor and remove esbuild dependency
#5501 3c44033e4 Thanks @Princesseuh! - Added a warning in build when trying to hydrate an Astro component
#5484 731e99df8 Thanks @Pimm! - Narrow type of Params, as its values cannot be numbers
#5480 c13775279 Thanks @sapphi-red! - Fix astro preview not working on Windows
#5497 ca01a71eb Thanks @bluwy! - Refactor internal plugins code
#5460 57888e069 Thanks @bluwy! - Fix linked Astro library style HMR
#5477 5e693c214 Thanks @bluwy! - Prevent inlining SCSS partials in dev
#5498 1a3923da7 Thanks @bluwy! - Optimize JSX import source detection
#5433 936c1e411 Thanks @wtchnm! - Add missing fetchpriority attribute to img, link, script and iframe elements
#5437 4b188132e Thanks @bluwy! - Correctly transform third-party JSX files
#5434 f5ed630bc Thanks @matthewp! - Use Vite's resolve to resolve paths for client:only
#5431 1ab505855 Thanks @matthewp! - Fix regression with loading .ts in .mjs config
#5426 ff35b4759 Thanks @bluwy! - Fix JSX tagging for anonymous higher-order components default export
#5430 b22ba1c03 Thanks @bluwy! - Fix preview --host in Node.js 18
#5417 a9f7ff966 Thanks @matthewp! - Prevent dev from crashing when there are errors in template
#5409 9f80a4046 Thanks @matthewp! - Fix Code component usage in Vercel
#5410 3c5cb6948 Thanks @impcyber! - Fix: https://github.com/withastro/astro/issues/5400
#5412 a278c7ae6 Thanks @matthewp! - Restart dev server on package.json changes
#5377 40226dd14 Thanks @matthewp! - Uses vite to load astro.config.ts files
#5375 f9104354b Thanks @Princesseuh! - Fix regression causing nested arrays in getStaticPaths's return value to throw an error
#5346 f3181b5ad Thanks @bluwy! - Fix .html.astro file routing in dev
#5358 9eee0f016 Thanks @matthewp! - Properly support trailingSlash: never with a base
#5345 3ae2a961b Thanks @bluwy! - Respect Vite user config for third-party packages config handling
#5371 bee8c14af Thanks @matthewp! - Prefer the base config rather than site config for creating URLs for links and scripts.
#5369 e385076ef Thanks @natemoo-re! - Upgrade @astrojs/compiler, fixes regression with body handling when head contains a Component node
#5353 b3d936ac2 Thanks @matthewp! - Updated the CSS naming algorithm to prevent clashes
#5294 ae41f25e1 Thanks @mrienstra! - Consistent Markdown frontmatter typing (MarkdownAstroData["frontmatter"] in particular was object before)
#5316 a780f2595 Thanks @Princesseuh! - Improved error messages descriptions and hints to be more informative
#5331 688f8e4bc Thanks @matthewp! - Allow dynamic segments in injected routes
#5330 7e19e8b30 Thanks @matthewp! - Prevent jsx throws from hanging server
#5328 bcd0f8f8c Thanks @matthewp! - 404 when not using subpath for items in public in dev
Previously if using a base like base: '/subpath/ you could load things from the root, which would break in prod. Now you must include the subpath.
#5339 03a8f89d5 Thanks @natemoo-re! - Upgrade @astrojs/compiler to latest
#5327 0dcdc6fb1 Thanks @Princesseuh! - Update Astro language-server to 0.28.3
#5326 88c1bbe3a Thanks @matthewp! - Fix omitted island hydration scripts in slots
#5301 a79a37cad Thanks @bluwy! - Improve environment variable handling performance
#5290 b2b291d29 Thanks @matthewp! - Handle base configuration in adapters
This allows adapters to correctly handle base configuration. Internally Astro now matches routes when the URL includes the base.
Adapters now also have access to the removeBase method which will remove the base from a pathname. This is useful to look up files for static assets.
#5292 97e2b6ad7 Thanks @MontelAle! - Changes slow astro cli imports to dynamic
#5293 4af4d8fa0 Thanks @matthewp! - Prevent overcaching .astro HMR changes
#5314 f6add3924 Thanks @matthewp! - Fixes regression with config file restarts
#5298 247eb7411 Thanks @wulinsheng123! - have not founded style when srcDir was root
#5273 c7b9b14a1 Thanks @matthewp! - Surface astro.config errors to the user
#5264 0d27c4a2b Thanks @VladCuciureanu! - Fixed memleak caused by project dir names containing '.md' or '.mdx'
#5258 74759cf78 Thanks @bluwy! - Allow 200 response for endpoints in build
#5284 126cd8e83 Thanks @herteleo! - Include missing class:list within HTMLAttributes type
#5236 1cc067052 Thanks @bluwy! - Refactor CSS preprocessing handling
#5198 c77a6cbe3 Thanks @matthewp! - HMR - Improved error recovery
This improves error recovery for HMR. Now when the dev server finds itself in an error state (because a route contained an error), it will recover from that state and refresh the page when the user has corrected the mistake.
#5243 7d678c9ed Thanks @matthewp! - Upgrade @astrojs/compiler to 0.29.x
Updated dependencies [b6a478f37]:
#5233 7f8987085 Thanks @bluwy! - Support rendering @motionone/solid components
#5238 26ff42905 Thanks @MoustaphaDev! - Fix not included file extension in url metadata for newly added markdown files
#5217 8c83359e3 Thanks @Princesseuh! - Fix missing types.d.ts in npm package
#5206 d64d5b9b5 Thanks @Princesseuh! - Improve error messages related to CSS and compiler errors
#5212 a609a8937 Thanks @bluwy! - Allow importing public files in SSR
#5147 0bf0758fb Thanks @natemoo-re! - Add astro/types entrypoint. These utilities can be used for common prop type patterns.
HTMLAttributesIf you would like to extend valid HTML attributes for a given HTML element, you may use the provided HTMLAttributes type—it accepts an element name and returns the valid HTML attributes for that element name.
import { HTMLAttributes } from 'astro/types';
interface Props extends HTMLAttributes<'a'> {
myProp?: string;
}
#5164 4a8a346ca Thanks @MoustaphaDev! - Add support for markdown files with the following extensions:
.markdown.mdown.mkdn.mkd.mdwn#4917 ddf2f8390 Thanks @natemoo-re! - Add support for --base CLI argument, which will override the base set in your astro.config.mjs file.
astro --site https://astro.build --base /docs
#5133 1c477dd8d Thanks @bluwy! - Update @astrojs/compiler and use the new resolvePath option. This allows removing much of the runtime code, which should improve rendering performance for Astro and MDX pages.
#5192 8728ee0b9 Thanks @tony-sull! - astro add no longer automatically installs optional peer dependencies
#5119 430e0346c Thanks @bluwy! - Use fs.promises.rm to remove node deprecation warning
#5123 9745009ae Thanks @matthewp! - Fixes index page with build.format=file
#5116 500acb3c1 Thanks @matthewp! - Throws when using Response.redirect in SSG mode
#5110 0edfdd325 Thanks @bluwy! - Ensure CLI flags override function-style server config
#5106 ef0c54316 Thanks @bluwy! - Support spread parameters for server endpoints
#5095 ddfbef5ac Thanks @Princesseuh! - Fix astro add trying to add lines from extended configurations when adding frameworks
#5076 6f9a88b31 Thanks @Princesseuh! - Fix jsconfig.json aliases not working anymore after 1.5.0
#5080 90b715d5c Thanks @matthewp! - Fix Astro-in-MDX dashes in slot attr
#5098 f684e9d36 Thanks @jkjustjoshing! - Separate type definitions for built-in HTML elements and custom elements. Helpful when implementing an "as" prop similar to styled-components.
#5108 ce01225a7 Thanks @Princesseuh! - Fix types not working properly when using moduleResolution: 'node16'
#5060 5923dd77c Thanks @AirBorne04! - api routes: adding cookies to the response, also when returning a simple result
#5087 49a8d18b4 Thanks @JuanM04! - Fix astro add pnpm command
#5056 e55af8a23 Thanks @matthewp! - # Adapter support for astro preview
Adapters are now about to support the astro preview command via a new integration option. The Node.js adapter @astrojs/node is the first of the built-in adapters to gain support for this. What this means is that if you are using @astrojs/node you can new preview your SSR app by running:
npm run preview
We will be updating the other first party Astro adapters to support preview over time. Adapters can opt-in to this feature by providing the previewEntrypoint via the setAdapter function in astro:config:done hook. The Node.js adapter's code looks like this:
export default function() {
return {
name: '@astrojs/node',
hooks: {
'astro:config:done': ({ setAdapter, config }) => {
setAdapter({
name: '@astrojs/node',
serverEntrypoint: '@astrojs/node/server.js',
+ previewEntrypoint: '@astrojs/node/preview.js',
exports: ['handler'],
});
// more here
}
}
};
}
The previewEntrypoint is a module in the adapter's package that is a Node.js script. This script is run when astro preview is run and is charged with starting up the built server. See the Node.js implementation in @astrojs/node to see how that is implemented.
#4986 ebd364e39 Thanks @bluwy! - ## New properties for API routes
In API routes, you can now get the site, generator, url, clientAddress, props, and redirect fields on the APIContext, which is the first parameter passed to an API route. This was done to make the APIContext more closely align with the Astro global in .astro pages.
For example, here's how you might use the clientAddress, which is the user's IP address, to selectively allow users.
export function post({ clientAddress, request, redirect }) {
if (!allowList.has(clientAddress)) {
return redirect('/not-allowed');
}
}
Check out the docs for more information on the newly available fields: https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes
#4959 0ea6187f9 Thanks @Princesseuh! - Added support for updating TypeScript settings automatically when using astro add
The astro add command will now automatically update your tsconfig.json with the proper TypeScript settings needed for the chosen frameworks.
For instance, typing astro add solid will update your tsconfig.json with the following settings, per Solid's TypeScript guide:
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js"
}
}
#4947 a5e3ecc80 Thanks @JuanM04! - - Added isRestart and addWatchFile to integration step isRestart.
#4986 ebd364e39 Thanks @bluwy! - ## Support passing a custom status code for Astro.redirect
New in this minor is the ability to pass a status code to Astro.redirect. By default it uses 302 but now you can pass another code as the second argument:
---
// This page was moved
return Astro.redirect('/posts/new-post-name', 301);
---
#5056 e55af8a23 Thanks @matthewp! - # New build configuration
The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for server (the server code for SSR), client (your client-side JavaScript and assets), and serverEntry (the name of the entrypoint server module). Here are the defaults:
import { defineConfig } from 'astro/config';
export default defineConfig({
output: 'server',
build: {
server: './dist/server/',
client: './dist/client/',
serverEntry: 'entry.mjs',
},
});
These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
The integration hook astro:build:start includes a param buildConfig which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new build.config options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:
export default function myIntegration() {
return {
name: 'my-integration',
hooks: {
'astro:config:setup': ({ updateConfig }) => {
updateConfig({
build: {
server: '...',
},
});
},
},
};
}
#5057 baf88ee9e Thanks @bluwy! - Skip JSX tagging for export statements with source
#5044 44ea0c6d9 Thanks @JuanM04! - Upgrade Astro compiler to 0.27.1
#5059 f7fcdfe62 Thanks @bluwy! - Support strict dependency install for libraries with JSX
#5047 1e2799243 Thanks @matthewp! - Update Astro.cookies.set types to allow booleans and numbers
Note that booleans and numbers were already allowed, they just were not allowed by the type definitions.
#5035 d7bfb144b Thanks @AirBorne04! - preventing multiple doctype injection into html documents
#5015 b1964e9e1 Thanks @matthewp! - Shared state in Preact components with signals
This makes it possible to share client state between Preact islands via signals.
For example, you can create a signals in an Astro component and then pass it to multiple islands:
---
// Component Imports
import Counter from '../components/Counter';
import { signal } from '@preact/signals';
const count = signal(0);
---
<Count count={count} />
<Count count={count} />
#5036 38fdb4ca6 Thanks @matthewp! - New algorithm for shorter CSS bundle names
#4981 1f890b336 Thanks @matthewp! - Ensure dynamic tags have their slot instructions yielded
#4886 61d26f335 Thanks @yuhang-dong! - Fix: import.meta.env.BASE_URL will be '/' in client loaded component on dev mode
#4973 c733d4fb8 Thanks @bluwy! - Support Astro.slots.render for mdx
#4918 a6bb2694b Thanks @bluwy! - Refactor hydration path handling
#4977 4f73b98ae Thanks @tony-sull! - Fixes a bug that logged route cache warnings in astro dev
#4887 37cb2fc02 Thanks @Calvin-LL! - fix object styles not escaped
#4990 8f9791d84 Thanks @matthewp! - Upgrade Astro compiler to 0.26.0
#4967 e6a881081 Thanks @matthewp! - Final perf fix from 1.3.0 regression
A regression in rendering perf happened in 1.3.0. This is the final fix for the underlying issue.
#4956 ee8dd424f Thanks @matthewp! - Fix perf regression in SSR
#4952 5bcd76e3a Thanks @bluwy! - Refactor ViteConfigWithSSR type
#4932 9898088c0 Thanks @matthewp! - Prevent hydration mismatch in streaming SSR
#4939 cf2bba1e4 Thanks @natemoo-re! - Fix MDX error handling, preventing a memory leak
7690849a8 Thanks @Princesseuh! - Fix module definition of Markdown and MDX files not being available outside Astro files#4907 01c1aaa00 Thanks @matthewp! - Order Astro styles last, to override imported styles
This fixes CSS ordering so that imported styles are placed higher than page/component level styles. This means that if you do:
---
import '../styles/global.css';
---
<style>
body {
background: limegreen;
}
</style>
The <style> defined in this component will be placed below the imported CSS. When compiled for production this will result in something like this:
/* /src/styles/global.css */
body {
background: blue;
}
/* /src/pages/index.astro */
body:where(.astro-12345) {
background: limegreen;
}
Given Astro's 0-specificity hashing, this change effectively makes it so that Astro styles "win" when they have the same specificity as global styles.
#4876 d3091f89e Thanks @matthewp! - Adds the Astro.cookies API
Astro.cookies is a new API for manipulating cookies in Astro components and API routes.
In Astro components, the new Astro.cookies object is a map-like object that allows you to get, set, delete, and check for a cookie's existence (has):
---
type Prefs = {
darkMode: boolean;
};
Astro.cookies.set<Prefs>(
'prefs',
{ darkMode: true },
{
expires: '1 month',
},
);
const prefs = Astro.cookies.get<Prefs>('prefs').json();
---
<body data-theme={prefs.darkMode ? 'dark' : 'light'}></body>
Once you've set a cookie with Astro.cookies it will automatically be included in the outgoing response.
This API is also available with the same functionality in API routes:
export function post({ cookies }) {
cookies.set('loggedIn', false);
return new Response(null, {
status: 302,
headers: {
Location: '/login',
},
});
}
See the RFC to learn more.
#4892 ff7ba0ee0 Thanks @matthewp! - Prevent multiple rendering of head content
#4842 812658ad2 Thanks @bluwy! - Add missing dependencies, support strict dependency installation (e.g. pnpm)
#4891 87a7cf48e Thanks @matthewp! - Hoist hydration scripts out of slot templates
Updated dependencies [812658ad2, 812658ad2]:
#4861 42fe8e0c7 Thanks @rishi-raj-jain! - use const instead of let for define:vars
#4878 90c207299 Thanks @rishi-raj-jain! - add warning for post routes called when output is not server
#4855 49ca9e129 Thanks @matthewp! - Fix TS errors when not using skipLibCheck
#4845 3389f0ce9 Thanks @matthewp! - Prevent the root folder from being deleted during the build
#4841 4b092269c Thanks @rishi-raj-jain! - copy assets even if outDir is out of process.cwd()
#4849 ee5fdeffd Thanks @rishi-raj-jain! - append .html to the file URL in case build.format says file
#4867 03e8b750a Thanks @rishi-raj-jain! - check if class:list's value is defined before converting
#4873 83ed1cc1f Thanks @bluwy! - Prevent /undefined catch-all routes in dev
#4454 6a1a17dd2 Thanks @bluwy! - Allow HMR for internal e2e tests
#4712 17dbc6701 Thanks @Lifeni! - Fix slashes for paths containing non-ASCII characters on Windows
#4850 edb7bead6 Thanks @rishi-raj-jain! - add support for changing mode via CLI
#4868 b99f9902b Thanks @rishi-raj-jain! - remove all the ssr generated folders in static build if only empty
Updated dependencies [5e4c5252b]:
#4775 b0cc93996 Thanks @tony-sull! - Adds a new "astro:build:generated" hook that runs after SSG builds finish but before build artifacts are cleaned up. This is a very specific use case, "astro:build:done" is probably what you're looking for.
#4669 a961aa3c2 Thanks @aggre! - astro-island now correctly passes Uint8Array/Uint16Array/Uint32Array
#4832 73f215df7 Thanks @matthewp! - Allows Responses to be passed to set:html
This expands the abilities of set:html to ultimate service this use-case:
<div set:html={fetch('/legacy-post.html')} />
This means you can take a legacy app that has been statically generated to HTML and directly consume that HTML within your templates. As is always the case with set:html, this should only be used on trusted content.
To make this possible, you can also pass several other types into set:html now:
Response objects, since that is what fetch() returns:
<div
set:html={new Response('<span>Hello world</span>', {
headers: { 'content-type': 'text/html' },
})}
/>
ReadableStreams:
<div
set:html={new ReadableStream({
start(controller) {
controller.enqueue(`<span>read me</span>`);
controller.close();
},
})}
/>
AsyncIterables:
<div
set:html={(async function* () {
for await (const num of [1, 2, 3, 4, 5]) {
yield `<li>${num}</li>`;
}
})()}
/>
Iterables (non-async):
<div
set:html={(function* () {
for (const num of [1, 2, 3, 4, 5]) {
yield `<li>${num}</li>`;
}
})()}
/>
#4831 29b29e6a8 Thanks @yuhang-dong! - Update vite-jsx-plugin for jsx export
#4754 baae1b3fd Thanks @Princesseuh! - Update astro check to latest version of the language server
#4813 be9eaa069 Thanks @bluwy! - Allow override vite.build.target
#4817 a49bc2f02 Thanks @mohammed-elhaouari! - fix parsing integration names with astro add command
#4819 518e8f7e2 Thanks @matthewp! - Allow passing promises to set:html
#4807 44fa37818 Thanks @lucacasonato! - Remove explicit Transfer-Encoding: chunked header from streaming responses
#4803 f53d97d56 Thanks @Enteleform! - replaces hard-coded minify values with vite.build.minify
Updated dependencies [df54595a8]:
#4768 9a59e24e0 Thanks @matthewp! - Ensure before-hydration is only loaded when used
#4759 fc885eaea Thanks @matthewp! - Read jsxImportSource from tsconfig
#4736 13ca686ea Thanks @bluwy! - Handle builds with outDir outside of current working directory
#4748 c5e134d03 Thanks @bluwy! - Fix console.error filtering
#4742 cf8a7e933 Thanks @matthewp! - Allow file uploads in dev server
#4594 005d5bacd Thanks @matthewp! - Allow custom 404 route to handle API route missing methods
#4705 5b6173fd0 Thanks @Princesseuh! - Properly show an error message when a renderer is not properly configured
#4723 0dba3b6f3 Thanks @matthewp! - Makes the dev server more resilient to crashes
d28f7013c Thanks @bholmesdev! - Fix: [astro add] Apply fetch polyfill before running#4682 d1e695914 Thanks @bholmesdev! - astro add - move configuration updates to final step
#4549 255636cc7 Thanks @altano! - Allow specifying custom encoding when using a non-html route. Only option before was 'utf-8' and now that is just the default.
#4578 c706d845e Thanks @bholmesdev! - Restart dev server when config file is added, updated, or removed
#4675 63e49c3b6 Thanks @matthewp! - Prevent locking up when encountering invalid CSS
#4684 919df13b9 Thanks @natemoo-re! - Fixes regression introduced in #4646 with better cyclic reference detection
#4683 cc242d3af Thanks @Princesseuh! - Fix tsc compilation errors when skipLibCheck wasn't enabled
#4667 9290b2414 Thanks @Holben888! - Fix framework components on Vercel Edge
#4645 f27ca6ab3 Thanks @bholmesdev! - Fix client-side scripts reloads on dev server in windows
#4646 98f242cdc Thanks @natemoo-re! - Add cyclic ref detection when serializing props
#4656 6d845c353 Thanks @matthewp! - Fix bug with using assert as import identifier
#4403 d31e72c3b Thanks @JohnDaly! - Fix for components, declared with JSXMemberExpression nodes, that failed to hydrate due to incomplete 'component-export' metadata
#4623 eb1862b4e Thanks @delucis! - Improve third-party Astro package support
#4643 307b7b97c Thanks @matthewp! - Remove regression when there is duplicate client/server CSS
#4584 29a5fdc15 Thanks @bluwy! - Correctly escape paths in file names
#4621 0068afb87 Thanks @AllanChain! - Ensure SSR module is loaded before testing if it's CSS in dev
#4586 16814dc71 Thanks @bluwy! - Move ast-types as dev dependency
#4585 f018e365c Thanks @FredKSchott! - Add docs link to "missing adapter" error msg
b92c24f40 Thanks @delucis! - Update astro add to list official integrations & adapters with same organisation we use in docs#4519 a2e8e76c3 Thanks @JuanM04! - Upgraded Shiki to v0.11.1
#4531 2d2e38e47 Thanks @bluwy! - Remove hardcoded Vite middleware handling
#4553 2f05f5d30 Thanks @matthewp! - Include trailingSlash in astro:build:done hook
This change ensures that the pages provided in the astro:build:done hook conform to the trailingSlash and build.format configs.
#4526 046bfd908 Thanks @bluwy! - Skip clean SSR output if page generation fails
#4546 bb71be78d Thanks @bholmesdev! - Update "Add an Adapter" help heading to "Add an SSR Adapter"
#4548 69b640b87 Thanks @bholmesdev! - Fix "failed to load for SSR" on styles when using tailwind
#4535 ca28d7578 Thanks @Princesseuh! - Add missing slot attributes to SVG definitions
#4524 d431fbe4e - fix import in the config type declarations
Updated dependencies [a2e8e76c3]:
4e1af3f0e Thanks @Princesseuh! - Fix import-meta.d.ts not being included in the npm packagecd154e447 Thanks @matthewp! - Make Astro.url match the build.format configuration during the buildd4cd7a59f Thanks @bholmesdev! - Update Markdown type signature to match new markdown plugin,and update top-level layout props for better alignmentac0321824 Thanks @bholmesdev! - Add "extends" to markdown plugin config to preserve Astro defaults9874c7bf4 Thanks @Princesseuh! - Update astro check to use latest version of the Astro language server77ce6be30 Thanks @Princesseuh! - Add tsconfig templates for users to extend from1f42c0791 Thanks @Princesseuh! - Fix tsc not being able to find Vite's import.meta types on Linux#4497 78e06c8ec Thanks @bholmesdev! - Production build logging - Only log [code].html instead of [code]/index.html for 404 and 500 routes
Updated dependencies [ac0321824, 839097c84]:
cd154e447 Thanks @matthewp! - Make Astro.url match the build.format configuration during the buildd4cd7a59f Thanks @bholmesdev! - Update Markdown type signature to match new markdown plugin,and update top-level layout props for better alignmentac0321824 Thanks @bholmesdev! - Add "extends" to markdown plugin config to preserve Astro defaults#4439 77ce6be30 Thanks @Princesseuh! - Add tsconfig templates for users to extend from
Updated dependencies [ac0321824, 839097c84]:
47e71ae8f Thanks @Princesseuh! - Added an error message when the second argument of Astro.slots.render is not an arrayb2e976f39 Thanks @cameronmcefee! - Fix config types to allow falsy values in integrations list, to match docs8164fa6f1 Thanks @krolebord! - Fix warning when using hooks inside the react components not exported as a function declarationdf4e99928 Thanks @bholmesdev! - Add "waiting for X integration" log for long-running integration hooksdc42f2c00 Thanks @bholmesdev! - astro add - Fix third-party npm orgs, i.e. @example/integrationca0c7e8b8 Thanks @Princesseuh! - Allow arbitrary strings on the target attribute#4446 27ac6a03a Thanks @matthewp! - Deterministic CSS ordering
This makes our CSS link order deterministic. It uses CSS depth; that is how deeply a module import the CSS comes from, in order to determine which CSS is page-level vs. component-level CSS.
This is intended to match dev ordering where, because we do not bundle, the page-level CSS always comes after component-level.
aa5118e85 Thanks @joseph-lozano! - Allow user config to set markdown.drafts optiona70f69a06 Thanks @FredKSchott! - Refactor JSX build plugin, improve performance45fdbc465 Thanks @BurntCaramel! - Use TextEncoder instead of Buffer.byteLength() for Deno compatibility0274b8d47 Thanks @tony-sull! - Updates routing logic to allow multiple routes to match the same URL in SSR166b3b8a5 Thanks @bholmesdev! - Fix MDXLayoutProps type signature for linting1d3a0a16f Thanks @FredKSchott! - Revert "Ensure hydration scripts inside of slots render ASAP (#4288)" to fix Svelte integration bug73f367c77 Thanks @FredKSchott! - Prevent preview if 'output: server' is configuredf7afdb889 Thanks @bholmesdev! - Align MD with MDX on layout props and "glob" import results:
Content to MDXfile and url to MDX frontmatter (layout import only)rawContent and compiledContent)8f845ca95 Thanks @matthewp! - Prevents automatic trailingSlash appending on getStaticPaths produced pagesc0992e1fe Thanks @natemoo-re! - Fix bug where Astro's server runtime would end up in the browser24d2f7a6e Thanks @natemoo-re! - Properly handle hydration for namespaced components3ca905174 Thanks @bholmesdev! - [astro add] Set output: 'server' when adding adapter42fd6936c Thanks @FredKSchott! - Handle "not found" imports without throwing an "Invalid URL" error0022f46b5 Thanks @Princesseuh! - Fix build output adding /index.html at the end of endpoints route7127b1bb3 Thanks @natemoo-re! - Make third-party integration names nicer when using astro add561a34d91 Thanks @matthewp! - Properly invalidate Astro modules when a child script updates in HMR3a7f2385e Thanks @FredKSchott! - Add rawContent and compiledContent to MD layout propsAstro v1.0 is out! Read the official announcement post.
Note If you need help migrating an existing Astro project to the new Astro v1.0, check out our updated Migration Guide and full documentation website.