0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

Merge branch 'main' into next

This commit is contained in:
bluwy 2023-11-27 23:47:51 +08:00
commit 88f40846d4
33 changed files with 75 additions and 65 deletions

View file

@ -2,8 +2,7 @@
We welcome contributions of any size and skill level. As an open source project, we believe in giving back to our contributors and are happy to help with guidance on PRs, technical writing, and turning any feature idea into a reality.
> **Tip for new contributors:**
> Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
> [!Tip] > **For new contributors:** Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
## Quick Guide
@ -46,7 +45,8 @@ To get started, create a codespace for this repository by clicking this 👇
Your new codespace will open in a web-based version of Visual Studio Code. All development dependencies will be preinstalled, and the tests will run automatically ensuring you've got a green base from which to start working.
**Note**: Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
> [!Note]
> Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
### Development
@ -187,7 +187,7 @@ Understanding in which environment code runs, and at which stage in the process,
Active Astro development happens on the [`main`](https://github.com/withastro/astro/tree/main) branch. `main` always reflects the latest code.
> **Note:**
> [!Note]
> During certain periods, we put `main` into a [**prerelease**](https://github.com/changesets/changesets/blob/main/docs/prereleases.md#prereleases) state. Read more about [Releasing Astro](#releasing-astro).
### `latest`
@ -198,7 +198,8 @@ By default, `create-astro` and [astro.new](https://astro.new) point to this bran
## Releasing Astro
_Note: Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro._
> [!Note]
> Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro.
The repo is set up with automatic releases, using the changeset GitHub action & bot.

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -14,6 +14,6 @@
"@astrojs/mdx": "^1.1.5",
"@astrojs/rss": "^3.0.0",
"@astrojs/sitemap": "^3.0.3",
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^3.6.0"
"astro": "^3.6.1"
},
"peerDependencies": {
"astro": "^3.0.0"

View file

@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.3.1",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^3.0.3",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^3.6.0",
"astro": "^3.6.1",
"lit": "^2.8.0"
}
}

View file

@ -16,7 +16,7 @@
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^4.0.4",
"@astrojs/vue": "^3.0.4",
"astro": "^3.6.0",
"astro": "^3.6.1",
"preact": "^10.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@preact/signals": "^1.2.1",
"astro": "^3.6.0",
"astro": "^3.6.1",
"preact": "^10.19.2"
}
}

View file

@ -14,7 +14,7 @@
"@astrojs/react": "^3.0.6",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^3.6.0",
"astro": "^3.6.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^3.0.2",
"astro": "^3.6.0",
"astro": "^3.6.1",
"solid-js": "^1.8.5"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^4.0.4",
"astro": "^3.6.0",
"astro": "^3.6.1",
"svelte": "^4.2.5"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^3.0.4",
"astro": "^3.6.0",
"astro": "^3.6.1",
"vue": "^3.3.8"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^6.0.4",
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^3.6.0"
"astro": "^3.6.1"
},
"peerDependencies": {
"astro": "^3.0.0"

View file

@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^6.0.4",
"astro": "^3.6.0",
"astro": "^3.6.1",
"html-minifier": "^4.0.0"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^6.0.4",
"@astrojs/svelte": "^4.0.4",
"astro": "^3.6.0",
"astro": "^3.6.1",
"svelte": "^4.2.5"
}
}

View file

@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.0.2",
"@astrojs/node": "^6.0.4",
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.7.2",
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^3.5.0",
"astro": "^3.6.0",
"astro": "^3.6.1",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.6.0"
"astro": "^3.6.1"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^1.1.5",
"@astrojs/preact": "^3.0.1",
"astro": "^3.6.0",
"astro": "^3.6.1",
"preact": "^10.19.2"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@nanostores/preact": "^0.5.0",
"astro": "^3.6.0",
"astro": "^3.6.1",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}

View file

@ -14,7 +14,7 @@
"@astrojs/mdx": "^1.1.5",
"@astrojs/tailwind": "^5.0.2",
"@types/canvas-confetti": "^1.6.3",
"astro": "^3.6.0",
"astro": "^3.6.1",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.6.0",
"astro": "^3.6.1",
"vite-plugin-pwa": "0.17.0",
"workbox-window": "^7.0.0"
}

View file

@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^3.6.0",
"astro": "^3.6.1",
"vitest": "^0.34.2"
}
}

View file

@ -1,5 +1,13 @@
# astro
## 3.6.1
### Patch Changes
- [#9173](https://github.com/withastro/astro/pull/9173) [`04fdc1c61`](https://github.com/withastro/astro/commit/04fdc1c613171409ed1a2bd887326e26cdb8b5ef) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixes an issue where having a middleware prevented the SSR app from being deployed on Netlify.
- [#9186](https://github.com/withastro/astro/pull/9186) [`607542c7c`](https://github.com/withastro/astro/commit/607542c7cf9fe9813c06f1d96615d6c793262d22) Thanks [@martrapp](https://github.com/martrapp)! - Fixes a view transition issue on webKit browsers that prevented scrolling to #fragments
## 3.6.0
### Minor Changes
@ -9,9 +17,9 @@
Three new events now complement the existing `astro:after-swap` and `astro:page-load` events:
```javascript
astro: before - preparation; // Control how the DOM and other resources of the target page are loaded
astro: after - preparation; // Last changes before taking off? Remove that loading indicator? Here you go!
astro: before - swap; // Control how the DOM is updated to match the new page
'astro:before-preparation'; // Control how the DOM and other resources of the target page are loaded
'astro:after-preparation'; // Last changes before taking off? Remove that loading indicator? Here you go!
'astro:before-swap'; // Control how the DOM is updated to match the new page
```
The `astro:before-*` events allow you to change properties and strategies of the view transition implementation.

View file

@ -1,6 +1,6 @@
{
"name": "astro",
"version": "3.6.0",
"version": "3.6.1",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",

View file

@ -7,7 +7,7 @@ import type { BuildInternals } from '../build/internal.js';
import type { StaticBuildOptions } from '../build/types.js';
import { MIDDLEWARE_PATH_SEGMENT_NAME } from '../constants.js';
export const MIDDLEWARE_MODULE_ID = '@astro-middleware';
export const MIDDLEWARE_MODULE_ID = '\0astro-internal:middleware';
const EMPTY_MIDDLEWARE = '\0empty-middleware';
export function vitePluginMiddleware({ settings }: { settings: AstroSettings }): VitePlugin {

View file

@ -194,7 +194,6 @@ const moveToLocation = (to: URL, from: URL, options: Options, historyState?: Sta
to.href
);
}
history.scrollRestoration = 'manual';
}
// now we are on the new page for non-history navigations!
// (with history navigation page change happens before popstate is fired)
@ -213,12 +212,14 @@ const moveToLocation = (to: URL, from: URL, options: Options, historyState?: Sta
// because we are already on the target page ...
// ... what comes next is a intra-page navigation
// that won't reload the page but instead scroll to the fragment
history.scrollRestoration = 'auto';
location.href = to.href;
} else {
if (!scrolledToTop) {
scrollTo({ left: 0, top: 0, behavior: 'instant' });
}
}
history.scrollRestoration = 'manual';
}
};

View file

@ -125,7 +125,7 @@ importers:
examples/basics:
dependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/blog:
@ -140,13 +140,13 @@ importers:
specifier: ^3.0.3
version: link:../../packages/integrations/sitemap
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/framework-alpine:
@ -161,7 +161,7 @@ importers:
specifier: ^3.13.3
version: 3.13.3
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/framework-lit:
@ -173,7 +173,7 @@ importers:
specifier: ^0.2.1
version: 0.2.1
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
lit:
specifier: ^2.8.0
@ -197,7 +197,7 @@ importers:
specifier: ^3.0.4
version: link:../../packages/integrations/vue
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
preact:
specifier: ^10.19.2
@ -227,7 +227,7 @@ importers:
specifier: ^1.2.1
version: 1.2.1(preact@10.19.2)
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
preact:
specifier: ^10.19.2
@ -245,7 +245,7 @@ importers:
specifier: ^18.2.15
version: 18.2.15
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
react:
specifier: ^18.2.0
@ -260,7 +260,7 @@ importers:
specifier: ^3.0.2
version: link:../../packages/integrations/solid
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
solid-js:
specifier: ^1.8.5
@ -272,7 +272,7 @@ importers:
specifier: ^4.0.4
version: link:../../packages/integrations/svelte
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
svelte:
specifier: ^4.2.5
@ -284,7 +284,7 @@ importers:
specifier: ^3.0.4
version: link:../../packages/integrations/vue
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
vue:
specifier: ^3.3.8
@ -296,13 +296,13 @@ importers:
specifier: ^6.0.4
version: link:../../packages/integrations/node
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/middleware:
@ -311,7 +311,7 @@ importers:
specifier: ^6.0.4
version: link:../../packages/integrations/node
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
html-minifier:
specifier: ^4.0.0
@ -320,19 +320,19 @@ importers:
examples/minimal:
dependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/non-html-pages:
dependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/ssr:
@ -344,7 +344,7 @@ importers:
specifier: ^4.0.4
version: link:../../packages/integrations/svelte
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
svelte:
specifier: ^4.2.5
@ -359,7 +359,7 @@ importers:
specifier: ^5.0.2
version: link:../../packages/integrations/tailwind
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/with-markdoc:
@ -368,7 +368,7 @@ importers:
specifier: ^0.7.2
version: link:../../packages/integrations/markdoc
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/with-markdown-plugins:
@ -377,7 +377,7 @@ importers:
specifier: ^3.5.0
version: link:../../packages/markdown/remark
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
hast-util-select:
specifier: ^6.0.2
@ -398,7 +398,7 @@ importers:
examples/with-markdown-shiki:
dependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
examples/with-mdx:
@ -410,7 +410,7 @@ importers:
specifier: ^3.0.1
version: link:../../packages/integrations/preact
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
preact:
specifier: ^10.19.2
@ -425,7 +425,7 @@ importers:
specifier: ^0.5.0
version: 0.5.0(nanostores@0.9.5)(preact@10.19.2)
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
nanostores:
specifier: ^0.9.5
@ -446,7 +446,7 @@ importers:
specifier: ^1.6.3
version: 1.6.3
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.15
@ -464,7 +464,7 @@ importers:
examples/with-vite-plugin-pwa:
dependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
vite-plugin-pwa:
specifier: 0.17.0
@ -476,7 +476,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
specifier: ^3.6.0
specifier: ^3.6.1
version: link:../../packages/astro
vitest:
specifier: ^0.34.2