Skip to content

Commit 54f9616

Browse files
authored
Merge branch 'main' into css-chunk-client
2 parents 85a27b1 + 60c16db commit 54f9616

File tree

97 files changed

+536
-166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+536
-166
lines changed

.changeset/angry-experts-compete.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Fix check CLI fs load fallback behaviour

.changeset/beige-humans-study.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Force error overlay direction to be LTR

.changeset/big-poems-march.md

-5
This file was deleted.

.changeset/breezy-roses-smash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/image': patch
3+
---
4+
5+
Make sizes prop optional on Image component

.changeset/fast-worms-agree.md

-5
This file was deleted.

examples/basics/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0"
14+
"astro": "^2.2.1"
1515
}
1616
}

examples/blog/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
15-
"@astrojs/mdx": "^0.18.2",
14+
"astro": "^2.2.1",
15+
"@astrojs/mdx": "^0.18.3",
1616
"@astrojs/rss": "^2.3.2",
1717
"@astrojs/sitemap": "^1.2.2"
1818
}

examples/component/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"scripts": {},
1717
"devDependencies": {
18-
"astro": "^2.2.0"
18+
"astro": "^2.2.1"
1919
},
2020
"peerDependencies": {
2121
"astro": "^2.0.0-beta.0"

examples/deno/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"astro": "astro"
1111
},
1212
"dependencies": {
13-
"astro": "^2.2.0"
13+
"astro": "^2.2.1"
1414
},
1515
"devDependencies": {
1616
"@astrojs/deno": "^4.1.0"

examples/docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"preact": "^10.7.3",
1616
"react": "^18.1.0",
1717
"react-dom": "^18.1.0",

examples/framework-alpine/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"alpinejs": "^3.10.2",
1616
"@astrojs/alpinejs": "^0.2.1",
1717
"@types/alpinejs": "^3.7.0"

examples/framework-lit/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"lit": "^2.7.0",
1616
"@astrojs/lit": "^2.0.1",
1717
"@webcomponents/template-shadowroot": "^0.2.1"

examples/framework-multiple/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"preact": "^10.7.3",
1616
"react": "^18.1.0",
1717
"react-dom": "^18.1.0",

examples/framework-preact/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"preact": "^10.7.3",
1616
"@astrojs/preact": "^2.1.0",
1717
"@preact/signals": "^1.1.0"

examples/framework-react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"react": "^18.1.0",
1616
"react-dom": "^18.1.0",
1717
"@astrojs/react": "^2.1.1",

examples/framework-solid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"solid-js": "^1.4.3",
1616
"@astrojs/solid-js": "^2.1.0"
1717
}

examples/framework-svelte/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"dependencies": {
1414
"svelte": "^3.48.0",
1515
"@astrojs/svelte": "^2.1.0",
16-
"astro": "^2.2.0"
16+
"astro": "^2.2.1"
1717
}
1818
}

examples/framework-vue/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"vue": "^3.2.37",
1616
"@astrojs/vue": "^2.1.1"
1717
}

examples/hackernews/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
},
1313
"dependencies": {
1414
"@astrojs/node": "^5.1.1",
15-
"astro": "^2.2.0"
15+
"astro": "^2.2.1"
1616
}
1717
}

examples/integration/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"scripts": {},
1717
"devDependencies": {
18-
"astro": "^2.2.0"
18+
"astro": "^2.2.1"
1919
},
2020
"peerDependencies": {
2121
"astro": "^2.0.0-beta.0"

examples/minimal/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0"
14+
"astro": "^2.2.1"
1515
}
1616
}

examples/non-html-pages/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0"
14+
"astro": "^2.2.1"
1515
}
1616
}

examples/portfolio/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0"
14+
"astro": "^2.2.1"
1515
}
1616
}

examples/ssr/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"server": "node dist/server/entry.mjs"
1313
},
1414
"dependencies": {
15-
"astro": "^2.2.0",
15+
"astro": "^2.2.1",
1616
"svelte": "^3.48.0",
1717
"@astrojs/svelte": "^2.1.0",
1818
"@astrojs/node": "^5.1.1",

examples/with-markdoc/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@astrojs/markdoc": "^0.1.1",
15-
"astro": "^2.2.0",
15+
"astro": "^2.2.1",
1616
"kleur": "^4.1.5"
1717
}
1818
}

examples/with-markdown-plugins/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"@astrojs/markdown-remark": "^2.1.3",
1616
"hast-util-select": "5.0.1",
1717
"rehype-autolink-headings": "^6.1.1",

examples/with-markdown-shiki/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0"
14+
"astro": "^2.2.1"
1515
}
1616
}

examples/with-mdx/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"preact": "^10.6.5",
1616
"@astrojs/preact": "^2.1.0",
17-
"@astrojs/mdx": "^0.18.2"
17+
"@astrojs/mdx": "^0.18.3"
1818
}
1919
}

examples/with-nanostores/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"preact": "^10.7.3",
1616
"@astrojs/preact": "^2.1.0",
1717
"nanostores": "^0.5.12",

examples/with-tailwindcss/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/mdx": "^0.18.2",
14+
"@astrojs/mdx": "^0.18.3",
1515
"@astrojs/tailwind": "^3.1.1",
1616
"@types/canvas-confetti": "^1.4.3",
17-
"astro": "^2.2.0",
17+
"astro": "^2.2.1",
1818
"autoprefixer": "^10.4.7",
1919
"canvas-confetti": "^1.5.1",
2020
"postcss": "^8.4.14",

examples/with-vite-plugin-pwa/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.2.0",
14+
"astro": "^2.2.1",
1515
"vite-plugin-pwa": "0.11.11",
1616
"workbox-window": "^6.5.3"
1717
}

examples/with-vitest/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test": "vitest"
1313
},
1414
"dependencies": {
15-
"astro": "^2.2.0",
15+
"astro": "^2.2.1",
1616
"vitest": "^0.20.3"
1717
}
1818
}

packages/astro/CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# astro
22

3+
## 2.2.1
4+
5+
### Patch Changes
6+
7+
- [#6766](https://github.com/withastro/astro/pull/6766) [`72fed684a`](https://github.com/withastro/astro/commit/72fed684a35f00d80c69bcf6e8af297fed0294fe) Thanks [@Xetera](https://github.com/Xetera)! - Exporting the ImageFunction in astro:content and grouping it under a SchemaContext
8+
9+
- [#6772](https://github.com/withastro/astro/pull/6772) [`45bff6fcc`](https://github.com/withastro/astro/commit/45bff6fccb3f5c71ff24c1ceb48cd532196c90f6) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Allow `import.meta.env` values of `0`, `1`, `true`, and `false` to be used for `export const prerender` statements
10+
11+
- [#6770](https://github.com/withastro/astro/pull/6770) [`52d7a4a01`](https://github.com/withastro/astro/commit/52d7a4a011a3bb722b522fffd88c5fe9a519a196) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updated types to match newer Vite versions
12+
13+
- [#6774](https://github.com/withastro/astro/pull/6774) [`9e88e0f23`](https://github.com/withastro/astro/commit/9e88e0f23c5913c07f7e3e96fa0555219ef710dc) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: remove old `slug()` type from `defineCollection()` helper
14+
15+
- [#6775](https://github.com/withastro/astro/pull/6775) [`fa84f1a7d`](https://github.com/withastro/astro/commit/fa84f1a7d2c290479c75199f16e8de489036d7ea) Thanks [@matthewp](https://github.com/matthewp)! - Support streaming inside of slots
16+
17+
- [#6779](https://github.com/withastro/astro/pull/6779) [`a98f6f418`](https://github.com/withastro/astro/commit/a98f6f418c92261a06ef79624a8c86e288c21eab) Thanks [@matthewp](https://github.com/matthewp)! - Prevent body head content injection in MDX when using layout
18+
19+
- [#6781](https://github.com/withastro/astro/pull/6781) [`7f74326b7`](https://github.com/withastro/astro/commit/7f74326b762bfc174ebe8e37ae03733563e4214f) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix `astro:server:setup` middlewares not applying. This resolves an issue with the Partytown integration in dev.
20+
321
## 2.2.0
422

523
### Minor Changes

packages/astro/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "astro",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
55
"type": "module",
66
"author": "withastro",
@@ -106,7 +106,7 @@
106106
"test:e2e:match": "playwright test -g"
107107
},
108108
"dependencies": {
109-
"@astrojs/compiler": "^1.3.0",
109+
"@astrojs/compiler": "^1.3.1",
110110
"@astrojs/language-server": "^0.28.3",
111111
"@astrojs/markdown-remark": "^2.1.3",
112112
"@astrojs/telemetry": "^2.1.0",

packages/astro/src/cli/check/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from '@astrojs/language-server';
77
import type { FSWatcher } from 'chokidar';
88
import glob from 'fast-glob';
9-
import fsMod, * as fs from 'fs';
9+
import fs from 'fs';
1010
import { bold, dim, red, yellow } from 'kleur/colors';
1111
import { createRequire } from 'module';
1212
import { join } from 'node:path';
@@ -136,7 +136,7 @@ type CheckerConstructor = {
136136

137137
logging: Readonly<LogOptions>;
138138

139-
fileSystem: typeof fsMod;
139+
fileSystem: typeof fs;
140140
};
141141

142142
/**
@@ -153,7 +153,7 @@ export class AstroChecker {
153153
readonly #settings: AstroSettings;
154154

155155
readonly #logging: LogOptions;
156-
readonly #fs: typeof fsMod;
156+
readonly #fs: typeof fs;
157157
#watcher?: FSWatcher;
158158

159159
#filesCount: number;

packages/astro/src/content/template/types.d.ts

-7
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ declare module 'astro:content' {
6767

6868
type BaseCollectionConfig<S extends BaseSchema> = {
6969
schema?: S | ((context: SchemaContext) => S);
70-
slug?: (entry: {
71-
id: CollectionEntry<keyof typeof entryMap>['id'];
72-
defaultSlug: string;
73-
collection: string;
74-
body: string;
75-
data: import('astro/zod').infer<S>;
76-
}) => string | Promise<string>;
7770
};
7871
export function defineCollection<S extends BaseSchema>(
7972
input: BaseCollectionConfig<S>

packages/astro/src/core/create-vite.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import envVitePlugin from '../vite-plugin-env/index.js';
1919
import astroHeadPlugin from '../vite-plugin-head/index.js';
2020
import htmlVitePlugin from '../vite-plugin-html/index.js';
2121
import { astroInjectEnvTsPlugin } from '../vite-plugin-inject-env-ts/index.js';
22+
import astroIntegrationsContainerPlugin from '../vite-plugin-integrations-container/index.js';
2223
import jsxVitePlugin from '../vite-plugin-jsx/index.js';
2324
import astroLoadFallbackPlugin from '../vite-plugin-load-fallback/index.js';
2425
import markdownVitePlugin from '../vite-plugin-markdown/index.js';
@@ -119,6 +120,7 @@ export async function createVite(
119120
htmlVitePlugin(),
120121
jsxVitePlugin({ settings, logging }),
121122
astroPostprocessVitePlugin({ settings }),
123+
mode === 'dev' && astroIntegrationsContainerPlugin({ settings, logging }),
122124
astroScriptsPageSSRPlugin({ settings }),
123125
astroHeadPlugin({ settings }),
124126
astroScannerPlugin({ settings }),

packages/astro/src/core/dev/container.ts

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
runHookConfigDone,
99
runHookConfigSetup,
1010
runHookServerDone,
11-
runHookServerSetup,
1211
runHookServerStart,
1312
} from '../../integrations/index.js';
1413
import { createDefaultDevSettings, resolveRoot } from '../config/index.js';
@@ -91,7 +90,6 @@ export async function createContainer(params: CreateContainerParams = {}): Promi
9190
);
9291
await runHookConfigDone({ settings, logging });
9392
const viteServer = await vite.createServer(viteConfig);
94-
runHookServerSetup({ config: settings.config, server: viteServer, logging });
9593

9694
const container: Container = {
9795
configFlag: params.configFlag,

packages/astro/src/core/errors/overlay.ts

+1
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ class ErrorOverlay extends HTMLElement {
584584
super();
585585
this.root = this.attachShadow({ mode: 'open' });
586586
this.root.innerHTML = overlayTemplate;
587+
this.dir = 'ltr';
587588

588589
// theme toggle logic
589590
const themeToggle = this.root.querySelector<HTMLInputElement>('.theme-toggle-checkbox');

0 commit comments

Comments
 (0)