0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] release (#10865)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Houston (Bot) 2024-04-25 02:28:32 -07:00 committed by GitHub
parent d74b9ed7b6
commit 9876163406
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 125 additions and 134 deletions

View file

@ -1,5 +0,0 @@
---
"astro": patch
---
Fixes an issue where `astro build` writes type declaration files to `outDir` when it's outside of root directory.

View file

@ -1,5 +0,0 @@
---
"astro": patch
---
Update sharp to 0.33 to fix issue with Alpine Linux

View file

@ -1,53 +0,0 @@
---
"astro": minor
---
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.
```diff
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:
```ts
"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](https://docs.astro.build/en/reference/dev-toolbar-app-reference/).

View file

@ -1,7 +0,0 @@
---
"astro": minor
---
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`.

View file

@ -1,7 +0,0 @@
---
"astro": minor
---
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`.

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -14,6 +14,6 @@
"@astrojs/mdx": "^2.3.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.4",
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.6.4"
"astro": "^4.7.0"
},
"peerDependencies": {
"astro": "^4.0.0"

View file

@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^4.0.1",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.6.4",
"astro": "^4.7.0",
"lit": "^3.1.2"
}
}

View file

@ -18,7 +18,7 @@
"@astrojs/vue": "^4.1.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.6.4",
"astro": "^4.7.0",
"preact": "^10.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.2.0",
"@preact/signals": "^1.2.1",
"astro": "^4.6.4",
"astro": "^4.7.0",
"preact": "^10.19.2"
}
}

View file

@ -14,7 +14,7 @@
"@astrojs/react": "^3.3.1",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.6.4",
"astro": "^4.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.1.0",
"astro": "^4.6.4",
"astro": "^4.7.0",
"solid-js": "^1.8.5"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^5.4.0",
"astro": "^4.6.4",
"astro": "^4.7.0",
"svelte": "^4.2.5"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^4.1.0",
"astro": "^4.6.4",
"astro": "^4.7.0",
"vue": "^3.3.8"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.6.4"
"astro": "^4.7.0"
},
"peerDependencies": {
"astro": "^4.0.0"

View file

@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.6.4",
"astro": "^4.7.0",
"html-minifier": "^4.0.0"
},
"devDependencies": {

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.2.5",
"@astrojs/svelte": "^5.4.0",
"astro": "^4.6.4",
"astro": "^4.7.0",
"svelte": "^4.2.5"
}
}

View file

@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.4",
"astro": "^4.7.0",
"sass": "^1.69.5",
"sharp": "^0.33.3"
}

View file

@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^4.6.1"
"astro": "^4.7.0"
}
}

View file

@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.2.5",
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.11.0",
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^5.1.0",
"astro": "^4.6.4",
"astro": "^4.7.0",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.4"
"astro": "^4.7.0"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^2.3.1",
"@astrojs/preact": "^3.2.0",
"astro": "^4.6.4",
"astro": "^4.7.0",
"preact": "^10.19.2"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.2.0",
"@nanostores/preact": "^0.5.0",
"astro": "^4.6.4",
"astro": "^4.7.0",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}

View file

@ -14,7 +14,7 @@
"@astrojs/mdx": "^2.3.1",
"@astrojs/tailwind": "^5.1.0",
"@types/canvas-confetti": "^1.6.3",
"astro": "^4.6.4",
"astro": "^4.7.0",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",

View file

@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.6.4",
"astro": "^4.7.0",
"vitest": "^1.5.0"
}
}

View file

@ -1,5 +1,73 @@
# astro
## 4.7.0
### Minor Changes
- [#10665](https://github.com/withastro/astro/pull/10665) [`7b4f284`](https://github.com/withastro/astro/commit/7b4f2840203fe220758934f1366485f788727f0d) Thanks [@Princesseuh](https://github.com/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.
```diff
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:
```ts
"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](https://docs.astro.build/en/reference/dev-toolbar-app-reference/).
- [#10734](https://github.com/withastro/astro/pull/10734) [`6fc4c0e`](https://github.com/withastro/astro/commit/6fc4c0e420da7629b4cfc28ee7efce1d614447be) Thanks [@Princesseuh](https://github.com/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](https://github.com/withastro/astro/pull/10762) [`43ead8f`](https://github.com/withastro/astro/commit/43ead8fbd5112823118060175c7a4a22522cc325) Thanks [@bholmesdev](https://github.com/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`.
### Patch Changes
- [#10861](https://github.com/withastro/astro/pull/10861) [`b673bc8`](https://github.com/withastro/astro/commit/b673bc850593d5af25793d0358c00797477fa373) Thanks [@mingjunlu](https://github.com/mingjunlu)! - Fixes an issue where `astro build` writes type declaration files to `outDir` when it's outside of root directory.
- [#10684](https://github.com/withastro/astro/pull/10684) [`8b59d5d`](https://github.com/withastro/astro/commit/8b59d5d078ff40576b8cbee432279c6ad044a1a9) Thanks [@PeterDraex](https://github.com/PeterDraex)! - Update sharp to 0.33 to fix issue with Alpine Linux
## 4.6.4
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "astro",
"version": "4.6.4",
"version": "4.7.0",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",

View file

@ -128,7 +128,7 @@ importers:
examples/basics:
dependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/blog:
@ -143,13 +143,13 @@ importers:
specifier: ^3.1.4
version: link:../../packages/integrations/sitemap
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/framework-alpine:
@ -164,7 +164,7 @@ importers:
specifier: ^3.13.3
version: 3.13.8
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/framework-lit:
@ -176,7 +176,7 @@ importers:
specifier: ^0.2.1
version: 0.2.1
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
lit:
specifier: ^3.1.2
@ -206,7 +206,7 @@ importers:
specifier: ^18.2.15
version: 18.2.25
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
preact:
specifier: ^10.19.2
@ -236,7 +236,7 @@ importers:
specifier: ^1.2.1
version: 1.2.1(preact@10.20.2)
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
preact:
specifier: ^10.19.2
@ -254,7 +254,7 @@ importers:
specifier: ^18.2.15
version: 18.2.25
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
react:
specifier: ^18.2.0
@ -269,7 +269,7 @@ importers:
specifier: ^4.1.0
version: link:../../packages/integrations/solid
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
solid-js:
specifier: ^1.8.5
@ -281,7 +281,7 @@ importers:
specifier: ^5.4.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
svelte:
specifier: ^4.2.5
@ -293,7 +293,7 @@ importers:
specifier: ^4.1.0
version: link:../../packages/integrations/vue
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
vue:
specifier: ^3.3.8
@ -305,13 +305,13 @@ importers:
specifier: ^8.2.5
version: link:../../packages/integrations/node
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/middleware:
@ -320,7 +320,7 @@ importers:
specifier: ^8.2.5
version: link:../../packages/integrations/node
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
html-minifier:
specifier: ^4.0.0
@ -333,19 +333,19 @@ importers:
examples/minimal:
dependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/non-html-pages:
dependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/ssr:
@ -357,7 +357,7 @@ importers:
specifier: ^5.4.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
svelte:
specifier: ^4.2.5
@ -366,7 +366,7 @@ importers:
examples/starlog:
dependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
sass:
specifier: ^1.69.5
@ -378,7 +378,7 @@ importers:
examples/toolbar-app:
devDependencies:
astro:
specifier: ^4.6.1
specifier: ^4.7.0
version: link:../../packages/astro
examples/view-transitions:
@ -390,7 +390,7 @@ importers:
specifier: ^5.1.0
version: link:../../packages/integrations/tailwind
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/with-markdoc:
@ -399,7 +399,7 @@ importers:
specifier: ^0.11.0
version: link:../../packages/integrations/markdoc
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/with-markdown-plugins:
@ -408,7 +408,7 @@ importers:
specifier: ^5.1.0
version: link:../../packages/markdown/remark
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
hast-util-select:
specifier: ^6.0.2
@ -429,7 +429,7 @@ importers:
examples/with-markdown-shiki:
dependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
examples/with-mdx:
@ -441,7 +441,7 @@ importers:
specifier: ^3.2.0
version: link:../../packages/integrations/preact
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
preact:
specifier: ^10.19.2
@ -456,7 +456,7 @@ importers:
specifier: ^0.5.0
version: 0.5.1(nanostores@0.9.5)(preact@10.20.2)
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
nanostores:
specifier: ^0.9.5
@ -477,7 +477,7 @@ importers:
specifier: ^1.6.3
version: 1.6.4
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.15
@ -495,7 +495,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
specifier: ^4.6.4
specifier: ^4.7.0
version: link:../../packages/astro
vitest:
specifier: ^1.5.0