diff --git a/.changeset/funny-eels-jog.md b/.changeset/funny-eels-jog.md
deleted file mode 100644
index 2481c24dff91..000000000000
--- a/.changeset/funny-eels-jog.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Ensure dev server restarts respect when `base` is removed
diff --git a/.changeset/fuzzy-jobs-explain.md b/.changeset/fuzzy-jobs-explain.md
deleted file mode 100644
index e15f46130f51..000000000000
--- a/.changeset/fuzzy-jobs-explain.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-'@astrojs/cloudflare': minor
----
-
-The `getRuntime` utility has been deprecated and should be updated to the new [`Astro.locals`](https://docs.astro.build/en/guides/middleware/#locals) API.
-
-```diff
-- import { getRuntime } from '@astrojs/cloudflare/runtime';
-- getRuntime(Astro.request);
-
-+ const runtime = Astro.locals.runtime;
-```
diff --git a/.changeset/lazy-pillows-burn.md b/.changeset/lazy-pillows-burn.md
new file mode 100644
index 000000000000..009955c7eef7
--- /dev/null
+++ b/.changeset/lazy-pillows-burn.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/sitemap': patch
+---
+
+docs: fix github search link in README.md
diff --git a/.changeset/nasty-olives-rush.md b/.changeset/nasty-olives-rush.md
deleted file mode 100644
index cb78479f2bef..000000000000
--- a/.changeset/nasty-olives-rush.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'create-astro': patch
----
-
-Improve yarn berry support
diff --git a/.changeset/odd-plants-tie.md b/.changeset/odd-plants-tie.md
new file mode 100644
index 000000000000..b57376dee7bb
--- /dev/null
+++ b/.changeset/odd-plants-tie.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Add support for non-awaited imports to the Image component and `getImage`
diff --git a/.changeset/olive-queens-drum.md b/.changeset/olive-queens-drum.md
new file mode 100644
index 000000000000..258d9c726367
--- /dev/null
+++ b/.changeset/olive-queens-drum.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Add second type argument to the AstroGlobal type to type Astro.self. This change will ultimately allow our editor tooling to provide props completions and intellisense for ``
diff --git a/.changeset/popular-spoons-behave.md b/.changeset/popular-spoons-behave.md
deleted file mode 100644
index 021705f41641..000000000000
--- a/.changeset/popular-spoons-behave.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@astrojs/node': patch
----
-
-Support the `--host` flag when running the standalone server (also works for `astro preview --host`)
diff --git a/.changeset/smart-nails-push.md b/.changeset/smart-nails-push.md
deleted file mode 100644
index 3166e9f468b7..000000000000
--- a/.changeset/smart-nails-push.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Always return a new array instance from `getCollection` in prod
diff --git a/.changeset/tender-tips-kneel.md b/.changeset/tender-tips-kneel.md
deleted file mode 100644
index 8301cf202b1a..000000000000
--- a/.changeset/tender-tips-kneel.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Links with hash marks now trigger view transitions if they lead to a different page. Links to the same page do not trigger view transitions.
diff --git a/examples/basics/package.json b/examples/basics/package.json
index cceaf811c24a..0dd85508f78a 100644
--- a/examples/basics/package.json
+++ b/examples/basics/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/blog/package.json b/examples/blog/package.json
index 41dbf5e828b1..feedfbe194ae 100644
--- a/examples/blog/package.json
+++ b/examples/blog/package.json
@@ -14,6 +14,6 @@
"@astrojs/mdx": "^0.19.7",
"@astrojs/rss": "^2.4.4",
"@astrojs/sitemap": "^2.0.1",
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/blog/public/blog-placeholder-5.jpg b/examples/blog/public/blog-placeholder-5.jpg
index 1a59ad9b6fa4..c5646746c08c 100644
Binary files a/examples/blog/public/blog-placeholder-5.jpg and b/examples/blog/public/blog-placeholder-5.jpg differ
diff --git a/examples/blog/public/placeholder-about.jpg b/examples/blog/public/placeholder-about.jpg
deleted file mode 100644
index 2f736d92af20..000000000000
Binary files a/examples/blog/public/placeholder-about.jpg and /dev/null differ
diff --git a/examples/component/package.json b/examples/component/package.json
index 0ca9ebf73f87..71a782e2efc0 100644
--- a/examples/component/package.json
+++ b/examples/component/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
diff --git a/examples/deno/package.json b/examples/deno/package.json
index 15790df5ddc9..26371e4cedb9 100644
--- a/examples/deno/package.json
+++ b/examples/deno/package.json
@@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
},
"devDependencies": {
"@astrojs/deno": "^4.3.0"
diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json
index dbf809b12609..ee9abb1bcee9 100644
--- a/examples/framework-alpine/package.json
+++ b/examples/framework-alpine/package.json
@@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.2.2",
"@types/alpinejs": "^3.7.1",
"alpinejs": "^3.12.2",
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json
index 8b1ca1738a62..cb5083e0e9e7 100644
--- a/examples/framework-lit/package.json
+++ b/examples/framework-lit/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^2.1.1",
"@webcomponents/template-shadowroot": "^0.2.1",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"lit": "^2.7.5"
}
}
diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json
index fed0c1fd2bf5..3fca61c05a8f 100644
--- a/examples/framework-multiple/package.json
+++ b/examples/framework-multiple/package.json
@@ -16,7 +16,7 @@
"@astrojs/solid-js": "^2.2.0",
"@astrojs/svelte": "^3.1.0",
"@astrojs/vue": "^2.2.1",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"preact": "^10.15.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json
index 110d586311a9..7abca0842c37 100644
--- a/examples/framework-preact/package.json
+++ b/examples/framework-preact/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^2.2.2",
"@preact/signals": "^1.1.3",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"preact": "^10.15.1"
}
}
diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json
index 52d2d60ce61c..95a89076de4b 100644
--- a/examples/framework-react/package.json
+++ b/examples/framework-react/package.json
@@ -14,7 +14,7 @@
"@astrojs/react": "^2.2.1",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.6",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json
index f76ab6a8809b..a9a4f258fd63 100644
--- a/examples/framework-solid/package.json
+++ b/examples/framework-solid/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^2.2.0",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"solid-js": "^1.7.6"
}
}
diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json
index be7c030d184a..8bffc9e872ad 100644
--- a/examples/framework-svelte/package.json
+++ b/examples/framework-svelte/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^3.1.0",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"svelte": "^3.59.1"
}
}
diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json
index 7053ffc8190d..827173a7f9e7 100644
--- a/examples/framework-vue/package.json
+++ b/examples/framework-vue/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^2.2.1",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"vue": "^3.3.4"
}
}
diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json
index 8f9c1b0b9e37..4571cd2eb041 100644
--- a/examples/hackernews/package.json
+++ b/examples/hackernews/package.json
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/node": "^5.3.2",
- "astro": "^2.10.5"
+ "@astrojs/node": "^5.3.3",
+ "astro": "^2.10.7"
}
}
diff --git a/examples/integration/package.json b/examples/integration/package.json
index c39f0b0f2c33..f046d2d1f343 100644
--- a/examples/integration/package.json
+++ b/examples/integration/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
diff --git a/examples/middleware/package.json b/examples/middleware/package.json
index dd5bf083378d..016864c90074 100644
--- a/examples/middleware/package.json
+++ b/examples/middleware/package.json
@@ -12,8 +12,8 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
- "@astrojs/node": "^5.3.2",
- "astro": "^2.10.5",
+ "@astrojs/node": "^5.3.3",
+ "astro": "^2.10.7",
"html-minifier": "^4.0.0"
}
}
diff --git a/examples/minimal/package.json b/examples/minimal/package.json
index f3030a41ef96..aaf860ed16b8 100644
--- a/examples/minimal/package.json
+++ b/examples/minimal/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json
index 4e00c9189751..1f0f83031556 100644
--- a/examples/non-html-pages/package.json
+++ b/examples/non-html-pages/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json
index 45a07d4bf14e..9602cf96fa59 100644
--- a/examples/portfolio/package.json
+++ b/examples/portfolio/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/ssr/package.json b/examples/ssr/package.json
index b84e9332fe73..17d308d9ed1f 100644
--- a/examples/ssr/package.json
+++ b/examples/ssr/package.json
@@ -12,9 +12,9 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
- "@astrojs/node": "^5.3.2",
+ "@astrojs/node": "^5.3.3",
"@astrojs/svelte": "^3.1.0",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"svelte": "^3.59.1"
}
}
diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json
index 6f7f6332be07..d89571435362 100644
--- a/examples/with-markdoc/package.json
+++ b/examples/with-markdoc/package.json
@@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.4.4",
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json
index 793bd355b35f..f749cbcfa78a 100644
--- a/examples/with-markdown-plugins/package.json
+++ b/examples/with-markdown-plugins/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^2.2.1",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"hast-util-select": "^5.0.5",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json
index a83d2a1731ba..9582ab1c09a1 100644
--- a/examples/with-markdown-shiki/package.json
+++ b/examples/with-markdown-shiki/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^2.10.5"
+ "astro": "^2.10.7"
}
}
diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json
index 513c9384aabe..a1deb632396f 100644
--- a/examples/with-mdx/package.json
+++ b/examples/with-mdx/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/preact": "^2.2.2",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"preact": "^10.15.1"
}
}
diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json
index bb85e54389ff..99f2e6e39d1a 100644
--- a/examples/with-nanostores/package.json
+++ b/examples/with-nanostores/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^2.2.2",
"@nanostores/preact": "^0.4.1",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"nanostores": "^0.8.1",
"preact": "^10.15.1"
}
diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json
index 2e702bc07ee5..2c97a09b8e0c 100644
--- a/examples/with-tailwindcss/package.json
+++ b/examples/with-tailwindcss/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/tailwind": "^4.0.0",
"@types/canvas-confetti": "^1.6.0",
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"autoprefixer": "^10.4.14",
"canvas-confetti": "^1.6.0",
"postcss": "^8.4.24",
diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json
index 81bd47afd3c5..7c648ade96e5 100644
--- a/examples/with-vite-plugin-pwa/package.json
+++ b/examples/with-vite-plugin-pwa/package.json
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"vite-plugin-pwa": "0.14.7",
"workbox-window": "^6.6.0"
}
diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json
index 73a1aceefb67..311b3bb60ad5 100644
--- a/examples/with-vitest/package.json
+++ b/examples/with-vitest/package.json
@@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
- "astro": "^2.10.5",
+ "astro": "^2.10.7",
"vitest": "^0.31.4"
}
}
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md
index f7030b792c23..4400d35295d6 100644
--- a/packages/astro/CHANGELOG.md
+++ b/packages/astro/CHANGELOG.md
@@ -1,5 +1,25 @@
# astro
+## 2.10.7
+
+### Patch Changes
+
+- [#8042](https://github.com/withastro/astro/pull/8042) [`4a145c4c7`](https://github.com/withastro/astro/commit/4a145c4c7d176a3fb56342844690c6999e880069) Thanks [@matthewp](https://github.com/matthewp)! - Treat same pathname with different search params as different page
+
+## 2.10.6
+
+### Patch Changes
+
+- [#8027](https://github.com/withastro/astro/pull/8027) [`1b8d30209`](https://github.com/withastro/astro/commit/1b8d3020990130dabfaaf753db73a32c6e0c896a) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Ensure dev server restarts respect when `base` is removed
+
+- [#8033](https://github.com/withastro/astro/pull/8033) [`405913cdf`](https://github.com/withastro/astro/commit/405913cdf20b26407aa351c090f0a0859a4e6f54) Thanks [@matthewp](https://github.com/matthewp)! - Prevent script re-evaluation on page transition
+
+- [#8036](https://github.com/withastro/astro/pull/8036) [`87d4b1843`](https://github.com/withastro/astro/commit/87d4b18437c7565c48cad4bea81831c2a244ebb8) Thanks [@ematipico](https://github.com/ematipico)! - Fix a bug where the middleware entry point was passed to integrations even though the configuration `build.excludeMiddleware` was set to `false`.
+
+- [#8022](https://github.com/withastro/astro/pull/8022) [`c23377caa`](https://github.com/withastro/astro/commit/c23377caafbc75deb91c33b9678c1b6868ad40ea) Thanks [@bluwy](https://github.com/bluwy)! - Always return a new array instance from `getCollection` in prod
+
+- [#8013](https://github.com/withastro/astro/pull/8013) [`86bee2812`](https://github.com/withastro/astro/commit/86bee2812185df6e14025e5962a335f51853587b) Thanks [@martrapp](https://github.com/martrapp)! - Links with hash marks now trigger view transitions if they lead to a different page. Links to the same page do not trigger view transitions.
+
## 2.10.5
### Patch Changes
diff --git a/packages/astro/client-base.d.ts b/packages/astro/client-base.d.ts
index c0203e0ef335..3b0ee490167d 100644
--- a/packages/astro/client-base.d.ts
+++ b/packages/astro/client-base.d.ts
@@ -48,7 +48,9 @@ declare module 'astro:assets' {
* This is functionally equivalent to using the `` component, as the component calls this function internally.
*/
getImage: (
- options: import('./dist/assets/types.js').ImageTransform
+ options:
+ | import('./dist/assets/types.js').ImageTransform
+ | import('./dist/assets/types.js').UnresolvedImageTransform
) => Promise;
getConfiguredImageService: typeof import('./dist/assets/index.js').getConfiguredImageService;
Image: typeof import('./components/Image.astro').default;
diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro
index d8d5bd1d7a8d..05fc57aa6e81 100644
--- a/packages/astro/components/ViewTransitions.astro
+++ b/packages/astro/components/ViewTransitions.astro
@@ -63,9 +63,16 @@ const { fallback = 'animate' } = Astro.props as Props;
return 'animate';
}
+ function markScriptsExec() {
+ for (const script of document.scripts) {
+ script.dataset.astroExec = '';
+ }
+ }
+
function runScripts() {
let wait = Promise.resolve();
for (const script of Array.from(document.scripts)) {
+ if (script.dataset.astroExec === '') continue;
const s = document.createElement('script');
s.innerHTML = script.innerHTML;
for (const attr of script.attributes) {
@@ -77,6 +84,7 @@ const { fallback = 'animate' } = Astro.props as Props;
}
s.setAttribute(attr.name, attr.value);
}
+ s.dataset.astroExec = '';
script.replaceWith(s);
}
return wait;
@@ -100,6 +108,19 @@ const { fallback = 'animate' } = Astro.props as Props;
const href = el.getAttribute('href');
return doc.head.querySelector(`link[rel=stylesheet][href="${href}"]`);
}
+ if (el.tagName === 'SCRIPT') {
+ let s1 = el as HTMLScriptElement;
+ for (const s2 of doc.scripts) {
+ if (
+ // Inline
+ (s1.textContent && s1.textContent === s2.textContent) ||
+ // External
+ (s1.type === s2.type && s1.src === s2.src)
+ ) {
+ return s2;
+ }
+ }
+ }
return null;
};
@@ -207,6 +228,7 @@ const { fallback = 'animate' } = Astro.props as Props;
} finally {
document.documentElement.removeAttribute('data-astro-transition');
await runScripts();
+ markScriptsExec();
onload();
}
}
@@ -225,6 +247,8 @@ const { fallback = 'animate' } = Astro.props as Props;
}
if (supportsViewTransitions || getFallback() !== 'none') {
+ markScriptsExec();
+
document.addEventListener('click', (ev) => {
let link = ev.target;
if (link instanceof Element && link.tagName !== 'A') {
@@ -239,7 +263,10 @@ const { fallback = 'animate' } = Astro.props as Props;
link.href &&
(!link.target || link.target === '_self') &&
link.origin === location.origin &&
- location.pathname !== link.pathname &&
+ !(
+ // Same page means same path and same query params
+ (location.pathname === link.pathname && location.search === link.search)
+ ) &&
ev.button === 0 && // left clicks only
!ev.metaKey && // new tab (mac)
!ev.ctrlKey && // new tab (windows)
diff --git a/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs b/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs
index c0df0074c658..8a9f43bcc93c 100644
--- a/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs
+++ b/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs
@@ -1,8 +1,11 @@
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
+import nodejs from '@astrojs/node';
// https://astro.build/config
export default defineConfig({
+ output: 'server',
+ adapter: nodejs({ mode: 'standalone' }),
integrations: [react()],
experimental: {
viewTransitions: true,
diff --git a/packages/astro/e2e/fixtures/view-transitions/package.json b/packages/astro/e2e/fixtures/view-transitions/package.json
index 90a07f839755..f4ba9b17b053 100644
--- a/packages/astro/e2e/fixtures/view-transitions/package.json
+++ b/packages/astro/e2e/fixtures/view-transitions/package.json
@@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"astro": "workspace:*",
+ "@astrojs/node": "workspace:*",
"@astrojs/react": "workspace:*",
"react": "^18.1.0",
"react-dom": "^18.1.0"
diff --git a/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro b/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro
index 7016a1bf7139..1c0f9bbdf0c1 100644
--- a/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro
+++ b/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro
@@ -20,6 +20,16 @@ const { link } = Astro.props as Props;
+
+
diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/query.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/query.astro
new file mode 100644
index 000000000000..44dd03ce0f22
--- /dev/null
+++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/query.astro
@@ -0,0 +1,9 @@
+---
+import Layout from '../components/Layout.astro';
+
+const page = Astro.url.searchParams.get('page') || 1;
+---
+
+ Page {page}
+ go to 2
+
diff --git a/packages/astro/e2e/view-transitions.test.js b/packages/astro/e2e/view-transitions.test.js
index f30cd990293d..7aeb6502a67a 100644
--- a/packages/astro/e2e/view-transitions.test.js
+++ b/packages/astro/e2e/view-transitions.test.js
@@ -279,4 +279,41 @@ test.describe('View Transitions', () => {
// Count should remain
await expect(cnt).toHaveText('6');
});
+
+ test('Scripts are only executed once', async ({ page, astro }) => {
+ // Go to page 1
+ await page.goto(astro.resolveUrl('/one'));
+ const p = page.locator('#one');
+ await expect(p, 'should have content').toHaveText('Page 1');
+
+ // go to page 2
+ await page.click('#click-two');
+ const article = page.locator('#twoarticle');
+ await expect(article, 'should have script content').toHaveText('works');
+
+ const meta = page.locator('[name="script-executions"]');
+ await expect(meta).toHaveAttribute('content', '0');
+ });
+
+ test('Navigating to the same path but with different query params should result in transition', async ({
+ page,
+ astro,
+ }) => {
+ const loads = [];
+ page.addListener('load', (p) => {
+ loads.push(p.title());
+ });
+
+ // Go to page 1
+ await page.goto(astro.resolveUrl('/query'));
+ let p = page.locator('#query-page');
+ await expect(p, 'should have content').toHaveText('Page 1');
+
+ // go to page 2
+ await page.click('#click-two');
+ p = page.locator('#query-page');
+ await expect(p, 'should have content').toHaveText('Page 2');
+
+ await expect(loads.length, 'There should only be 1 page load').toEqual(1);
+ });
});
diff --git a/packages/astro/package.json b/packages/astro/package.json
index 54e4f0fbcceb..404242f20296 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -1,6 +1,6 @@
{
"name": "astro",
- "version": "2.10.5",
+ "version": "2.10.7",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index c2a7c38233d3..fd809e846615 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -139,8 +139,10 @@ export interface CLIFlags {
*
* [Astro reference](https://docs.astro.build/reference/api-reference/#astro-global)
*/
-export interface AstroGlobal = Record>
- extends AstroGlobalPartial,
+export interface AstroGlobal<
+ Props extends Record = Record,
+ Self = AstroComponentFactory
+> extends AstroGlobalPartial,
AstroSharedContext {
/**
* A full URL object of the request URL.
@@ -217,7 +219,7 @@ export interface AstroGlobal = Record {
}
export async function getImage(
- options: ImageTransform,
+ options: ImageTransform | UnresolvedImageTransform,
serviceConfig: Record
): Promise {
if (!options || typeof options !== 'object') {
@@ -48,9 +53,19 @@ export async function getImage(
}
const service = await getConfiguredImageService();
+
+ // If the user inlined an import, something fairly common especially in MDX, await it for them
+ const resolvedOptions: ImageTransform = {
+ ...options,
+ src:
+ typeof options.src === 'object' && 'then' in options.src
+ ? (await options.src).default
+ : options.src,
+ };
+
const validatedOptions = service.validateOptions
- ? await service.validateOptions(options, serviceConfig)
- : options;
+ ? await service.validateOptions(resolvedOptions, serviceConfig)
+ : resolvedOptions;
let imageURL = await service.getURL(validatedOptions, serviceConfig);
@@ -60,7 +75,7 @@ export async function getImage(
}
return {
- rawOptions: options,
+ rawOptions: resolvedOptions,
options: validatedOptions,
src: imageURL,
attributes:
diff --git a/packages/astro/src/assets/types.ts b/packages/astro/src/assets/types.ts
index 5632d76917af..9c5990cb77ae 100644
--- a/packages/astro/src/assets/types.ts
+++ b/packages/astro/src/assets/types.ts
@@ -27,6 +27,10 @@ export interface ImageMetadata {
orientation?: number;
}
+export type UnresolvedImageTransform = Omit & {
+ src: Promise<{ default: ImageMetadata }>;
+};
+
/**
* Options accepted by the image transformation service.
*/
@@ -93,7 +97,7 @@ export type LocalImageProps = ImageSharedProps & {
*
* ```
*/
- src: ImageMetadata;
+ src: ImageMetadata | Promise<{ default: ImageMetadata }>;
/**
* Desired output format for the image. Defaults to `webp`.
*
diff --git a/packages/astro/src/core/build/plugins/plugin-middleware.ts b/packages/astro/src/core/build/plugins/plugin-middleware.ts
index 8afca2fbc20a..5ed532d5e88e 100644
--- a/packages/astro/src/core/build/plugins/plugin-middleware.ts
+++ b/packages/astro/src/core/build/plugins/plugin-middleware.ts
@@ -56,7 +56,7 @@ export function vitePluginMiddleware(
if (chunk.type === 'asset') {
continue;
}
- if (chunk.fileName === 'middleware.mjs') {
+ if (chunk.fileName === 'middleware.mjs' && opts.settings.config.build.excludeMiddleware) {
internals.middlewareEntryPoint = new URL(chunkName, opts.settings.config.build.server);
}
}
diff --git a/packages/astro/test/core-image.test.js b/packages/astro/test/core-image.test.js
index 4d5f467bfc0f..8c09de245211 100644
--- a/packages/astro/test/core-image.test.js
+++ b/packages/astro/test/core-image.test.js
@@ -147,6 +147,19 @@ describe('astro:image', () => {
})
).to.be.true;
});
+
+ it('supports inlined imports', async () => {
+ let res = await fixture.fetch('/inlineImport');
+ let html = await res.text();
+ $ = cheerio.load(html);
+
+ let $img = $('img');
+ expect($img).to.have.a.lengthOf(1);
+
+ let src = $img.attr('src');
+ res = await fixture.fetch(src);
+ expect(res.status).to.equal(200);
+ });
});
describe('vite-isms', () => {
diff --git a/packages/astro/test/fixtures/core-image/src/pages/inlineImport.astro b/packages/astro/test/fixtures/core-image/src/pages/inlineImport.astro
new file mode 100644
index 000000000000..3235879934c3
--- /dev/null
+++ b/packages/astro/test/fixtures/core-image/src/pages/inlineImport.astro
@@ -0,0 +1,7 @@
+---
+import { getImage } from "astro:assets";
+
+const optimizedImage = await getImage({src: import('../assets/penguin1.jpg')})
+---
+
+
diff --git a/packages/astro/test/middleware.test.js b/packages/astro/test/middleware.test.js
index 1ed857d5b03c..3796a341fcab 100644
--- a/packages/astro/test/middleware.test.js
+++ b/packages/astro/test/middleware.test.js
@@ -118,13 +118,7 @@ describe('Middleware API in PROD mode, SSR', () => {
fixture = await loadFixture({
root: './fixtures/middleware-dev/',
output: 'server',
- adapter: testAdapter({
- setEntryPoints(entryPointsOrMiddleware) {
- if (entryPointsOrMiddleware instanceof URL) {
- middlewarePath = entryPointsOrMiddleware;
- }
- },
- }),
+ adapter: testAdapter({}),
});
await fixture.build();
});
@@ -218,6 +212,21 @@ describe('Middleware API in PROD mode, SSR', () => {
});
it('the integration should receive the path to the middleware', async () => {
+ fixture = await loadFixture({
+ root: './fixtures/middleware-dev/',
+ output: 'server',
+ build: {
+ excludeMiddleware: true,
+ },
+ adapter: testAdapter({
+ setEntryPoints(entryPointsOrMiddleware) {
+ if (entryPointsOrMiddleware instanceof URL) {
+ middlewarePath = entryPointsOrMiddleware;
+ }
+ },
+ }),
+ });
+ await fixture.build();
expect(middlewarePath).to.not.be.undefined;
try {
const path = fileURLToPath(middlewarePath);
diff --git a/packages/create-astro/CHANGELOG.md b/packages/create-astro/CHANGELOG.md
index 41a52e32ee4e..dd0220e51b7f 100644
--- a/packages/create-astro/CHANGELOG.md
+++ b/packages/create-astro/CHANGELOG.md
@@ -1,5 +1,11 @@
# create-astro
+## 3.1.13
+
+### Patch Changes
+
+- [#8028](https://github.com/withastro/astro/pull/8028) [`8292c4131`](https://github.com/withastro/astro/commit/8292c41311ec41d9d50921fbb2bdeed69e039443) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Improve yarn berry support
+
## 3.1.12
### Patch Changes
diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json
index e08d4320da02..761a230cf627 100644
--- a/packages/create-astro/package.json
+++ b/packages/create-astro/package.json
@@ -1,6 +1,6 @@
{
"name": "create-astro",
- "version": "3.1.12",
+ "version": "3.1.13",
"type": "module",
"author": "withastro",
"license": "MIT",
diff --git a/packages/integrations/cloudflare/CHANGELOG.md b/packages/integrations/cloudflare/CHANGELOG.md
index 161eda64be7a..2a53e71bd573 100644
--- a/packages/integrations/cloudflare/CHANGELOG.md
+++ b/packages/integrations/cloudflare/CHANGELOG.md
@@ -1,5 +1,23 @@
# @astrojs/cloudflare
+## 6.8.0
+
+### Minor Changes
+
+- [#7541](https://github.com/withastro/astro/pull/7541) [`ffcfcddb7`](https://github.com/withastro/astro/commit/ffcfcddb7575030d62b4ef979d46a74425e6d3fe) Thanks [@alexanderniebuhr](https://github.com/alexanderniebuhr)! - The `getRuntime` utility has been deprecated and should be updated to the new [`Astro.locals`](https://docs.astro.build/en/guides/middleware/#locals) API.
+
+ ```diff
+ - import { getRuntime } from '@astrojs/cloudflare/runtime';
+ - getRuntime(Astro.request);
+
+ + const runtime = Astro.locals.runtime;
+ ```
+
+### Patch Changes
+
+- Updated dependencies [[`1b8d30209`](https://github.com/withastro/astro/commit/1b8d3020990130dabfaaf753db73a32c6e0c896a), [`405913cdf`](https://github.com/withastro/astro/commit/405913cdf20b26407aa351c090f0a0859a4e6f54), [`87d4b1843`](https://github.com/withastro/astro/commit/87d4b18437c7565c48cad4bea81831c2a244ebb8), [`c23377caa`](https://github.com/withastro/astro/commit/c23377caafbc75deb91c33b9678c1b6868ad40ea), [`86bee2812`](https://github.com/withastro/astro/commit/86bee2812185df6e14025e5962a335f51853587b)]:
+ - astro@2.10.6
+
## 6.7.0
### Minor Changes
diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json
index 52bdf32d9118..a9c857ba09e1 100644
--- a/packages/integrations/cloudflare/package.json
+++ b/packages/integrations/cloudflare/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/cloudflare",
"description": "Deploy your site to Cloudflare Workers/Pages",
- "version": "6.7.0",
+ "version": "6.8.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -45,7 +45,7 @@
"tiny-glob": "^0.2.9"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5"
+ "astro": "workspace:^2.10.7"
},
"devDependencies": {
"astro": "workspace:*",
diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json
index 2b7b398172cc..be0b2b2bca24 100644
--- a/packages/integrations/deno/package.json
+++ b/packages/integrations/deno/package.json
@@ -36,7 +36,7 @@
"esbuild": "^0.15.18"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5"
+ "astro": "workspace:^2.10.7"
},
"devDependencies": {
"astro": "workspace:*",
diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json
index 190d61a6e7dd..e0653b6288db 100644
--- a/packages/integrations/image/package.json
+++ b/packages/integrations/image/package.json
@@ -63,7 +63,7 @@
"vite": "^4.4.6"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5",
+ "astro": "workspace:^2.10.7",
"sharp": ">=0.31.0"
},
"peerDependenciesMeta": {
diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json
index 158200b2ff9a..ca1808e380ee 100644
--- a/packages/integrations/markdoc/package.json
+++ b/packages/integrations/markdoc/package.json
@@ -75,7 +75,7 @@
"zod": "^3.17.3"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5"
+ "astro": "workspace:^2.10.7"
},
"devDependencies": {
"@astrojs/markdown-remark": "^2.2.1",
diff --git a/packages/integrations/netlify/CHANGELOG.md b/packages/integrations/netlify/CHANGELOG.md
index 57f318c29005..2313698d59f7 100644
--- a/packages/integrations/netlify/CHANGELOG.md
+++ b/packages/integrations/netlify/CHANGELOG.md
@@ -1,5 +1,31 @@
# @astrojs/netlify
+## 2.6.0
+
+### Minor Changes
+
+- [#7975](https://github.com/withastro/astro/pull/7975) [`f974c95a2`](https://github.com/withastro/astro/commit/f974c95a27ccbf91adbc66f6f1433f4cf11be33e) Thanks [@lilnasy](https://github.com/lilnasy)! - If you are using Netlify's On-demand Builders, you can now specify how long your pages should remain cached. By default, all pages will be rendered on first visit and reused on every subsequent visit until a redeploy. To set a custom revalidation time, call the `runtime.setBuildersTtl()` local in either your frontmatter or middleware.
+
+ ```astro
+ ---
+ import Layout from '../components/Layout.astro';
+
+ if (import.meta.env.PROD) {
+ // revalidates every 45 seconds
+ Astro.locals.runtime.setBuildersTtl(45);
+ }
+ ---
+
+
+ {new Date(Date.now())}
+
+ ```
+
+### Patch Changes
+
+- Updated dependencies [[`1b8d30209`](https://github.com/withastro/astro/commit/1b8d3020990130dabfaaf753db73a32c6e0c896a), [`405913cdf`](https://github.com/withastro/astro/commit/405913cdf20b26407aa351c090f0a0859a4e6f54), [`87d4b1843`](https://github.com/withastro/astro/commit/87d4b18437c7565c48cad4bea81831c2a244ebb8), [`c23377caa`](https://github.com/withastro/astro/commit/c23377caafbc75deb91c33b9678c1b6868ad40ea), [`86bee2812`](https://github.com/withastro/astro/commit/86bee2812185df6e14025e5962a335f51853587b)]:
+ - astro@2.10.6
+
## 2.5.2
### Patch Changes
diff --git a/packages/integrations/netlify/README.md b/packages/integrations/netlify/README.md
index 18ba65cd7842..8d6c2096ec9a 100644
--- a/packages/integrations/netlify/README.md
+++ b/packages/integrations/netlify/README.md
@@ -162,6 +162,30 @@ Once you run `astro build` there will be a `dist/_redirects` file. Netlify will
> **Note**
> You can still include a `public/_redirects` file for manual redirects. Any redirects you specify in the redirects config are appended to the end of your own.
+### On-demand Builders
+
+[Netlify On-demand Builders](https://docs.netlify.com/configure-builds/on-demand-builders/) are serverless functions used to generate web content as needed that’s automatically cached on Netlify’s Edge CDN. You can enable these functions using the [`builders` configuration](#builders).
+
+By default, all pages will be rendered on first visit and the rendered result will be reused for every subsequent visit until you redeploy. To set a revalidation time, call the [`runtime.setBuildersTtl(ttl)` local](https://docs.astro.build/en/guides/middleware/#locals) with the duration (in seconds).
+
+The following example sets a revalidation time of 45, causing Netlify to store the rendered HTML for 45 seconds.
+
+```astro
+---
+import Layout from '../components/Layout.astro';
+
+if (import.meta.env.PROD) {
+ Astro.locals.runtime.setBuildersTtl(45);
+}
+---
+
+
+ {new Date(Date.now())}
+
+```
+
+It is important to note that On-demand Builders ignore query params when checking for cached pages. For example, if `example.com/?x=y` is cached, it will be served for `example.com/?a=b` (different query params) and `example.com/` (no query params) as well.
+
## Usage
[Read the full deployment guide here.](https://docs.astro.build/en/guides/deploy/netlify/)
@@ -206,7 +230,7 @@ directory = "dist/functions"
### builders
-[Netlify On-demand Builders](https://docs.netlify.com/configure-builds/on-demand-builders/) are serverless functions used to build and cache page content on Netlify’s Edge CDN. You can enable these functions with the `builders` option:
+You can enable On-demand Builders using the `builders` option:
```js
// astro.config.mjs
diff --git a/packages/integrations/netlify/builders-types.d.ts b/packages/integrations/netlify/builders-types.d.ts
new file mode 100644
index 000000000000..7c778be4fdc3
--- /dev/null
+++ b/packages/integrations/netlify/builders-types.d.ts
@@ -0,0 +1,9 @@
+interface NetlifyLocals {
+ runtime: {
+ /**
+ * On-demand Builders support an optional time to live (TTL) pattern that allows you to set a fixed duration of time after which a cached builder response is invalidated. This allows you to force a refresh of a builder-generated response without a new deploy.
+ * @param ttl time to live, in seconds
+ */
+ setBuildersTtl(ttl: number): void;
+ };
+}
diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json
index f338eb52bdda..79562930f9af 100644
--- a/packages/integrations/netlify/package.json
+++ b/packages/integrations/netlify/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/netlify",
"description": "Deploy your site to Netlify",
- "version": "2.5.2",
+ "version": "2.6.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -26,7 +26,8 @@
"./package.json": "./package.json"
},
"files": [
- "dist"
+ "dist",
+ "builders-types.d.ts"
],
"scripts": {
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
@@ -44,7 +45,7 @@
"esbuild": "^0.15.18"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5"
+ "astro": "workspace:^2.10.7"
},
"devDependencies": {
"@netlify/edge-functions": "^2.0.0",
diff --git a/packages/integrations/netlify/src/netlify-functions.ts b/packages/integrations/netlify/src/netlify-functions.ts
index cc6636ec4853..c45c1b9ef06c 100644
--- a/packages/integrations/netlify/src/netlify-functions.ts
+++ b/packages/integrations/netlify/src/netlify-functions.ts
@@ -68,18 +68,32 @@ export const createExports = (manifest: SSRManifest, args: Args) => {
init.body =
typeof requestBody === 'string' ? Buffer.from(requestBody, encoding) : requestBody;
}
+
const request = new Request(rawUrl, init);
const routeData = app.match(request);
const ip = headers['x-nf-client-connection-ip'];
Reflect.set(request, clientAddressSymbol, ip);
- let locals = {};
+
+ let locals: Record = {};
+
if (request.headers.has(ASTRO_LOCALS_HEADER)) {
let localsAsString = request.headers.get(ASTRO_LOCALS_HEADER);
if (localsAsString) {
locals = JSON.parse(localsAsString);
}
}
+
+ let responseTtl = undefined;
+
+ locals.runtime = builders
+ ? {
+ setBuildersTtl(ttl: number) {
+ responseTtl = ttl;
+ },
+ }
+ : {};
+
const response: Response = await app.render(request, routeData, locals);
const responseHeaders = Object.fromEntries(response.headers.entries());
@@ -99,6 +113,7 @@ export const createExports = (manifest: SSRManifest, args: Args) => {
headers: responseHeaders,
body: responseBody,
isBase64Encoded: responseIsBase64Encoded,
+ ttl: responseTtl,
};
const cookies = response.headers.get('set-cookie');
diff --git a/packages/integrations/netlify/test/functions/builders.test.js b/packages/integrations/netlify/test/functions/builders.test.js
new file mode 100644
index 000000000000..d47af92c0d44
--- /dev/null
+++ b/packages/integrations/netlify/test/functions/builders.test.js
@@ -0,0 +1,37 @@
+import { expect } from 'chai';
+import { loadFixture, testIntegration } from './test-utils.js';
+import netlifyAdapter from '../../dist/index.js';
+
+describe('Builders', () => {
+ /** @type {import('../../../astro/test/test-utils').Fixture} */
+ let fixture;
+
+ before(async () => {
+ fixture = await loadFixture({
+ root: new URL('./fixtures/builders/', import.meta.url).toString(),
+ output: 'server',
+ adapter: netlifyAdapter({
+ dist: new URL('./fixtures/builders/dist/', import.meta.url),
+ builders: true,
+ }),
+ site: `http://example.com`,
+ integrations: [testIntegration()],
+ });
+ await fixture.build();
+ });
+
+ it('A route can set builders ttl', async () => {
+ const entryURL = new URL(
+ './fixtures/builders/.netlify/functions-internal/entry.mjs',
+ import.meta.url
+ );
+ const { handler } = await import(entryURL);
+ const resp = await handler({
+ httpMethod: 'GET',
+ headers: {},
+ rawUrl: 'http://example.com/',
+ isBase64Encoded: false,
+ });
+ expect(resp.ttl).to.equal(45);
+ });
+});
diff --git a/packages/integrations/netlify/test/functions/fixtures/builders/src/pages/index.astro b/packages/integrations/netlify/test/functions/fixtures/builders/src/pages/index.astro
new file mode 100644
index 000000000000..ab8853785f9e
--- /dev/null
+++ b/packages/integrations/netlify/test/functions/fixtures/builders/src/pages/index.astro
@@ -0,0 +1,11 @@
+---
+Astro.locals.runtime.setBuildersTtl(45)
+---
+
+
+ Astro on Netlify
+
+
+ {new Date(Date.now())}
+
+
diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md
index 484ac50db23c..80fb53b86d21 100644
--- a/packages/integrations/node/CHANGELOG.md
+++ b/packages/integrations/node/CHANGELOG.md
@@ -1,5 +1,14 @@
# @astrojs/node
+## 5.3.3
+
+### Patch Changes
+
+- [#6928](https://github.com/withastro/astro/pull/6928) [`b16cb787f`](https://github.com/withastro/astro/commit/b16cb787fd16ebaaf860d8bb183789caf01c0fb7) Thanks [@JerryWu1234](https://github.com/JerryWu1234)! - Support the `--host` flag when running the standalone server (also works for `astro preview --host`)
+
+- Updated dependencies [[`1b8d30209`](https://github.com/withastro/astro/commit/1b8d3020990130dabfaaf753db73a32c6e0c896a), [`405913cdf`](https://github.com/withastro/astro/commit/405913cdf20b26407aa351c090f0a0859a4e6f54), [`87d4b1843`](https://github.com/withastro/astro/commit/87d4b18437c7565c48cad4bea81831c2a244ebb8), [`c23377caa`](https://github.com/withastro/astro/commit/c23377caafbc75deb91c33b9678c1b6868ad40ea), [`86bee2812`](https://github.com/withastro/astro/commit/86bee2812185df6e14025e5962a335f51853587b)]:
+ - astro@2.10.6
+
## 5.3.2
### Patch Changes
diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json
index 3306b2e57c0e..988246f108e5 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": "5.3.2",
+ "version": "5.3.3",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -38,7 +38,7 @@
"server-destroy": "^1.0.1"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5"
+ "astro": "workspace:^2.10.7"
},
"devDependencies": {
"@types/node": "^18.16.18",
diff --git a/packages/integrations/sitemap/README.md b/packages/integrations/sitemap/README.md
index ecf59a12dd7a..b2fb5e9ddb65 100644
--- a/packages/integrations/sitemap/README.md
+++ b/packages/integrations/sitemap/README.md
@@ -339,7 +339,7 @@ The resulting sitemap looks like this:
## Examples
- The official Astro website uses Astro Sitemap to generate [its sitemap](https://astro.build/sitemap-index.xml).
-- [Browse projects with Astro Sitemap on GitHub](https://github.com/search?q=%22@astrojs/sitemap%22+filename:package.json&type=Code) for more examples!
+- [Browse projects with Astro Sitemap on GitHub](https://github.com/search?q=%22%40astrojs%2Fsitemap%22+path%3Apackage.json&type=Code) for more examples!
## Troubleshooting
diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json
index d622852ce8a9..615377c6b87b 100644
--- a/packages/integrations/svelte/package.json
+++ b/packages/integrations/svelte/package.json
@@ -48,7 +48,7 @@
"vite": "^4.4.6"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5",
+ "astro": "workspace:^2.10.7",
"svelte": "^3.55.0 || ^4.0.0"
},
"engines": {
diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json
index 9bcaf13f5d97..e041bd1351a2 100644
--- a/packages/integrations/tailwind/package.json
+++ b/packages/integrations/tailwind/package.json
@@ -43,7 +43,7 @@
"vite": "^4.4.6"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5",
+ "astro": "workspace:^2.10.7",
"tailwindcss": "^3.0.24"
}
}
diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md
index 899005dc0b68..d255604532a6 100644
--- a/packages/integrations/vercel/CHANGELOG.md
+++ b/packages/integrations/vercel/CHANGELOG.md
@@ -1,5 +1,14 @@
# @astrojs/vercel
+## 3.8.1
+
+### Patch Changes
+
+- [#8039](https://github.com/withastro/astro/pull/8039) [`6b57628d1`](https://github.com/withastro/astro/commit/6b57628d128779290db3344bbb6de7282196fb97) Thanks [@matthewp](https://github.com/matthewp)! - Prevent Vercel NFT from scanning /dev
+
+- Updated dependencies [[`1b8d30209`](https://github.com/withastro/astro/commit/1b8d3020990130dabfaaf753db73a32c6e0c896a), [`405913cdf`](https://github.com/withastro/astro/commit/405913cdf20b26407aa351c090f0a0859a4e6f54), [`87d4b1843`](https://github.com/withastro/astro/commit/87d4b18437c7565c48cad4bea81831c2a244ebb8), [`c23377caa`](https://github.com/withastro/astro/commit/c23377caafbc75deb91c33b9678c1b6868ad40ea), [`86bee2812`](https://github.com/withastro/astro/commit/86bee2812185df6e14025e5962a335f51853587b)]:
+ - astro@2.10.6
+
## 3.8.0
### Minor Changes
diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json
index 566cead6fb6b..726587005a86 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": "3.8.0",
+ "version": "3.8.1",
"type": "module",
"author": "withastro",
"license": "MIT",
@@ -61,7 +61,7 @@
"web-vitals": "^3.3.2"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5"
+ "astro": "workspace:^2.10.7"
},
"devDependencies": {
"@types/set-cookie-parser": "^2.4.2",
diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts
index 752f87251bc7..10c298a1dc8c 100644
--- a/packages/integrations/vercel/src/lib/nft.ts
+++ b/packages/integrations/vercel/src/lib/nft.ts
@@ -28,6 +28,9 @@ export async function copyDependenciesToFunction({
const { nodeFileTrace } = await import('@vercel/nft');
const result = await nodeFileTrace([entryPath], {
base: fileURLToPath(base),
+ // If you have a route of /dev this appears in source and NFT will try to
+ // scan your local /dev :8
+ ignore: ['/dev/**'],
});
for (const error of result.warnings) {
diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json
index cea74ee295cf..315da8042c27 100644
--- a/packages/integrations/vue/package.json
+++ b/packages/integrations/vue/package.json
@@ -56,7 +56,7 @@
"vue": "^3.3.4"
},
"peerDependencies": {
- "astro": "workspace:^2.10.5",
+ "astro": "workspace:^2.10.7",
"vue": "^3.2.30"
},
"engines": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b57d14b75faf..48cd6243367e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -128,7 +128,7 @@ importers:
examples/basics:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/blog:
@@ -143,19 +143,19 @@ importers:
specifier: ^2.0.1
version: link:../../packages/integrations/sitemap
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/deno:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
devDependencies:
'@astrojs/deno':
@@ -174,7 +174,7 @@ importers:
specifier: ^3.12.2
version: 3.12.2
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/framework-lit:
@@ -186,7 +186,7 @@ importers:
specifier: ^0.2.1
version: 0.2.1
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
lit:
specifier: ^2.7.5
@@ -210,7 +210,7 @@ importers:
specifier: ^2.2.1
version: link:../../packages/integrations/vue
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
preact:
specifier: ^10.15.1
@@ -240,7 +240,7 @@ importers:
specifier: ^1.1.3
version: 1.1.3(preact@10.15.1)
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
preact:
specifier: ^10.15.1
@@ -258,7 +258,7 @@ importers:
specifier: ^18.2.6
version: 18.2.6
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
react:
specifier: ^18.2.0
@@ -273,7 +273,7 @@ importers:
specifier: ^2.2.0
version: link:../../packages/integrations/solid
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
solid-js:
specifier: ^1.7.6
@@ -285,7 +285,7 @@ importers:
specifier: ^3.1.0
version: link:../../packages/integrations/svelte
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
svelte:
specifier: ^3.59.1
@@ -297,7 +297,7 @@ importers:
specifier: ^2.2.1
version: link:../../packages/integrations/vue
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
vue:
specifier: ^3.3.4
@@ -306,25 +306,25 @@ importers:
examples/hackernews:
dependencies:
'@astrojs/node':
- specifier: ^5.3.2
+ specifier: ^5.3.3
version: link:../../packages/integrations/node
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/middleware:
dependencies:
'@astrojs/node':
- specifier: ^5.3.2
+ specifier: ^5.3.3
version: link:../../packages/integrations/node
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
html-minifier:
specifier: ^4.0.0
@@ -333,31 +333,31 @@ importers:
examples/minimal:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/non-html-pages:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/ssr:
dependencies:
'@astrojs/node':
- specifier: ^5.3.2
+ specifier: ^5.3.3
version: link:../../packages/integrations/node
'@astrojs/svelte':
specifier: ^3.1.0
version: link:../../packages/integrations/svelte
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
svelte:
specifier: ^3.59.1
@@ -369,7 +369,7 @@ importers:
specifier: ^0.4.4
version: link:../../packages/integrations/markdoc
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/with-markdown-plugins:
@@ -378,7 +378,7 @@ importers:
specifier: ^2.2.1
version: link:../../packages/markdown/remark
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
hast-util-select:
specifier: ^5.0.5
@@ -399,7 +399,7 @@ importers:
examples/with-markdown-shiki:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
examples/with-mdx:
@@ -411,7 +411,7 @@ importers:
specifier: ^2.2.2
version: link:../../packages/integrations/preact
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
preact:
specifier: ^10.15.1
@@ -426,7 +426,7 @@ importers:
specifier: ^0.4.1
version: 0.4.1(nanostores@0.8.1)(preact@10.15.1)
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
nanostores:
specifier: ^0.8.1
@@ -444,7 +444,7 @@ importers:
specifier: ^1.6.0
version: 1.6.0
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.14
@@ -462,7 +462,7 @@ importers:
examples/with-vite-plugin-pwa:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
vite-plugin-pwa:
specifier: 0.14.7
@@ -474,7 +474,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
- specifier: ^2.10.5
+ specifier: ^2.10.7
version: link:../../packages/astro
vitest:
specifier: ^0.31.4
@@ -1484,6 +1484,9 @@ importers:
packages/astro/e2e/fixtures/view-transitions:
dependencies:
+ '@astrojs/node':
+ specifier: workspace:*
+ version: link:../../../../integrations/node
'@astrojs/react':
specifier: workspace:*
version: link:../../../../integrations/react