Skip to content

Commit

Permalink
Merge branch 'main' into ci/lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Feb 16, 2023
2 parents cc3b7b3 + fb4e79b commit dd405cb
Show file tree
Hide file tree
Showing 70 changed files with 349 additions and 137 deletions.
5 changes: 0 additions & 5 deletions .changeset/cold-spoons-battle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/little-carrots-add.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/moody-cats-train.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/selfish-frogs-tell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/three-peaches-guess.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": "^2.0.11"
"astro": "^2.0.13"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.11",
"@astrojs/mdx": "^0.16.0",
"astro": "^2.0.13",
"@astrojs/mdx": "^0.17.0",
"@astrojs/rss": "^2.1.0",
"@astrojs/sitemap": "^1.0.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^2.0.11"
"astro": "^2.0.13"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.11"
"astro": "^2.0.13"
},
"devDependencies": {
"@astrojs/deno": "^4.0.0"
"@astrojs/deno": "^4.0.1"
}
}
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.11",
"astro": "^2.0.13",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.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": "^2.0.11",
"astro": "^2.0.13",
"alpinejs": "^3.10.2",
"@astrojs/alpinejs": "^0.1.3",
"@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": "^2.0.11",
"astro": "^2.0.13",
"lit": "^2.2.5",
"@astrojs/lit": "^1.2.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,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.11",
"astro": "^2.0.13",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
Expand All @@ -21,7 +21,7 @@
"@astrojs/preact": "^2.0.3",
"@astrojs/react": "^2.0.2",
"@astrojs/solid-js": "^2.0.2",
"@astrojs/svelte": "^2.0.1",
"@astrojs/svelte": "^2.0.2",
"@astrojs/vue": "^2.0.1"
}
}
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": "^2.0.11",
"astro": "^2.0.13",
"preact": "^10.7.3",
"@astrojs/preact": "^2.0.3",
"@preact/signals": "^1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.11",
"astro": "^2.0.13",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^2.0.2",
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": "^2.0.11",
"astro": "^2.0.13",
"solid-js": "^1.4.3",
"@astrojs/solid-js": "^2.0.2"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"svelte": "^3.48.0",
"@astrojs/svelte": "^2.0.1",
"astro": "^2.0.11"
"@astrojs/svelte": "^2.0.2",
"astro": "^2.0.13"
}
}
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": "^2.0.11",
"astro": "^2.0.13",
"vue": "^3.2.37",
"@astrojs/vue": "^2.0.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^5.0.3",
"astro": "^2.0.11"
"astro": "^2.0.13"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^2.0.11"
"astro": "^2.0.13"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
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": "^2.0.11"
"astro": "^2.0.13"
}
}
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": "^2.0.11"
"astro": "^2.0.13"
}
}
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": "^2.0.11"
"astro": "^2.0.13"
}
}
4 changes: 2 additions & 2 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"astro": "^2.0.11",
"astro": "^2.0.13",
"svelte": "^3.48.0",
"@astrojs/svelte": "^2.0.1",
"@astrojs/svelte": "^2.0.2",
"@astrojs/node": "^5.0.3",
"concurrently": "^7.2.1",
"unocss": "^0.15.6",
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": "^2.0.11",
"astro": "^2.0.13",
"@astrojs/markdown-remark": "^2.0.1",
"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": "^2.0.11"
"astro": "^2.0.13"
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.11",
"astro": "^2.0.13",
"preact": "^10.6.5",
"@astrojs/preact": "^2.0.3",
"@astrojs/mdx": "^0.16.0"
"@astrojs/mdx": "^0.17.0"
}
}
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": "^2.0.11",
"astro": "^2.0.13",
"preact": "^10.7.3",
"@astrojs/preact": "^2.0.3",
"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,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^0.16.0",
"@astrojs/mdx": "^0.17.0",
"@astrojs/tailwind": "^3.0.1",
"@types/canvas-confetti": "^1.4.3",
"astro": "^2.0.11",
"astro": "^2.0.13",
"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": "^2.0.11",
"astro": "^2.0.13",
"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": "^2.0.11",
"astro": "^2.0.13",
"vitest": "^0.20.3"
}
}
18 changes: 18 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# astro

## 2.0.13

### Patch Changes

- [#6248](https://github.com/withastro/astro/pull/6248) [`ef5cea4dc`](https://github.com/withastro/astro/commit/ef5cea4dc5c4ffa33bd57ea0886e6912afb24fec) Thanks [@wulinsheng123](https://github.com/wulinsheng123)! - Deno SSR with prerender=true complains about invalid URL scheme

- [#6257](https://github.com/withastro/astro/pull/6257) [`2fec47848`](https://github.com/withastro/astro/commit/2fec4784871f2b06fd780eb4cb0bb69866c6b065) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: prevent dev server hanging for `getCollection()` calls within a layout when using the `layout` prop

## 2.0.12

### Patch Changes

- [#6238](https://github.com/withastro/astro/pull/6238) [`deacd5443`](https://github.com/withastro/astro/commit/deacd5443aae8d0ee6508e2c442783dcc2e9a014) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: run integration setup hooks during `astro sync`

- [#6244](https://github.com/withastro/astro/pull/6244) [`1c678f7eb`](https://github.com/withastro/astro/commit/1c678f7ebff6b8ea843bf4b49ab73ca942a2a755) Thanks [@bluwy](https://github.com/bluwy)! - Fix hydrate loading path to prevent multiple instance loaded for circular imports

- [#6229](https://github.com/withastro/astro/pull/6229) [`c397be324`](https://github.com/withastro/astro/commit/c397be324f97bb9700da8cd6d845470530b7d18c) Thanks [@MoustaphaDev](https://github.com/MoustaphaDev)! - Add support for `.js/.mjs` file extensions for Content Collections configuration file.

## 2.0.11

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<script>
let isNavOpen = false;
const toggleNav = () => (isNavOpen = !isNavOpen);
</script>

<button id="toggle" on:click={toggleNav}>
{#if isNavOpen}
<slot name="open" />
{:else}
<slot name="close" />
{/if}
</button>
1 change: 1 addition & 0 deletions packages/astro/e2e/fixtures/svelte-component/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
10 changes: 10 additions & 0 deletions packages/astro/e2e/fixtures/svelte-component/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import Counter from '../components/Counter.svelte';
import SvelteComponent from '../components/SvelteComponent.svelte';
import ToggleSlots from '../components/ToggleSlots.svelte';
const someProps = {
count: 0,
Expand Down Expand Up @@ -33,5 +34,14 @@ const someProps = {
</Counter>

<SvelteComponent id="client-only" client:only="svelte" />

<ToggleSlots client:load>
<div slot="open">
open
</div>
<div slot="close">
close
</div>
</ToggleSlots>
</body>
</html>
12 changes: 12 additions & 0 deletions packages/astro/e2e/svelte-component.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { expect } from '@playwright/test';
import { prepareTestFactory } from './shared-component-tests.js';

const { test, createTests } = prepareTestFactory({ root: './fixtures/svelte-component/' });
Expand All @@ -23,3 +24,14 @@ test.describe('Svelte components in MDX files', () => {
pageSourceFilePath: './src/pages/mdx.mdx',
});
});

test.describe('Svelte components lifecycle', () => {
test('slot should unmount properly', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/'));

const toggle = page.locator('#toggle');
expect((await toggle.textContent()).trim()).toBe('close');
await toggle.click();
expect((await toggle.textContent()).trim()).toBe('open');
});
});
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": "2.0.11",
"version": "2.0.13",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
Loading

0 comments on commit dd405cb

Please sign in to comment.