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

[ci] release (alpha) (#11910)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Houston (Bot) 2024-09-04 04:44:20 -07:00 committed by GitHub
parent c3dce8363b
commit 70865b3cdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 204 additions and 62 deletions

View file

@ -38,17 +38,22 @@
"clean-donuts-walk",
"curvy-walls-kneel",
"eighty-boxes-applaud",
"empty-spoons-kiss",
"five-jars-hear",
"forty-spies-train",
"healthy-ads-scream",
"heavy-seahorses-poke",
"hungry-jokes-try",
"itchy-toys-march",
"large-zebras-sniff",
"long-months-rule",
"many-garlics-lick",
"mean-donkeys-switch",
"modern-bears-deny",
"moody-waves-think",
"nasty-crabs-worry",
"neat-dots-hear",
"old-zebras-teach",
"perfect-fans-fly",
"poor-frogs-dream",
"quick-ads-exercise",

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -14,6 +14,6 @@
"@astrojs/mdx": "^4.0.0-alpha.2",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
},
"peerDependencies": {
"astro": "^4.0.0"

View file

@ -12,7 +12,7 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"@astrojs/react": "^3.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.1",
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -18,7 +18,7 @@
"@astrojs/vue": "^5.0.0-alpha.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"preact": "^10.23.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.2",
"@preact/signals": "^1.3.0",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"preact": "^10.23.2"
}
}

View file

@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.2",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.1",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"solid-js": "^1.8.22"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^6.0.0-alpha.0",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"svelte": "^4.2.19"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.0-alpha.0",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"vue": "^3.4.38"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
},
"peerDependencies": {
"astro": "^4.0.0"

View file

@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"html-minifier": "^4.0.0"
},
"devDependencies": {

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -17,7 +17,7 @@
"@tailwindcss/forms": "^0.5.8",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"postcss": "^8.4.43",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"@astrojs/svelte": "^6.0.0-alpha.0",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"svelte": "^4.2.19"
}
}

View file

@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"sass": "^1.77.8",
"sharp": "^0.33.3"
}

View file

@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^6.0.0-alpha.0",
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^1.0.0-alpha.1",
"astro": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^6.0.0-alpha.1",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"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": "^5.0.0-alpha.3"
"astro": "^5.0.0-alpha.4"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^4.0.0-alpha.2",
"@astrojs/preact": "^3.5.2",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"preact": "^10.23.2"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.2",
"@nanostores/preact": "^0.5.2",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"nanostores": "^0.11.3",
"preact": "^10.23.2"
}

View file

@ -14,7 +14,7 @@
"@astrojs/mdx": "^4.0.0-alpha.2",
"@astrojs/tailwind": "^6.0.0-alpha.0",
"@types/canvas-confetti": "^1.6.4",
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.43",

View file

@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^5.0.0-alpha.3",
"astro": "^5.0.0-alpha.4",
"vitest": "^2.0.5"
}
}

View file

@ -1,5 +1,133 @@
# astro
## 5.0.0-alpha.4
### Major Changes
- [#11859](https://github.com/withastro/astro/pull/11859) [`3804711`](https://github.com/withastro/astro/commit/38047119ff454e80cddd115bff53e33b32cd9930) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Changes the default `tsconfig.json` with better defaults, and makes `src/env.d.ts` optional
Astro's default `tsconfig.json` in starter examples has been updated to include generated types and exclude your build output. This means that `src/env.d.ts` is only necessary if you have added custom type declarations or if you're not using a `tsconfig.json` file.
Additionally, running `astro sync` no longer creates, nor updates, `src/env.d.ts` as it is not required for type-checking standard Astro projects.
To update your project to Astro's recommended TypeScript settings, please add the following `include` and `exclude` properties to `tsconfig.json`:
```diff
{
"extends": "astro/tsconfigs/base",
+ "include": ["**/*", ".astro/types.d.ts"],
+ "exclude": ["dist"]
}
```
### Minor Changes
- [#11911](https://github.com/withastro/astro/pull/11911) [`c3dce83`](https://github.com/withastro/astro/commit/c3dce8363be22121a567df22df2ec566a3ebda17) Thanks [@ascorbic](https://github.com/ascorbic)! - The Content Layer API introduced behind a flag in [4.14.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#4140) is now stable and ready for use in Astro v5.0.
The new Content Layer API builds upon content collections, taking them beyond local files in `src/content/` and allowing you to fetch content from anywhere, including remote APIs. These new collections work alongside your existing content collections, and you can migrate them to the new API at your own pace. There are significant improvements to performance with large collections of local files. For more details, see [the Content Layer RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md).
If you previously used this feature, you can now remove the `experimental.contentLayer` flag from your Astro config:
```diff
// astro.config.mjs
import { defineConfig } from 'astro'
export default defineConfig({
- experimental: {
- contentLayer: true
- }
})
```
### Loading your content
The core of the new Content Layer API is the loader, a function that fetches content from a source and caches it in a local data store. Astro 4.14 ships with built-in `glob()` and `file()` loaders to handle your local Markdown, MDX, Markdoc, and JSON files:
```ts {3,7}
// src/content/config.ts
import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';
const blog = defineCollection({
// The ID is a slug generated from the path of the file relative to `base`
loader: glob({ pattern: '**/*.md', base: './src/data/blog' }),
schema: z.object({
title: z.string(),
description: z.string(),
publishDate: z.coerce.date(),
}),
});
export const collections = { blog };
```
You can then query using the existing content collections functions, and use a simplified `render()` function to display your content:
```astro
---
import { getEntry, render } from 'astro:content';
const post = await getEntry('blog', Astro.params.slug);
const { Content } = await render(entry);
---
<Content />
```
### Creating a loader
You're not restricted to the built-in loaders we hope you'll try building your own. You can fetch content from anywhere and return an array of entries:
```ts
// src/content/config.ts
const countries = defineCollection({
loader: async () => {
const response = await fetch('https://restcountries.com/v3.1/all');
const data = await response.json();
// Must return an array of entries with an id property,
// or an object with IDs as keys and entries as values
return data.map((country) => ({
id: country.cca3,
...country,
}));
},
// optionally add a schema to validate the data and make it type-safe for users
// schema: z.object...
});
export const collections = { countries };
```
For more advanced loading logic, you can define an object loader. This allows incremental updates and conditional loading, and gives full access to the data store. It also allows a loader to define its own schema, including generating it dynamically based on the source API. See the [the Content Layer API RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md#loaders) for more details.
### Sharing your loaders
Loaders are better when they're shared. You can create a package that exports a loader and publish it to npm, and then anyone can use it on their site. We're excited to see what the community comes up with! To get started, [take a look at some examples](https://github.com/ascorbic/astro-loaders/). Here's how to load content using an RSS/Atom feed loader:
```ts
// src/content/config.ts
import { defineCollection } from 'astro:content';
import { feedLoader } from '@ascorbic/feed-loader';
const podcasts = defineCollection({
loader: feedLoader({
url: 'https://feeds.99percentinvisible.org/99percentinvisible',
}),
});
export const collections = { podcasts };
```
To learn more, see [the Content Layer RFC](https://github.com/withastro/roadmap/blob/content-layer/proposals/0050-content-layer.md).
### Patch Changes
- [#11902](https://github.com/withastro/astro/pull/11902) [`d63bc50`](https://github.com/withastro/astro/commit/d63bc50d9940c1107e0fee7687e5c332549a0eff) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes case where content layer did not update during clean dev builds on Linux and Windows
- [#11914](https://github.com/withastro/astro/pull/11914) [`b5d827b`](https://github.com/withastro/astro/commit/b5d827ba6852d046c33643f795e1542bc2818b2c) Thanks [@ascorbic](https://github.com/ascorbic)! - Exports types for all `LoaderContext` properties from `astro/loaders` to make it easier to use them in custom loaders.
The `ScopedDataStore` interface (which was previously internal) is renamed to `DataStore`, to reflect the fact that it's the only public API for the data store.
## 5.0.0-alpha.3
### Major Changes

View file

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

View file

@ -1,8 +1,10 @@
import fsMod, { existsSync } from 'node:fs';
import { dirname, relative } from 'node:path';
import { performance } from 'node:perf_hooks';
import { fileURLToPath } from 'node:url';
import { dim } from 'kleur/colors';
import { type HMRPayload, createServer } from 'vite';
import { normalizePath } from 'vite';
import { CONTENT_TYPES_FILE } from '../../content/consts.js';
import { getDataStoreFile, globalContentLayer } from '../../content/content-layer.js';
import { createContentTypesGenerator } from '../../content/index.js';
@ -30,8 +32,6 @@ import {
import type { Logger } from '../logger/core.js';
import { formatErrorMessage } from '../messages.js';
import { ensureProcessNodeEnv } from '../util.js';
import { dirname, relative } from 'node:path';
import { normalizePath } from 'vite';
export type SyncOptions = {
/**

View file

@ -1,5 +1,14 @@
# @astrojs/db
## 0.13.2-alpha.1
### Patch Changes
- [#11894](https://github.com/withastro/astro/pull/11894) [`cc820c5`](https://github.com/withastro/astro/commit/cc820c5d5e176a8d71594d612af75e1c94b9bf02) Thanks [@Fryuni](https://github.com/Fryuni)! - Fixes mixed environment variable for app token when using DB commands with libSQL remote.
- Updated dependencies []:
- @astrojs/studio@0.1.1
## 0.14.0
### Minor Changes

View file

@ -1,6 +1,6 @@
{
"name": "@astrojs/db",
"version": "0.13.2-alpha.0",
"version": "0.13.2-alpha.1",
"description": "Add libSQL and Astro Studio support to your Astro site",
"license": "MIT",
"repository": {

View file

@ -116,7 +116,7 @@ importers:
examples/basics:
dependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/blog:
@ -131,13 +131,13 @@ importers:
specifier: ^3.1.6
version: link:../../packages/integrations/sitemap
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/container-with-vitest:
@ -146,7 +146,7 @@ importers:
specifier: ^3.6.2
version: link:../../packages/integrations/react
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -177,7 +177,7 @@ importers:
specifier: ^3.14.1
version: 3.14.1
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/framework-multiple:
@ -204,7 +204,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
preact:
specifier: ^10.23.2
@ -234,7 +234,7 @@ importers:
specifier: ^1.3.0
version: 1.3.0(preact@10.23.2)
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
preact:
specifier: ^10.23.2
@ -252,7 +252,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -267,7 +267,7 @@ importers:
specifier: ^4.4.1
version: link:../../packages/integrations/solid
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
solid-js:
specifier: ^1.8.22
@ -279,7 +279,7 @@ importers:
specifier: ^6.0.0-alpha.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
svelte:
specifier: ^4.2.19
@ -291,7 +291,7 @@ importers:
specifier: ^5.0.0-alpha.0
version: link:../../packages/integrations/vue
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
vue:
specifier: ^3.4.38
@ -303,13 +303,13 @@ importers:
specifier: ^9.0.0-alpha.1
version: 9.0.0-alpha.1(astro@packages+astro)
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/middleware:
@ -318,7 +318,7 @@ importers:
specifier: ^9.0.0-alpha.1
version: 9.0.0-alpha.1(astro@packages+astro)
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
html-minifier:
specifier: ^4.0.0
@ -331,19 +331,19 @@ importers:
examples/minimal:
dependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/non-html-pages:
dependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/server-islands:
@ -370,7 +370,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
postcss:
specifier: ^8.4.43
@ -394,7 +394,7 @@ importers:
specifier: ^6.0.0-alpha.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
svelte:
specifier: ^4.2.19
@ -403,7 +403,7 @@ importers:
examples/starlog:
dependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
sass:
specifier: ^1.77.8
@ -415,7 +415,7 @@ importers:
examples/toolbar-app:
devDependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/view-transitions:
@ -427,7 +427,7 @@ importers:
specifier: ^6.0.0-alpha.0
version: link:../../packages/integrations/tailwind
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/with-markdoc:
@ -436,7 +436,7 @@ importers:
specifier: ^1.0.0-alpha.1
version: link:../../packages/integrations/markdoc
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/with-markdown-plugins:
@ -445,7 +445,7 @@ importers:
specifier: ^6.0.0-alpha.1
version: link:../../packages/markdown/remark
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
hast-util-select:
specifier: ^6.0.2
@ -466,7 +466,7 @@ importers:
examples/with-markdown-shiki:
dependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
examples/with-mdx:
@ -478,7 +478,7 @@ importers:
specifier: ^3.5.2
version: link:../../packages/integrations/preact
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
preact:
specifier: ^10.23.2
@ -493,7 +493,7 @@ importers:
specifier: ^0.5.2
version: 0.5.2(nanostores@0.11.3)(preact@10.23.2)
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
nanostores:
specifier: ^0.11.3
@ -514,7 +514,7 @@ importers:
specifier: ^1.6.4
version: 1.6.4
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.20
@ -532,7 +532,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
specifier: ^5.0.0-alpha.3
specifier: ^5.0.0-alpha.4
version: link:../../packages/astro
vitest:
specifier: ^2.0.5