Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Aug 15, 2023
2 parents 8df5a2f + 76a2ba2 commit 685b1ab
Show file tree
Hide file tree
Showing 83 changed files with 1,046 additions and 796 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-balloons-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Fix install step to avoid unscrutable errors
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Astro is generously supported by Netlify, Storyblok, and several other amazing o

[![Astro's sponsors.](https://astro.build/sponsors.png "Astro's sponsors.
Platinum sponsors: Netlify, storyblok, Vercel, Ship Shape, Google Chrome
Gold sponsors: ‹div›RIOTS, DEEPGRAM, CloudCannon
Gold sponsors: ‹div›RIOTS, DEEPGRAM, Transloadit, CloudCannon
Sponsors: Monogram, Qoddi, Dimension")](https://github.com/sponsors/withastro)

</a>
Expand Down
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.10.7"
"astro": "^2.10.8"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/rss": "^2.4.4",
"@astrojs/sitemap": "^2.0.1",
"astro": "^2.10.7"
"@astrojs/sitemap": "^2.0.2",
"astro": "^2.10.8"
}
}
Binary file modified examples/blog/public/blog-placeholder-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed examples/blog/public/placeholder-about.jpg
Binary file not shown.
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.10.7"
"astro": "^2.10.8"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.10.7"
"astro": "^2.10.8"
},
"devDependencies": {
"@astrojs/deno": "^4.3.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 @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.2.2",
"@types/alpinejs": "^3.7.1",
"alpinejs": "^3.12.2",
"astro": "^2.10.7"
"astro": "^2.10.8"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^2.1.1",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^2.10.7",
"astro": "^2.10.8",
"lit": "^2.7.5"
}
}
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
},
"dependencies": {
"@astrojs/preact": "^2.2.2",
"@astrojs/react": "^2.2.1",
"@astrojs/react": "^2.2.2",
"@astrojs/solid-js": "^2.2.0",
"@astrojs/svelte": "^3.1.0",
"@astrojs/vue": "^2.2.1",
"astro": "^2.10.7",
"astro": "^2.10.8",
"preact": "^10.15.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
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 @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^2.2.2",
"@preact/signals": "^1.1.3",
"astro": "^2.10.7",
"astro": "^2.10.8",
"preact": "^10.15.1"
}
}
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": {
"@astrojs/react": "^2.2.1",
"@astrojs/react": "^2.2.2",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.6",
"astro": "^2.10.7",
"astro": "^2.10.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
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 @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^2.2.0",
"astro": "^2.10.7",
"astro": "^2.10.8",
"solid-js": "^1.7.6"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^3.1.0",
"astro": "^2.10.7",
"astro": "^2.10.8",
"svelte": "^3.59.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^2.2.1",
"astro": "^2.10.7",
"astro": "^2.10.8",
"vue": "^3.3.4"
}
}
4 changes: 2 additions & 2 deletions examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^5.3.3",
"astro": "^2.10.7"
"@astrojs/node": "^5.3.4",
"astro": "^2.10.8"
}
}
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.10.7"
"astro": "^2.10.8"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"@astrojs/node": "^5.3.3",
"astro": "^2.10.7",
"@astrojs/node": "^5.3.4",
"astro": "^2.10.8",
"html-minifier": "^4.0.0"
}
}
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.10.7"
"astro": "^2.10.8"
}
}
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.10.7"
"astro": "^2.10.8"
}
}
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.10.7"
"astro": "^2.10.8"
}
}
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": {
"@astrojs/node": "^5.3.3",
"@astrojs/node": "^5.3.4",
"@astrojs/svelte": "^3.1.0",
"astro": "^2.10.7",
"astro": "^2.10.8",
"svelte": "^3.59.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.4.4",
"astro": "^2.10.7"
"astro": "^2.10.8"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^2.2.1",
"astro": "^2.10.7",
"astro": "^2.10.8",
"hast-util-select": "^5.0.5",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
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.10.7"
"astro": "^2.10.8"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/preact": "^2.2.2",
"astro": "^2.10.7",
"astro": "^2.10.8",
"preact": "^10.15.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^2.2.2",
"@nanostores/preact": "^0.4.1",
"astro": "^2.10.7",
"astro": "^2.10.8",
"nanostores": "^0.8.1",
"preact": "^10.15.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/tailwind": "^4.0.0",
"@types/canvas-confetti": "^1.6.0",
"astro": "^2.10.7",
"astro": "^2.10.8",
"autoprefixer": "^10.4.14",
"canvas-confetti": "^1.6.0",
"postcss": "^8.4.24",
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.10.7",
"astro": "^2.10.8",
"vite-plugin-pwa": "0.14.7",
"workbox-window": "^6.6.0"
}
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.10.7",
"astro": "^2.10.8",
"vitest": "^0.31.4"
}
}
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

## 2.10.8

### Patch Changes

- [#7702](https://github.com/withastro/astro/pull/7702) [`c19987df0`](https://github.com/withastro/astro/commit/c19987df0be3520cf774476cea270c03edd08354) Thanks [@shishkin](https://github.com/shishkin)! - Fix AstroConfigSchema type export

- [#8084](https://github.com/withastro/astro/pull/8084) [`560e45924`](https://github.com/withastro/astro/commit/560e45924622141206ff5b47d134cb343d6d2a71) Thanks [@hbgl](https://github.com/hbgl)! - Stream request body instead of buffering it in memory.

- [#8066](https://github.com/withastro/astro/pull/8066) [`afc45af20`](https://github.com/withastro/astro/commit/afc45af2022f7c43fbb6c5c04983695f3819e47e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Add support for non-awaited imports to the Image component and `getImage`

- [#7866](https://github.com/withastro/astro/pull/7866) [`d1f7143f9`](https://github.com/withastro/astro/commit/d1f7143f9caf2ffa0e87cc55c0e05339d3501db3) Thanks [@43081j](https://github.com/43081j)! - Add second type argument to the AstroGlobal type to type Astro.self. This change will ultimately allow our editor tooling to provide props completions and intellisense for `<Astro.self />`

- [#8032](https://github.com/withastro/astro/pull/8032) [`3e46634fd`](https://github.com/withastro/astro/commit/3e46634fd540e5b967d2e5c9abd6235452cee2f2) Thanks [@natemoo-re](https://github.com/natemoo-re)! - `astro add` now passes down `--save-prod`, `--save-dev`, `--save-exact`, and `--no-save` flags for installation

- [#8035](https://github.com/withastro/astro/pull/8035) [`a12027b6a`](https://github.com/withastro/astro/commit/a12027b6af411be39700919ca47e240a335e9887) Thanks [@fyndor](https://github.com/fyndor)! - Removed extra double quotes from computed style in shiki code component

## 2.10.7

### Patch Changes
Expand Down
4 changes: 3 additions & 1 deletion packages/astro/client-base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ declare module 'astro:assets' {
* This is functionally equivalent to using the `<Image />` component, as the component calls this function internally.
*/
getImage: (
options: import('./dist/assets/types.js').ImageTransform
options:
| import('./dist/assets/types.js').ImageTransform
| import('./dist/assets/types.js').UnresolvedImageTransform
) => Promise<import('./dist/assets/types.js').GetImageResult>;
getConfiguredImageService: typeof import('./dist/assets/index.js').getConfiguredImageService;
Image: typeof import('./components/Image.astro').default;
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/components/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const html = renderToHtml(tokens, {
// Handle code wrapping
// if wrap=null, do nothing.
if (wrap === false) {
style += '; overflow-x: auto;"';
style += '; overflow-x: auto;';
} else if (wrap === true) {
style += '; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;"';
style += '; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;';
}
return `<${tag} class="${className}" style="${style}" tabindex="0">${children}</${tag}>`;
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';

export default function () {
const id = React.useId();
return <p className='react-use-id' id={id}>{id}</p>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Counter from '../components/Counter.jsx';
import ReactComponent from '../components/JSXComponent.jsx';
import Suffix from '../components/Suffix.react';
import WithId from '../components/WithId.jsx';
const someProps = {
count: 0,
Expand Down Expand Up @@ -36,5 +37,11 @@ const someProps = {
<ReactComponent id="client-only" client:only="react" />

<Suffix client:load />

<WithId />
<WithId client:load />
<WithId client:load />
<WithId client:only="react" />
<WithId client:only="react" />
</body>
</html>
19 changes: 19 additions & 0 deletions packages/astro/e2e/react-component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@ test.describe('dev', () => {
expect(await suffix.textContent()).toBe('suffix toggle true');
});
});

test.describe('React client id generation', () => {
test('react components generate unique ids', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/'));

const components = page.locator('.react-use-id');
await expect(components).toHaveCount(5);
const staticId = await components.nth(0).getAttribute('id');
const hydratedId0 = await components.nth(1).getAttribute('id');
const hydratedId1 = await components.nth(2).getAttribute('id');
const clientOnlyId0 = await components.nth(3).getAttribute('id');
const clientOnlyId1 = await components.nth(4).getAttribute('id');
console.log('ho ho', staticId, hydratedId0, hydratedId1, clientOnlyId0, clientOnlyId1);
expect(staticId).not.toEqual(hydratedId0);
expect(hydratedId0).not.toEqual(hydratedId1);
expect(hydratedId1).not.toEqual(clientOnlyId0);
expect(clientOnlyId0).not.toEqual(clientOnlyId1);
});
});
3 changes: 1 addition & 2 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "2.10.7",
"version": "2.10.8",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down Expand Up @@ -137,7 +137,6 @@
"common-ancestor-path": "^1.0.1",
"cookie": "^0.5.0",
"debug": "^4.3.4",
"deepmerge-ts": "^4.3.0",
"devalue": "^4.3.2",
"diff": "^5.1.0",
"es-module-lexer": "^1.3.0",
Expand Down
Loading

0 comments on commit 685b1ab

Please sign in to comment.