Skip to content

Commit

Permalink
[ci] release (beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 7, 2024
1 parent b75758f commit bcb07bc
Show file tree
Hide file tree
Showing 38 changed files with 160 additions and 72 deletions.
5 changes: 5 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@
"curvy-walls-kneel",
"dry-lamps-smile",
"dry-worms-knock",
"dull-moles-talk",
"eight-days-sort",
"eighty-bags-cross",
"eighty-boxes-applaud",
"eighty-ligers-punch",
"five-jars-hear",
"fluffy-jars-live",
"fresh-pandas-drive",
Expand All @@ -72,6 +74,7 @@
"moody-waves-think",
"nasty-crabs-worry",
"neat-dots-hear",
"neat-queens-learn",
"old-zebras-teach",
"perfect-fans-fly",
"pink-yaks-exercise",
Expand All @@ -80,6 +83,7 @@
"poor-frogs-dream",
"poor-seals-clap",
"quick-ads-exercise",
"quick-onions-leave",
"rotten-phones-scream",
"selfish-cats-crash",
"selfish-impalas-grin",
Expand All @@ -100,6 +104,7 @@
"twenty-cobras-push",
"unlucky-bobcats-sit",
"violet-goats-grab",
"wet-foxes-walk",
"wise-carrots-float"
]
}
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/mdx": "^4.0.0-beta.2",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.2.0",
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
},
"peerDependencies": {
"astro": "^4.0.0 || ^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/container-with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"@astrojs/react": "^3.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.1",
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"@astrojs/preact": "^3.5.3",
"@astrojs/react": "^3.6.2",
"@astrojs/solid-js": "^4.4.2",
"@astrojs/svelte": "^6.0.0-beta.0",
"@astrojs/svelte": "^6.0.0-beta.1",
"@astrojs/vue": "^5.0.0-beta.0",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"preact": "^10.24.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.3",
"@preact/signals": "^1.3.0",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"preact": "^10.24.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.2",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.2",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"solid-js": "^1.9.1"
}
}
4 changes: 2 additions & 2 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/svelte": "^6.0.0-beta.0",
"astro": "^5.0.0-beta.3",
"@astrojs/svelte": "^6.0.0-beta.1",
"astro": "^5.0.0-beta.4",
"svelte": "^4.2.19"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.0-beta.0",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"vue": "^3.5.11"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"html-minifier": "^4.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/server-islands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@tailwindcss/forms": "^0.5.9",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"postcss": "^8.4.47",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"@astrojs/svelte": "^6.0.0-beta.0",
"astro": "^5.0.0-beta.3",
"@astrojs/svelte": "^6.0.0-beta.1",
"astro": "^5.0.0-beta.4",
"svelte": "^4.2.19"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"sass": "^1.79.4",
"sharp": "^0.33.3"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/toolbar-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.1",
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.11.5-beta.1",
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^6.0.0-beta.2",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-beta.3"
"astro": "^5.0.0-beta.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^4.0.0-beta.2",
"@astrojs/preact": "^3.5.3",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"preact": "^10.24.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.3",
"@nanostores/preact": "^0.5.2",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"nanostores": "^0.11.3",
"preact": "^10.24.2"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/mdx": "^4.0.0-beta.2",
"@astrojs/tailwind": "^5.1.1",
"@types/canvas-confetti": "^1.6.4",
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^5.0.0-beta.3",
"astro": "^5.0.0-beta.4",
"vitest": "^2.1.2"
}
}
80 changes: 80 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,85 @@
# astro

## 5.0.0-beta.4

### Major Changes

- [#11979](https://github.com/withastro/astro/pull/11979) [`423dfc1`](https://github.com/withastro/astro/commit/423dfc19ad83661b71151f8cec40701c7ced557b) Thanks [@bluwy](https://github.com/bluwy)! - Bumps `vite` dependency to v6.0.0-beta.2. The version is pinned and will be updated as new Vite versions publish to prevent unhandled breaking changes. For the full list of Vite-specific changes, see [its changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md).

- [#12100](https://github.com/withastro/astro/pull/12100) [`abf9a89`](https://github.com/withastro/astro/commit/abf9a89ac1eaec9a8934a68aeebe3c502a3b47eb) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Refactors legacy `content` and `data` collections to use the Content Layer API `glob()` loader for better performance and to support backwards compatibility. Also introduces the `legacy.collections` flag for projects that are unable to update to the new behavior immediately.

:warning: **BREAKING CHANGE FOR LEGACY CONTENT COLLECTIONS** :warning:

By default, collections that use the old types (`content` or `data`) and do not define a `loader` are now implemented under the hood using the Content Layer API's built-in `glob()` loader, with extra backward-compatibility handling.

In order to achieve backwards compatibility with existing `content` collections, the following have been implemented:

- a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content/<collection name>/**/*.md` and other content extensions depending on installed integrations, with underscore-prefixed files and folders ignored)
- When used in the runtime, the entries have an ID based on the filename in the same format as legacy collections
- A `slug` field is added with the same format as before
- A `render()` method is added to the entry, so they can be called using `entry.render()`
- `getEntryBySlug` is supported

In order to achieve backwards compatibility with existing `data` collections, the following have been implemented:

- a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content/<collection name>/**/*{.json,.yaml}` and other data extensions, with underscore-prefixed files and folders ignored)
- Entries have an ID that is not slugified
- `getDataEntryById` is supported

While this backwards compatibility implementation is able to emulate most of the features of legacy collections, **there are some differences and limitations that may cause breaking changes to existing collections**:

- In previous versions of Astro, collections would be generated for all folders in `src/content/`, even if they were not defined in `src/content/config.ts`. This behavior is now deprecated, and collections should always be defined in `src/content/config.ts`. For existing collections, these can just be empty declarations (e.g. `const blog = defineCollection({})`) and Astro will implicitly define your legacy collection for you in a way that is compatible with the new loading behavior.
- The special `layout` field is not supported in Markdown collection entries. This property is intended only for standalone page files located in `src/pages/` and not likely to be in your collection entries. However, if you were using this property, you must now create dynamic routes that include your page styling.
- Sort order of generated collections is non-deterministic and platform-dependent. This means that if you are calling `getCollection()`, the order in which entries are returned may be different than before. If you need a specific order, you should sort the collection entries yourself.
- `image().refine()` is not supported. If you need to validate the properties of an image you will need to do this at runtime in your page or component.
- the `key` argument of `getEntry(collection, key)` is typed as `string`, rather than having types for every entry.

A new legacy configuration flag `legacy.collections` is added for users that want to keep their current legacy (content and data) collections behavior (available in Astro v2 - v4), or who are not yet ready to update their projects:

```js
// astro.config.mjs
import { defineConfig } from 'astro/config';

export default defineConfig({
legacy: {
collections: true,
},
});
```

When set, no changes to your existing collections are necessary, and the restrictions on storing both new and old collections continue to exist: legacy collections (only) must continue to remain in `src/content/`, while new collections using a loader from the Content Layer API are forbidden in that folder.

- [#12079](https://github.com/withastro/astro/pull/12079) [`7febf1f`](https://github.com/withastro/astro/commit/7febf1f6b58f2ed014df617bd7162c854cadd230) Thanks [@ematipico](https://github.com/ematipico)! - `params` passed in `getStaticPaths` are no longer automatically decoded.

### [changed]: `params` aren't decoded anymore.

In Astro v4.x, `params` in were automatically decoded using `decodeURIComponent`.

Astro v5.0 doesn't automatically decode `params` in `getStaticPaths` anymore, so you'll need to manually decode them yourself if needed

#### What should I do?

If you were relying on the automatic decode, you'll need to manually decode it using `decodeURI`.

Note that the use of [`decodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)) is discouraged for `getStaticPaths` because it decodes more characters than it should, for example `/`, `?`, `#` and more.

```diff
---
export function getStaticPaths() {
return [
+ { params: { id: decodeURI("%5Bpage%5D") } },
- { params: { id: "%5Bpage%5D" } },
]
}

const { id } = Astro.params;
---
```

### Patch Changes

- [#12127](https://github.com/withastro/astro/pull/12127) [`55e9cd8`](https://github.com/withastro/astro/commit/55e9cd88551ac56ec4cab9a9f3fd9ba49b8934b9) Thanks [@ascorbic](https://github.com/ascorbic)! - Prevents Vite emitting an error when restarting itself

## 5.0.0-beta.3

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "5.0.0-beta.3",
"version": "5.0.0-beta.4",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
Loading

0 comments on commit bcb07bc

Please sign in to comment.