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 Sep 24, 2024
1 parent d1e5977 commit 381f522
Show file tree
Hide file tree
Showing 47 changed files with 226 additions and 191 deletions.
5 changes: 5 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"chilly-terms-know",
"clean-camels-drive",
"clean-donuts-walk",
"cold-bananas-hear",
"cool-mangos-shop",
"cuddly-shoes-press",
"curvy-walls-kneel",
Expand All @@ -54,9 +55,11 @@
"fuzzy-pugs-live",
"giant-rocks-thank",
"healthy-ads-scream",
"heavy-peas-sneeze",
"heavy-seahorses-poke",
"hip-wombats-exercise",
"honest-dingos-add",
"hot-camels-move",
"hungry-jokes-try",
"itchy-toys-march",
"large-zebras-sniff",
Expand All @@ -75,9 +78,11 @@
"poor-dots-add",
"poor-frogs-dream",
"quick-ads-exercise",
"rotten-phones-scream",
"selfish-cats-crash",
"selfish-impalas-grin",
"sharp-worms-sniff",
"sixty-oranges-walk",
"slimy-mice-dance",
"slimy-queens-hang",
"small-ties-sort",
Expand Down
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.1"
"astro": "^5.0.0-beta.2"
}
}
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.1",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"astro": "^5.0.0-beta.1"
"astro": "^5.0.0-beta.2"
}
}
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.1"
"astro": "^5.0.0-beta.2"
},
"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.1",
"astro": "^5.0.0-beta.2",
"@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.1"
"astro": "^5.0.0-beta.2"
}
}
8 changes: 4 additions & 4 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"dependencies": {
"@astrojs/preact": "^3.5.3",
"@astrojs/react": "^3.6.2",
"@astrojs/solid-js": "^4.4.1",
"@astrojs/svelte": "^5.7.0",
"@astrojs/vue": "^4.5.0",
"@astrojs/solid-js": "^4.4.2",
"@astrojs/svelte": "^6.0.0-beta.0",
"@astrojs/vue": "^5.0.0-beta.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-beta.1",
"astro": "^5.0.0-beta.2",
"preact": "^10.23.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.1",
"astro": "^5.0.0-beta.2",
"preact": "^10.23.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.5",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-beta.1",
"astro": "^5.0.0-beta.2",
"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.1",
"astro": "^5.0.0-beta.2",
"solid-js": "^1.8.22"
}
}
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": "^5.7.1",
"astro": "^5.0.0-beta.1",
"@astrojs/svelte": "^6.0.0-beta.0",
"astro": "^5.0.0-beta.2",
"svelte": "^4.2.19"
}
}
4 changes: 2 additions & 2 deletions examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/vue": "^4.5.1",
"astro": "^5.0.0-beta.1",
"@astrojs/vue": "^5.0.0-beta.0",
"astro": "^5.0.0-beta.2",
"vue": "^3.5.3"
}
}
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.1"
"astro": "^5.0.0-beta.2"
}
}
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.1"
"astro": "^5.0.0-beta.2"
},
"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.1",
"astro": "^5.0.0-beta.2",
"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.1"
"astro": "^5.0.0-beta.2"
}
}
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.1"
"astro": "^5.0.0-beta.2"
}
}
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.1"
"astro": "^5.0.0-beta.2"
}
}
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.5",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-beta.1",
"astro": "^5.0.0-beta.2",
"postcss": "^8.4.45",
"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": "^5.7.0",
"astro": "^5.0.0-beta.1",
"@astrojs/svelte": "^6.0.0-beta.0",
"astro": "^5.0.0-beta.2",
"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.1",
"astro": "^5.0.0-beta.2",
"sass": "^1.78.0",
"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.1"
"astro": "^5.0.0-beta.2"
}
}
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.1"
"astro": "^5.0.0-beta.2"
}
}
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.0",
"astro": "^5.0.0-beta.1"
"astro": "^5.0.0-beta.2"
}
}
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.1",
"astro": "^5.0.0-beta.1",
"astro": "^5.0.0-beta.2",
"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.1"
"astro": "^5.0.0-beta.2"
}
}
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.1",
"@astrojs/preact": "^3.5.3",
"astro": "^5.0.0-beta.1",
"astro": "^5.0.0-beta.2",
"preact": "^10.23.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.1",
"astro": "^5.0.0-beta.2",
"nanostores": "^0.11.3",
"preact": "^10.23.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.1",
"@astrojs/tailwind": "^5.1.1",
"@types/canvas-confetti": "^1.6.4",
"astro": "^5.0.0-beta.1",
"astro": "^5.0.0-beta.2",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.45",
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.1",
"astro": "^5.0.0-beta.2",
"vitest": "^2.0.5"
}
}
14 changes: 14 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# astro

## 5.0.0-beta.2

### Patch Changes

- [#12035](https://github.com/withastro/astro/pull/12035) [`325a57c`](https://github.com/withastro/astro/commit/325a57c543d88eab5e3ab32ee1bbfb534aed9c7c) Thanks [@ascorbic](https://github.com/ascorbic)! - Correctly parse values returned from inline loader

- [#12022](https://github.com/withastro/astro/pull/12022) [`ddc3a08`](https://github.com/withastro/astro/commit/ddc3a08e8facdaf0b0298ee5a7adb73a53e1575e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Properly handle including trailing slash on the image endpoint route based on the trailingSlash config

- [#12016](https://github.com/withastro/astro/pull/12016) [`837ee3a`](https://github.com/withastro/astro/commit/837ee3a4aa6b33362bd680d4a7fc786ed8639444) Thanks [@matthewp](https://github.com/matthewp)! - Fixes actions with large amount of validation errors

- [#12030](https://github.com/withastro/astro/pull/12030) [`10a756a`](https://github.com/withastro/astro/commit/10a756ad872ab0311524fca5438bff13d4df25c1) Thanks [@ascorbic](https://github.com/ascorbic)! - Resolves image paths in content layer with initial slash as project-relative

When using the `image()` schema helper, previously paths with an initial slash were treated as public URLs. This was to match the behavior of markdown images. However this is a change from before, where paths with an initial slash were treated as project-relative. This change restores the previous behavior, so that paths with an initial slash are treated as project-relative.

## 5.0.0-beta.1

### Major Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/astro/e2e/actions-blog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ test.describe('Astro Actions - Blog', () => {
await expect(form.locator('p[data-error="body"]')).toBeVisible();
});

test('Comment action - progressive fallback lots of validation errors', async ({ page, astro }) => {
test('Comment action - progressive fallback lots of validation errors', async ({
page,
astro,
}) => {
await page.goto(astro.resolveUrl('/lots-of-fields/'));

const form = page.getByTestId('lots');
Expand All @@ -81,12 +84,9 @@ test.describe('Astro Actions - Blog', () => {

const expectedText = 'Expected string, received null';

const fields = [
'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight', 'nine', 'ten'
];
const fields = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'];

for await(const field of fields) {
for await (const field of fields) {
await expect(form.locator(`.${field}.error`)).toHaveText(expectedText);
}
});
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.1",
"version": "5.0.0-beta.2",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
16 changes: 10 additions & 6 deletions packages/astro/src/actions/runtime/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { decodeBase64, encodeBase64 } from '@oslojs/encoding';
import { yellow } from 'kleur/colors';
import { defineMiddleware } from '../../core/middleware/index.js';
import type { MiddlewareNext } from '../../types/public/common.js';
Expand All @@ -10,7 +11,6 @@ import {
type SerializedActionResult,
serializeActionResult,
} from './virtual/shared.js';
import { encodeBase64, decodeBase64 } from '@oslojs/encoding';

export type ActionPayload = {
actionResult: SerializedActionResult;
Expand Down Expand Up @@ -46,7 +46,7 @@ export const onRequest = defineMiddleware(async (context, next) => {
const actionPayloadCookie = context.cookies.get(ACTION_QUERY_PARAMS.actionPayload)?.value;
if (actionPayloadCookie) {
const actionPayload = JSON.parse(decoder.decode(decodeBase64(actionPayloadCookie)));

if (!isActionPayload(actionPayload)) {
throw new Error('Internal: Invalid action payload in cookie.');
}
Expand Down Expand Up @@ -130,10 +130,14 @@ async function redirectWithResult({
actionName: string;
actionResult: SafeResult<any, any>;
}) {
const cookieValue = encodeBase64(encoder.encode(JSON.stringify({
actionName: actionName,
actionResult: serializeActionResult(actionResult),
})));
const cookieValue = encodeBase64(
encoder.encode(
JSON.stringify({
actionName: actionName,
actionResult: serializeActionResult(actionResult),
}),
),
);
context.cookies.set(ACTION_QUERY_PARAMS.actionPayload, cookieValue);

if (actionResult.error) {
Expand Down
Loading

0 comments on commit 381f522

Please sign in to comment.