Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Nov 22, 2023
2 parents 710be50 + 4d1274c commit 19fd19f
Show file tree
Hide file tree
Showing 74 changed files with 1,320 additions and 523 deletions.
2 changes: 2 additions & 0 deletions .changeset/sour-games-burn.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ Refactors virtual modules exports. This should not break your project unless you
- `astro/middleware/namespace`
- `astro/transitions`
- `astro/transitions/router`
- `astro/transitions/events`
- `astro/transitions/types`
- `astro/prefetch`
- `astro/i18n`
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": "^3.5.5"
"astro": "^3.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/mdx": "^1.1.5",
"@astrojs/rss": "^3.0.0",
"@astrojs/sitemap": "^3.0.3",
"astro": "^3.5.5"
"astro": "^3.6.0"
}
}
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": "^3.5.5"
"astro": "^3.6.0"
},
"peerDependencies": {
"astro": "^3.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.3.1",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^3.5.5"
"astro": "^3.6.0"
}
}
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": "^3.0.3",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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
Expand Up @@ -12,11 +12,11 @@
},
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@astrojs/react": "^3.0.5",
"@astrojs/react": "^3.0.6",
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^4.0.4",
"@astrojs/vue": "^3.0.4",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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.0.1",
"@preact/signals": "^1.2.1",
"astro": "^3.5.5",
"astro": "^3.6.0",
"preact": "^10.19.2"
}
}
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.0.5",
"@astrojs/react": "^3.0.6",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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": "^3.0.2",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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": "^4.0.4",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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": "^3.0.4",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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": "^6.0.4",
"astro": "^3.5.5"
"astro": "^3.6.0"
}
}
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": "^3.5.5"
"astro": "^3.6.0"
},
"peerDependencies": {
"astro": "^3.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": "^6.0.4",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.5.5"
"astro": "^3.6.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": "^3.5.5"
"astro": "^3.6.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": "^3.5.5"
"astro": "^3.6.0"
}
}
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": "^6.0.4",
"@astrojs/svelte": "^4.0.4",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.0.2",
"@astrojs/node": "^6.0.4",
"astro": "^3.5.5"
"astro": "^3.6.0"
}
}
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.7.2",
"astro": "^3.5.5"
"astro": "^3.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^3.5.0",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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": "^3.5.5"
"astro": "^3.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^1.1.5",
"@astrojs/preact": "^3.0.1",
"astro": "^3.5.5",
"astro": "^3.6.0",
"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.0.1",
"@nanostores/preact": "^0.5.0",
"astro": "^3.5.5",
"astro": "^3.6.0",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}
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 @@ -14,7 +14,7 @@
"@astrojs/mdx": "^1.1.5",
"@astrojs/tailwind": "^5.0.2",
"@types/canvas-confetti": "^1.6.3",
"astro": "^3.5.5",
"astro": "^3.6.0",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",
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": "^3.5.5",
"astro": "^3.6.0",
"vite-plugin-pwa": "0.17.0",
"workbox-window": "^7.0.0"
}
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": "^3.5.5",
"astro": "^3.6.0",
"vitest": "^0.34.2"
}
}
48 changes: 48 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# astro

## 3.6.0

### Minor Changes

- [#9090](https://github.com/withastro/astro/pull/9090) [`c87223c21`](https://github.com/withastro/astro/commit/c87223c21ab5d515fb8f04ee10be5c0ca51e0b29) Thanks [@martrapp](https://github.com/martrapp)! - Take full control over the behavior of view transitions!

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
```

The `astro:before-*` events allow you to change properties and strategies of the view transition implementation.
The `astro:after-*` events are notifications that a phase is complete.
Head over to docs to see [the full view transitions lifecycle](https://docs.astro.build/en/guides/view-transitions/#lifecycle-events) including these new events!

- [#9092](https://github.com/withastro/astro/pull/9092) [`0ea4bd47e`](https://github.com/withastro/astro/commit/0ea4bd47e0d7cc98c43568a55aa87da772bd2e0a) Thanks [@smitbarmase](https://github.com/smitbarmase)! - Changes the fallback prefetch behavior on slow connections and when data saver mode is enabled. Instead of disabling prefetch entirely, the `tap` strategy will be used.

- [#9166](https://github.com/withastro/astro/pull/9166) [`cba6cf32d`](https://github.com/withastro/astro/commit/cba6cf32d9bf1f5c3268808f185a4824d6fbd7f4) Thanks [@matthewp](https://github.com/matthewp)! - The Picture component is no longer experimental

The `<Picture />` component, part of `astro:assets`, has exited experimental status and is now recommended for use. There are no code changes to the component, and no upgrade to your project is necessary.

This is only a change in documentation/recommendation. If you were waiting to use the `<Picture />` component until it had exited the experimental stage, wait no more!

- [#9092](https://github.com/withastro/astro/pull/9092) [`0ea4bd47e`](https://github.com/withastro/astro/commit/0ea4bd47e0d7cc98c43568a55aa87da772bd2e0a) Thanks [@smitbarmase](https://github.com/smitbarmase)! - Adds a `ignoreSlowConnection` option to the `prefetch()` API to prefetch even on data saver mode or slow connection.

## 3.5.7

### Patch Changes

- [#9157](https://github.com/withastro/astro/pull/9157) [`7ff8d62bf`](https://github.com/withastro/astro/commit/7ff8d62bf861694067491ff17d01b1b0f6809d6b) Thanks [@ematipico](https://github.com/ematipico)! - Revert fix around fallback system, which broken injected styles

## 3.5.6

### Patch Changes

- [#9121](https://github.com/withastro/astro/pull/9121) [`f4efd1c80`](https://github.com/withastro/astro/commit/f4efd1c808476c7e60fe00fcfb86276cf14fee79) Thanks [@peng](https://github.com/peng)! - Adds a warning if `astro add` fetches a package but returns a non-404 status

- [#9142](https://github.com/withastro/astro/pull/9142) [`7d55cf68d`](https://github.com/withastro/astro/commit/7d55cf68d89cb46bfb89a109b09af61be8431c89) Thanks [@ematipico](https://github.com/ematipico)! - Consistely emit fallback routes in the correct folders.

- [#9119](https://github.com/withastro/astro/pull/9119) [`306781795`](https://github.com/withastro/astro/commit/306781795d5f4b755bbdf650a937f1f3c00030bd) Thanks [@ematipico](https://github.com/ematipico)! - Fix a flaw in the i18n fallback logic, where the routes didn't preserve their metadata, such as hoisted scripts

- [#9140](https://github.com/withastro/astro/pull/9140) [`7742fd7dc`](https://github.com/withastro/astro/commit/7742fd7dc26533c6f7cd497b00b72de935c57628) Thanks [@martrapp](https://github.com/martrapp)! - View Transitions: handle clicks on SVGAElements and image maps"

- [#9101](https://github.com/withastro/astro/pull/9101) [`e3dce215a`](https://github.com/withastro/astro/commit/e3dce215a5ea06bcff1b21027e5613e6518c69d4) Thanks [@ematipico](https://github.com/ematipico)! - Add a new property `Astro.currentLocale`, available when `i18n` is enabled.

## 3.5.5

### Patch Changes
Expand Down
27 changes: 24 additions & 3 deletions packages/astro/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,38 @@ declare module 'astro:transitions' {
type TransitionModule = typeof import('./dist/virtual-modules/transitions.js');
export const slide: TransitionModule['slide'];
export const fade: TransitionModule['fade'];
export const createAnimationScope: TransitionModule['createAnimationScope'];

type ViewTransitionsModule = typeof import('./components/ViewTransitions.astro');
export const ViewTransitions: ViewTransitionsModule['default'];
}

declare module 'astro:transitions/client' {
type TransitionRouterModule = typeof import('./dist/virtual-modules/transitions-router.js');
export const supportsViewTransitions: TransitionRouterModule['supportsViewTransitions'];
export const transitionEnabledOnThisPage: TransitionRouterModule['transitionEnabledOnThisPage'];
export const navigate: TransitionRouterModule['navigate'];
export type Options = import('./dist/virtual-modules/transitions-router.js').Options;

type TransitionUtilModule = typeof import('./dist/virtual-modules/transitions-util.js');
export const supportsViewTransitions: TransitionUtilModule['supportsViewTransitions'];
export const getFallback: TransitionUtilModule['getFallback'];
export const transitionEnabledOnThisPage: TransitionUtilModule['transitionEnabledOnThisPage'];

export type Fallback = import('./dist/virtual-modules/transitions-types.js').Fallback;
export type Direction = import('./dist/virtual-modules/transitions-types.ts').Direction;
export type NavigationTypeString = import('./dist/virtual-modules/transitions-types.js').NavigationTypeString;
export type Options = import('./dist/virtual-modules/transitions-types.js').Options;

type EventModule = typeof import('./dist/virtual-modules/transitions-events.js');
export const TRANSITION_BEFORE_PREPARATION: EventModule['TRANSITION_BEFORE_PREPARATION'];
export const TRANSITION_AFTER_PREPARATION: EventModule['TRANSITION_AFTER_PREPARATION'];
export const TRANSITION_BEFORE_SWAP: EventModule['TRANSITION_BEFORE_SWAP'];
export const TRANSITION_AFTER_SWAP: EventModule['TRANSITION_AFTER_SWAP'];
export const TRANSITION_PAGE_LOAD: EventModule['TRANSITION_PAGE_LOAD'];
export type TransitionBeforePreparationEvent =
import('./dist/virtual-modules/transitions-events.js').TransitionBeforePreparationEvent;
export type TransitionBeforeSwapEvent =
import('./dist/virtual-modules/transitions-events.js').TransitionBeforeSwapEvent;
export const isTransitionBeforePreparationEvent: EventModule['isTransitionBeforePreparationEvent'];
export const isTransitionBeforeSwapEvent: EventModule['isTransitionBeforeSwapEvent'];
}

declare module 'astro:prefetch' {
Expand Down
Loading

0 comments on commit 19fd19f

Please sign in to comment.