The web framework for content-driven websites. ⭐️ Star to support our work!
OTHER License
Published by astrobot-houston 6 months ago
#10938 fd508a0
Thanks @florian-lefebvre! - Adds a devtools
option
You can enable Preact devtools in development by setting devtools: true
in your preact()
integration config:
import { defineConfig } from 'astro/config';
import preact from '@astrojs/preact';
export default defineConfig({
integrations: [preact({ devtools: true })],
});
Published by astrobot-houston 6 months ago
#10935 ddd8e49
Thanks @bluwy! - Refactors the MDX transformation to rely only on the unified pipeline. Babel and esbuild transformations are removed, which should result in faster build times. The refactor requires using Astro v4.8.0 but no other changes are necessary.
#10935 ddd8e49
Thanks @bluwy! - Allows integrations after the MDX integration to update markdown.remarkPlugins
and markdown.rehypePlugins
, and have the plugins work in MDX too.
If your integration relies on Astro's previous behavior that prevents integrations from adding remark/rehype plugins for MDX, you will now need to configure @astrojs/mdx
with extendMarkdownConfig: false
and explicitly specify any remarkPlugins
and rehypePlugins
options instead.
#10935 ddd8e49
Thanks @bluwy! - Renames the optimize.customComponentNames
option to optimize.ignoreElementNames
to better reflect its usecase. Its behaviour is not changed and should continue to work as before.
#10935 ddd8e49
Thanks @bluwy! - Replaces the internal remark-images-to-component
plugin with rehype-images-to-component
to let users use additional rehype plugins for images
#10935 ddd8e49
Thanks @bluwy! - Simplifies plain MDX components as hast element nodes to further improve HTML string inlining for the optimize
option
#10935 ddd8e49
Thanks @bluwy! - Allows Vite plugins to transform .mdx
files before the MDX plugin transforms it
#10935 ddd8e49
Thanks @bluwy! - Updates the optimize
option to group static sibling nodes as a <Fragment />
. This reduces the number of AST nodes and simplifies runtime rendering of MDX pages.
#10935 ddd8e49
Thanks @bluwy! - Tags the MDX component export for quicker component checks while rendering
#10935 ddd8e49
Thanks @bluwy! - Fixes export const components
keys detection for the optimize
option
#10935 ddd8e49
Thanks @bluwy! - Improves optimize
handling for MDX components with attributes and inline MDX components
Published by astrobot-houston 6 months ago
Published by astrobot-houston 6 months ago
Published by astrobot-houston 6 months ago
44bafa9
Thanks @bholmesdev! - - Fix duplicate table recreations when you start your dev server.
Published by astrobot-houston 6 months ago
#10911 a86dc9d
Thanks @bluwy! - Skips adding CSS dependencies of CSS Vite modules as style tags in the HTML
#10900 36bb3b6
Thanks @martrapp! - Detects overlapping navigation and view transitions and automatically aborts all but the most recent one.
#10933 007d17f
Thanks @Princesseuh! - Fixes app.toggleState
not working correctly
#10931 4ce5ced
Thanks @ktym4a! - Fixes toggleNotification()
's parameter type for the notification level not using the proper levels
Published by astrobot-houston 6 months ago
Published by astrobot-houston 6 months ago
#10882 cf58d1e
Thanks @delucis! - Improves the typing of the asDrizzleTable()
utility
Fixes a type error when passing the output of defineTable()
to the utility and returns a more detailed type inferred from the columns of the passed table config.
#10918 ca605f4
Thanks @matthewp! - Provide a better error message when app token is missing in CI
#10925 a0c77fc
Thanks @Princesseuh! - Fixes ASTRO_DATABASE_FILE
not correctly resolving relative paths (e.g. ASTRO_DATABASE_FILE=./api/database.db
Published by astrobot-houston 6 months ago
#10665 7b4f284
Thanks @Princesseuh! - Adds new utilities to ease the creation of toolbar apps including defineToolbarApp
to make it easier to define your toolbar app and app
and server
helpers for easier communication between the toolbar and the server. These new utilities abstract away some of the boilerplate code that is common in toolbar apps, and lower the barrier of entry for app authors.
For example, instead of creating an event listener for the app-toggled
event and manually typing the value in the callback, you can now use the onAppToggled
method. Additionally, communicating with the server does not require knowing any of the Vite APIs anymore, as a new server
object is passed to the init
function that contains easy to use methods for communicating with the server.
import { defineToolbarApp } from "astro/toolbar";
export default defineToolbarApp({
init(canvas, app, server) {
- app.addEventListener("app-toggled", (e) => {
- console.log(`App is now ${state ? "enabled" : "disabled"}`);.
- });
+ app.onToggled(({ state }) => {
+ console.log(`App is now ${state ? "enabled" : "disabled"}`);
+ });
- if (import.meta.hot) {
- import.meta.hot.send("my-app:my-client-event", { message: "world" });
- }
+ server.send("my-app:my-client-event", { message: "world" })
- if (import.meta.hot) {
- import.meta.hot.on("my-server-event", (data: {message: string}) => {
- console.log(data.message);
- });
- }
+ server.on<{ message: string }>("my-server-event", (data) => {
+ console.log(data.message); // data is typed using the type parameter
+ });
},
})
Server helpers are also available on the server side, for use in your integrations, through the new toolbar
object:
"astro:server:setup": ({ toolbar }) => {
toolbar.on<{ message: string }>("my-app:my-client-event", (data) => {
console.log(data.message);
toolbar.send("my-server-event", { message: "hello" });
});
}
This is a backwards compatible change and your your existing dev toolbar apps will continue to function. However, we encourage you to build your apps with the new helpers, following the updated Dev Toolbar API documentation.
#10734 6fc4c0e
Thanks @Princesseuh! - Astro will now automatically check for updates when you run the dev server. If a new version is available, a message will appear in the terminal with instructions on how to update. Updates will be checked once per 10 days, and the message will only appear if the project is multiple versions behind the latest release.
This behavior can be disabled by running astro preferences disable checkUpdates
or setting the ASTRO_DISABLE_UPDATE_CHECK
environment variable to false
.
#10762 43ead8f
Thanks @bholmesdev! - Enables type checking for JavaScript files when using the strictest
TS config. This ensures consistency with Astro's other TS configs, and fixes type checking for integrations like Astro DB when using an astro.config.mjs
.
If you are currently using the strictest
preset and would like to still disable .js
files, set allowJS: false
in your tsconfig.json
.
#10861 b673bc8
Thanks @mingjunlu! - Fixes an issue where astro build
writes type declaration files to outDir
when it's outside of root directory.
#10684 8b59d5d
Thanks @PeterDraex! - Update sharp to 0.33 to fix issue with Alpine Linux
Published by astrobot-houston 6 months ago
#10846 3294f7a
Thanks @matthewp! - Prevent getCollection breaking in vitest
#10856 30cf82a
Thanks @robertvanhoesel! - Prevents inputs with a name attribute of action or method to break ViewTransitions' form submission
#10833 8d5f3e8
Thanks @renovate! - Updates esbuild
dependency to v0.20. This should not affect projects in most cases.
#10801 204b782
Thanks @rishi-raj-jain! - Fixes an issue where images in MD required a relative specifier (e.g. ./
)
Now, you can use the standard ![](relative/img.png)
syntax in MD files for images colocated in the same folder: no relative specifier required!
There is no need to update your project; your existing images will still continue to work. However, you may wish to remove any relative specifiers from these MD images as they are no longer necessary:
- ![A cute dog](./dog.jpg)
+ ![A cute dog](dog.jpg)
<!-- This dog lives in the same folder as my article! -->
#10841 a2df344
Thanks @martrapp! - Due to regression on mobile WebKit browsers, reverts a change made for JavaScript animations during view transitions.
Published by astrobot-houston 6 months ago
Published by astrobot-houston 6 months ago
f6bddd3
Thanks @lamATnginx! - Fix Redoc usage in React integrationPublished by astrobot-houston 6 months ago
Published by astrobot-houston 6 months ago
8e6eb62
Thanks @bholmesdev! - Add astro login
support from online editors like Stackblitz and GitHub CodespacesPublished by astrobot-houston 6 months ago
#10799 dc74afca9f5eebc2d61331298d6ef187d92051e0
Thanks @martrapp! - Fixes an issue with persisted non-text input fields that have the focus during view transition navigation.
#10773 35e43ecdaae7adc4b9a0b974192a033568cfb3f0
Thanks @lilnasy! - Improves performance for frequent use of small components.
#10763 63132771373ce1510be3e8814897accc0bf62ef8
Thanks @matthewp! - Invalidate CC cache manifest when lockfile or config changes
#10811 77822a822b04b5113726f713df104e8667333c59
Thanks @AvinashReddy3108! - Update list of available integrations in the astro add
CLI help.
Published by astrobot-houston 6 months ago
0e22462d1534afc8f7bb6782f86db680c7a5f245
Thanks @gislerro! - Fixes an issue where the root url does not follow the trailingSlash
config optionPublished by astrobot-houston 6 months ago
d4c91cb10924a0627a9e9a80bc549b3c82d043e6
Thanks @NickDubelman! - Expose the Drizzle alias
utility from astro:db
to enable self-joins on a table.Published by astrobot-houston 6 months ago
#10732 a92e263beb6e0166f1f13c97803d1861793e2a99
Thanks @rishi-raj-jain! - Correctly sets build.assets
directory during vite
config setup
#10776 1607face67051b16d4648555f1001b2a9308e377
Thanks @fshafiee! - Fixes cookies type inference
#10796 90669472df3a05b33f0de46fd2d039e3eba7f7dd
Thanks @bluwy! - Disables streaming when rendering site with output: "static"
#10782 b0589d05538fcc77dd3c38198bf93f3548362cd8
Thanks @nektro! - Handles possible null value when calling which-pm
during dynamic package installation
#10774 308b5d8c122f44e7724bb2f3ad3aa5c43a83e584
Thanks @Princesseuh! - Fixes astro add
sometimes modifying baseUrl
unintentionally
#10783 4dbd545304d1a8af903c8c97f237eb55c988c40b
Thanks @jurajkapsz! - Fixes Picture component specialFormatsFallback fallback check
#10775 06843121450899ecf0390ca4efaff6c9a6fe0f75
Thanks @Princesseuh! - Fixes assets endpoint in serverless returning 404 in certain situations where the website might be under a protected route
#10787 699f4559a279b374bddb3e5e48c72afe2709e8e7
Thanks @martrapp! - Fixes a timing issue in the view transition simulation.
Published by astrobot-houston 6 months ago
1ce22881c657becf0397b83ac393fb5d2399104c
Thanks @bluwy! - Improves performance when generating the sitemap data