Skip to content

Commit

Permalink
[ci] release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 14, 2022
1 parent 005d5ba commit 0ccbcb3
Show file tree
Hide file tree
Showing 42 changed files with 105 additions and 118 deletions.
5 changes: 0 additions & 5 deletions .changeset/kind-rats-lay.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/leaders-of-the-free-world.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nice-peaches-swim.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/polite-melons-pump.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shaggy-books-give.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spotty-berries-grow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spotty-ways-cry.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twelve-days-build.md

This file was deleted.

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": "^1.2.3"
"astro": "^1.2.4"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"@astrojs/mdx": "^0.11.1",
"@astrojs/rss": "^1.0.1",
"@astrojs/sitemap": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
],
"scripts": {},
"devDependencies": {
"astro": "^1.2.3"
"astro": "^1.2.4"
},
"peerDependencies": {
"astro": "^1.2.3"
"astro": "^1.2.4"
}
}
4 changes: 2 additions & 2 deletions examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^1.1.2",
"@astrojs/react": "^1.1.3",
"@astrojs/preact": "^1.1.0",
"@algolia/client-search": "^4.13.1",
"@docsearch/css": "^3.1.0",
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"alpinejs": "^3.10.2",
"@astrojs/alpinejs": "^0.1.2",
"@types/alpinejs": "^3.7.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"lit": "^2.2.5",
"@astrojs/lit": "^1.0.0",
"@webcomponents/template-shadowroot": "^0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"solid-js": "^1.4.3",
"svelte": "^3.48.0",
"vue": "^3.2.37",
"@astrojs/preact": "^1.1.0",
"@astrojs/react": "^1.1.2",
"@astrojs/react": "^1.1.3",
"@astrojs/solid-js": "^1.1.0",
"@astrojs/svelte": "^1.0.0",
"@astrojs/vue": "^1.0.2"
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"preact": "^10.7.3",
"@astrojs/preact": "^1.1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^1.1.2",
"@astrojs/react": "^1.1.3",
"@types/react": "^18.0.10",
"@types/react-dom": "^18.0.5"
}
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"solid-js": "^1.4.3",
"@astrojs/solid-js": "^1.1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"dependencies": {
"svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.0",
"astro": "^1.2.3"
"astro": "^1.2.4"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"vue": "^3.2.37",
"@astrojs/vue": "^1.0.2"
}
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": "^1.2.3"
"astro": "^1.2.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": "^1.2.3"
"astro": "^1.2.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": "^1.2.3"
"astro": "^1.2.4"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.0",
"@astrojs/node": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"@astrojs/markdown-remark": "^1.1.0",
"hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.1",
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": "^1.2.3"
"astro": "^1.2.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"preact": "^10.6.5",
"@astrojs/preact": "^1.1.0",
"@astrojs/mdx": "^0.11.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"preact": "^10.7.3",
"@astrojs/preact": "^1.1.0",
"nanostores": "^0.5.12",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"@astrojs/tailwind": "^1.0.1",
"astro": "^1.2.4",
"@astrojs/tailwind": "^2.0.0",
"autoprefixer": "^10.4.7",
"canvas-confetti": "^1.5.1",
"postcss": "^8.4.14",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vite-plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.3",
"astro": "^1.2.4",
"vite-plugin-pwa": "0.11.11",
"workbox-window": "^6.5.3"
}
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": "^1.2.3",
"astro": "^1.2.4",
"vitest": "^0.20.3"
}
}
16 changes: 16 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# astro

## 1.2.4

### Patch Changes

- [#4736](https://github.com/withastro/astro/pull/4736) [`13ca686ea`](https://github.com/withastro/astro/commit/13ca686ea18346a68db6af37348ee6d50719350d) Thanks [@bluwy](https://github.com/bluwy)! - Handle builds with outDir outside of current working directory

- [#4748](https://github.com/withastro/astro/pull/4748) [`c5e134d03`](https://github.com/withastro/astro/commit/c5e134d0358b7548bebe60b5707366b861c2fe28) Thanks [@bluwy](https://github.com/bluwy)! - Fix console.error filtering

- [#4742](https://github.com/withastro/astro/pull/4742) [`cf8a7e933`](https://github.com/withastro/astro/commit/cf8a7e933d26125eee44ce8b4f84d1353cfed957) Thanks [@matthewp](https://github.com/matthewp)! - Allow file uploads in dev server

- [#4752](https://github.com/withastro/astro/pull/4752) [`1bedb9427`](https://github.com/withastro/astro/commit/1bedb9427ebbe92eb74a82fc70cb67a97a250f32) Thanks [@bluwy](https://github.com/bluwy)! - Support Vite 3.1

- [#4755](https://github.com/withastro/astro/pull/4755) [`f1efd88dd`](https://github.com/withastro/astro/commit/f1efd88ddefe078f64901b1754ebfbaf65d36b51) Thanks [@matthewp](https://github.com/matthewp)! - Upgrade to Vite 3.1

- [#4594](https://github.com/withastro/astro/pull/4594) [`005d5bacd`](https://github.com/withastro/astro/commit/005d5bacd9c4dca5635da0759d5f73427df68e50) Thanks [@matthewp](https://github.com/matthewp)! - Allow custom 404 route to handle API route missing methods

## 1.2.3

### Patch 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": "1.2.3",
"version": "1.2.4",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/core/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ export class App {
});

if (result.type === 'response') {
if(result.response.headers.get('X-Astro-Response') === 'Not-Found') {
if (result.response.headers.get('X-Astro-Response') === 'Not-Found') {
const fourOhFourRequest = new Request(new URL('/404', request.url));
const fourOhFourRouteData = this.match(fourOhFourRequest);
if(fourOhFourRouteData) {
if (fourOhFourRouteData) {
return this.render(fourOhFourRequest, fourOhFourRouteData);
}
}
Expand Down
8 changes: 2 additions & 6 deletions packages/astro/src/runtime/server/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ function getHandlerFromModule(mod: EndpointHandler, method: string) {
}

/** Renders an endpoint request to completion, returning the body. */
export async function renderEndpoint(
mod: EndpointHandler,
request: Request,
params: Params
) {
export async function renderEndpoint(mod: EndpointHandler, request: Request, params: Params) {
const chosenMethod = request.method?.toLowerCase();
const handler = getHandlerFromModule(mod, chosenMethod);
if (!handler || typeof handler !== 'function') {
Expand All @@ -32,7 +28,7 @@ export async function renderEndpoint(
let response = new Response(null, {
status: 404,
headers: {
'X-Astro-Response': 'Not-Found'
'X-Astro-Response': 'Not-Found',
},
});
return response;
Expand Down
17 changes: 10 additions & 7 deletions packages/astro/src/vite-plugin-astro-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ interface AstroPluginOptions {
logging: LogOptions;
}

type AsyncReturnType<T extends (...args: any) => Promise<any>> =
T extends (...args: any) => Promise<infer R> ? R : any
type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (
...args: any
) => Promise<infer R>
? R
: any;

function writeHtmlResponse(res: http.ServerResponse, statusCode: number, html: string) {
res.writeHead(statusCode, {
Expand Down Expand Up @@ -181,7 +184,7 @@ async function matchRoute(
viteServer: vite.ViteDevServer,
logging: LogOptions,
manifest: ManifestData,
config: AstroConfig,
config: AstroConfig
) {
const matches = matchAllRoutes(pathname, manifest);

Expand Down Expand Up @@ -273,7 +276,7 @@ async function handleRequest(
if (!(req.method === 'GET' || req.method === 'HEAD')) {
let bytes: Uint8Array[] = [];
await new Promise((resolve) => {
req.on('data', part => {
req.on('data', (part) => {
bytes.push(part);
});
req.on('end', resolve);
Expand All @@ -292,7 +295,7 @@ async function handleRequest(
config
);
filePath = matchedRoute?.filePath;

return await handleRoute(
matchedRoute,
url,
Expand All @@ -307,7 +310,7 @@ async function handleRequest(
req,
res
);
} catch(_err) {
} catch (_err) {
const err = fixViteErrorMessage(_err, viteServer, filePath);
const errorWithMetadata = collectErrorMetadata(err);
error(logging, null, msg.formatErrorMessage(errorWithMetadata));
Expand Down Expand Up @@ -376,7 +379,7 @@ async function handleRoute(
if (route.type === 'endpoint') {
const result = await callEndpoint(options);
if (result.type === 'response') {
if(result.response.headers.get('X-Astro-Response') === 'Not-Found') {
if (result.response.headers.get('X-Astro-Response') === 'Not-Found') {
const fourOhFourRoute = await matchRoute(
'/404',
routeCache,
Expand Down
Loading

0 comments on commit 0ccbcb3

Please sign in to comment.