summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2021-11-02 16:20:35 -0500
committerGravatar GitHub <noreply@github.com> 2021-11-02 16:20:35 -0500
commit11ee158ad50f515dadf66cef1a0ea9a2672e487c (patch)
treeae1da19dc307b4ae471808da5a5233d91a356482
parentbd3bed7f2780058329e46b5342788a048c6b1472 (diff)
downloadastro-11ee158ad50f515dadf66cef1a0ea9a2672e487c.tar.gz
astro-11ee158ad50f515dadf66cef1a0ea9a2672e487c.tar.zst
astro-11ee158ad50f515dadf66cef1a0ea9a2672e487c.zip
Update `@astrojs/compiler` (#1730)
* chore: update @astrojs/compiler * fix: add Fragment handling * chore: add changeset
-rw-r--r--.changeset/curvy-years-kiss.md9
-rw-r--r--packages/astro/package.json2
-rw-r--r--packages/astro/src/runtime/server/index.ts6
-rw-r--r--yarn.lock8
4 files changed, 20 insertions, 5 deletions
diff --git a/.changeset/curvy-years-kiss.md b/.changeset/curvy-years-kiss.md
new file mode 100644
index 000000000..f43a50496
--- /dev/null
+++ b/.changeset/curvy-years-kiss.md
@@ -0,0 +1,9 @@
+---
+'astro': patch
+---
+
+Fix issue with `style` and `script` processing where siblings would be skipped
+
+Fix `Fragment` and `<>` handling for backwards compatability
+
+Fix CSS `--custom-proprty` parsing when using scoped CSS
diff --git a/packages/astro/package.json b/packages/astro/package.json
index 77a8e06d7..6db274813 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -52,7 +52,7 @@
"test": "mocha --parallel --timeout 15000"
},
"dependencies": {
- "@astrojs/compiler": "^0.2.23",
+ "@astrojs/compiler": "^0.2.24",
"@astrojs/language-server": "^0.7.16",
"@astrojs/markdown-remark": "^0.4.0-next.0",
"@astrojs/markdown-support": "0.3.1",
diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts
index b1c231f4b..40accdfce 100644
--- a/packages/astro/src/runtime/server/index.ts
+++ b/packages/astro/src/runtime/server/index.ts
@@ -90,11 +90,17 @@ export async function renderSlot(_result: any, slotted: string, fallback?: any)
return fallback;
}
+export const Fragment = Symbol("Astro.Fragment");
+
export async function renderComponent(result: SSRResult, displayName: string, Component: unknown, _props: Record<string | number, any>, slots: any = {}) {
Component = await Component;
const children = await renderSlot(result, slots?.default);
const { renderers } = result._metadata;
+ if (Component === Fragment) {
+ return children;
+ }
+
if (Component && (Component as any).isAstroComponentFactory) {
const output = await renderToString(result, Component as any, _props, slots);
return output;
diff --git a/yarn.lock b/yarn.lock
index 35cf4d797..13a890689 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -106,10 +106,10 @@
"@algolia/logger-common" "4.10.5"
"@algolia/requester-common" "4.10.5"
-"@astrojs/compiler@^0.2.23":
- version "0.2.23"
- resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-0.2.23.tgz#ebc705521ed5ce89d37ebfc0c3392ec6c0d7ec47"
- integrity sha512-RjQXt4AFQqUYzjzbwFKBDqTnj2yfBnwPROHmFD40ONaIXaeHYcVvHKC3zrXqO8PIVRpQOlvFw9V3CWZD6rG7pw==
+"@astrojs/compiler@^0.2.24":
+ version "0.2.24"
+ resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-0.2.24.tgz#1e737989a0f3da00d785d48081935417cbaf8745"
+ integrity sha512-BiS5nQIlRYB7kroay4zBtNgdzaW14RIh+Lpwbi9WcZ0oSRiq5LVa/lOgr6fKRClmmDQn56TX7LBWqy5gh68e7w==
dependencies:
typescript "^4.3.5"