Skip to content

Commit

Permalink
Merge branch 'main' into feat/update-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Apr 24, 2024
2 parents f8a363f + 43ead8f commit ad7d5ca
Show file tree
Hide file tree
Showing 74 changed files with 801 additions and 643 deletions.
5 changes: 0 additions & 5 deletions .changeset/bright-chefs-develop.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/curvy-humans-judge.md
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fixes an issue where `astro build` writes type declaration files to `outDir` when it's outside of root directory.
5 changes: 5 additions & 0 deletions .changeset/famous-mugs-grab.md
@@ -0,0 +1,5 @@
---
"astro": patch
---

Update sharp to 0.33 to fix issue with Alpine Linux
5 changes: 0 additions & 5 deletions .changeset/spotty-dots-beg.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/thick-wasps-know.md

This file was deleted.

7 changes: 7 additions & 0 deletions .changeset/thirty-poems-chew.md
@@ -0,0 +1,7 @@
---
"astro": minor
---

Enables type checking for JavaScript files when using the `strictest` TS config. This ensures consistency with Astro's other TS configs, and fixes type checking for integrations like Astro DB when using an `astro.config.mjs`.

If you are currently using the `strictest` preset and would like to still disable `.js` files, set `allowJS: false` in your `tsconfig.json`.
5 changes: 0 additions & 5 deletions .changeset/weak-swans-sparkle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wet-apples-accept.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/basics/package.json
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Expand Up @@ -14,6 +14,6 @@
"@astrojs/mdx": "^2.3.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.4",
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.6.3"
"astro": "^4.6.4"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Expand Up @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^4.0.1",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.6.3",
"astro": "^4.6.4",
"lit": "^3.1.2"
}
}
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Expand Up @@ -12,13 +12,13 @@
},
"dependencies": {
"@astrojs/preact": "^3.2.0",
"@astrojs/react": "^3.3.0",
"@astrojs/react": "^3.3.1",
"@astrojs/solid-js": "^4.1.0",
"@astrojs/svelte": "^5.4.0",
"@astrojs/vue": "^4.1.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.6.3",
"astro": "^4.6.4",
"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
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.2.0",
"@preact/signals": "^1.2.1",
"astro": "^4.6.3",
"astro": "^4.6.4",
"preact": "^10.19.2"
}
}
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.3.0",
"@astrojs/react": "^3.3.1",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.6.3",
"astro": "^4.6.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.1.0",
"astro": "^4.6.3",
"astro": "^4.6.4",
"solid-js": "^1.8.5"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^5.4.0",
"astro": "^4.6.3",
"astro": "^4.6.4",
"svelte": "^4.2.5"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^4.1.0",
"astro": "^4.6.3",
"astro": "^4.6.4",
"vue": "^3.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.6.3"
"astro": "^4.6.4"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.6.3",
"astro": "^4.6.4",
"html-minifier": "^4.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.2.5",
"@astrojs/svelte": "^5.4.0",
"astro": "^4.6.3",
"astro": "^4.6.4",
"svelte": "^4.2.5"
}
}
4 changes: 2 additions & 2 deletions examples/starlog/package.json
Expand Up @@ -10,8 +10,8 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.3",
"astro": "^4.6.4",
"sass": "^1.69.5",
"sharp": "^0.32.6"
"sharp": "^0.33.3"
}
}
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.2.5",
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
4 changes: 2 additions & 2 deletions examples/with-markdoc/package.json
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdoc": "^0.10.0",
"astro": "^4.6.3"
"@astrojs/markdoc": "^0.11.0",
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^5.1.0",
"astro": "^4.6.3",
"astro": "^4.6.4",
"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
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.6.3"
"astro": "^4.6.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^2.3.1",
"@astrojs/preact": "^3.2.0",
"astro": "^4.6.3",
"astro": "^4.6.4",
"preact": "^10.19.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.2.0",
"@nanostores/preact": "^0.5.0",
"astro": "^4.6.3",
"astro": "^4.6.4",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Expand Up @@ -14,7 +14,7 @@
"@astrojs/mdx": "^2.3.1",
"@astrojs/tailwind": "^5.1.0",
"@types/canvas-confetti": "^1.6.3",
"astro": "^4.6.3",
"astro": "^4.6.4",
"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
Expand Up @@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.6.3",
"astro": "^4.6.4",
"vitest": "^1.5.0"
}
}
24 changes: 24 additions & 0 deletions packages/astro/CHANGELOG.md
@@ -1,5 +1,29 @@
# astro

## 4.6.4

### Patch Changes

- [#10846](https://github.com/withastro/astro/pull/10846) [`3294f7a`](https://github.com/withastro/astro/commit/3294f7a343e036d2ad9ac8d5f792ad0d4f43a399) Thanks [@matthewp](https://github.com/matthewp)! - Prevent getCollection breaking in vitest

- [#10856](https://github.com/withastro/astro/pull/10856) [`30cf82a`](https://github.com/withastro/astro/commit/30cf82ac3e970a6a3c0f07db1340dd7152d1c35d) Thanks [@robertvanhoesel](https://github.com/robertvanhoesel)! - Prevents inputs with a name attribute of action or method to break ViewTransitions' form submission

- [#10833](https://github.com/withastro/astro/pull/10833) [`8d5f3e8`](https://github.com/withastro/astro/commit/8d5f3e8656027023f9fda51c66b0213ffe16d3a5) Thanks [@renovate](https://github.com/apps/renovate)! - Updates `esbuild` dependency to v0.20. This should not affect projects in most cases.

- [#10801](https://github.com/withastro/astro/pull/10801) [`204b782`](https://github.com/withastro/astro/commit/204b7820e6de22d97fa2a7b988180c42155c8387) Thanks [@rishi-raj-jain](https://github.com/rishi-raj-jain)! - Fixes an issue where images in MD required a relative specifier (e.g. `./`)

Now, you can use the standard `![](relative/img.png)` syntax in MD 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 MD 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! -->
```

- [#10841](https://github.com/withastro/astro/pull/10841) [`a2df344`](https://github.com/withastro/astro/commit/a2df344bff15647c2bfb3f49e3f7b66aa069d6f4) Thanks [@martrapp](https://github.com/martrapp)! - Due to regression on mobile WebKit browsers, reverts a change made for JavaScript animations during view transitions.

## 4.6.3

### Patch Changes
Expand Down
11 changes: 9 additions & 2 deletions packages/astro/components/ViewTransitions.astro
Expand Up @@ -108,9 +108,16 @@ const { fallback = 'animate' } = Astro.props;
const form = el as HTMLFormElement;
const submitter = ev.submitter;
const formData = new FormData(form, submitter);
// form.action and form.method can point to an <input name="action"> or <input name="method">
// in which case should fallback to the form attribute
const formAction =
typeof form.action === 'string' ? form.action : form.getAttribute('action');
const formMethod =
typeof form.method === 'string' ? form.method : form.getAttribute('method');
// Use the form action, if defined, otherwise fallback to current path.
let action = submitter?.getAttribute('formaction') ?? form.action ?? location.pathname;
const method = submitter?.getAttribute('formmethod') ?? form.method;
let action = submitter?.getAttribute('formaction') ?? formAction ?? location.pathname;
// Use the form method, if defined, otherwise fallback to "get"
const method = submitter?.getAttribute('formmethod') ?? formMethod ?? 'get';

// the "dialog" method is a special keyword used within <dialog> elements
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-method
Expand Down
Expand Up @@ -4,4 +4,3 @@ import Layout from '../components/Layout.astro';
<Layout>
<p id="FourOhFour">Page not found</p>
</Layout>
</script>
@@ -0,0 +1,11 @@
---
import Layout from '../components/Layout.astro';
---
<Layout>
<form>
<p>This form has an no method defined, but input with `name=method`</p>
<input type="text" name="method" value="POST" />
<button id="submit">Submit</button>
</form>
</Layout>
@@ -0,0 +1,11 @@
---
import Layout from '../components/Layout.astro';
---
<Layout>
<form method="POST" action="bar">
<p>This form has an input with `name=action`</p>
<input type="text" name="action" value="foo" />
<button id="submit">Submit</button>
</form>
</Layout>

0 comments on commit ad7d5ca

Please sign in to comment.