From a5aea2ce561e86ac6242cdc9291f18ecc76a6bfa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:22:47 -0400 Subject: [PATCH 1/6] [ci] release (beta) (#3023) Co-authored-by: github-actions[bot] --- .changeset/pre.json | 4 + examples/blog-multiple-authors/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/demo/package.json | 2 +- examples/component/package.json | 2 +- examples/docs/package.json | 2 +- examples/env-vars/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/integrations-playground/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starter/package.json | 2 +- examples/subpath/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-markdown/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- packages/astro/CHANGELOG.md | 79 +++++++++++-------- packages/astro/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 6 ++ packages/integrations/vercel/package.json | 2 +- pnpm-lock.yaml | 54 ++++++------- 33 files changed, 113 insertions(+), 88 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 026abc5c1507..fb24ef869913 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -62,9 +62,13 @@ "changesets": [ "angry-suits-thank", "big-yaks-invite", + "calm-dolphins-remain", "dirty-trains-yawn", + "dull-bobcats-clean", "empty-pens-talk", + "forty-boats-remain", "nervous-chairs-check", + "odd-squids-rest", "shiny-rice-worry", "sour-laws-raise", "stale-walls-whisper", diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index 68698e09a25b..ab4984b5f745 100644 --- a/examples/blog-multiple-authors/package.json +++ b/examples/blog-multiple-authors/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.0.2", - "astro": "^1.0.0-beta.4", + "astro": "^1.0.0-beta.5", "sass": "^1.49.11" }, "dependencies": { diff --git a/examples/blog/package.json b/examples/blog/package.json index d4701aa4d560..beb499641da2 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "preact": "^10.7.0" diff --git a/examples/component/demo/package.json b/examples/component/demo/package.json index f62f0da5e1d4..c27f118a134b 100644 --- a/examples/component/demo/package.json +++ b/examples/component/demo/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@example/my-component": "workspace:*", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/component/package.json b/examples/component/package.json index 396d8342627f..e03f07796073 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -8,6 +8,6 @@ "serve": "astro --root demo preview" }, "devDependencies": { - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/docs/package.json b/examples/docs/package.json index 9dc80fd9d42d..402659f6f385 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -20,6 +20,6 @@ "devDependencies": { "@astrojs/preact": "^0.0.2", "@astrojs/react": "^0.1.0", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/env-vars/package.json b/examples/env-vars/package.json index 1793d00051a1..6781c67d9b85 100644 --- a/examples/env-vars/package.json +++ b/examples/env-vars/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index e998ad7548a1..246e74db7985 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index c61590e0bcb7..5b78e9499e54 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/lit": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 59129ce140d4..d41984083e84 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -15,7 +15,7 @@ "@astrojs/solid-js": "^0.0.4-beta.0", "@astrojs/svelte": "^0.0.2", "@astrojs/vue": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 39731f7ad140..a933db7715ad 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "preact": "^10.7.0" diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 06960e598528..2f50d84e92d8 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.1.0", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "react": "^18.0.0", diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index b87de26e29ec..36915e817c93 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/solid-js": "^0.0.4-beta.0", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "solid-js": "^1.3.13" diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 9ce3f199b3ae..60eadc0cc3e5 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/svelte": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "svelte": "^3.46.6" diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 7abd1e9ea80f..c8ce1ddd5a95 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/vue": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "vue": "^3.2.31" diff --git a/examples/integrations-playground/package.json b/examples/integrations-playground/package.json index ee2bc3c93ac3..c56e2e3b90e1 100644 --- a/examples/integrations-playground/package.json +++ b/examples/integrations-playground/package.json @@ -15,7 +15,7 @@ "@astrojs/sitemap": "^0.1.0", "@astrojs/tailwind": "^0.1.0", "@astrojs/turbolinks": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 4617c595640e..547010696fcb 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 5f171b7e837f..6bf095527d43 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 5d96957ffe6d..ef4e310f667c 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.0.2", - "astro": "^1.0.0-beta.4", + "astro": "^1.0.0-beta.5", "sass": "^1.49.11" }, "dependencies": { diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 764fddc681f0..d6ae1fc138fb 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@astrojs/node": "^0.0.2", "@astrojs/svelte": "^0.0.2", - "astro": "^1.0.0-beta.4", + "astro": "^1.0.0-beta.5", "concurrently": "^7.1.0", "lightcookie": "^1.0.25", "unocss": "^0.15.6", diff --git a/examples/starter/package.json b/examples/starter/package.json index 8ff5fdf3792e..83826ec3e47b 100644 --- a/examples/starter/package.json +++ b/examples/starter/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/subpath/package.json b/examples/subpath/package.json index 05995ad2a945..23196ec447b6 100644 --- a/examples/subpath/package.json +++ b/examples/subpath/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.1.0", - "astro": "^1.0.0-beta.4", + "astro": "^1.0.0-beta.5", "sass": "^1.49.11" }, "dependencies": { diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 408325fd903d..d0f7bfff13a1 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.8.1", - "astro": "^1.0.0-beta.4", + "astro": "^1.0.0-beta.5", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index e5bdef7c67df..09e82f4126c1 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.8.1", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/with-markdown/package.json b/examples/with-markdown/package.json index 27e00afdc237..3abbbf829804 100644 --- a/examples/with-markdown/package.json +++ b/examples/with-markdown/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^0.1.0", "@astrojs/svelte": "^0.0.2", "@astrojs/vue": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" }, "dependencies": { "preact": "^10.7.0", diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 15800e8b4cee..58e1475d325b 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -25,6 +25,6 @@ "@astrojs/solid-js": "^0.0.4-beta.0", "@astrojs/svelte": "^0.0.2", "@astrojs/vue": "^0.0.2", - "astro": "^1.0.0-beta.4" + "astro": "^1.0.0-beta.5" } } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 455d8a63ffde..7d0000b92fc2 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/tailwind": "^0.1.0", - "astro": "^1.0.0-beta.4", + "astro": "^1.0.0-beta.5", "autoprefixer": "^10.4.4", "canvas-confetti": "^1.5.1", "postcss": "^8.4.12", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index 5b4a7f6c2985..fd71d97b2db7 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.4", + "astro": "^1.0.0-beta.5", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.2" } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 00d51415746c..ebc66e7c4c0b 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,20 @@ # astro +## 1.0.0-beta.5 + +### Patch Changes + +- [#3026](https://github.com/withastro/astro/pull/3026) [`4b0f27d9`](https://github.com/withastro/astro/commit/4b0f27d9ffa6ec90e898de504588ba92630064c0) Thanks [@matthewp](https://github.com/matthewp)! - Fix for adding set-cookie multiple times + +* [#3020](https://github.com/withastro/astro/pull/3020) [`c773dcde`](https://github.com/withastro/astro/commit/c773dcde317d46e3f8e68088cda580c30bc8e1da) Thanks [@tony-sull](https://github.com/tony-sull)! - Add support for advanced CSS imports with `?raw` and `?url` + + > ⚠️WARNING⚠️: + > Be careful when bypassing Astro's built-in CSS bundling! Styles won't be included in the built output - this is best used in combination with `set:html` to inline styles directly into the built HTML page. + +- [#3022](https://github.com/withastro/astro/pull/3022) [`8c04ff1f`](https://github.com/withastro/astro/commit/8c04ff1f0bea42d033832ce5047076e315cb38a3) Thanks [@matthewp](https://github.com/matthewp)! - Allows adapters to export default + +* [#3021](https://github.com/withastro/astro/pull/3021) [`7e9d82d7`](https://github.com/withastro/astro/commit/7e9d82d75e4b19993b4246d3546169c8476702c4) Thanks [@matthewp](https://github.com/matthewp)! - Warn when attempting to access headers in SSG mode + ## 1.0.0-beta.4 ### Patch Changes @@ -150,7 +165,7 @@ import netlify from '@astrojs/netlify/functions'; export default defineConfig({ - adapter: netlify(), + adapter: netlify(), }); ``` @@ -170,7 +185,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -230,7 +245,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -326,7 +341,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ - renderers: [], + renderers: [], }); ``` @@ -364,9 +379,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -386,7 +401,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -470,7 +485,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -494,9 +509,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -608,12 +623,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -775,12 +790,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -2135,10 +2150,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - markdownOptions: { - remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], - rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], - }, + markdownOptions: { + remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], + rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], + }, }; ``` @@ -2158,10 +2173,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - name: '@matthewp/my-renderer', - server: './server.js', - client: './client.js', - hydrationPolyfills: ['./my-polyfill.js'], + name: '@matthewp/my-renderer', + server: './server.js', + client: './client.js', + hydrationPolyfills: ['./my-polyfill.js'], }; ``` diff --git a/packages/astro/package.json b/packages/astro/package.json index 53416a2b7c4f..f3962955609a 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index ebbf5585d5e3..b541f5b1ed9a 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/vercel +## 0.0.3-beta.1 + +### Patch Changes + +- [#3022](https://github.com/withastro/astro/pull/3022) [`8c04ff1f`](https://github.com/withastro/astro/commit/8c04ff1f0bea42d033832ce5047076e315cb38a3) Thanks [@matthewp](https://github.com/matthewp)! - Allows adapters to export default + ## 0.0.3-beta.0 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 5b22409f2cb6..9478fd64f719 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "0.0.3-beta.0", + "version": "0.0.3-beta.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 19faf2e2b212..662607cf413e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,7 +44,7 @@ importers: examples/blog: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 preact: ^10.7.0 dependencies: preact: 10.7.0 @@ -55,7 +55,7 @@ importers: examples/blog-multiple-authors: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 preact: ^10.7.0 sass: ^1.49.11 dependencies: @@ -67,14 +67,14 @@ importers: examples/component: specifiers: - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: astro: link:../../packages/astro examples/component/demo: specifiers: '@example/my-component': workspace:* - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: '@example/my-component': link:../packages/my-component astro: link:../../../packages/astro @@ -90,7 +90,7 @@ importers: '@docsearch/css': ^3.0.0 '@docsearch/react': ^3.0.0 '@types/react': ^17.0.43 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 preact: ^10.7.0 react: ^18.0.0 react-dom: ^18.0.0 @@ -109,13 +109,13 @@ importers: examples/env-vars: specifiers: - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: astro: link:../../packages/astro examples/framework-alpine: specifiers: - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: astro: link:../../packages/astro @@ -123,7 +123,7 @@ importers: specifiers: '@astrojs/lit': ^0.0.2 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 lit: ^2.2.1 dependencies: '@webcomponents/template-shadowroot': 0.1.0 @@ -141,7 +141,7 @@ importers: '@astrojs/svelte': ^0.0.2 '@astrojs/vue': ^0.0.2 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 lit: ^2.2.1 preact: ^10.7.0 react: ^18.0.0 @@ -170,7 +170,7 @@ importers: examples/framework-preact: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 preact: ^10.7.0 dependencies: preact: 10.7.0 @@ -181,7 +181,7 @@ importers: examples/framework-react: specifiers: '@astrojs/react': ^0.1.0 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 react: ^18.0.0 react-dom: ^18.0.0 dependencies: @@ -194,7 +194,7 @@ importers: examples/framework-solid: specifiers: '@astrojs/solid-js': ^0.0.4-beta.0 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 solid-js: ^1.3.13 dependencies: solid-js: 1.3.13 @@ -205,7 +205,7 @@ importers: examples/framework-svelte: specifiers: '@astrojs/svelte': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 svelte: ^3.46.6 dependencies: svelte: 3.46.6 @@ -216,7 +216,7 @@ importers: examples/framework-vue: specifiers: '@astrojs/vue': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 vue: ^3.2.31 dependencies: vue: 3.2.31 @@ -233,7 +233,7 @@ importers: '@astrojs/tailwind': ^0.1.0 '@astrojs/turbolinks': ^0.0.2 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 lit: ^2.2.1 preact: ^10.7.0 react: ^18.0.0 @@ -261,20 +261,20 @@ importers: examples/minimal: specifiers: - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: astro: link:../../packages/astro examples/non-html-pages: specifiers: - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: astro: link:../../packages/astro examples/portfolio: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 preact: ^10.7.0 sass: ^1.49.11 dependencies: @@ -288,7 +288,7 @@ importers: specifiers: '@astrojs/node': ^0.0.2 '@astrojs/svelte': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 concurrently: ^7.1.0 lightcookie: ^1.0.25 svelte: ^3.46.6 @@ -307,14 +307,14 @@ importers: examples/starter: specifiers: - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: astro: link:../../packages/astro examples/subpath: specifiers: '@astrojs/react': ^0.1.0 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 react: ^18.0.0 react-dom: ^18.0.0 sass: ^1.49.11 @@ -333,7 +333,7 @@ importers: '@astrojs/react': ^0.1.0 '@astrojs/svelte': ^0.0.2 '@astrojs/vue': ^0.0.2 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 preact: ^10.7.0 react: ^18.0.0 react-dom: ^18.0.0 @@ -356,7 +356,7 @@ importers: examples/with-markdown-plugins: specifiers: '@astrojs/markdown-remark': ^0.8.1 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 hast-util-select: 5.0.1 rehype-autolink-headings: ^6.1.1 rehype-slug: ^5.0.1 @@ -374,7 +374,7 @@ importers: examples/with-markdown-shiki: specifiers: '@astrojs/markdown-remark': ^0.8.1 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 devDependencies: '@astrojs/markdown-remark': link:../../packages/markdown/remark astro: link:../../packages/astro @@ -389,7 +389,7 @@ importers: '@nanostores/preact': ^0.1.3 '@nanostores/react': ^0.1.5 '@nanostores/vue': ^0.4.1 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 nanostores: ^0.5.12 preact: ^10.7.0 react: ^18.0.0 @@ -417,7 +417,7 @@ importers: examples/with-tailwindcss: specifiers: '@astrojs/tailwind': ^0.1.0 - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 autoprefixer: ^10.4.4 canvas-confetti: ^1.5.1 postcss: ^8.4.12 @@ -432,7 +432,7 @@ importers: examples/with-vite-plugin-pwa: specifiers: - astro: ^1.0.0-beta.4 + astro: ^1.0.0-beta.5 vite-plugin-pwa: 0.11.11 workbox-window: ^6.5.2 devDependencies: From cde2c4418428e73e5c2de8b7f35ae87b9add0cbb Mon Sep 17 00:00:00 2001 From: matthewp Date: Thu, 7 Apr 2022 19:23:39 +0000 Subject: [PATCH 2/6] [ci] format --- packages/astro/CHANGELOG.md | 64 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index ebc66e7c4c0b..34031c4f4d96 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -165,7 +165,7 @@ import netlify from '@astrojs/netlify/functions'; export default defineConfig({ - adapter: netlify(), + adapter: netlify(), }); ``` @@ -185,7 +185,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -245,7 +245,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -341,7 +341,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ - renderers: [], + renderers: [], }); ``` @@ -379,9 +379,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -401,7 +401,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -485,7 +485,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -509,9 +509,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -623,12 +623,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -790,12 +790,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -2150,10 +2150,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - markdownOptions: { - remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], - rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], - }, + markdownOptions: { + remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], + rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], + }, }; ``` @@ -2173,10 +2173,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - name: '@matthewp/my-renderer', - server: './server.js', - client: './client.js', - hydrationPolyfills: ['./my-polyfill.js'], + name: '@matthewp/my-renderer', + server: './server.js', + client: './client.js', + hydrationPolyfills: ['./my-polyfill.js'], }; ``` From d1f292199ce309c55c57827a8de0409bd73bb3e8 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Thu, 7 Apr 2022 17:08:27 -0400 Subject: [PATCH 3/6] Update JSDoc comments that get shown in editor (#2999) --- .changeset/shaggy-pans-buy.md | 5 ++ packages/astro/env.d.ts | 5 +- packages/astro/src/@types/astro.ts | 115 ++++++++++++++++++++++++++--- 3 files changed, 114 insertions(+), 11 deletions(-) create mode 100644 .changeset/shaggy-pans-buy.md diff --git a/.changeset/shaggy-pans-buy.md b/.changeset/shaggy-pans-buy.md new file mode 100644 index 000000000000..742b5e0f7734 --- /dev/null +++ b/.changeset/shaggy-pans-buy.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Update JSDoc comments that get shown to users through editor integration diff --git a/packages/astro/env.d.ts b/packages/astro/env.d.ts index ebb416dd2681..54f9b17279e5 100644 --- a/packages/astro/env.d.ts +++ b/packages/astro/env.d.ts @@ -4,8 +4,9 @@ type Astro = import('astro').AstroGlobal; // We duplicate the description here because editors won't show the JSDoc comment from the imported type (but will for its properties, ex: Astro.request will show the AstroGlobal.request description) /** - * Astro.* available in all components - * Docs: https://docs.astro.build/reference/api-reference/#astro-global + * Astro global available in all contexts in .astro files + * + * [Astro documentation](https://docs.astro.build/reference/api-reference/#astro-global) */ declare const Astro: Readonly; diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 76e24a4a0fca..c0764dc00bdd 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -72,21 +72,101 @@ export interface BuildConfig { } /** - * Astro.* available in all components - * Docs: https://docs.astro.build/reference/api-reference/#astro-global + * Astro global available in all contexts in .astro files + * + * [Astro documentation](https://docs.astro.build/reference/api-reference/#astro-global) */ export interface AstroGlobal extends AstroGlobalPartial { - /** get the current canonical URL */ + /** Canonical URL of the current page. If the [site](https://docs.astro.build/en/reference/configuration-reference/#site) config option is set, its origin will be the origin of this URL. + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#astrocanonicalurl) + */ canonicalURL: URL; - /** get page params (dynamic pages only) */ + /** Parameters passed to a dynamic page generated using [getStaticPaths](https://docs.astro.build/en/reference/api-reference/#getstaticpaths) + * + * Example usage: + * ```astro + * --- + * export async function getStaticPaths() { + * return [ + * { params: { id: '1' } }, + * ]; + * } + * + * const { id } = Astro.params; + * --- + *

{id}

+ * ``` + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#params) + */ params: Params; - /** set props for this astro component (along with default values) */ + /** List of props passed to this component + * + * A common way to get specific props is through [destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment), ex: + * ```typescript + * const { name } = Astro.props + * ``` + * + * [Astro documentation](https://docs.astro.build/en/core-concepts/astro-components/#component-props) + */ props: Record; - /** get information about this page */ + /** Information about the current request. This is a standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object + * + * For example, to get a URL object of the current URL, you can use: + * ```typescript + * const url = new URL(Astro.request.url); + * ``` + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#astrorequest) + */ request: Request; - /** see if slots are used */ + /** Redirect to another page (**SSR Only**) + * + * Example usage: + * ```typescript + * if(!isLoggedIn) { + * return Astro.redirect('/login'); + * } + * ``` + * + * [Astro documentation](https://docs.astro.build/en/guides/server-side-rendering/#astroredirect) + */ + redirect(path: string): Response; + /** Utility functions for modifying an Astro component’s slotted children + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#astroslots) + */ slots: Record & { + /** + * Check whether content for this slot name exists + * + * Example usage: + * ```typescript + * if (Astro.slots.has('default')) { + * // Do something... + * } + * ``` + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#astroslots) + */ has(slotName: string): boolean; + /** + * Asychronously renders this slot and returns HTML + * + * Example usage: + * ```astro + * --- + * let html: string = ''; + * if (Astro.slots.has('default')) { + * html = await Astro.slots.render('default') + * } + * --- + * + * ``` + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#astroslots) + */ render(slotName: string, args?: any[]): Promise; }; } @@ -95,12 +175,29 @@ export interface AstroGlobalPartial { /** * @deprecated since version 0.24. See the {@link https://astro.build/deprecated/resolve upgrade guide} for more details. */ - resolve: (path: string) => string; - /** @deprecated Use `Astro.glob()` instead. */ + resolve(path: string): string; + /** @deprecated since version 0.26. Use [Astro.glob()](https://docs.astro.build/en/reference/api-reference/#astroglob) instead. */ fetchContent(globStr: string): Promise; + /** + * Fetch local files into your static site setup + * + * Example usage: + * ```typescript + * const posts = await Astro.glob('../pages/post/*.md'); + * ``` + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#astroglob) + */ glob(globStr: `${any}.astro`): Promise; glob>(globStr: `${any}.md`): Promise[]>; glob>(globStr: string): Promise; + /** + * Returns a [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) object built from the [site](https://docs.astro.build/en/reference/configuration-reference/#site) config option + * + * If `site` is undefined, the URL object will instead be built from `localhost` + * + * [Astro documentation](https://docs.astro.build/en/reference/api-reference/#astrosite) + */ site: URL; } From 3c5715a74030f04a3b3185ee6b89f7184e1cef6b Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Fri, 8 Apr 2022 12:02:04 +0000 Subject: [PATCH 4/6] [ci] collect stats --- scripts/stats/stats.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/stats/stats.csv b/scripts/stats/stats.csv index b038bb1e5658..868a971adf07 100644 --- a/scripts/stats/stats.csv +++ b/scripts/stats/stats.csv @@ -1,4 +1,5 @@ Date,Commits (24hr),Issues (24hr),Issues:BUG (24hr),Issues:RFC (24hr),Issues:DOC (24hr),PRs (24hr),Open PRs,Open Issues,Bugs: Needs Triage,Bugs: Accepted,RFC: In Progress,RFC: Accepted,Date (ISO) +"Friday, April 8, 2022",13,9,8,0,0,9,9,97,49,41,0,0,"2022-04-08T12:01:59.641Z" "Thursday, April 7, 2022",17,6,6,0,0,7,6,93,47,40,0,0,"2022-04-07T12:07:02.763Z" "Wednesday, April 6, 2022",3,2,2,0,0,9,11,91,44,41,0,0,"2022-04-06T12:02:17.434Z" "Tuesday, April 5, 2022",17,4,4,0,0,8,4,90,44,40,0,0,"2022-04-05T12:02:04.260Z" From eb2ac8d53b17e4277611a911073d33a21f53181f Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Sat, 9 Apr 2022 12:01:54 +0000 Subject: [PATCH 5/6] [ci] collect stats --- scripts/stats/stats.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/stats/stats.csv b/scripts/stats/stats.csv index 868a971adf07..efda88c011d1 100644 --- a/scripts/stats/stats.csv +++ b/scripts/stats/stats.csv @@ -1,4 +1,5 @@ Date,Commits (24hr),Issues (24hr),Issues:BUG (24hr),Issues:RFC (24hr),Issues:DOC (24hr),PRs (24hr),Open PRs,Open Issues,Bugs: Needs Triage,Bugs: Accepted,RFC: In Progress,RFC: Accepted,Date (ISO) +"Saturday, April 9, 2022",1,1,1,0,0,6,15,95,50,39,0,0,"2022-04-09T12:01:49.149Z" "Friday, April 8, 2022",13,9,8,0,0,9,9,97,49,41,0,0,"2022-04-08T12:01:59.641Z" "Thursday, April 7, 2022",17,6,6,0,0,7,6,93,47,40,0,0,"2022-04-07T12:07:02.763Z" "Wednesday, April 6, 2022",3,2,2,0,0,9,11,91,44,41,0,0,"2022-04-06T12:02:17.434Z" From ce0c54ae43cd9882d3f6128e85a040e7ee13f1a6 Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Sun, 10 Apr 2022 12:02:10 +0000 Subject: [PATCH 6/6] [ci] collect stats --- scripts/stats/stats.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/stats/stats.csv b/scripts/stats/stats.csv index efda88c011d1..93aeee904e98 100644 --- a/scripts/stats/stats.csv +++ b/scripts/stats/stats.csv @@ -1,4 +1,5 @@ Date,Commits (24hr),Issues (24hr),Issues:BUG (24hr),Issues:RFC (24hr),Issues:DOC (24hr),PRs (24hr),Open PRs,Open Issues,Bugs: Needs Triage,Bugs: Accepted,RFC: In Progress,RFC: Accepted,Date (ISO) +"Sunday, April 10, 2022",0,8,8,0,0,4,19,103,58,39,0,0,"2022-04-10T12:02:05.421Z" "Saturday, April 9, 2022",1,1,1,0,0,6,15,95,50,39,0,0,"2022-04-09T12:01:49.149Z" "Friday, April 8, 2022",13,9,8,0,0,9,9,97,49,41,0,0,"2022-04-08T12:01:59.641Z" "Thursday, April 7, 2022",17,6,6,0,0,7,6,93,47,40,0,0,"2022-04-07T12:07:02.763Z"