Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into disallow-use-of-vercel-static-on-output-server
Browse files Browse the repository at this point in the history
matthewp authored Oct 28, 2022
2 parents 87f4ffc + 83fd265 commit 1e0b73f
Showing 62 changed files with 289 additions and 187 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-feet-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Allow Windows users to pass `--fancy` to enable full unicode support
5 changes: 0 additions & 5 deletions .changeset/new-pumas-begin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/olive-tomatoes-jog.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/silly-mirrors-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/webapi': patch
---

Fix CustomElementRegistry for Node SSR Adapter
5 changes: 0 additions & 5 deletions .changeset/tasty-mugs-approve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tasty-rules-sleep.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ten-cheetahs-perform.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wicked-pans-wait.md

This file was deleted.

26 changes: 15 additions & 11 deletions .github/workflows/check-merge.yml
Original file line number Diff line number Diff line change
@@ -9,19 +9,23 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Retrieve existing PR reviews
id: set-reviews
run: |
echo ::set-output name=reviews::$(curl --request GET \
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}')
- name: Check if there is already a block on this PR
id: set-blocks
run: |
echo ::set-output name=blocks::$(echo '${{ steps.set-reviews.outputs.reviews }}' \
| jq '.[] | select(.user.id == 41898282 and .state == "CHANGES_REQUESTED") | length' \
| uniq)
uses: actions/github-script@v6
with:
script: |
const url = 'https://api.github.com/repos/' + context.repo.owner + '/' + context.repo.repo + '/pulls/' + context.issue.number + '/reviews';
console.log('reviews URL', url);
const result = await github.request(url);
console.log(result);
const reviews = result.data;
for(const review of reviews) {
if(review.user.id === 41898282 && review.state === 'CHANGES_REQUESTED') {
return 'block';
}
}
return '';
result-encoding: string

- uses: actions/checkout@v3
if: steps.set-blocks.outputs.blocks == ''
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"@astrojs/mdx": "^0.11.5",
"@astrojs/rss": "^1.0.3",
"@astrojs/sitemap": "^1.0.0"
4 changes: 2 additions & 2 deletions examples/component/package.json
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@
],
"scripts": {},
"devDependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
},
"peerDependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/deno/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
},
"devDependencies": {
"@astrojs/deno": "^1.2.0"
4 changes: 2 additions & 2 deletions examples/docs/package.json
Original file line number Diff line number Diff line change
@@ -12,11 +12,11 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^1.2.1",
"@astrojs/react": "^1.2.2",
"@astrojs/preact": "^1.2.0",
"@algolia/client-search": "^4.13.1",
"@docsearch/css": "^3.1.0",
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"alpinejs": "^3.10.2",
"@astrojs/alpinejs": "^0.1.2",
"@types/alpinejs": "^3.7.0"
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"lit": "^2.2.5",
"@astrojs/lit": "^1.0.0",
"@webcomponents/template-shadowroot": "^0.1.0"
6 changes: 3 additions & 3 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
@@ -11,16 +11,16 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"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.2.0",
"@astrojs/react": "^1.2.1",
"@astrojs/solid-js": "^1.2.1",
"@astrojs/react": "^1.2.2",
"@astrojs/solid-js": "^1.2.2",
"@astrojs/svelte": "^1.0.2",
"@astrojs/vue": "^1.2.1"
}
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"preact": "^10.7.3",
"@astrojs/preact": "^1.2.0",
"@preact/signals": "^1.1.0"
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^1.2.1",
"@astrojs/react": "^1.2.2",
"@types/react": "^18.0.10",
"@types/react-dom": "^18.0.5"
}
4 changes: 2 additions & 2 deletions examples/framework-solid/package.json
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"solid-js": "^1.4.3",
"@astrojs/solid-js": "^1.2.1"
"@astrojs/solid-js": "^1.2.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,6 @@
"dependencies": {
"svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.2",
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"vue": "^3.2.37",
"@astrojs/vue": "^1.2.1"
}
4 changes: 2 additions & 2 deletions examples/integration/package.json
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@
],
"scripts": {},
"devDependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
},
"peerDependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.2",
"@astrojs/node": "^2.0.2",
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"@astrojs/markdown-remark": "^1.1.3",
"hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.1",
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0"
"astro": "^1.6.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"preact": "^10.6.5",
"@astrojs/preact": "^1.2.0",
"@astrojs/mdx": "^0.11.5"
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"preact": "^10.7.3",
"@astrojs/preact": "^1.2.0",
"nanostores": "^0.5.12",
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"@astrojs/mdx": "^0.11.5",
"@astrojs/tailwind": "^2.1.1",
"@types/canvas-confetti": "^1.4.3",
"astro": "^1.6.0",
"astro": "^1.6.1",
"autoprefixer": "^10.4.7",
"canvas-confetti": "^1.5.1",
"postcss": "^8.4.14",
2 changes: 1 addition & 1 deletion examples/with-vite-plugin-pwa/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"vite-plugin-pwa": "0.11.11",
"workbox-window": "^6.5.3"
}
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^1.6.0",
"astro": "^1.6.1",
"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.6.1

### Patch Changes

- [#5233](https://github.com/withastro/astro/pull/5233) [`7f8987085`](https://github.com/withastro/astro/commit/7f8987085c9c5bdcd39b9a6700303e9b9f76b9f2) Thanks [@bluwy](https://github.com/bluwy)! - Support rendering `@motionone/solid` components

- [#5238](https://github.com/withastro/astro/pull/5238) [`26ff42905`](https://github.com/withastro/astro/commit/26ff429058c6244767276b9fa20ef58987be13ee) Thanks [@MoustaphaDev](https://github.com/MoustaphaDev)! - Fix not included file extension in `url` metadata for newly added markdown files

- [#5217](https://github.com/withastro/astro/pull/5217) [`8c83359e3`](https://github.com/withastro/astro/commit/8c83359e385b47fb6e453c023aeac2e01a579f38) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix missing types.d.ts in npm package

- [#5212](https://github.com/withastro/astro/pull/5212) [`a609a8937`](https://github.com/withastro/astro/commit/a609a8937f9f35c46f3c934d38b83c445da425b9) Thanks [@bluwy](https://github.com/bluwy)! - Upgrade Vite to 3.2

- [#5206](https://github.com/withastro/astro/pull/5206) [`d64d5b9b5`](https://github.com/withastro/astro/commit/d64d5b9b52c66ac0b3435b85c92a877f374fb100) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Improve error messages related to CSS and compiler errors

- [#5212](https://github.com/withastro/astro/pull/5212) [`a609a8937`](https://github.com/withastro/astro/commit/a609a8937f9f35c46f3c934d38b83c445da425b9) Thanks [@bluwy](https://github.com/bluwy)! - Allow importing public files in SSR

## 1.6.0

### Minor Changes
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.6.0",
"version": "1.6.1",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/server/render/astro.ts
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ export function isAstroComponent(obj: any): obj is AstroComponent {
}

export function isAstroComponentFactory(obj: any): obj is AstroComponentFactory {
return obj == null ? false : !!obj.isAstroComponentFactory;
return obj == null ? false : obj.isAstroComponentFactory === true;
}

export async function* renderAstroComponent(
11 changes: 9 additions & 2 deletions packages/astro/src/runtime/server/render/component.ts
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ export async function renderComponent(
_props: Record<string | number, any>,
slots: any = {}
): Promise<ComponentIterable> {
Component = await Component;
Component = (await Component) ?? Component;

switch (getComponentType(Component)) {
case 'fragment': {
@@ -133,7 +133,14 @@ Did you mean to add ${formatList(probableRendererNames.map((r) => '`' + r + '`')
// If this component ran through `__astro_tag_component__`, we already know
// which renderer to match to and can skip the usual `check` calls.
// This will help us throw most relevant error message for modules with runtime errors
if (Component && (Component as any)[Renderer]) {
let isTagged = false;
try {
isTagged = Component && (Component as any)[Renderer];
} catch {
// Accessing `Component[Renderer]` may throw if `Component` is a Proxy that doesn't
// return the actual read-only value. In this case, ignore.
}
if (isTagged) {
const rendererName = (Component as any)[Renderer];
renderer = renderers.find(({ name }) => name === rendererName);
}
Loading

0 comments on commit 1e0b73f

Please sign in to comment.