Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: withastro/astro
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: astro@4.0.1
Choose a base ref
...
head repository: withastro/astro
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: astro@4.0.2
Choose a head ref
  • 14 commits
  • 63 files changed
  • 13 contributors

Commits on Dec 5, 2023

  1. fix: docs placement and wording (#9316)

    * fix: docs placement and wording
    
    * more changes
    
    * Update packages/astro/src/@types/astro.ts
    
    Co-authored-by:  Matthew Phillips <matthew@skypack.dev>
    
    * apply Sarah's suggestion
    
    * Remove  tag
    
    ---------
    
    Co-authored-by: Matthew Phillips <matthew@skypack.dev>
    Co-authored-by: = <otterlord.dev@gmail.com>
    3 people authored Dec 5, 2023
    Copy the full SHA
    933f9f2 View commit details
  2. Copy the full SHA
    eb584de View commit details
  3. [ci] format

    sarah11918 authored and astrobot-houston committed Dec 5, 2023
    Copy the full SHA
    aa2e76d View commit details
  4. Copy the full SHA
    d1c91ad View commit details
  5. [ci] format

    natemoo-re authored and astrobot-houston committed Dec 5, 2023
    Copy the full SHA
    874f68c View commit details
  6. Improve Vue appEntrypoint handling (#8794)

    Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
    Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
    Co-authored-by: Florian LEFEBVRE <contact@florian-lefebvre.dev>
    Co-authored-by: Nate Moore <nate@astro.build>
    5 people authored Dec 5, 2023
    Copy the full SHA
    4d4e34d View commit details
  7. [ci] format

    natemoo-re authored and astrobot-houston committed Dec 5, 2023
    Copy the full SHA
    e83b2fe View commit details
  8. [ci] release (#9319)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    astrobot-houston and github-actions[bot] authored Dec 5, 2023
    Copy the full SHA
    339be4d View commit details
  9. Copy the full SHA
    cfb2055 View commit details

Commits on Dec 6, 2023

  1. Copy the full SHA
    b832cd1 View commit details
  2. [ci] format

    natemoo-re authored and astrobot-houston committed Dec 6, 2023
    Copy the full SHA
    dd24379 View commit details
  3. Prevent client-side navigation for method="dialog" (#9327)

    Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
    doseofted and natemoo-re authored Dec 6, 2023
    Copy the full SHA
    3878a91 View commit details
  4. [ci] format

    natemoo-re authored and astrobot-houston committed Dec 6, 2023
    Copy the full SHA
    6404d26 View commit details
  5. [ci] release (#9332)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    astrobot-houston and github-actions[bot] authored Dec 6, 2023
    Copy the full SHA
    895ebcb View commit details
Showing with 648 additions and 115 deletions.
  1. +1 −1 examples/basics/package.json
  2. +1 −1 examples/blog/package.json
  3. +1 −1 examples/component/package.json
  4. +1 −1 examples/framework-alpine/package.json
  5. +1 −1 examples/framework-lit/package.json
  6. +2 −2 examples/framework-multiple/package.json
  7. +1 −1 examples/framework-preact/package.json
  8. +1 −1 examples/framework-react/package.json
  9. +1 −1 examples/framework-solid/package.json
  10. +1 −1 examples/framework-svelte/package.json
  11. +2 −2 examples/framework-vue/package.json
  12. +1 −1 examples/hackernews/package.json
  13. +1 −1 examples/integration/package.json
  14. +1 −1 examples/middleware/package.json
  15. +1 −1 examples/minimal/package.json
  16. +1 −1 examples/non-html-pages/package.json
  17. +1 −1 examples/portfolio/package.json
  18. +1 −1 examples/ssr/package.json
  19. +1 −1 examples/view-transitions/package.json
  20. +1 −1 examples/with-markdoc/package.json
  21. +1 −1 examples/with-markdown-plugins/package.json
  22. +1 −1 examples/with-markdown-shiki/package.json
  23. +1 −1 examples/with-mdx/package.json
  24. +1 −1 examples/with-nanostores/package.json
  25. +1 −1 examples/with-tailwindcss/package.json
  26. +1 −1 examples/with-vitest/package.json
  27. +8 −0 packages/astro/CHANGELOG.md
  28. +7 −0 packages/astro/components/ViewTransitions.astro
  29. +16 −0 packages/astro/e2e/fixtures/view-transitions/src/pages/dialog.astro
  30. +17 −0 packages/astro/e2e/view-transitions.test.js
  31. +2 −2 packages/astro/package.json
  32. +29 −34 packages/astro/src/@types/astro.ts
  33. +12 −0 packages/integrations/vue/CHANGELOG.md
  34. +1 −1 packages/integrations/vue/package.json
  35. +64 −12 packages/integrations/vue/src/index.ts
  36. +134 −0 packages/integrations/vue/test/app-entrypoint.test.js
  37. +14 −0 packages/integrations/vue/test/fixtures/app-entrypoint-no-export-default/astro.config.mjs
  38. +13 −0 packages/integrations/vue/test/fixtures/app-entrypoint-no-export-default/package.json
  39. +3 −0 packages/integrations/vue/test/fixtures/app-entrypoint-no-export-default/src/components/Bar.vue
  40. +1 −0 packages/integrations/vue/test/fixtures/app-entrypoint-no-export-default/src/components/Circle.svg
  41. +11 −0 packages/integrations/vue/test/fixtures/app-entrypoint-no-export-default/src/components/Foo.vue
  42. +3 −0 packages/integrations/vue/test/fixtures/app-entrypoint-no-export-default/src/pages/_app.ts
  43. +12 −0 packages/integrations/vue/test/fixtures/app-entrypoint-no-export-default/src/pages/index.astro
  44. +8 −0 packages/integrations/vue/test/fixtures/app-entrypoint-relative/astro.config.mjs
  45. +12 −0 packages/integrations/vue/test/fixtures/app-entrypoint-relative/package.json
  46. +3 −0 packages/integrations/vue/test/fixtures/app-entrypoint-relative/src/components/Bar.vue
  47. +1 −0 packages/integrations/vue/test/fixtures/app-entrypoint-relative/src/components/Circle.svg
  48. +11 −0 packages/integrations/vue/test/fixtures/app-entrypoint-relative/src/components/Foo.vue
  49. +12 −0 packages/integrations/vue/test/fixtures/app-entrypoint-relative/src/pages/index.astro
  50. +1 −0 packages/integrations/vue/test/fixtures/app-entrypoint-relative/src/vue.ts
  51. +8 −0 packages/integrations/vue/test/fixtures/app-entrypoint-src-absolute/astro.config.mjs
  52. +12 −0 packages/integrations/vue/test/fixtures/app-entrypoint-src-absolute/package.json
  53. +3 −0 packages/integrations/vue/test/fixtures/app-entrypoint-src-absolute/src/components/Bar.vue
  54. +1 −0 packages/integrations/vue/test/fixtures/app-entrypoint-src-absolute/src/components/Circle.svg
  55. +11 −0 packages/integrations/vue/test/fixtures/app-entrypoint-src-absolute/src/components/Foo.vue
  56. +12 −0 packages/integrations/vue/test/fixtures/app-entrypoint-src-absolute/src/pages/index.astro
  57. +1 −0 packages/integrations/vue/test/fixtures/app-entrypoint-src-absolute/src/vue.ts
  58. +6 −0 packages/upgrade/CHANGELOG.md
  59. +1 −1 packages/upgrade/package.json
  60. +21 −6 packages/upgrade/src/actions/verify.ts
  61. +2 −2 packages/upgrade/src/index.ts
  62. +76 −0 packages/upgrade/test/verify.test.js
  63. +71 −29 pnpm-lock.yaml
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
@@ -14,6 +14,6 @@
"@astrojs/mdx": "^2.0.0",
"@astrojs/rss": "^4.0.0",
"@astrojs/sitemap": "^3.0.3",
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.0.1"
"astro": "^4.0.2"
},
"peerDependencies": {
"astro": "^3.0.0"
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
@@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.3.1",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^3.0.3",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.0.1",
"astro": "^4.0.2",
"lit": "^2.8.0"
}
}
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@
"@astrojs/react": "^3.0.7",
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^5.0.0",
"@astrojs/vue": "^4.0.0",
"astro": "^4.0.1",
"@astrojs/vue": "^4.0.2",
"astro": "^4.0.2",
"preact": "^10.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@preact/signals": "^1.2.1",
"astro": "^4.0.1",
"astro": "^4.0.2",
"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
@@ -14,7 +14,7 @@
"@astrojs/react": "^3.0.7",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.0.1",
"astro": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^3.0.2",
"astro": "^4.0.1",
"astro": "^4.0.2",
"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
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^5.0.0",
"astro": "^4.0.1",
"astro": "^4.0.2",
"svelte": "^4.2.5"
}
}
4 changes: 2 additions & 2 deletions examples/framework-vue/package.json
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/vue": "^4.0.0",
"astro": "^4.0.1",
"@astrojs/vue": "^4.0.2",
"astro": "^4.0.2",
"vue": "^3.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^7.0.0",
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.0.1"
"astro": "^4.0.2"
},
"peerDependencies": {
"astro": "^3.0.0"
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^7.0.0",
"astro": "^4.0.1",
"astro": "^4.0.2",
"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
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^7.0.0",
"@astrojs/svelte": "^5.0.0",
"astro": "^4.0.1",
"astro": "^4.0.2",
"svelte": "^4.2.5"
}
}
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.0.3",
"@astrojs/node": "^7.0.0",
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.8.0",
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^4.0.0",
"astro": "^4.0.1",
"astro": "^4.0.2",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.1"
"astro": "^4.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^2.0.0",
"@astrojs/preact": "^3.0.1",
"astro": "^4.0.1",
"astro": "^4.0.2",
"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
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@nanostores/preact": "^0.5.0",
"astro": "^4.0.1",
"astro": "^4.0.2",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"@astrojs/mdx": "^2.0.0",
"@astrojs/tailwind": "^5.0.3",
"@types/canvas-confetti": "^1.6.3",
"astro": "^4.0.1",
"astro": "^4.0.2",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.0.1",
"astro": "^4.0.2",
"vitest": "^0.34.2"
}
}
8 changes: 8 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# astro

## 4.0.2

### Patch Changes

- [#9331](https://github.com/withastro/astro/pull/9331) [`cfb20550d`](https://github.com/withastro/astro/commit/cfb20550d346a33e76e23453d5dcd084e5065c4d) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Updates an internal dependency ([`vitefu`](https://github.com/svitejs/vitefu)) to avoid a common `peerDependency` warning

- [#9327](https://github.com/withastro/astro/pull/9327) [`3878a91be`](https://github.com/withastro/astro/commit/3878a91be4879988c7235f433e50a6dc82e32288) Thanks [@doseofted](https://github.com/doseofted)! - Fixes an edge case for `<form method="dialog">` when using View Transitions. Forms with `method="dialog"` no longer require an additional `data-astro-reload` attribute.

## 4.0.1

### Patch Changes
7 changes: 7 additions & 0 deletions packages/astro/components/ViewTransitions.astro
Original file line number Diff line number Diff line change
@@ -104,6 +104,12 @@ const { fallback = 'animate' } = Astro.props;
let action = submitter?.getAttribute('formaction') ?? form.action ?? location.pathname;
const method = submitter?.getAttribute('formmethod') ?? form.method;

// the "dialog" method is a special keyword used within <dialog> elements
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-method
if (method === 'dialog') {
return;
}

const options: Options = { sourceElement: submitter ?? form };
if (method === 'get') {
const params = new URLSearchParams(formData as any);
@@ -113,6 +119,7 @@ const { fallback = 'animate' } = Astro.props;
} else {
options.formData = formData;
}

ev.preventDefault();
navigate(action, options);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
import { ViewTransitions } from "astro:transitions";
---
<html>
<head>
<ViewTransitions />
</head>
<body>
<button id="open" onclick="modal.showModal()">Open Modal</button>
<dialog id="modal">
<form method="dialog">
<button id="close">Close</button>
</form>
</dialog>
</body>
</html>
17 changes: 17 additions & 0 deletions packages/astro/e2e/view-transitions.test.js
Original file line number Diff line number Diff line change
@@ -1074,4 +1074,21 @@ test.describe('View Transitions', () => {
await page.click('#three');
await expect(page).toHaveURL(expected);
});

test('Dialog using form with method of "dialog" should not trigger navigation', async ({
page,
astro,
}) => {
await page.goto(astro.resolveUrl('/dialog'));

let requests = [];
page.on('request', (request) => requests.push(`${request.method()} ${request.url()}`));

await page.click('#open');
await expect(page.locator('dialog')).toHaveAttribute('open');
await page.click('#close');
await expect(page.locator('dialog')).not.toHaveAttribute('open');

expect(requests).toHaveLength(0);
});
});
4 changes: 2 additions & 2 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "4.0.1",
"version": "4.0.2",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
@@ -169,7 +169,7 @@
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.1",
"vite": "^5.0.0",
"vitefu": "^0.2.4",
"vitefu": "^0.2.5",
"which-pm": "^2.1.1",
"yargs-parser": "^21.1.1",
"zod": "^3.22.4"
Loading