Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Sep 22, 2022
2 parents 305576c + e9eb4d1 commit ddd9723
Show file tree
Hide file tree
Showing 64 changed files with 674 additions and 133 deletions.
5 changes: 0 additions & 5 deletions .changeset/four-eggs-compare.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/healthy-ears-compete.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sour-steaks-rule.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/violet-tigers-shake.md

This file was deleted.

13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ jobs:
# Otherwise, run lint autofixer
- name: Lint
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
uses: wearerequired/lint-action@v1.11.1
uses: wearerequired/lint-action@v2.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
eslint: true
eslint_extensions: js,ts,cts,mts,cjs,mjs
prettier: false
auto_fix: true
git_name: github-actions[bot]
git_email: github-actions[bot]@users.noreply.github.com
auto_fix: false
git_name: fredkbot
git_email: fred+astrobot@astro.build
commit_message: 'chore(lint): ${linter} fix'
github_token: ${{ secrets.GITHUB_TOKEN }}
neutral_check_on_warning: true
Expand Down Expand Up @@ -97,7 +98,7 @@ jobs:

- name: Install dependencies
run: pnpm install

- name: Build Packages
run: pnpm run build

Expand Down Expand Up @@ -213,4 +214,4 @@ jobs:
run: pnpm run build

- name: Test
run: pnpm run test:smoke
run: pnpm run test:smoke
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": "^1.2.8"
"astro": "^1.3.0"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.8",
"astro": "^1.3.0",
"@astrojs/mdx": "^0.11.1",
"@astrojs/rss": "^1.0.1",
"@astrojs/sitemap": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/src/pages/blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const posts = (await Astro.glob('./blog/*.{md,mdx}')).sort(
ul li time {
flex: 0 0 130px;
font-style: italic;
color: #888;
color: #595959;
}
ul li a:visited {
color: #8e32dc;
Expand Down
4 changes: 2 additions & 2 deletions examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
],
"scripts": {},
"devDependencies": {
"astro": "^1.2.8"
"astro": "^1.3.0"
},
"peerDependencies": {
"astro": "^1.2.8"
"astro": "^1.3.0"
}
}
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": "^1.2.8"
"astro": "^1.3.0"
},
"devDependencies": {
"@astrojs/deno": "^1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.8",
"astro": "^1.3.0",
"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": "^1.2.8",
"astro": "^1.3.0",
"alpinejs": "^3.10.2",
"@astrojs/alpinejs": "^0.1.2",
"@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": "^1.2.8",
"astro": "^1.3.0",
"lit": "^2.2.5",
"@astrojs/lit": "^1.0.0",
"@webcomponents/template-shadowroot": "^0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion 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": "^1.2.8",
"astro": "^1.3.0",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.8",
"astro": "^1.3.0",
"preact": "^10.7.3",
"@astrojs/preact": "^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": "^1.2.8",
"astro": "^1.3.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^1.1.4",
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": "^1.2.8",
"astro": "^1.3.0",
"solid-js": "^1.4.3",
"@astrojs/solid-js": "^1.1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"dependencies": {
"svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.0",
"astro": "^1.2.8"
"astro": "^1.3.0"
}
}
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": "^1.2.8",
"astro": "^1.3.0",
"vue": "^3.2.37",
"@astrojs/vue": "^1.0.2"
}
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": "^1.2.8"
"astro": "^1.3.0"
}
}
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": "^1.2.8"
"astro": "^1.3.0"
}
}
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": "^1.2.8"
"astro": "^1.3.0"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {},
"dependencies": {
"astro": "^1.2.8",
"astro": "^1.3.0",
"svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.0",
"@astrojs/node": "^1.0.1",
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": "^1.2.8",
"astro": "^1.3.0",
"@astrojs/markdown-remark": "^1.1.2",
"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": "^1.2.8"
"astro": "^1.3.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.8",
"astro": "^1.3.0",
"preact": "^10.6.5",
"@astrojs/preact": "^1.1.0",
"@astrojs/mdx": "^0.11.1"
Expand Down
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": "^1.2.8",
"astro": "^1.3.0",
"preact": "^10.7.3",
"@astrojs/preact": "^1.1.0",
"nanostores": "^0.5.12",
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^1.2.8",
"astro": "^1.3.0",
"@astrojs/tailwind": "^2.0.1",
"autoprefixer": "^10.4.7",
"canvas-confetti": "^1.5.1",
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": "^1.2.8",
"astro": "^1.3.0",
"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": "^1.2.8",
"astro": "^1.3.0",
"vitest": "^0.20.3"
}
}
72 changes: 72 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,77 @@
# astro

## 1.3.0

### Minor Changes

- [#4775](https://github.com/withastro/astro/pull/4775) [`b0cc93996`](https://github.com/withastro/astro/commit/b0cc93996169fe8a52a7b1119ce2180ae6101e70) Thanks [@tony-sull](https://github.com/tony-sull)! - Adds a new "astro:build:generated" hook that runs after SSG builds finish but **before** build artifacts are cleaned up. This is a very specific use case, "astro:build:done" is probably what you're looking for.

- [#4669](https://github.com/withastro/astro/pull/4669) [`a961aa3c2`](https://github.com/withastro/astro/commit/a961aa3c2fa946898fd209dfc70a7b5472b60817) Thanks [@aggre](https://github.com/aggre)! - astro-island now correctly passes Uint8Array/Uint16Array/Uint32Array

- [#4832](https://github.com/withastro/astro/pull/4832) [`73f215df7`](https://github.com/withastro/astro/commit/73f215df76d238a5ce0cb0e64543af032f468773) Thanks [@matthewp](https://github.com/matthewp)! - Allows Responses to be passed to set:html

This expands the abilities of `set:html` to ultimate service this use-case:

```astro
<div set:html={fetch('/legacy-post.html')}></div>
```

This means you can take a legacy app that has been statically generated to HTML and directly consume that HTML within your templates. As is always the case with `set:html`, this should only be used on trusted content.

To make this possible, you can also pass several other types into `set:html` now:

- `Response` objects, since that is what fetch() returns:
```astro
<div
set:html={new Response('<span>Hello world</span>', {
headers: { 'content-type': 'text/html' },
})}
>
</div>
```
- `ReadableStream`s:
```astro
<div
set:html={new ReadableStream({
start(controller) {
controller.enqueue(`<span>read me</span>`);
controller.close();
},
})}
>
</div>
```
- `AsyncIterable`s:
```astro
<div
set:html={(async function* () {
for await (const num of [1, 2, 3, 4, 5]) {
yield `<li>${num}</li>`;
}
})()}
>
</div>
```
- `Iterable`s (non-async):
```astro
<div
set:html={(function* () {
for (const num of [1, 2, 3, 4, 5]) {
yield `<li>${num}</li>`;
}
})()}
>
</div>
```

### Patch Changes

- [#4831](https://github.com/withastro/astro/pull/4831) [`29b29e6a8`](https://github.com/withastro/astro/commit/29b29e6a8a54f6ed764e57bb97f1799657d39be7) Thanks [@yuhang-dong](https://github.com/yuhang-dong)! - Update vite-jsx-plugin for jsx export

- [#4754](https://github.com/withastro/astro/pull/4754) [`baae1b3fd`](https://github.com/withastro/astro/commit/baae1b3fd10cf0a74e880c0e0552ba8d58f24453) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Update `astro check` to latest version of the language server

- [#4509](https://github.com/withastro/astro/pull/4509) [`a0619f086`](https://github.com/withastro/astro/commit/a0619f08699de34f1d4c3da8020ac9a9ad3b9ff9) Thanks [@bluwy](https://github.com/bluwy)! - Refactor server url logs

## 1.2.8

### Patch Changes
Expand Down
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.2.8",
"version": "1.3.0",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/src/core/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ export function resolveServerUrls({
networkInterface?.address &&
networkInterface?.family === (nodeVersion < 18 || nodeVersion >= 18.4 ? 'IPv4' : 4)
);
for (let { address } of ipv4Networks) {
if (address.includes('127.0.0.1')) {
const displayAddress = address.replace('127.0.0.1', localAddress);
for (let { address: ipv4Address } of ipv4Networks) {
if (ipv4Address.includes('127.0.0.1')) {
const displayAddress = ipv4Address.replace('127.0.0.1', localAddress);
local = toDisplayUrl(displayAddress);
} else {
network = toDisplayUrl(address);
network = toDisplayUrl(ipv4Address);
}
}
}
Expand Down
Loading

0 comments on commit ddd9723

Please sign in to comment.