summaryrefslogtreecommitdiff
path: root/packages/integrations
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations')
-rw-r--r--packages/integrations/lit/package.json2
-rw-r--r--packages/integrations/markdoc/CHANGELOG.md7
-rw-r--r--packages/integrations/markdoc/package.json23
-rw-r--r--packages/integrations/markdoc/src/content-entry-type.ts5
-rw-r--r--packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js6
-rw-r--r--packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js6
-rw-r--r--packages/integrations/mdx/CHANGELOG.md14
-rw-r--r--packages/integrations/mdx/README.md6
-rw-r--r--packages/integrations/mdx/package.json52
-rw-r--r--packages/integrations/mdx/src/index.ts7
-rw-r--r--packages/integrations/mdx/src/plugins.ts8
-rw-r--r--packages/integrations/mdx/src/remark-images-to-component.ts2
-rw-r--r--packages/integrations/mdx/src/utils.ts4
-rw-r--r--packages/integrations/mdx/test/fixtures/mdx-frontmatter-injection/src/pages/glob.json.js8
-rw-r--r--packages/integrations/mdx/test/fixtures/mdx-frontmatter/src/pages/glob.json.js11
-rw-r--r--packages/integrations/mdx/test/fixtures/mdx-get-headings/src/pages/pages.json.js15
-rw-r--r--packages/integrations/mdx/test/fixtures/mdx-infinite-loop/package.json2
-rw-r--r--packages/integrations/mdx/test/fixtures/mdx-url-export/src/pages/pages.json.js11
-rw-r--r--packages/integrations/mdx/test/fixtures/mdx-vite-env-vars/src/pages/frontmatter.json.js6
-rw-r--r--packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js2
-rw-r--r--packages/integrations/mdx/test/mdx-math.test.js2
-rw-r--r--packages/integrations/node/CHANGELOG.md19
-rw-r--r--packages/integrations/node/package.json8
-rw-r--r--packages/integrations/node/src/createOutgoingHttpHeaders.ts3
-rw-r--r--packages/integrations/node/src/nodeMiddleware.ts6
-rw-r--r--packages/integrations/node/test/fixtures/node-middleware/src/pages/ssr.ts12
-rw-r--r--packages/integrations/preact/package.json6
-rw-r--r--packages/integrations/prefetch/package.json2
-rw-r--r--packages/integrations/react/CHANGELOG.md6
-rw-r--r--packages/integrations/react/package.json10
-rw-r--r--packages/integrations/react/test/fixtures/react-component/package.json2
-rw-r--r--packages/integrations/sitemap/src/index.ts6
-rw-r--r--packages/integrations/sitemap/src/utils/logger.ts46
-rw-r--r--packages/integrations/sitemap/test/fixtures/static/src/pages/endpoint.json.ts2
-rw-r--r--packages/integrations/solid/package.json2
-rw-r--r--packages/integrations/svelte/CHANGELOG.md13
-rw-r--r--packages/integrations/svelte/package.json14
-rw-r--r--packages/integrations/svelte/src/index.ts1
-rw-r--r--packages/integrations/tailwind/CHANGELOG.md7
-rw-r--r--packages/integrations/tailwind/package.json10
-rw-r--r--packages/integrations/tailwind/src/index.ts3
-rw-r--r--packages/integrations/vercel/CHANGELOG.md17
-rw-r--r--packages/integrations/vercel/package.json14
-rw-r--r--packages/integrations/vercel/src/serverless/adapter.ts18
-rw-r--r--packages/integrations/vercel/src/serverless/entrypoint.ts2
-rw-r--r--packages/integrations/vercel/src/static/adapter.ts19
-rw-r--r--packages/integrations/vue/CHANGELOG.md9
-rw-r--r--packages/integrations/vue/package.json18
-rw-r--r--packages/integrations/vue/test/fixtures/app-entrypoint/package.json4
49 files changed, 237 insertions, 241 deletions
diff --git a/packages/integrations/lit/package.json b/packages/integrations/lit/package.json
index 252a412d1..dd29cde62 100644
--- a/packages/integrations/lit/package.json
+++ b/packages/integrations/lit/package.json
@@ -59,7 +59,7 @@
"cheerio": "1.0.0-rc.12",
"lit": "^2.8.0",
"mocha": "^10.2.0",
- "sass": "^1.66.1"
+ "sass": "^1.69.5"
},
"peerDependencies": {
"@webcomponents/template-shadowroot": "^0.2.1",
diff --git a/packages/integrations/markdoc/CHANGELOG.md b/packages/integrations/markdoc/CHANGELOG.md
index 574607c28..57916bc43 100644
--- a/packages/integrations/markdoc/CHANGELOG.md
+++ b/packages/integrations/markdoc/CHANGELOG.md
@@ -1,5 +1,12 @@
# @astrojs/markdoc
+## 1.0.0-beta.0
+
+### Patch Changes
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]:
+ - astro@4.0.0-beta.0
+
## 0.7.2
### Patch Changes
diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json
index 18e6aca5e..2254c5247 100644
--- a/packages/integrations/markdoc/package.json
+++ b/packages/integrations/markdoc/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/markdoc",
"description": "Add support for Markdoc in your Astro site",
- "version": "0.7.2",
+ "version": "1.0.0-beta.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -65,32 +65,31 @@
"dependencies": {
"@astrojs/internal-helpers": "workspace:*",
"@astrojs/prism": "workspace:*",
- "@markdoc/markdoc": "^0.3.0",
- "esbuild": "^0.19.2",
+ "@markdoc/markdoc": "^0.3.5",
+ "esbuild": "^0.19.6",
"github-slugger": "^2.0.0",
"gray-matter": "^4.0.3",
"htmlparser2": "^9.0.0",
"kleur": "^4.1.5",
- "shikiji": "^0.6.8",
+ "shikiji": "^0.6.13",
"zod": "^3.22.4"
},
"peerDependencies": {
- "astro": "^3.0.0"
+ "astro": "^4.0.0-beta.0"
},
"devDependencies": {
"@astrojs/markdown-remark": "workspace:*",
- "@types/chai": "^4.3.5",
- "@types/html-escaper": "^3.0.0",
- "@types/markdown-it": "^13.0.0",
- "@types/mocha": "^10.0.1",
+ "@types/chai": "^4.3.10",
+ "@types/html-escaper": "^3.0.2",
+ "@types/markdown-it": "^13.0.6",
+ "@types/mocha": "^10.0.4",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
"devalue": "^4.3.2",
- "linkedom": "^0.15.1",
+ "linkedom": "^0.16.4",
"mocha": "^10.2.0",
- "rollup": "^3.28.1",
- "vite": "^4.4.9"
+ "vite": "^5.0.0"
},
"engines": {
"node": ">=18.14.1"
diff --git a/packages/integrations/markdoc/src/content-entry-type.ts b/packages/integrations/markdoc/src/content-entry-type.ts
index 07c5268e4..21ba7ab19 100644
--- a/packages/integrations/markdoc/src/content-entry-type.ts
+++ b/packages/integrations/markdoc/src/content-entry-type.ts
@@ -6,8 +6,7 @@ import matter from 'gray-matter';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
-import type * as rollup from 'rollup';
-import type { ErrorPayload as ViteErrorPayload } from 'vite';
+import type { ErrorPayload as ViteErrorPayload, Rollup } from 'vite';
import type { ComponentConfig } from './config.js';
import { htmlTokenTransform } from './html/transform/html-token-transform.js';
import type { MarkdocConfigResult } from './load-config.js';
@@ -174,7 +173,7 @@ function getEntryInfo({ fileUrl, contents }: { fileUrl: URL; contents: string })
async function emitOptimizedImages(
nodeChildren: Node[],
ctx: {
- pluginContext: rollup.PluginContext;
+ pluginContext: Rollup.PluginContext;
filePath: string;
astroConfig: AstroConfig;
}
diff --git a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js
index 98ae36a58..cb3c84652 100644
--- a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js
+++ b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js
@@ -2,9 +2,7 @@ import { getCollection } from 'astro:content';
import { stringify } from 'devalue';
import { stripAllRenderFn } from '../../utils.js';
-export async function get() {
+export async function GET() {
const posts = await getCollection('blog');
- return {
- body: stringify(stripAllRenderFn(posts))
- };
+ return new Response(stringify(stripAllRenderFn(posts)));
}
diff --git a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js
index 7899a757a..53dd17013 100644
--- a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js
+++ b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js
@@ -2,9 +2,7 @@ import { getEntryBySlug } from 'astro:content';
import { stringify } from 'devalue';
import { stripRenderFn } from '../../utils.js';
-export async function get() {
+export async function GET() {
const post = await getEntryBySlug('blog', 'post-1');
- return {
- body: stringify(stripRenderFn(post)),
- };
+ return new Response(stringify(stripRenderFn(post)));
}
diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md
index 80febcb54..11632d110 100644
--- a/packages/integrations/mdx/CHANGELOG.md
+++ b/packages/integrations/mdx/CHANGELOG.md
@@ -1,5 +1,19 @@
# @astrojs/mdx
+## 2.0.0-beta.0
+
+### Major Changes
+
+- [#9138](https://github.com/withastro/astro/pull/9138) [`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3) Thanks [@bluwy](https://github.com/bluwy)! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.
+
+ **Potentially breaking change:** The default value of `markdown.remarkRehype.footnoteBackLabel` is changed from `"Back to content"` to `"Back to reference 1"`. See the `mdast-util-to-hast` [commit](https://github.com/syntax-tree/mdast-util-to-hast/commit/56c88e45690be138fad9f0bf367b939d09816863) for more information.
+
+### Patch Changes
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`addb57c8e`](https://github.com/withastro/astro/commit/addb57c8e80b7b67ec61224666f3a1db5c44410c), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`c7953645e`](https://github.com/withastro/astro/commit/c7953645eeaaf9e87c6db4494b0023d2c1878ff0), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]:
+ - @astrojs/markdown-remark@4.0.0-beta.0
+ - astro@4.0.0-beta.0
+
## 1.1.5
### Patch Changes
diff --git a/packages/integrations/mdx/README.md b/packages/integrations/mdx/README.md
index df0458ce9..150ada5e8 100644
--- a/packages/integrations/mdx/README.md
+++ b/packages/integrations/mdx/README.md
@@ -83,11 +83,7 @@ You can configure how your MDX is rendered with the following options:
### Options inherited from Markdown config
-All [`markdown` configuration options](https://docs.astro.build/en/reference/configuration-reference/#markdown-options) except `drafts` can be configured separately in the MDX integration. This includes remark and rehype plugins, syntax highlighting, and more. Options will default to those in your Markdown config ([see the `extendMarkdownConfig` option](#extendmarkdownconfig) to modify this).
-
-:::note
-There is no separate MDX configuration for [including pages marked as draft in the build](https://docs.astro.build/en/reference/configuration-reference/#markdowndrafts). This Markdown setting will be respected by both Markdown and MDX files and cannot be overridden for MDX files specifically.
-:::
+All [`markdown` configuration options](https://docs.astro.build/en/reference/configuration-reference/#markdown-options) can be configured separately in the MDX integration. This includes remark and rehype plugins, syntax highlighting, and more. Options will default to those in your Markdown config ([see the `extendMarkdownConfig` option](#extendmarkdownconfig) to modify this).
```js
// astro.config.mjs
diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json
index f9e22d58c..3f5b6d559 100644
--- a/packages/integrations/mdx/package.json
+++ b/packages/integrations/mdx/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/mdx",
"description": "Add support for MDX pages in your Astro site",
- "version": "1.1.5",
+ "version": "2.0.0-beta.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -35,47 +35,47 @@
},
"dependencies": {
"@astrojs/markdown-remark": "workspace:*",
- "@mdx-js/mdx": "^2.3.0",
- "acorn": "^8.10.0",
- "es-module-lexer": "^1.3.0",
- "estree-util-visit": "^1.2.1",
+ "@mdx-js/mdx": "^3.0.0",
+ "acorn": "^8.11.2",
+ "es-module-lexer": "^1.4.1",
+ "estree-util-visit": "^2.0.0",
"github-slugger": "^2.0.0",
"gray-matter": "^4.0.3",
- "hast-util-to-html": "^8.0.4",
+ "hast-util-to-html": "^9.0.0",
"kleur": "^4.1.4",
- "rehype-raw": "^6.1.1",
- "remark-gfm": "^3.0.1",
+ "rehype-raw": "^7.0.0",
+ "remark-gfm": "^4.0.0",
"remark-smartypants": "^2.0.0",
"source-map": "^0.7.4",
- "unist-util-visit": "^4.1.2",
- "vfile": "^5.3.7"
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.1"
},
"peerDependencies": {
- "astro": "^3.0.0"
+ "astro": "^4.0.0-beta.0"
},
"devDependencies": {
- "@types/chai": "^4.3.5",
- "@types/estree": "^1.0.1",
- "@types/mdast": "^3.0.12",
- "@types/mocha": "^10.0.1",
- "@types/yargs-parser": "^21.0.0",
+ "@types/chai": "^4.3.10",
+ "@types/estree": "^1.0.5",
+ "@types/mdast": "^4.0.3",
+ "@types/mocha": "^10.0.4",
+ "@types/yargs-parser": "^21.0.3",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
"cheerio": "1.0.0-rc.12",
- "linkedom": "^0.15.1",
- "mdast-util-mdx": "^2.0.1",
- "mdast-util-to-string": "^3.2.0",
+ "linkedom": "^0.16.4",
+ "mdast-util-mdx": "^3.0.0",
+ "mdast-util-to-string": "^4.0.0",
"mocha": "^10.2.0",
"reading-time": "^1.5.0",
- "rehype-mathjax": "^4.0.3",
- "rehype-pretty-code": "^0.10.0",
- "remark-math": "^5.1.1",
- "remark-rehype": "^10.1.0",
+ "rehype-mathjax": "^5.0.0",
+ "rehype-pretty-code": "^0.10.2",
+ "remark-math": "^6.0.0",
+ "remark-rehype": "^11.0.0",
"remark-shiki-twoslash": "^3.1.3",
- "remark-toc": "^8.0.1",
- "unified": "^10.1.2",
- "vite": "^4.4.9"
+ "remark-toc": "^9.0.0",
+ "unified": "^11.0.4",
+ "vite": "^5.0.0"
},
"engines": {
"node": ">=18.14.1"
diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts
index fd330625e..3fc00a723 100644
--- a/packages/integrations/mdx/src/index.ts
+++ b/packages/integrations/mdx/src/index.ts
@@ -1,8 +1,8 @@
import { markdownConfigDefaults, setVfileFrontmatter } from '@astrojs/markdown-remark';
-import type { PluggableList } from '@mdx-js/mdx/lib/core.js';
import type { AstroIntegration, ContentEntryType, HookParameters, SSRError } from 'astro';
import astroJSXRenderer from 'astro/jsx/renderer.js';
import { parse as parseESM } from 'es-module-lexer';
+import type { PluggableList } from 'unified';
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import type { Options as RemarkRehypeOptions } from 'remark-rehype';
@@ -190,7 +190,10 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
componentsCode += ' }';
// Make `Content` the default export so we can wrap `MDXContent` and pass in `Fragment`
- code = code.replace('export default MDXContent;', '');
+ code = code.replace(
+ 'export default function MDXContent',
+ 'function MDXContent'
+ );
code += `\nexport const Content = (props = {}) => MDXContent({
...props,
components: ${componentsCode},
diff --git a/packages/integrations/mdx/src/plugins.ts b/packages/integrations/mdx/src/plugins.ts
index 3286a9fd8..e6584aacf 100644
--- a/packages/integrations/mdx/src/plugins.ts
+++ b/packages/integrations/mdx/src/plugins.ts
@@ -5,12 +5,11 @@ import {
remarkShiki,
} from '@astrojs/markdown-remark';
import { createProcessor, nodeTypes } from '@mdx-js/mdx';
-import type { PluggableList } from '@mdx-js/mdx/lib/core.js';
import rehypeRaw from 'rehype-raw';
import remarkGfm from 'remark-gfm';
import remarkSmartypants from 'remark-smartypants';
import { SourceMapGenerator } from 'source-map';
-import type { Processor } from 'unified';
+import type { PluggableList } from 'unified';
import type { MdxOptions } from './index.js';
import { recmaInjectImportMetaEnv } from './recma-inject-import-meta-env.js';
import { rehypeApplyFrontmatterExport } from './rehype-apply-frontmatter-export.js';
@@ -27,10 +26,7 @@ interface MdxProcessorExtraOptions {
importMetaEnv: Record<string, any>;
}
-export function createMdxProcessor(
- mdxOptions: MdxOptions,
- extraOptions: MdxProcessorExtraOptions
-): Processor {
+export function createMdxProcessor(mdxOptions: MdxOptions, extraOptions: MdxProcessorExtraOptions) {
return createProcessor({
remarkPlugins: getRemarkPlugins(mdxOptions),
rehypePlugins: getRehypePlugins(mdxOptions),
diff --git a/packages/integrations/mdx/src/remark-images-to-component.ts b/packages/integrations/mdx/src/remark-images-to-component.ts
index f83f5d76a..810056def 100644
--- a/packages/integrations/mdx/src/remark-images-to-component.ts
+++ b/packages/integrations/mdx/src/remark-images-to-component.ts
@@ -15,7 +15,7 @@ export function remarkImageToComponent() {
const importsStatements: MdxjsEsm[] = [];
const importedImages = new Map<string, string>();
- visit(tree, 'image', (node: Image, index: number | null, parent: Parent | null) => {
+ visit(tree, 'image', (node: Image, index: number | undefined, parent: Parent | null) => {
// Use the imagePaths set from the remark-collect-images so we don't have to duplicate the logic for
// checking if an image should be imported or not
if (file.data.imagePaths?.has(node.url)) {
diff --git a/packages/integrations/mdx/src/utils.ts b/packages/integrations/mdx/src/utils.ts
index 3425c50e3..a5b198116 100644
--- a/packages/integrations/mdx/src/utils.ts
+++ b/packages/integrations/mdx/src/utils.ts
@@ -1,10 +1,10 @@
-import type { PluggableList } from '@mdx-js/mdx/lib/core.js';
import type { Options as AcornOpts } from 'acorn';
import { parse } from 'acorn';
import type { AstroConfig, SSRError } from 'astro';
import matter from 'gray-matter';
import { bold, yellow } from 'kleur/colors';
import type { MdxjsEsm } from 'mdast-util-mdx';
+import type { PluggableList } from 'unified';
function appendForwardSlash(path: string) {
return path.endsWith('/') ? path : path + '/';
@@ -75,8 +75,8 @@ export function jsToTreeNode(
type: 'mdxjsEsm',
value: '',
data: {
+ // @ts-expect-error `parse` return types is incompatible but it should work in runtime
estree: {
- body: [],
...parse(jsString, acornOpts),
type: 'Program',
sourceType: 'module',
diff --git a/packages/integrations/mdx/test/fixtures/mdx-frontmatter-injection/src/pages/glob.json.js b/packages/integrations/mdx/test/fixtures/mdx-frontmatter-injection/src/pages/glob.json.js
index b73cd234d..63248dc56 100644
--- a/packages/integrations/mdx/test/fixtures/mdx-frontmatter-injection/src/pages/glob.json.js
+++ b/packages/integrations/mdx/test/fixtures/mdx-frontmatter-injection/src/pages/glob.json.js
@@ -1,6 +1,6 @@
-export async function get() {
+export async function GET() {
const docs = await import.meta.glob('./*.mdx', { eager: true });
- return {
- body: JSON.stringify(Object.values(docs).map(doc => doc.frontmatter)),
- }
+ return new Response(
+ JSON.stringify(Object.values(docs).map(doc => doc.frontmatter))
+ );
}
diff --git a/packages/integrations/mdx/test/fixtures/mdx-frontmatter/src/pages/glob.json.js b/packages/integrations/mdx/test/fixtures/mdx-frontmatter/src/pages/glob.json.js
index a1d6a4ac4..d82d9f770 100644
--- a/packages/integrations/mdx/test/fixtures/mdx-frontmatter/src/pages/glob.json.js
+++ b/packages/integrations/mdx/test/fixtures/mdx-frontmatter/src/pages/glob.json.js
@@ -1,9 +1,6 @@
-export async function get() {
+export async function GET() {
const mdxPages = await import.meta.glob('./*.mdx', { eager: true });
-
- return {
- body: JSON.stringify({
- titles: Object.values(mdxPages ?? {}).map(v => v?.frontmatter?.title),
- })
- }
+ return Response.json({
+ titles: Object.values(mdxPages ?? {}).map((v) => v?.frontmatter?.title),
+ });
}
diff --git a/packages/integrations/mdx/test/fixtures/mdx-get-headings/src/pages/pages.json.js b/packages/integrations/mdx/test/fixtures/mdx-get-headings/src/pages/pages.json.js
index 940e5c141..e57192c61 100644
--- a/packages/integrations/mdx/test/fixtures/mdx-get-headings/src/pages/pages.json.js
+++ b/packages/integrations/mdx/test/fixtures/mdx-get-headings/src/pages/pages.json.js
@@ -1,11 +1,8 @@
-export async function get() {
+export async function GET() {
const mdxPages = await import.meta.glob('./*.mdx', { eager: true });
-
- return {
- body: JSON.stringify({
- headingsByPage: Object.fromEntries(
- Object.entries(mdxPages ?? {}).map(([k, v]) => [k, v?.getHeadings()])
- ),
- }),
- }
+ return Response.json({
+ headingsByPage: Object.fromEntries(
+ Object.entries(mdxPages ?? {}).map(([k, v]) => [k, v?.getHeadings()])
+ ),
+ });
}
diff --git a/packages/integrations/mdx/test/fixtures/mdx-infinite-loop/package.json b/packages/integrations/mdx/test/fixtures/mdx-infinite-loop/package.json
index d2fb7a75d..a00e19d5b 100644
--- a/packages/integrations/mdx/test/fixtures/mdx-infinite-loop/package.json
+++ b/packages/integrations/mdx/test/fixtures/mdx-infinite-loop/package.json
@@ -6,6 +6,6 @@
"@astrojs/mdx": "workspace:*",
"@astrojs/preact": "workspace:*",
"astro": "workspace:*",
- "preact": "^10.17.1"
+ "preact": "^10.19.2"
}
}
diff --git a/packages/integrations/mdx/test/fixtures/mdx-url-export/src/pages/pages.json.js b/packages/integrations/mdx/test/fixtures/mdx-url-export/src/pages/pages.json.js
index 36b6f7af6..02cff64a8 100644
--- a/packages/integrations/mdx/test/fixtures/mdx-url-export/src/pages/pages.json.js
+++ b/packages/integrations/mdx/test/fixtures/mdx-url-export/src/pages/pages.json.js
@@ -1,9 +1,6 @@
-export async function get() {
+export async function GET() {
const mdxPages = await import.meta.glob('./*.mdx', { eager: true });
-
- return {
- body: JSON.stringify({
- urls: Object.values(mdxPages ?? {}).map(v => v?.url),
- })
- }
+ return Response.json({
+ urls: Object.values(mdxPages ?? {}).map((v) => v?.url),
+ });
}
diff --git a/packages/integrations/mdx/test/fixtures/mdx-vite-env-vars/src/pages/frontmatter.json.js b/packages/integrations/mdx/test/fixtures/mdx-vite-env-vars/src/pages/frontmatter.json.js
index ce3cf81e5..152285b9c 100644
--- a/packages/integrations/mdx/test/fixtures/mdx-vite-env-vars/src/pages/frontmatter.json.js
+++ b/packages/integrations/mdx/test/fixtures/mdx-vite-env-vars/src/pages/frontmatter.json.js
@@ -1,7 +1,5 @@
import { frontmatter } from './vite-env-vars.mdx';
-export function get() {
- return {
- body: JSON.stringify(frontmatter),
- }
+export function GET() {
+ return Response.json(frontmatter);
}
diff --git a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js
index ddcce4ba5..eab2c61b0 100644
--- a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js
+++ b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js
@@ -79,7 +79,7 @@ describe('MDX with Astro Markdown remark-rehype config', () => {
expect(document.querySelector('#footnote-label').textContent).to.equal('Catatan kaki');
expect(document.querySelector('.data-footnote-backref').getAttribute('aria-label')).to.equal(
- 'Back to content'
+ 'Back to reference 1'
);
});
});
diff --git a/packages/integrations/mdx/test/mdx-math.test.js b/packages/integrations/mdx/test/mdx-math.test.js
index f39ea42c8..52ee94a46 100644
--- a/packages/integrations/mdx/test/mdx-math.test.js
+++ b/packages/integrations/mdx/test/mdx-math.test.js
@@ -4,7 +4,7 @@ import { parseHTML } from 'linkedom';
import { loadFixture } from '../../../astro/test/test-utils.js';
import remarkMath from 'remark-math';
import rehypeMathjaxSvg from 'rehype-mathjax';
-import rehypeMathjaxChtml from 'rehype-mathjax/chtml.js';
+import rehypeMathjaxChtml from 'rehype-mathjax/chtml';
const FIXTURE_ROOT = new URL('./fixtures/mdx-math/', import.meta.url);
diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md
index 4b455aeae..e4cf76b85 100644
--- a/packages/integrations/node/CHANGELOG.md
+++ b/packages/integrations/node/CHANGELOG.md
@@ -1,5 +1,24 @@
# @astrojs/node
+## 7.0.0-beta.1
+
+### Major Changes
+
+- [#9199](https://github.com/withastro/astro/pull/9199) [`49aa215a0`](https://github.com/withastro/astro/commit/49aa215a01ee1c4805316c85bb0aea6cfbc25a31) Thanks [@lilnasy](https://github.com/lilnasy)! - The internals of the integration have been updated to support Astro 4.0. Make sure to upgrade your Astro version as Astro 3.0 is no longer supported.
+
+## 7.0.0-beta.0
+
+### Patch Changes
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]:
+ - astro@4.0.0-beta.0
+
+## 6.1.0
+
+### Minor Changes
+
+- [#9125](https://github.com/withastro/astro/pull/9125) [`8f1d50957`](https://github.com/withastro/astro/commit/8f1d509574f5ee5d77816a13d89ce452dce403ff) Thanks [@matthewp](https://github.com/matthewp)! - Automatically sets immutable cache headers for assets served from the `/_astro` directory.
+
## 6.1.0
### Minor Changes
diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json
index 8f5d88285..9981db3c5 100644
--- a/packages/integrations/node/package.json
+++ b/packages/integrations/node/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/node",
"description": "Deploy your site to a Node.js server",
- "version": "6.1.0",
+ "version": "7.0.0-beta.1",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -37,12 +37,12 @@
"server-destroy": "^1.0.1"
},
"peerDependencies": {
- "astro": "^3.0.0"
+ "astro": "^4.0.0-beta.0"
},
"devDependencies": {
"@types/node": "^18.17.8",
- "@types/send": "^0.17.1",
- "@types/server-destroy": "^1.0.1",
+ "@types/send": "^0.17.4",
+ "@types/server-destroy": "^1.0.3",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
diff --git a/packages/integrations/node/src/createOutgoingHttpHeaders.ts b/packages/integrations/node/src/createOutgoingHttpHeaders.ts
index 781a74de6..44bbf81ca 100644
--- a/packages/integrations/node/src/createOutgoingHttpHeaders.ts
+++ b/packages/integrations/node/src/createOutgoingHttpHeaders.ts
@@ -23,8 +23,7 @@ export const createOutgoingHttpHeaders = (
// if there is > 1 set-cookie header, we have to fix it to be an array of values
if (headers.has('set-cookie')) {
- // @ts-expect-error
- const cookieHeaders = headers.getSetCookie() as string[];
+ const cookieHeaders = headers.getSetCookie();
if (cookieHeaders.length > 1) {
// the Headers.entries() API already normalized all header names to lower case so we can safely index this as 'set-cookie'
nodeHeaders['set-cookie'] = cookieHeaders;
diff --git a/packages/integrations/node/src/nodeMiddleware.ts b/packages/integrations/node/src/nodeMiddleware.ts
index 4fd0a4bc2..0b9381f1d 100644
--- a/packages/integrations/node/src/nodeMiddleware.ts
+++ b/packages/integrations/node/src/nodeMiddleware.ts
@@ -30,10 +30,10 @@ export default function (app: NodeApp, mode: Options['mode']) {
}
try {
- const route = app.match(req);
- if (route) {
+ const routeData = app.match(req);
+ if (routeData) {
try {
- const response = await app.render(req, route, locals);
+ const response = await app.render(req, { routeData, locals });
await writeWebResponse(app, res, response);
} catch (err: unknown) {
if (next) {
diff --git a/packages/integrations/node/test/fixtures/node-middleware/src/pages/ssr.ts b/packages/integrations/node/test/fixtures/node-middleware/src/pages/ssr.ts
index 93543190f..423db341a 100644
--- a/packages/integrations/node/test/fixtures/node-middleware/src/pages/ssr.ts
+++ b/packages/integrations/node/test/fixtures/node-middleware/src/pages/ssr.ts
@@ -1,9 +1,7 @@
-export async function get() {
+export async function GET() {
let number = Math.random();
- return {
- body: JSON.stringify({
- number,
- message: `Here's a random number: ${number}`,
- }),
- };
+ return Response.json({
+ number,
+ message: `Here's a random number: ${number}`,
+ });
}
diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json
index 29a10439a..84043fb76 100644
--- a/packages/integrations/preact/package.json
+++ b/packages/integrations/preact/package.json
@@ -37,15 +37,15 @@
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/plugin-transform-react-jsx-development": "^7.22.5",
- "@preact/preset-vite": "^2.5.0",
+ "@preact/preset-vite": "^2.7.0",
"@preact/signals": "^1.2.1",
"babel-plugin-transform-hook-names": "^1.0.2",
- "preact-render-to-string": "^6.2.1"
+ "preact-render-to-string": "^6.3.1"
},
"devDependencies": {
"astro": "workspace:*",
"astro-scripts": "workspace:*",
- "preact": "^10.17.1"
+ "preact": "^10.19.2"
},
"peerDependencies": {
"preact": "^10.6.5"
diff --git a/packages/integrations/prefetch/package.json b/packages/integrations/prefetch/package.json
index da199b43a..3291eb1a7 100644
--- a/packages/integrations/prefetch/package.json
+++ b/packages/integrations/prefetch/package.json
@@ -34,7 +34,7 @@
"test:match": "playwright test -g"
},
"devDependencies": {
- "@playwright/test": "^1.37.1",
+ "@playwright/test": "^1.40.0",
"astro": "workspace:*",
"astro-scripts": "workspace:*"
},
diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md
index 46d3a2512..7dcf8dc2a 100644
--- a/packages/integrations/react/CHANGELOG.md
+++ b/packages/integrations/react/CHANGELOG.md
@@ -1,5 +1,11 @@
# @astrojs/react
+## 3.0.7-beta.0
+
+### Patch Changes
+
+- [#9122](https://github.com/withastro/astro/pull/9122) [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721) Thanks [@bluwy](https://github.com/bluwy)! - Adds Vite 5 support. There are no breaking changes from Astro. Check the [Vite migration guide](https://vitejs.dev/guide/migration.html) for details of the breaking changes from Vite instead.
+
## 3.0.6
### Patch Changes
diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json
index c72005a69..0721d37f3 100644
--- a/packages/integrations/react/package.json
+++ b/packages/integrations/react/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/react",
"description": "Use React components within Astro",
- "version": "3.0.6",
+ "version": "3.0.7-beta.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -46,19 +46,19 @@
"test": "mocha --exit --timeout 20000"
},
"dependencies": {
- "@vitejs/plugin-react": "^4.0.4",
+ "@vitejs/plugin-react": "^4.2.0",
"ultrahtml": "^1.3.0"
},
"devDependencies": {
- "@types/react": "^18.2.21",
- "@types/react-dom": "^18.2.7",
+ "@types/react": "^18.2.37",
+ "@types/react-dom": "^18.2.15",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
"cheerio": "1.0.0-rc.12",
"react": "^18.1.0",
"react-dom": "^18.1.0",
- "vite": "^4.4.9",
+ "vite": "^5.0.0",
"mocha": "^10.2.0"
},
"peerDependencies": {
diff --git a/packages/integrations/react/test/fixtures/react-component/package.json b/packages/integrations/react/test/fixtures/react-component/package.json
index cf7b2b057..e7b7ac5d9 100644
--- a/packages/integrations/react/test/fixtures/react-component/package.json
+++ b/packages/integrations/react/test/fixtures/react-component/package.json
@@ -8,6 +8,6 @@
"astro": "workspace:*",
"react": "^18.1.0",
"react-dom": "^18.1.0",
- "vue": "^3.3.4"
+ "vue": "^3.3.8"
}
}
diff --git a/packages/integrations/sitemap/src/index.ts b/packages/integrations/sitemap/src/index.ts
index 43728b1a3..45f694887 100644
--- a/packages/integrations/sitemap/src/index.ts
+++ b/packages/integrations/sitemap/src/index.ts
@@ -10,7 +10,6 @@ import {
import { ZodError } from 'zod';
import { generateSitemap } from './generate-sitemap.js';
-import { Logger } from './utils/logger.js';
import { validateOptions } from './validate-options.js';
export { EnumChangefreq as ChangeFreqEnum } from 'sitemap';
@@ -62,7 +61,6 @@ function isStatusCodePage(pathname: string): boolean {
const createPlugin = (options?: SitemapOptions): AstroIntegration => {
let config: AstroConfig;
- const logger = new Logger(PKG_NAME);
return {
name: PKG_NAME,
@@ -72,7 +70,7 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => {
config = cfg;
},
- 'astro:build:done': async ({ dir, routes, pages }) => {
+ 'astro:build:done': async ({ dir, routes, pages, logger }) => {
try {
if (!config.site) {
logger.warn(
@@ -178,7 +176,7 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => {
limit: entryLimit,
gzip: false,
});
- logger.success(`\`${OUTFILE}\` created at \`${path.relative(process.cwd(), destDir)}\``);
+ logger.info(`\`${OUTFILE}\` created at \`${path.relative(process.cwd(), destDir)}\``);
} catch (err) {
if (err instanceof ZodError) {
logger.warn(formatConfigErrorMessage(err));
diff --git a/packages/integrations/sitemap/src/utils/logger.ts b/packages/integrations/sitemap/src/utils/logger.ts
deleted file mode 100644
index 3292bbdfc..000000000
--- a/packages/integrations/sitemap/src/utils/logger.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-// @internal
-export interface ILogger {
- info(msg: string): void;
- success(msg: string): void;
- warn(msg: string): void;
- error(msg: string): void;
-}
-
-// @internal
-export class Logger implements ILogger {
- private colors = {
- reset: '\x1b[0m',
- fg: {
- red: '\x1b[31m',
- green: '\x1b[32m',
- yellow: '\x1b[33m',
- },
- } as const;
-
- private packageName: string;
-
- constructor(packageName: string) {
- this.packageName = packageName;
- }
-
- private log(msg: string, prefix = '') {
- // eslint-disable-next-line no-console
- console.log(`%s${this.packageName}:%s ${msg}\n`, prefix, prefix ? this.colors.reset : '');
- }
-
- info(msg: string) {
- this.log(msg);
- }
-
- success(msg: string) {
- this.log(msg, this.colors.fg.green);
- }
-
- warn(msg: string) {
- this.log(`Skipped!\n${msg}`, this.colors.fg.yellow);
- }
-
- error(msg: string) {
- this.log(`Failed!\n${msg}`, this.colors.fg.red);
- }
-}
diff --git a/packages/integrations/sitemap/test/fixtures/static/src/pages/endpoint.json.ts b/packages/integrations/sitemap/test/fixtures/static/src/pages/endpoint.json.ts
index 8f9fa2c90..4b848f339 100644
--- a/packages/integrations/sitemap/test/fixtures/static/src/pages/endpoint.json.ts
+++ b/packages/integrations/sitemap/test/fixtures/static/src/pages/endpoint.json.ts
@@ -1,4 +1,4 @@
-export async function get({}) {
+export async function GET({}) {
return {
body: JSON.stringify({
name: 'Astro',
diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json
index 7e3fcd11b..407d5d870 100644
--- a/packages/integrations/solid/package.json
+++ b/packages/integrations/solid/package.json
@@ -40,7 +40,7 @@
"devDependencies": {
"astro": "workspace:*",
"astro-scripts": "workspace:*",
- "solid-js": "^1.7.11"
+ "solid-js": "^1.8.5"
},
"peerDependencies": {
"solid-js": "^1.4.3"
diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md
index 2681a45c0..e9ce0c2ed 100644
--- a/packages/integrations/svelte/CHANGELOG.md
+++ b/packages/integrations/svelte/CHANGELOG.md
@@ -1,5 +1,18 @@
# @astrojs/svelte
+## 5.0.0-beta.0
+
+### Major Changes
+
+- [#9122](https://github.com/withastro/astro/pull/9122) [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721) Thanks [@bluwy](https://github.com/bluwy)! - Adds Vite 5 support. There are no breaking changes from Astro. Check the [Vite migration guide](https://vitejs.dev/guide/migration.html) for details of the breaking changes from Vite instead.
+
+- [#9122](https://github.com/withastro/astro/pull/9122) [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721) Thanks [@bluwy](https://github.com/bluwy)! - Drops support for Svelte 3 as `@sveltejs/vite-plugin-svelte` is updated to `3.0.0` which does not support Svelte 3
+
+### Patch Changes
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]:
+ - astro@4.0.0-beta.0
+
## 4.0.4
### Patch Changes
diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json
index 4c7e8bb63..9694acab6 100644
--- a/packages/integrations/svelte/package.json
+++ b/packages/integrations/svelte/package.json
@@ -1,6 +1,6 @@
{
"name": "@astrojs/svelte",
- "version": "4.0.4",
+ "version": "5.0.0-beta.0",
"description": "Use Svelte components within Astro",
"type": "module",
"types": "./dist/index.d.ts",
@@ -42,18 +42,18 @@
"dev": "astro-scripts dev \"src/**/*.ts\""
},
"dependencies": {
- "@sveltejs/vite-plugin-svelte": "^2.5.2",
- "svelte2tsx": "^0.6.20"
+ "@sveltejs/vite-plugin-svelte": "^3.0.0",
+ "svelte2tsx": "^0.6.25"
},
"devDependencies": {
"astro": "workspace:*",
"astro-scripts": "workspace:*",
- "svelte": "^4.2.0",
- "vite": "^4.4.9"
+ "svelte": "^4.2.5",
+ "vite": "^5.0.0"
},
"peerDependencies": {
- "astro": "^3.0.0",
- "svelte": "^3.55.0 || ^4.0.0 || ^5.0.0-next.1"
+ "astro": "^4.0.0-beta.0",
+ "svelte": "^4.0.0 || ^5.0.0-next.1"
},
"engines": {
"node": ">=18.14.1"
diff --git a/packages/integrations/svelte/src/index.ts b/packages/integrations/svelte/src/index.ts
index 695214223..b894ee623 100644
--- a/packages/integrations/svelte/src/index.ts
+++ b/packages/integrations/svelte/src/index.ts
@@ -73,6 +73,7 @@ async function getViteConfiguration({
}
if (!resolvedOptions.preprocess && !(await svelteConfigHasPreprocess(root))) {
+ // @ts-expect-error there's a bug with the types where the first arg should be optional
resolvedOptions.preprocess = vitePreprocess();
}
diff --git a/packages/integrations/tailwind/CHANGELOG.md b/packages/integrations/tailwind/CHANGELOG.md
index 5810ea59b..10b062b35 100644
--- a/packages/integrations/tailwind/CHANGELOG.md
+++ b/packages/integrations/tailwind/CHANGELOG.md
@@ -1,5 +1,12 @@
# @astrojs/tailwind
+## 6.0.0-beta.0
+
+### Patch Changes
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]:
+ - astro@4.0.0-beta.0
+
## 5.0.2
### Patch Changes
diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json
index d093ffc61..de681aac0 100644
--- a/packages/integrations/tailwind/package.json
+++ b/packages/integrations/tailwind/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/tailwind",
"description": "Use Tailwind CSS to style your Astro site",
- "version": "5.0.2",
+ "version": "6.0.0-beta.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -34,16 +34,16 @@
"dependencies": {
"autoprefixer": "^10.4.15",
"postcss": "^8.4.28",
- "postcss-load-config": "^4.0.1"
+ "postcss-load-config": "^4.0.2"
},
"devDependencies": {
"astro": "workspace:*",
"astro-scripts": "workspace:*",
- "tailwindcss": "^3.3.3",
- "vite": "^4.4.9"
+ "tailwindcss": "^3.3.5",
+ "vite": "^5.0.0"
},
"peerDependencies": {
- "astro": "^3.0.0",
+ "astro": "^4.0.0-beta.0",
"tailwindcss": "^3.0.24"
},
"publishConfig": {
diff --git a/packages/integrations/tailwind/src/index.ts b/packages/integrations/tailwind/src/index.ts
index daee5f857..f0cb5feb4 100644
--- a/packages/integrations/tailwind/src/index.ts
+++ b/packages/integrations/tailwind/src/index.ts
@@ -33,8 +33,7 @@ async function getViteConfiguration(
const postcssOptions = postcssConfigResult?.options ?? {};
const postcssPlugins = postcssConfigResult?.plugins?.slice() ?? [];
- // @ts-expect-error Tailwind plugin types are wrong
- postcssPlugins.push(tailwindPlugin(tailwindConfigPath) as ResultPlugin);
+ postcssPlugins.push(tailwindPlugin(tailwindConfigPath));
postcssPlugins.push(autoprefixerPlugin());
return {
diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md
index 26d265393..1cb378ee3 100644
--- a/packages/integrations/vercel/CHANGELOG.md
+++ b/packages/integrations/vercel/CHANGELOG.md
@@ -1,5 +1,22 @@
# @astrojs/vercel
+## 6.0.0-beta.1
+
+### Major Changes
+
+- [#9199](https://github.com/withastro/astro/pull/9199) [`49aa215a0`](https://github.com/withastro/astro/commit/49aa215a01ee1c4805316c85bb0aea6cfbc25a31) Thanks [@lilnasy](https://github.com/lilnasy)! - The internals of the integration have been updated to support Astro 4.0. Make sure to upgrade your Astro version as Astro 3.0 is no longer supported.
+
+## 6.0.0-beta.0
+
+### Major Changes
+
+- [#9184](https://github.com/withastro/astro/pull/9184) [`a145ac07e`](https://github.com/withastro/astro/commit/a145ac07e75927e13af62e28d13bc8217a362b8e) Thanks [@bluwy](https://github.com/bluwy)! - Removes deprecated `analytics` option. Use the `webAnalytics` option instead.
+
+### Patch Changes
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]:
+ - astro@4.0.0-beta.0
+
## 5.2.0
### Minor Changes
diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json
index dc9433c5a..8e770376c 100644
--- a/packages/integrations/vercel/package.json
+++ b/packages/integrations/vercel/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/vercel",
"description": "Deploy your site to Vercel",
- "version": "5.2.0",
+ "version": "6.0.0-beta.1",
"type": "module",
"author": "withastro",
"license": "MIT",
@@ -54,18 +54,18 @@
"dependencies": {
"@astrojs/internal-helpers": "workspace:*",
"@vercel/analytics": "^1.0.2",
- "@vercel/nft": "^0.23.1",
- "esbuild": "^0.19.2",
- "fast-glob": "^3.3.1",
+ "@vercel/nft": "^0.24.3",
+ "esbuild": "^0.19.6",
+ "fast-glob": "^3.3.2",
"set-cookie-parser": "^2.6.0",
"web-vitals": "^3.4.0"
},
"peerDependencies": {
- "astro": "^3.0.0"
+ "astro": "^4.0.0-beta.0"
},
"devDependencies": {
- "@types/set-cookie-parser": "^2.4.3",
- "@vercel/edge": "^1.0.0",
+ "@types/set-cookie-parser": "^2.4.6",
+ "@vercel/edge": "^1.1.1",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts
index 621849688..ef2552cc1 100644
--- a/packages/integrations/vercel/src/serverless/adapter.ts
+++ b/packages/integrations/vercel/src/serverless/adapter.ts
@@ -71,11 +71,6 @@ function getAdapter({
}
export interface VercelServerlessConfig {
- /**
- * @deprecated
- */
- analytics?: boolean;
-
/** Configuration for [Vercel Web Analytics](https://vercel.com/docs/concepts/analytics). */
webAnalytics?: VercelWebAnalyticsConfig;
@@ -108,7 +103,6 @@ export interface VercelServerlessConfig {
}
export default function vercelServerless({
- analytics,
webAnalytics,
speedInsights,
includeFiles,
@@ -151,13 +145,7 @@ export default function vercelServerless({
);
}
- if (webAnalytics?.enabled || analytics) {
- if (analytics) {
- logger.warn(
- `The \`analytics\` property is deprecated. Please use the new \`webAnalytics\` and \`speedInsights\` properties instead.`
- );
- }
-
+ if (webAnalytics?.enabled) {
injectScript(
'head-inline',
await getInjectableWebAnalyticsContent({
@@ -165,7 +153,7 @@ export default function vercelServerless({
})
);
}
- if (command === 'build' && (speedInsights?.enabled || analytics)) {
+ if (command === 'build' && speedInsights?.enabled) {
injectScript('page', 'import "@astrojs/vercel/speed-insights"');
}
const outDir = getVercelOutput(config.root);
@@ -178,7 +166,7 @@ export default function vercelServerless({
redirects: false,
},
vite: {
- ...getSpeedInsightsViteConfig(speedInsights?.enabled || analytics),
+ ...getSpeedInsightsViteConfig(speedInsights?.enabled),
ssr: {
external: ['@vercel/nft'],
},
diff --git a/packages/integrations/vercel/src/serverless/entrypoint.ts b/packages/integrations/vercel/src/serverless/entrypoint.ts
index 7b548dc37..513c34640 100644
--- a/packages/integrations/vercel/src/serverless/entrypoint.ts
+++ b/packages/integrations/vercel/src/serverless/entrypoint.ts
@@ -29,7 +29,7 @@ export const createExports = (manifest: SSRManifest) => {
locals = JSON.parse(localsAsString);
}
}
- await setResponse(app, res, await app.render(request, routeData, locals));
+ await setResponse(app, res, await app.render(request, { routeData, locals }));
};
return { default: handler };
diff --git a/packages/integrations/vercel/src/static/adapter.ts b/packages/integrations/vercel/src/static/adapter.ts
index df2995c37..80b42b95d 100644
--- a/packages/integrations/vercel/src/static/adapter.ts
+++ b/packages/integrations/vercel/src/static/adapter.ts
@@ -41,10 +41,6 @@ function getAdapter(): AstroAdapter {
}
export interface VercelStaticConfig {
- /**
- * @deprecated
- */
- analytics?: boolean;
webAnalytics?: VercelWebAnalyticsConfig;
speedInsights?: VercelSpeedInsightsConfig;
imageService?: boolean;
@@ -53,7 +49,6 @@ export interface VercelStaticConfig {
}
export default function vercelStatic({
- analytics,
webAnalytics,
speedInsights,
imageService,
@@ -65,14 +60,8 @@ export default function vercelStatic({
return {
name: '@astrojs/vercel',
hooks: {
- 'astro:config:setup': async ({ command, config, injectScript, updateConfig, logger }) => {
- if (webAnalytics?.enabled || analytics) {
- if (analytics) {
- logger.warn(
- `The \`analytics\` property is deprecated. Please use the new \`webAnalytics\` and \`speedInsights\` properties instead.`
- );
- }
-
+ 'astro:config:setup': async ({ command, config, injectScript, updateConfig }) => {
+ if (webAnalytics?.enabled) {
injectScript(
'head-inline',
await getInjectableWebAnalyticsContent({
@@ -80,7 +69,7 @@ export default function vercelStatic({
})
);
}
- if (command === 'build' && (speedInsights?.enabled || analytics)) {
+ if (command === 'build' && speedInsights?.enabled) {
injectScript('page', 'import "@astrojs/vercel/speed-insights"');
}
const outDir = new URL('./static/', getVercelOutput(config.root));
@@ -91,7 +80,7 @@ export default function vercelStatic({
redirects: false,
},
vite: {
- ...getSpeedInsightsViteConfig(speedInsights?.enabled || analytics),
+ ...getSpeedInsightsViteConfig(speedInsights?.enabled),
},
...getAstroImageConfig(
imageService,
diff --git a/packages/integrations/vue/CHANGELOG.md b/packages/integrations/vue/CHANGELOG.md
index fc54ae2ea..3199fdccb 100644
--- a/packages/integrations/vue/CHANGELOG.md
+++ b/packages/integrations/vue/CHANGELOG.md
@@ -1,5 +1,14 @@
# @astrojs/vue
+## 4.0.0-beta.0
+
+### Patch Changes
+
+- [#9122](https://github.com/withastro/astro/pull/9122) [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721) Thanks [@bluwy](https://github.com/bluwy)! - Adds Vite 5 support. There are no breaking changes from Astro. Check the [Vite migration guide](https://vitejs.dev/guide/migration.html) for details of the breaking changes from Vite instead.
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]:
+ - astro@4.0.0-beta.0
+
## 3.0.4
### Patch Changes
diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json
index b8fa62d38..f220d5bf9 100644
--- a/packages/integrations/vue/package.json
+++ b/packages/integrations/vue/package.json
@@ -1,6 +1,6 @@
{
"name": "@astrojs/vue",
- "version": "3.0.4",
+ "version": "4.0.0-beta.0",
"description": "Use Vue components within Astro",
"type": "module",
"types": "./dist/index.d.ts",
@@ -40,24 +40,24 @@
"test": "mocha --timeout 20000"
},
"dependencies": {
- "@vitejs/plugin-vue": "^4.3.3",
- "@vitejs/plugin-vue-jsx": "^3.0.2",
+ "@vitejs/plugin-vue": "^4.5.0",
+ "@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/babel-plugin-jsx": "^1.1.5",
- "@vue/compiler-sfc": "^3.3.4"
+ "@vue/compiler-sfc": "^3.3.8"
},
"devDependencies": {
- "@types/chai": "^4.3.5",
+ "@types/chai": "^4.3.10",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
- "linkedom": "^0.15.1",
"cheerio": "1.0.0-rc.12",
+ "linkedom": "^0.16.4",
"mocha": "^10.2.0",
- "vite": "^4.4.9",
- "vue": "^3.3.4"
+ "vite": "^5.0.0",
+ "vue": "^3.3.8"
},
"peerDependencies": {
- "astro": "^3.0.0",
+ "astro": "^4.0.0-beta.0",
"vue": "^3.2.30"
},
"engines": {
diff --git a/packages/integrations/vue/test/fixtures/app-entrypoint/package.json b/packages/integrations/vue/test/fixtures/app-entrypoint/package.json
index abdab9e4c..0795ba955 100644
--- a/packages/integrations/vue/test/fixtures/app-entrypoint/package.json
+++ b/packages/integrations/vue/test/fixtures/app-entrypoint/package.json
@@ -3,8 +3,8 @@
"version": "0.0.0",
"private": true,
"dependencies": {
- "astro": "workspace:*",
"@astrojs/vue": "workspace:*",
- "vite-svg-loader": "4.0.0"
+ "astro": "workspace:*",
+ "vite-svg-loader": "5.0.1"
}
} \ No newline at end of file