0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

[ci] release (alpha) (#11853)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Houston (Bot) 2024-08-30 13:12:25 -07:00 committed by GitHub
parent 01b48a466e
commit 534d3edff8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 200 additions and 105 deletions

View file

@ -35,27 +35,22 @@
"blue-boats-relax", "blue-boats-relax",
"chatty-teachers-sit", "chatty-teachers-sit",
"eighty-boxes-applaud", "eighty-boxes-applaud",
"fair-rats-fail", "five-jars-hear",
"healthy-ads-scream", "healthy-ads-scream",
"itchy-toys-march", "itchy-toys-march",
"long-months-burn", "long-months-rule",
"many-garlics-lick", "many-garlics-lick",
"mighty-trees-teach",
"modern-bears-deny", "modern-bears-deny",
"new-pillows-kick", "nasty-crabs-worry",
"odd-donuts-impress", "neat-dots-hear",
"perfect-fans-fly", "perfect-fans-fly",
"poor-frogs-dream", "poor-frogs-dream",
"quick-ads-exercise", "quick-ads-exercise",
"selfish-impalas-grin", "selfish-impalas-grin",
"sixty-masks-lie",
"small-ties-sort", "small-ties-sort",
"smart-comics-doubt",
"smooth-melons-cough",
"spicy-houses-fry",
"spotty-garlics-cheat", "spotty-garlics-cheat",
"ten-students-repair", "ten-students-repair",
"tiny-lamps-lick", "twenty-cobras-push"
"weak-dancers-beam",
"weak-masks-do"
] ]
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.2", "@astrojs/react": "^3.6.2",
"@types/react": "^18.3.4", "@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.1", "astro": "^5.0.0-alpha.2",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1" "react-dom": "^18.3.1"
} }

View file

@ -12,7 +12,7 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/solid-js": "^4.4.1", "@astrojs/solid-js": "^4.4.1",
"astro": "^5.0.0-alpha.1", "astro": "^5.0.0-alpha.2",
"solid-js": "^1.8.21" "solid-js": "^1.8.21"
} }
} }

View file

@ -12,7 +12,7 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/svelte": "^6.0.0-alpha.0", "@astrojs/svelte": "^6.0.0-alpha.0",
"astro": "^5.0.0-alpha.1", "astro": "^5.0.0-alpha.2",
"svelte": "^4.2.18" "svelte": "^4.2.18"
} }
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -17,7 +17,7 @@
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/forms": "^0.5.7",
"@types/react": "^18.3.4", "@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.1", "astro": "^5.0.0-alpha.2",
"postcss": "^8.4.41", "postcss": "^8.4.41",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -12,7 +12,7 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/markdown-remark": "^6.0.0-alpha.0", "@astrojs/markdown-remark": "^6.0.0-alpha.0",
"astro": "^5.0.0-alpha.1", "astro": "^5.0.0-alpha.2",
"hast-util-select": "^6.0.2", "hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0", "rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0", "rehype-slug": "^6.0.0",

View file

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

View file

@ -12,8 +12,8 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/mdx": "^4.0.0-alpha.1", "@astrojs/mdx": "^4.0.0-alpha.1",
"@astrojs/preact": "^3.5.1", "@astrojs/preact": "^3.5.2",
"astro": "^5.0.0-alpha.1", "astro": "^5.0.0-alpha.2",
"preact": "^10.23.2" "preact": "^10.23.2"
} }
} }

View file

@ -13,7 +13,7 @@
"dependencies": { "dependencies": {
"@astrojs/preact": "^3.5.2", "@astrojs/preact": "^3.5.2",
"@nanostores/preact": "^0.5.2", "@nanostores/preact": "^0.5.2",
"astro": "^5.0.0-alpha.1", "astro": "^5.0.0-alpha.2",
"nanostores": "^0.11.2", "nanostores": "^0.11.2",
"preact": "^10.23.2" "preact": "^10.23.2"
} }

View file

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

View file

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

View file

@ -1,5 +1,95 @@
# astro # astro
## 5.0.0-alpha.2
### Major Changes
- [#11826](https://github.com/withastro/astro/pull/11826) [`7315050`](https://github.com/withastro/astro/commit/7315050fc1192fa72ae92aef92b920f63b46118f) Thanks [@matthewp](https://github.com/matthewp)! - Deprecate Astro.glob
The `Astro.glob` function has been deprecated in favor of Content Collections and `import.meta.glob`.
- If you want to query for markdown and MDX in your project, use Content Collections.
- If you want to query source files in your project, use `import.meta.glob`(https://vitejs.dev/guide/features.html#glob-import).
Also consider using glob packages from npm, like [fast-glob](https://www.npmjs.com/package/fast-glob), especially if statically generating your site, as it is faster for most use-cases.
The easiest path is to migrate to `import.meta.glob` like so:
```diff
- const posts = Astro.glob('./posts/*.md');
+ const posts = Object.values(import.meta.glob('./posts/*.md', { eager: true }));
```
- [#11827](https://github.com/withastro/astro/pull/11827) [`a83e362`](https://github.com/withastro/astro/commit/a83e362ee41174501a433c210a24696784d7368f) Thanks [@matthewp](https://github.com/matthewp)! - Prevent usage of `astro:content` in the client
Usage of `astro:content` in the client has always been discouraged because it leads to all of your content winding up in your client bundle, and can possibly leaks secrets.
This formally makes doing so impossible, adding to the previous warning with errors.
In the future Astro might add APIs for client-usage based on needs.
- [#11253](https://github.com/withastro/astro/pull/11253) [`4e5cc5a`](https://github.com/withastro/astro/commit/4e5cc5aadd7d864bc5194ee67dc2ea74dbe80473) Thanks [@kevinzunigacuellar](https://github.com/kevinzunigacuellar)! - Changes the data returned for `page.url.current`, `page.url.next`, `page.url.prev`, `page.url.first` and `page.url.last` to include the value set for `base` in your Astro config.
Previously, you had to manually prepend your configured value for `base` to the URL path. Now, Astro automatically includes your `base` value in `next` and `prev` URLs.
If you are using the `paginate()` function for "previous" and "next" URLs, remove any existing `base` value as it is now added for you:
```diff
---
export async function getStaticPaths({ paginate }) {
const astronautPages = [{
astronaut: 'Neil Armstrong',
}, {
astronaut: 'Buzz Aldrin',
}, {
astronaut: 'Sally Ride',
}, {
astronaut: 'John Glenn',
}];
return paginate(astronautPages, { pageSize: 1 });
}
const { page } = Astro.props;
// `base: /'docs'` configured in `astro.config.mjs`
- const prev = "/docs" + page.url.prev;
+ const prev = page.url.prev;
---
<a id="prev" href={prev}>Back</a>
```
### Minor Changes
- [#11698](https://github.com/withastro/astro/pull/11698) [`05139ef`](https://github.com/withastro/astro/commit/05139ef8b46de96539cc1d08148489eaf3cfd837) Thanks [@ematipico](https://github.com/ematipico)! - Adds a new property to the globals `Astro` and `APIContext` called `routePattern`. The `routePattern` represents the current route (component)
that is being rendered by Astro. It's usually a path pattern will look like this: `blog/[slug]`:
```asto
---
// src/pages/blog/[slug].astro
const route = Astro.routePattern;
console.log(route); // it will log "blog/[slug]"
---
```
```js
// src/pages/index.js
export const GET = (ctx) => {
console.log(ctx.routePattern); // it will log src/pages/index.js
return new Response.json({ loreum: 'ipsum' });
};
```
### Patch Changes
- [#11791](https://github.com/withastro/astro/pull/11791) [`9393243`](https://github.com/withastro/astro/commit/93932432e7239a1d31c68ea916945302286268e9) Thanks [@bluwy](https://github.com/bluwy)! - Updates Astro's default `<script>` rendering strategy and removes the `experimental.directRenderScript` option as this is now the default behavior: scripts are always rendered directly. This new strategy prevents scripts from being executed in pages where they are not used.
Scripts will directly render as declared in Astro files (including existing features like TypeScript, importing `node_modules`, and deduplicating scripts). You can also now conditionally render scripts in your Astro file.
However, this means scripts are no longer hoisted to the `<head>`, multiple scripts on a page are no longer bundled together, and the `<script>` tag may interfere with the CSS styling.
As this is a potentially breaking change to your script behavior, please review your `<script>` tags and ensure that they behave as expected.
- [#11767](https://github.com/withastro/astro/pull/11767) [`d1bd1a1`](https://github.com/withastro/astro/commit/d1bd1a11f7aca4d2141d1c4665f2db0440393d03) Thanks [@ascorbic](https://github.com/ascorbic)! - Refactors content layer sync to use a queue
## 4.15.0 ## 4.15.0
### Minor Changes ### Minor Changes

View file

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

View file

@ -254,20 +254,19 @@ export async function generateContentEntryFile({
} }
let virtualModContents: string; let virtualModContents: string;
if(isClient) { if (isClient) {
throw new AstroError({ throw new AstroError({
...AstroErrorData.ServerOnlyModule, ...AstroErrorData.ServerOnlyModule,
message: AstroErrorData.ServerOnlyModule.message('astro:content'), message: AstroErrorData.ServerOnlyModule.message('astro:content'),
}); });
} else { } else {
virtualModContents = virtualModContents = nodeFs
nodeFs .readFileSync(contentPaths.virtualModTemplate, 'utf-8')
.readFileSync(contentPaths.virtualModTemplate, 'utf-8') .replace('@@CONTENT_DIR@@', relContentDir)
.replace('@@CONTENT_DIR@@', relContentDir) .replace("'@@CONTENT_ENTRY_GLOB_PATH@@'", contentEntryGlobResult)
.replace("'@@CONTENT_ENTRY_GLOB_PATH@@'", contentEntryGlobResult) .replace("'@@DATA_ENTRY_GLOB_PATH@@'", dataEntryGlobResult)
.replace("'@@DATA_ENTRY_GLOB_PATH@@'", dataEntryGlobResult) .replace("'@@RENDER_ENTRY_GLOB_PATH@@'", renderEntryGlobResult)
.replace("'@@RENDER_ENTRY_GLOB_PATH@@'", renderEntryGlobResult) .replace('/* @@LOOKUP_MAP_ASSIGNMENT@@ */', `lookupMap = ${JSON.stringify(lookupMap)};`);
.replace('/* @@LOOKUP_MAP_ASSIGNMENT@@ */', `lookupMap = ${JSON.stringify(lookupMap)};`);
} }
return virtualModContents; return virtualModContents;

View file

@ -61,7 +61,7 @@ function createContext({
generator: `Astro v${ASTRO_VERSION}`, generator: `Astro v${ASTRO_VERSION}`,
props: {}, props: {},
rewrite, rewrite,
routePattern: "", routePattern: '',
redirect(path, status) { redirect(path, status) {
return new Response(null, { return new Response(null, {
status: status || 302, status: status || 302,

View file

@ -46,17 +46,20 @@ describe('Astro Global', () => {
false, false,
); );
}); });
it("Astro.route.pattern has the right value in pages and components", async () => { it('Astro.route.pattern has the right value in pages and components', async () => {
let html = await fixture.fetch('/blog').then((res) => res.text()); let html = await fixture.fetch('/blog').then((res) => res.text());
let $ = cheerio.load(html); let $ = cheerio.load(html);
assert.match($("#pattern").text(), /Astro route pattern: \//); assert.match($('#pattern').text(), /Astro route pattern: \//);
assert.match($("#pattern-middleware").text(), /Astro route pattern middleware: \//); assert.match($('#pattern-middleware').text(), /Astro route pattern middleware: \//);
html = await fixture.fetch('/blog/omit-markdown-extensions/').then((res) => res.text()); html = await fixture.fetch('/blog/omit-markdown-extensions/').then((res) => res.text());
$ = cheerio.load(html); $ = cheerio.load(html);
assert.match($("#pattern").text(), /Astro route pattern: \/omit-markdown-extensions/); assert.match($('#pattern').text(), /Astro route pattern: \/omit-markdown-extensions/);
assert.match($("#pattern-middleware").text(), /Astro route pattern middleware: \/omit-markdown-extensions/); assert.match(
}) $('#pattern-middleware').text(),
/Astro route pattern middleware: \/omit-markdown-extensions/,
);
});
}); });
describe('build', () => { describe('build', () => {
@ -93,23 +96,28 @@ describe('Astro Global', () => {
assert.equal($('.post-url[href]').length, 8); assert.equal($('.post-url[href]').length, 8);
}); });
it("Astro.route.pattern has the right value in pages and components", async () => { it('Astro.route.pattern has the right value in pages and components', async () => {
let html = await fixture.readFile('/index.html'); let html = await fixture.readFile('/index.html');
let $ = cheerio.load(html); let $ = cheerio.load(html);
assert.match($("#pattern").text(), /Astro route pattern: \//); assert.match($('#pattern').text(), /Astro route pattern: \//);
assert.match($("#pattern-middleware").text(), /Astro route pattern middleware: \//); assert.match($('#pattern-middleware').text(), /Astro route pattern middleware: \//);
html =await fixture.readFile('/omit-markdown-extensions/index.html'); html = await fixture.readFile('/omit-markdown-extensions/index.html');
$ = cheerio.load(html); $ = cheerio.load(html);
assert.match($("#pattern").text(), /Astro route pattern: \/omit-markdown-extensions/); assert.match($('#pattern').text(), /Astro route pattern: \/omit-markdown-extensions/);
assert.match($("#pattern-middleware").text(), /Astro route pattern middleware: \/omit-markdown-extensions/); assert.match(
$('#pattern-middleware').text(),
/Astro route pattern middleware: \/omit-markdown-extensions/,
);
html = await fixture.readFile('/posts/1/index.html'); html = await fixture.readFile('/posts/1/index.html');
$ = cheerio.load(html); $ = cheerio.load(html);
assert.equal($("#pattern").text(), "Astro route pattern: /posts/[page]"); assert.equal($('#pattern').text(), 'Astro route pattern: /posts/[page]');
assert.equal($("#pattern-middleware").text(), "Astro route pattern middleware: /posts/[page]"); assert.equal(
$('#pattern-middleware').text(),
}) 'Astro route pattern middleware: /posts/[page]',
);
});
}); });
describe('app', () => { describe('app', () => {
@ -135,18 +143,21 @@ describe('Astro Global', () => {
assert.equal($('#site').attr('href'), 'https://mysite.dev/subsite/'); assert.equal($('#site').attr('href'), 'https://mysite.dev/subsite/');
}); });
it("Astro.route.pattern has the right value in pages and components", async () => { it('Astro.route.pattern has the right value in pages and components', async () => {
let response = await app.render(new Request('https://example.com/')); let response = await app.render(new Request('https://example.com/'));
let html = await response.text(); let html = await response.text();
let $ = cheerio.load(html); let $ = cheerio.load(html);
assert.match($("#pattern").text(), /Astro route pattern: \//); assert.match($('#pattern').text(), /Astro route pattern: \//);
assert.match($("#pattern-middleware").text(), /Astro route pattern middleware: \//); assert.match($('#pattern-middleware').text(), /Astro route pattern middleware: \//);
response = await app.render(new Request('https://example.com/omit-markdown-extensions')); response = await app.render(new Request('https://example.com/omit-markdown-extensions'));
html = await response.text(); html = await response.text();
$ = cheerio.load(html); $ = cheerio.load(html);
assert.match($("#pattern").text(), /Astro route pattern: \/omit-markdown-extensions/); assert.match($('#pattern').text(), /Astro route pattern: \/omit-markdown-extensions/);
assert.match($("#pattern-middleware").text(), /Astro route pattern middleware: \/omit-markdown-extensions/); assert.match(
}) $('#pattern-middleware').text(),
/Astro route pattern middleware: \/omit-markdown-extensions/,
);
});
}); });
}); });

View file

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