Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into build-format-preserve
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jan 31, 2024
2 parents 8ae668c + 84c100d commit 7b929e2
Show file tree
Hide file tree
Showing 140 changed files with 2,818 additions and 1,259 deletions.
5 changes: 0 additions & 5 deletions .changeset/cool-colts-watch.md

This file was deleted.

14 changes: 14 additions & 0 deletions .changeset/cuddly-moons-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"astro": minor
---

Adds a new `ComponentProps` type export from `astro/types` to get the props type of an Astro component.

```astro
---
import type { ComponentProps } from 'astro/types';
import { Button } from "./Button.astro";
type myButtonProps = ComponentProps<typeof Button>;
---
```
5 changes: 0 additions & 5 deletions .changeset/famous-seas-press.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/four-masks-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@astrojs/vercel": minor
"@astrojs/node": minor
---

Adds experimental support for internationalization domains
5 changes: 0 additions & 5 deletions .changeset/large-kangaroos-camp.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/little-panthers-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fixes an issue where the function `getLocaleRelativeUrlList` wasn't normalising the paths by default
9 changes: 9 additions & 0 deletions .changeset/old-cherries-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'astro': minor
---

Adds CLI shortcuts as an easter egg for the dev server:

- `o + enter`: opens the site in your browser
- `q + enter`: quits the dev server
- `h + enter`: prints all available shortcuts
5 changes: 0 additions & 5 deletions .changeset/silent-buckets-retire.md

This file was deleted.

52 changes: 52 additions & 0 deletions .changeset/tidy-carrots-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
'astro': minor
---

Adds experimental support for a new i18n domain routing option (`"domains"`) that allows you to configure different domains for individual locales in entirely server-rendered projects.

To enable this in your project, first configure your `server`-rendered project's i18n routing with your preferences if you have not already done so. Then, set the `experimental.i18nDomains` flag to `true` and add `i18n.domains` to map any of your supported `locales` to custom URLs:

```js
//astro.config.mjs"
import { defineConfig } from "astro/config"
export default defineConfig({
site: "https://example.com",
output: "server", // required, with no prerendered pages
adapter: node({
mode: 'standalone',
}),
i18n: {
defaultLocale: "en",
locales: ["es", "en", "fr", "ja"],
routing: {
prefixDefaultLocale: false
},
domains: {
fr: "https://fr.example.com",
es: "https://example.es"
}
},
experimental: {
i18nDomains: true
}
})
```
With `"domains"` configured, the URLs emitted by `getAbsoluteLocaleUrl()` and `getAbsoluteLocaleUrlList()` will use the options set in `i18n.domains`.

```js
import { getAbsoluteLocaleUrl } from "astro:i18n";

getAbsoluteLocaleUrl("en", "about"); // will return "https://example.com/about"
getAbsoluteLocaleUrl("fr", "about"); // will return "https://fr.example.com/about"
getAbsoluteLocaleUrl("es", "about"); // will return "https://example.es/about"
getAbsoluteLocaleUrl("ja", "about"); // will return "https://example.com/ja/about"
```

Similarly, your localized files will create routes at corresponding URLs:

- The file `/en/about.astro` will be reachable at the URL `https://example.com/about`.
- The file `/fr/about.astro` will be reachable at the URL `https://fr.example.com/about`.
- The file `/es/about.astro` will be reachable at the URL `https://example.es/about`.
- The file `/ja/about.astro` will be reachable at the URL `https://example.com/ja/about`.

See our [Internationalization Guide](https://docs.astro.build/en/guides/internationalization/#domains-experimental) for more details and limitations on this experimental routing feature.
15 changes: 15 additions & 0 deletions .changeset/young-eyes-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"astro": minor
---

Fixes an issue where images in Markdown required a relative specifier (e.g. `./`)

Now, you can use the standard `![](img.png)` syntax in Markdown files for images colocated in the same folder: no relative specifier required!

There is no need to update your project; your existing images will still continue to work. However, you may wish to remove any relative specifiers from these Markdown images as they are no longer necessary:

```diff
- ![A cute dog](./dog.jpg)
+ ![A cute dog](dog.jpg)
<!-- This dog lives in the same folder as my article! -->
```
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": "^4.2.6"
"astro": "^4.2.8"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.1.0",
"@astrojs/mdx": "^2.1.1",
"@astrojs/rss": "^4.0.4",
"@astrojs/sitemap": "^3.0.5",
"astro": "^4.2.6"
"astro": "^4.2.8"
}
}
3 changes: 2 additions & 1 deletion examples/blog/src/components/HeaderLink.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ type Props = HTMLAttributes<'a'>;
const { href, class: className, ...props } = Astro.props;
const { pathname } = Astro.url;
const isActive = href === pathname || href === pathname.replace(/\/$/, '');
const subpath = pathname.match(/[^\/]+/g);
const isActive = href === pathname || href === '/' + subpath?.[0];
---

<a href={href} class:list={[className, { active: isActive }]} {...props}>
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": "^4.2.6"
"astro": "^4.2.8"
},
"peerDependencies": {
"astro": "^4.0.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.4.0",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^4.2.6"
"astro": "^4.2.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": "^4.0.1",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.2.6",
"astro": "^4.2.8",
"lit": "^2.8.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/solid-js": "^4.0.1",
"@astrojs/svelte": "^5.0.3",
"@astrojs/vue": "^4.0.8",
"astro": "^4.2.6",
"astro": "^4.2.8",
"preact": "^10.19.2",
"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": "^3.1.0",
"@preact/signals": "^1.2.1",
"astro": "^4.2.6",
"astro": "^4.2.8",
"preact": "^10.19.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^3.0.9",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.2.6",
"astro": "^4.2.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": "^4.0.1",
"astro": "^4.2.6",
"astro": "^4.2.8",
"solid-js": "^1.8.5"
}
}
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": "^5.0.3",
"astro": "^4.2.6",
"astro": "^4.2.8",
"svelte": "^4.2.5"
}
}
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": "^4.0.8",
"astro": "^4.2.6",
"astro": "^4.2.8",
"vue": "^3.3.8"
}
}
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": "^8.1.0",
"astro": "^4.2.6"
"astro": "^4.2.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": "^4.2.6"
"astro": "^4.2.8"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.1.0",
"astro": "^4.2.6",
"astro": "^4.2.8",
"html-minifier": "^4.0.0"
},
"devDependencies": {
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": "^4.2.6"
"astro": "^4.2.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": "^4.2.6"
"astro": "^4.2.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": "^4.2.6"
"astro": "^4.2.8"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.1.0",
"@astrojs/svelte": "^5.0.3",
"astro": "^4.2.6",
"astro": "^4.2.8",
"svelte": "^4.2.5"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.2.6",
"astro": "^4.2.8",
"sass": "^1.69.5",
"sharp": "^0.32.6"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.1.0",
"astro": "^4.2.6"
"astro": "^4.2.8"
}
}
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.8.3",
"astro": "^4.2.6"
"astro": "^4.2.8"
}
}
4 changes: 2 additions & 2 deletions examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdown-remark": "^4.2.0",
"astro": "^4.2.6",
"@astrojs/markdown-remark": "^4.2.1",
"astro": "^4.2.8",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.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": "^4.2.6"
"astro": "^4.2.8"
}
}
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": {
"@astrojs/mdx": "^2.1.0",
"@astrojs/mdx": "^2.1.1",
"@astrojs/preact": "^3.1.0",
"astro": "^4.2.6",
"astro": "^4.2.8",
"preact": "^10.19.2"
}
}
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": "^3.1.0",
"@nanostores/preact": "^0.5.0",
"astro": "^4.2.6",
"astro": "^4.2.8",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}
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": "^2.1.0",
"@astrojs/mdx": "^2.1.1",
"@astrojs/tailwind": "^5.1.0",
"@types/canvas-confetti": "^1.6.3",
"astro": "^4.2.6",
"astro": "^4.2.8",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",
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": "^4.2.6",
"astro": "^4.2.8",
"vitest": "^1.2.1"
}
}
Loading

0 comments on commit 7b929e2

Please sign in to comment.