From da6e3da1ce00bed625fc568cfe4693713448e93f Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Thu, 17 Aug 2023 15:28:21 +0200 Subject: [PATCH 01/20] fix: reinsert attribute to specify direction of ViewTransition (forward / back) (#8109) --- .changeset/wet-foxes-sleep.md | 5 +++++ packages/astro/components/ViewTransitions.astro | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .changeset/wet-foxes-sleep.md diff --git a/.changeset/wet-foxes-sleep.md b/.changeset/wet-foxes-sleep.md new file mode 100644 index 000000000..7d81195f8 --- /dev/null +++ b/.changeset/wet-foxes-sleep.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +fix: reinsert attribute to specify direction of ViewTransition (forward / back) diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro index 47eb3c112..3967d0aee 100644 --- a/packages/astro/components/ViewTransitions.astro +++ b/packages/astro/components/ViewTransitions.astro @@ -101,9 +101,8 @@ const { fallback = 'animate' } = Astro.props as Props; const parser = new DOMParser(); - async function updateDOM(dir: Direction, html: string, state?: State, fallback?: Fallback) { + async function updateDOM(html: string, state?: State, fallback?: Fallback) { const doc = parser.parseFromString(html, 'text/html'); - doc.documentElement.dataset.astroTransition = dir; // Check for a head element that should persist, either because it has the data // attribute or is a link el. @@ -233,15 +232,17 @@ const { fallback = 'animate' } = Astro.props as Props; location.href = href; return; } + document.documentElement.dataset.astroTransition = dir; if (supportsViewTransitions) { - finished = document.startViewTransition(() => updateDOM(dir, html, state)).finished; + finished = document.startViewTransition(() => updateDOM(html, state)).finished; } else { - finished = updateDOM(dir, html, state, getFallback()); + finished = updateDOM(html, state, getFallback()); } try { await finished; } finally { - document.documentElement.removeAttribute('data-astro-transition'); + // skip this for the moment as it tends to stop fallback animations + // document.documentElement.removeAttribute('data-astro-transition'); await runScripts(); markScriptsExec(); onload(); @@ -291,8 +292,7 @@ const { fallback = 'animate' } = Astro.props as Props; transitionEnabledOnThisPage() ) { ev.preventDefault(); - navigate('forward', link.href, { index: currentHistoryIndex, scrollY: 0 }); - currentHistoryIndex++; + navigate('forward', link.href, { index: ++currentHistoryIndex, scrollY: 0 }); const newState: State = { index: currentHistoryIndex, scrollY }; persistState({ index: currentHistoryIndex - 1, scrollY }); history.pushState(newState, '', link.href); From b290f0a99778a9b9c1045f3cd06b6aee934d7c03 Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Thu, 17 Aug 2023 18:18:30 +0200 Subject: [PATCH 02/20] only update our own history entires during back navigation through view transitions (#8116) --- .changeset/small-nails-try.md | 5 +++++ packages/astro/components/ViewTransitions.astro | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changeset/small-nails-try.md diff --git a/.changeset/small-nails-try.md b/.changeset/small-nails-try.md new file mode 100644 index 000000000..3f6f591f1 --- /dev/null +++ b/.changeset/small-nails-try.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +On back navigation only animate view transitions that were animated going forward. diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro index 3967d0aee..4b7a46551 100644 --- a/packages/astro/components/ViewTransitions.astro +++ b/packages/astro/components/ViewTransitions.astro @@ -306,10 +306,11 @@ const { fallback = 'animate' } = Astro.props as Props; return; } - // hash change creates no state. + // History entries without state are created by the browser (e.g. for hash links) + // Our view transition entries always have state. + // Just ignore stateless entries. + // The browser will handle navigation fine without our help if (ev.state === null) { - persistState({ index: currentHistoryIndex, scrollY }); - ev.preventDefault(); return; } @@ -344,6 +345,8 @@ const { fallback = 'animate' } = Astro.props as Props; addEventListener( 'scroll', throttle(() => { + // only updste history entries that are managed by us + // leave other entries alone and do not accidently add state. if (history.state) { persistState({ ...history.state, scrollY }); } From 442f94611696e310f9d2a19e2ff1b6e1c55cf257 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Thu, 17 Aug 2023 16:32:27 -0300 Subject: [PATCH 03/20] [error msg] add hybrid option to a getStaticPaths error message (#8120) --- packages/astro/src/core/errors/errors-data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts index c717a2b03..c0aadaae7 100644 --- a/packages/astro/src/core/errors/errors-data.ts +++ b/packages/astro/src/core/errors/errors-data.ts @@ -387,7 +387,7 @@ export const GetStaticPathsRequired = { '`getStaticPaths()` function is required for dynamic routes. Make sure that you `export` a `getStaticPaths` function from your dynamic route.', hint: `See https://docs.astro.build/en/core-concepts/routing/#dynamic-routes for more information on dynamic routes. -Alternatively, set \`output: "server"\` in your Astro config file to switch to a non-static server build. This error can also occur if using \`export const prerender = true;\`. +Alternatively, set \`output: "server"\` or \`output: "hybrid"\` in your Astro config file to switch to a non-static server build. This error can also occur if using \`export const prerender = true;\`. See https://docs.astro.build/en/guides/server-side-rendering/ for more information on non-static rendering.`, } satisfies ErrorData; /** From fa6b68a776c5b3cc8167fc042b7d305234ebcff9 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 17 Aug 2023 15:34:36 -0500 Subject: [PATCH 04/20] fix(#6965): fix build stats (#8122) --- .changeset/lovely-walls-call.md | 5 +++++ packages/astro/src/core/build/generate.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/lovely-walls-call.md diff --git a/.changeset/lovely-walls-call.md b/.changeset/lovely-walls-call.md new file mode 100644 index 000000000..408fa00c5 --- /dev/null +++ b/.changeset/lovely-walls-call.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Improve fidelity of time stats when running `astro build` diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index a78a46883..32b5ebb09 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -272,15 +272,17 @@ async function generatePage( // Get paths for the route, calling getStaticPaths if needed. const paths = await getPathsForRoute(pageData, pageModule, opts, builtPaths); + let prevTimeEnd = timeStart; for (let i = 0; i < paths.length; i++) { const path = paths[i]; await generatePath(path, opts, generationOptions, manifest, onRequest); const timeEnd = performance.now(); - const timeChange = getTimeStat(timeStart, timeEnd); + const timeChange = getTimeStat(prevTimeEnd, timeEnd); const timeIncrease = `(+${timeChange})`; const filePath = getOutputFilename(opts.settings.config, path, pageData.route.type); const lineIcon = i === paths.length - 1 ? '└─' : '├─'; info(opts.logging, null, ` ${cyan(lineIcon)} ${dim(filePath)} ${dim(timeIncrease)}`); + prevTimeEnd = timeEnd; } } From 1b656233b3c9dc1b90732aa29ea1bf904c2c5f98 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Thu, 17 Aug 2023 13:35:52 -0700 Subject: [PATCH 05/20] chore(gitpod): resolve potential globbing and word splitting issue (#8124) Co-authored-by: Nate Moore --- .gitpod/gitpod-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod/gitpod-setup.sh b/.gitpod/gitpod-setup.sh index 0e739c46d..6186117fe 100755 --- a/.gitpod/gitpod-setup.sh +++ b/.gitpod/gitpod-setup.sh @@ -17,7 +17,7 @@ fi # Wait for VSCode to be ready (port 23000) gp ports await 23000 > /dev/null 2>&1 -echo "Loading example project:" $EXAMPLE_PROJECT +echo "Loading example project: $EXAMPLE_PROJECT" # Go to the requested example project cd "$GITPOD_REPO_ROOT"/examples/"$EXAMPLE_PROJECT" || exit From 1f6497c3341231ee76fc4538cfe7624cf4721d56 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 17 Aug 2023 16:51:08 -0500 Subject: [PATCH 06/20] fix(dev): open to base path (#8123) --- .changeset/popular-carrots-sneeze.md | 5 +++++ packages/astro/src/core/dev/container.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/popular-carrots-sneeze.md diff --git a/.changeset/popular-carrots-sneeze.md b/.changeset/popular-carrots-sneeze.md new file mode 100644 index 000000000..0f914891d --- /dev/null +++ b/.changeset/popular-carrots-sneeze.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Open to configured `base` when `astro dev --open` runs diff --git a/packages/astro/src/core/dev/container.ts b/packages/astro/src/core/dev/container.ts index d4e41e96d..b48d4c7b5 100644 --- a/packages/astro/src/core/dev/container.ts +++ b/packages/astro/src/core/dev/container.ts @@ -56,7 +56,9 @@ export async function createContainer({ settings = injectImageEndpoint(settings); } - const { host, headers, open } = settings.config.server; + const { base, server: { host, headers, open: shouldOpen }} = settings.config; + // Open server to the correct path + const open = shouldOpen ? base : false; // The client entrypoint for renderers. Since these are imported dynamically // we need to tell Vite to preoptimize them. From c7de971b10884ce788a1af98618a14d689576e1f Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Thu, 17 Aug 2023 21:53:48 +0000 Subject: [PATCH 07/20] [ci] format --- packages/astro/src/core/dev/container.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/core/dev/container.ts b/packages/astro/src/core/dev/container.ts index b48d4c7b5..a2c6d5dc8 100644 --- a/packages/astro/src/core/dev/container.ts +++ b/packages/astro/src/core/dev/container.ts @@ -56,7 +56,10 @@ export async function createContainer({ settings = injectImageEndpoint(settings); } - const { base, server: { host, headers, open: shouldOpen }} = settings.config; + const { + base, + server: { host, headers, open: shouldOpen }, + } = settings.config; // Open server to the correct path const open = shouldOpen ? base : false; From b12c8471f413c0291de4a9c444bfe3079a192034 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 18 Aug 2023 07:26:52 -0500 Subject: [PATCH 08/20] Stringify shouldn't throw on user object during rendering (#8127) * fix(#7923): do not throw on user { type } object * chore: remove unused type export * chore: guess it wasn't unused --- .changeset/brave-cheetahs-float.md | 5 ++ .../astro/src/runtime/server/render/common.ts | 38 +++++++------- .../src/runtime/server/render/component.ts | 4 +- .../astro/src/runtime/server/render/head.ts | 7 +-- .../astro/src/runtime/server/render/index.ts | 2 +- .../src/runtime/server/render/instruction.ts | 32 ++++++++++++ .../astro/src/runtime/server/render/slot.ts | 2 +- .../astro/src/runtime/server/render/types.ts | 19 ------- .../astro/test/units/render/chunk.test.js | 52 +++++++++++++++++++ 9 files changed, 115 insertions(+), 46 deletions(-) create mode 100644 .changeset/brave-cheetahs-float.md create mode 100644 packages/astro/src/runtime/server/render/instruction.ts delete mode 100644 packages/astro/src/runtime/server/render/types.ts create mode 100644 packages/astro/test/units/render/chunk.test.js diff --git a/.changeset/brave-cheetahs-float.md b/.changeset/brave-cheetahs-float.md new file mode 100644 index 000000000..84825ce0f --- /dev/null +++ b/.changeset/brave-cheetahs-float.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Do not throw Error when users pass an object with a "type" property diff --git a/packages/astro/src/runtime/server/render/common.ts b/packages/astro/src/runtime/server/render/common.ts index 48d8143df..a49bb2c9d 100644 --- a/packages/astro/src/runtime/server/render/common.ts +++ b/packages/astro/src/runtime/server/render/common.ts @@ -1,6 +1,7 @@ import type { SSRResult } from '../../../@types/astro'; -import type { RenderInstruction } from './types.js'; +import type { RenderInstruction } from './instruction.js'; +import { isRenderInstruction } from './instruction.js'; import { HTMLBytes, HTMLString, markHTMLString } from '../escape.js'; import { determineIfNeedsHydrationScript, @@ -52,8 +53,8 @@ function stringifyChunk( result: SSRResult, chunk: string | HTMLString | SlotString | RenderInstruction ): string { - if (typeof (chunk as any).type === 'string') { - const instruction = chunk as RenderInstruction; + if (isRenderInstruction(chunk)) { + const instruction = chunk; switch (instruction.type) { case 'directive': { const { hydration } = instruction; @@ -64,8 +65,8 @@ function stringifyChunk( let prescriptType: PrescriptType = needsHydrationScript ? 'both' : needsDirectiveScript - ? 'directive' - : null; + ? 'directive' + : null; if (prescriptType) { let prescripts = getPrescripts(result, prescriptType, hydration.directive); return markHTMLString(prescripts); @@ -86,27 +87,24 @@ function stringifyChunk( return renderAllHeadContent(result); } default: { - if (chunk instanceof Response) { - return ''; - } throw new Error(`Unknown chunk type: ${(chunk as any).type}`); } } - } else { - if (isSlotString(chunk as string)) { - let out = ''; - const c = chunk as SlotString; - if (c.instructions) { - for (const instr of c.instructions) { - out += stringifyChunk(result, instr); - } + } else if (chunk instanceof Response) { + return ''; + } else if (isSlotString(chunk as string)) { + let out = ''; + const c = chunk as SlotString; + if (c.instructions) { + for (const instr of c.instructions) { + out += stringifyChunk(result, instr); } - out += chunk.toString(); - return out; } - - return chunk.toString(); + out += chunk.toString(); + return out; } + + return chunk.toString(); } export function chunkToString(result: SSRResult, chunk: Exclude) { diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts index f78f11d51..5f61e68b5 100644 --- a/packages/astro/src/runtime/server/render/component.ts +++ b/packages/astro/src/runtime/server/render/component.ts @@ -4,7 +4,7 @@ import type { SSRLoadedRenderer, SSRResult, } from '../../../@types/astro'; -import type { RenderInstruction } from './types.js'; +import { createRenderInstruction, type RenderInstruction } from './instruction.js'; import { AstroError, AstroErrorData } from '../../../core/errors/index.js'; import { HTMLBytes, markHTMLString } from '../escape.js'; @@ -370,7 +370,7 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr destination.write(instruction); } } - destination.write({ type: 'directive', hydration }); + destination.write(createRenderInstruction({ type: 'directive', hydration })); destination.write(markHTMLString(renderElement('astro-island', island, false))); }, }; diff --git a/packages/astro/src/runtime/server/render/head.ts b/packages/astro/src/runtime/server/render/head.ts index 7bb38f07d..d56684ce5 100644 --- a/packages/astro/src/runtime/server/render/head.ts +++ b/packages/astro/src/runtime/server/render/head.ts @@ -1,7 +1,8 @@ import type { SSRResult } from '../../../@types/astro'; import { markHTMLString } from '../escape.js'; -import type { MaybeRenderHeadInstruction, RenderHeadInstruction } from './types'; +import { createRenderInstruction } from './instruction.js'; +import type { MaybeRenderHeadInstruction, RenderHeadInstruction } from './instruction.js'; import { renderElement } from './util.js'; // Filter out duplicate elements in our set @@ -45,7 +46,7 @@ export function renderAllHeadContent(result: SSRResult) { } export function* renderHead(): Generator { - yield { type: 'head' }; + yield createRenderInstruction({ type: 'head' }); } // This function is called by Astro components that do not contain a component @@ -55,5 +56,5 @@ export function* renderHead(): Generator { export function* maybeRenderHead(): Generator { // This is an instruction informing the page rendering that head might need rendering. // This allows the page to deduplicate head injections. - yield { type: 'maybe-head' }; + yield createRenderInstruction({ type: 'maybe-head' }); } diff --git a/packages/astro/src/runtime/server/render/index.ts b/packages/astro/src/runtime/server/render/index.ts index 70d63ca60..c7e39e70a 100644 --- a/packages/astro/src/runtime/server/render/index.ts +++ b/packages/astro/src/runtime/server/render/index.ts @@ -1,4 +1,5 @@ export type { AstroComponentFactory, AstroComponentInstance } from './astro/index'; +export type { RenderInstruction } from './instruction'; export { createHeadAndContent, renderTemplate, renderToString } from './astro/index.js'; export { Fragment, Renderer, chunkToByteArray, chunkToString } from './common.js'; export { renderComponent, renderComponentToString } from './component.js'; @@ -7,5 +8,4 @@ export { maybeRenderHead, renderHead } from './head.js'; export { renderPage } from './page.js'; export { renderSlot, renderSlotToString, type ComponentSlots } from './slot.js'; export { renderScriptElement, renderUniqueStylesheet } from './tags.js'; -export type { RenderInstruction } from './types'; export { addAttribute, defineScriptVars, voidElementNames } from './util.js'; diff --git a/packages/astro/src/runtime/server/render/instruction.ts b/packages/astro/src/runtime/server/render/instruction.ts new file mode 100644 index 000000000..5cda5cec9 --- /dev/null +++ b/packages/astro/src/runtime/server/render/instruction.ts @@ -0,0 +1,32 @@ +import type { HydrationMetadata } from '../hydration.js'; + +const RenderInstructionSymbol = Symbol.for('astro:render'); + +export type RenderDirectiveInstruction = { + type: 'directive'; + hydration: HydrationMetadata; +}; + +export type RenderHeadInstruction = { + type: 'head'; +}; + +export type MaybeRenderHeadInstruction = { + type: 'maybe-head'; +}; + +export type RenderInstruction = + | RenderDirectiveInstruction + | RenderHeadInstruction + | MaybeRenderHeadInstruction; + +export function createRenderInstruction(instruction: RenderDirectiveInstruction): RenderDirectiveInstruction; +export function createRenderInstruction(instruction: RenderHeadInstruction): RenderHeadInstruction; +export function createRenderInstruction(instruction: MaybeRenderHeadInstruction): MaybeRenderHeadInstruction; +export function createRenderInstruction(instruction: { type: string }): RenderInstruction { + return Object.defineProperty(instruction as RenderInstruction, RenderInstructionSymbol, { value: true }); +} + +export function isRenderInstruction(chunk: any): chunk is RenderInstruction { + return chunk && typeof chunk === 'object' && chunk[RenderInstructionSymbol]; +} diff --git a/packages/astro/src/runtime/server/render/slot.ts b/packages/astro/src/runtime/server/render/slot.ts index daae87a80..e887b19d2 100644 --- a/packages/astro/src/runtime/server/render/slot.ts +++ b/packages/astro/src/runtime/server/render/slot.ts @@ -1,6 +1,6 @@ import type { SSRResult } from '../../../@types/astro.js'; import type { renderTemplate } from './astro/render-template.js'; -import type { RenderInstruction } from './types.js'; +import type { RenderInstruction } from './instruction.js'; import { HTMLString, markHTMLString } from '../escape.js'; import { renderChild } from './any.js'; diff --git a/packages/astro/src/runtime/server/render/types.ts b/packages/astro/src/runtime/server/render/types.ts deleted file mode 100644 index 1c3a888db..000000000 --- a/packages/astro/src/runtime/server/render/types.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { HydrationMetadata } from '../hydration.js'; - -export type RenderDirectiveInstruction = { - type: 'directive'; - hydration: HydrationMetadata; -}; - -export type RenderHeadInstruction = { - type: 'head'; -}; - -export type MaybeRenderHeadInstruction = { - type: 'maybe-head'; -}; - -export type RenderInstruction = - | RenderDirectiveInstruction - | RenderHeadInstruction - | MaybeRenderHeadInstruction; diff --git a/packages/astro/test/units/render/chunk.test.js b/packages/astro/test/units/render/chunk.test.js new file mode 100644 index 000000000..b623f662f --- /dev/null +++ b/packages/astro/test/units/render/chunk.test.js @@ -0,0 +1,52 @@ +import { expect } from 'chai'; +import * as cheerio from 'cheerio'; +import { fileURLToPath } from 'node:url'; +import { createFs, createRequestAndResponse, runInContainer } from '../test-utils.js'; + +const root = new URL('../../fixtures/alias/', import.meta.url); + +describe('core/render chunk', () => { + it('does not throw on user object with type', async () => { + const fs = createFs( + { + '/src/pages/index.astro': ` + --- + const value = { type: 'foobar' } + --- +
{value}
+ `, + }, + root + ); + + await runInContainer( + { + fs, + inlineConfig: { + root: fileURLToPath(root), + logLevel: 'silent', + integrations: [], + }, + }, + async (container) => { + const { req, res, done, text } = createRequestAndResponse({ + method: 'GET', + url: '/', + }); + container.handle(req, res); + + await done; + try { + const html = await text(); + const $ = cheerio.load(html); + const target = $('#chunk'); + + expect(target).not.to.be.undefined; + expect(target.text()).to.equal('[object Object]'); + } catch (e) { + expect(false).to.be.ok; + } + } + ); + }); +}); From 821918bc0ccf8a706da2194456c625d55dee989c Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Fri, 18 Aug 2023 12:29:31 +0000 Subject: [PATCH 09/20] [ci] format --- packages/astro/src/runtime/server/render/common.ts | 6 +++--- packages/astro/src/runtime/server/render/head.ts | 2 +- packages/astro/src/runtime/server/render/index.ts | 2 +- .../astro/src/runtime/server/render/instruction.ts | 14 ++++++++++---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/packages/astro/src/runtime/server/render/common.ts b/packages/astro/src/runtime/server/render/common.ts index a49bb2c9d..d4c7a1242 100644 --- a/packages/astro/src/runtime/server/render/common.ts +++ b/packages/astro/src/runtime/server/render/common.ts @@ -1,7 +1,6 @@ import type { SSRResult } from '../../../@types/astro'; import type { RenderInstruction } from './instruction.js'; -import { isRenderInstruction } from './instruction.js'; import { HTMLBytes, HTMLString, markHTMLString } from '../escape.js'; import { determineIfNeedsHydrationScript, @@ -10,6 +9,7 @@ import { type PrescriptType, } from '../scripts.js'; import { renderAllHeadContent } from './head.js'; +import { isRenderInstruction } from './instruction.js'; import { isSlotString, type SlotString } from './slot.js'; /** @@ -65,8 +65,8 @@ function stringifyChunk( let prescriptType: PrescriptType = needsHydrationScript ? 'both' : needsDirectiveScript - ? 'directive' - : null; + ? 'directive' + : null; if (prescriptType) { let prescripts = getPrescripts(result, prescriptType, hydration.directive); return markHTMLString(prescripts); diff --git a/packages/astro/src/runtime/server/render/head.ts b/packages/astro/src/runtime/server/render/head.ts index d56684ce5..d2cb43fa3 100644 --- a/packages/astro/src/runtime/server/render/head.ts +++ b/packages/astro/src/runtime/server/render/head.ts @@ -1,8 +1,8 @@ import type { SSRResult } from '../../../@types/astro'; import { markHTMLString } from '../escape.js'; -import { createRenderInstruction } from './instruction.js'; import type { MaybeRenderHeadInstruction, RenderHeadInstruction } from './instruction.js'; +import { createRenderInstruction } from './instruction.js'; import { renderElement } from './util.js'; // Filter out duplicate elements in our set diff --git a/packages/astro/src/runtime/server/render/index.ts b/packages/astro/src/runtime/server/render/index.ts index c7e39e70a..da83879e0 100644 --- a/packages/astro/src/runtime/server/render/index.ts +++ b/packages/astro/src/runtime/server/render/index.ts @@ -1,10 +1,10 @@ export type { AstroComponentFactory, AstroComponentInstance } from './astro/index'; -export type { RenderInstruction } from './instruction'; export { createHeadAndContent, renderTemplate, renderToString } from './astro/index.js'; export { Fragment, Renderer, chunkToByteArray, chunkToString } from './common.js'; export { renderComponent, renderComponentToString } from './component.js'; export { renderHTMLElement } from './dom.js'; export { maybeRenderHead, renderHead } from './head.js'; +export type { RenderInstruction } from './instruction'; export { renderPage } from './page.js'; export { renderSlot, renderSlotToString, type ComponentSlots } from './slot.js'; export { renderScriptElement, renderUniqueStylesheet } from './tags.js'; diff --git a/packages/astro/src/runtime/server/render/instruction.ts b/packages/astro/src/runtime/server/render/instruction.ts index 5cda5cec9..d8feacff9 100644 --- a/packages/astro/src/runtime/server/render/instruction.ts +++ b/packages/astro/src/runtime/server/render/instruction.ts @@ -20,13 +20,19 @@ export type RenderInstruction = | RenderHeadInstruction | MaybeRenderHeadInstruction; -export function createRenderInstruction(instruction: RenderDirectiveInstruction): RenderDirectiveInstruction; +export function createRenderInstruction( + instruction: RenderDirectiveInstruction +): RenderDirectiveInstruction; export function createRenderInstruction(instruction: RenderHeadInstruction): RenderHeadInstruction; -export function createRenderInstruction(instruction: MaybeRenderHeadInstruction): MaybeRenderHeadInstruction; +export function createRenderInstruction( + instruction: MaybeRenderHeadInstruction +): MaybeRenderHeadInstruction; export function createRenderInstruction(instruction: { type: string }): RenderInstruction { - return Object.defineProperty(instruction as RenderInstruction, RenderInstructionSymbol, { value: true }); + return Object.defineProperty(instruction as RenderInstruction, RenderInstructionSymbol, { + value: true, + }); } export function isRenderInstruction(chunk: any): chunk is RenderInstruction { - return chunk && typeof chunk === 'object' && chunk[RenderInstructionSymbol]; + return chunk && typeof chunk === 'object' && chunk[RenderInstructionSymbol]; } From 5c190d06f1cec6a4ecd2a1fbfc77c498c91b9d2c Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Fri, 18 Aug 2023 07:31:52 -0700 Subject: [PATCH 10/20] [ci] release (#8096) Co-authored-by: github-actions[bot] --- .changeset/big-elephants-drive.md | 5 -- .changeset/brave-cheetahs-float.md | 5 -- .changeset/brown-wolves-tan.md | 5 -- .changeset/eleven-wasps-teach.md | 5 -- .changeset/itchy-pants-grin.md | 5 -- .changeset/lovely-walls-call.md | 5 -- .changeset/many-actors-flash.md | 5 -- .changeset/orange-foxes-care.md | 5 -- .changeset/popular-carrots-sneeze.md | 5 -- .changeset/popular-planes-cover.md | 5 -- .changeset/silent-baboons-juggle.md | 5 -- .changeset/small-nails-try.md | 5 -- .changeset/sour-frogs-shout.md | 27 ------- .changeset/wet-foxes-sleep.md | 5 -- .changeset/yellow-snakes-jam.md | 21 ------ examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/deno/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 8 +-- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 4 +- examples/framework-solid/package.json | 4 +- examples/framework-svelte/package.json | 4 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 4 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 44 ++++++++++++ packages/astro/package.json | 2 +- packages/create-astro/CHANGELOG.md | 8 +++ packages/create-astro/package.json | 2 +- packages/integrations/cloudflare/package.json | 2 +- packages/integrations/deno/package.json | 2 +- packages/integrations/image/package.json | 2 +- packages/integrations/markdoc/package.json | 2 +- packages/integrations/netlify/package.json | 2 +- packages/integrations/node/package.json | 2 +- packages/integrations/react/CHANGELOG.md | 22 ++++++ packages/integrations/react/package.json | 2 +- packages/integrations/solid/CHANGELOG.md | 6 ++ packages/integrations/solid/package.json | 2 +- packages/integrations/svelte/CHANGELOG.md | 9 +++ packages/integrations/svelte/package.json | 4 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 9 +++ packages/integrations/vercel/package.json | 4 +- packages/integrations/vue/package.json | 2 +- pnpm-lock.yaml | 72 ++++++++++--------- 63 files changed, 186 insertions(+), 197 deletions(-) delete mode 100644 .changeset/big-elephants-drive.md delete mode 100644 .changeset/brave-cheetahs-float.md delete mode 100644 .changeset/brown-wolves-tan.md delete mode 100644 .changeset/eleven-wasps-teach.md delete mode 100644 .changeset/itchy-pants-grin.md delete mode 100644 .changeset/lovely-walls-call.md delete mode 100644 .changeset/many-actors-flash.md delete mode 100644 .changeset/orange-foxes-care.md delete mode 100644 .changeset/popular-carrots-sneeze.md delete mode 100644 .changeset/popular-planes-cover.md delete mode 100644 .changeset/silent-baboons-juggle.md delete mode 100644 .changeset/small-nails-try.md delete mode 100644 .changeset/sour-frogs-shout.md delete mode 100644 .changeset/wet-foxes-sleep.md delete mode 100644 .changeset/yellow-snakes-jam.md diff --git a/.changeset/big-elephants-drive.md b/.changeset/big-elephants-drive.md deleted file mode 100644 index 2d760f715..000000000 --- a/.changeset/big-elephants-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -Filter unknown `class` prop warnings diff --git a/.changeset/brave-cheetahs-float.md b/.changeset/brave-cheetahs-float.md deleted file mode 100644 index 84825ce0f..000000000 --- a/.changeset/brave-cheetahs-float.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Do not throw Error when users pass an object with a "type" property diff --git a/.changeset/brown-wolves-tan.md b/.changeset/brown-wolves-tan.md deleted file mode 100644 index 4f11f4534..000000000 --- a/.changeset/brown-wolves-tan.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'create-astro': patch ---- - -Update 'dev' command for Bun users diff --git a/.changeset/eleven-wasps-teach.md b/.changeset/eleven-wasps-teach.md deleted file mode 100644 index 3a0993f49..000000000 --- a/.changeset/eleven-wasps-teach.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Ensure dotfiles are cleaned during static builds diff --git a/.changeset/itchy-pants-grin.md b/.changeset/itchy-pants-grin.md deleted file mode 100644 index 2ab292f27..000000000 --- a/.changeset/itchy-pants-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/vercel': patch ---- - -Update image support to work with latest version of Astro diff --git a/.changeset/lovely-walls-call.md b/.changeset/lovely-walls-call.md deleted file mode 100644 index 408fa00c5..000000000 --- a/.changeset/lovely-walls-call.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improve fidelity of time stats when running `astro build` diff --git a/.changeset/many-actors-flash.md b/.changeset/many-actors-flash.md deleted file mode 100644 index 92f70c55a..000000000 --- a/.changeset/many-actors-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fix a handful of edge cases with prerendered 404/500 pages diff --git a/.changeset/orange-foxes-care.md b/.changeset/orange-foxes-care.md deleted file mode 100644 index 2136a95a9..000000000 --- a/.changeset/orange-foxes-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/solid-js': patch ---- - -Update `babel-preset-solid` dependency to `^1.7.7` diff --git a/.changeset/popular-carrots-sneeze.md b/.changeset/popular-carrots-sneeze.md deleted file mode 100644 index 0f914891d..000000000 --- a/.changeset/popular-carrots-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Open to configured `base` when `astro dev --open` runs diff --git a/.changeset/popular-planes-cover.md b/.changeset/popular-planes-cover.md deleted file mode 100644 index c379a7edc..000000000 --- a/.changeset/popular-planes-cover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -ViewTransition: bug fix for lost scroll position in browser history diff --git a/.changeset/silent-baboons-juggle.md b/.changeset/silent-baboons-juggle.md deleted file mode 100644 index bd57c6a8a..000000000 --- a/.changeset/silent-baboons-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'create-astro': patch ---- - -Verify internet connection and that `--template` exists before continuing diff --git a/.changeset/small-nails-try.md b/.changeset/small-nails-try.md deleted file mode 100644 index 3f6f591f1..000000000 --- a/.changeset/small-nails-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -On back navigation only animate view transitions that were animated going forward. diff --git a/.changeset/sour-frogs-shout.md b/.changeset/sour-frogs-shout.md deleted file mode 100644 index 9006914f1..000000000 --- a/.changeset/sour-frogs-shout.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'astro': patch ---- - -Added support for optimizing remote images from authorized sources when using `astro:assets`. This comes with two new parameters to specify which domains (`image.domains`) and host patterns (`image.remotePatterns`) are authorized for remote images. - -For example, the following configuration will only allow remote images from `astro.build` to be optimized: - -```ts -// astro.config.mjs -export default defineConfig({ - image: { - domains: ["astro.build"], - } -}); -``` - -The following configuration will only allow remote images from HTTPS hosts: - -```ts -// astro.config.mjs -export default defineConfig({ - image: { - remotePatterns: [{ protocol: "https" }], - } -}); -``` diff --git a/.changeset/wet-foxes-sleep.md b/.changeset/wet-foxes-sleep.md deleted file mode 100644 index 7d81195f8..000000000 --- a/.changeset/wet-foxes-sleep.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -fix: reinsert attribute to specify direction of ViewTransition (forward / back) diff --git a/.changeset/yellow-snakes-jam.md b/.changeset/yellow-snakes-jam.md deleted file mode 100644 index 87c4d1da7..000000000 --- a/.changeset/yellow-snakes-jam.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@astrojs/react': minor ---- - -Optionally parse React slots as React children. - -This adds a new configuration option for the React integration `experimentalReactChildren`: - -```js -export default { - integrations: [ - react({ - experimentalReactChildren: true, - }) - ] -} -``` - -With this enabled, children passed to React from Astro components via the default slot are parsed as React components. - -This enables better compatibility with certain React components which manipulate their children. diff --git a/examples/basics/package.json b/examples/basics/package.json index b6513759e..47598d43b 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.9" + "astro": "^2.10.10" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index a3669469f..ccdbedb20 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.2", - "astro": "^2.10.9" + "astro": "^2.10.10" } } diff --git a/examples/component/package.json b/examples/component/package.json index ee1151ea1..8ac6a6b9e 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^2.10.9" + "astro": "^2.10.10" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/deno/package.json b/examples/deno/package.json index 410082241..1596f1804 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.9" + "astro": "^2.10.10" }, "devDependencies": { "@astrojs/deno": "^4.3.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 75113f4e3..44ebe9c8f 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.9" + "astro": "^2.10.10" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index d18731fa5..896e6ccc1 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.9", + "astro": "^2.10.10", "lit": "^2.7.5" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 9405a65b8..640b1a61d 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@astrojs/preact": "^2.2.2", - "@astrojs/react": "^2.2.2", - "@astrojs/solid-js": "^2.2.0", - "@astrojs/svelte": "^3.1.0", + "@astrojs/react": "^2.3.0", + "@astrojs/solid-js": "^2.2.1", + "@astrojs/svelte": "^3.1.1", "@astrojs/vue": "^2.2.1", - "astro": "^2.10.9", + "astro": "^2.10.10", "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 503a2b22b..3940efbe9 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.9", + "astro": "^2.10.10", "preact": "^10.15.1" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 0110bb53b..fd4eade55 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^2.2.2", + "@astrojs/react": "^2.3.0", "@types/react": "^18.2.13", "@types/react-dom": "^18.2.6", - "astro": "^2.10.9", + "astro": "^2.10.10", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 302fa3abc..9566b6bc5 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/solid-js": "^2.2.0", - "astro": "^2.10.9", + "@astrojs/solid-js": "^2.2.1", + "astro": "^2.10.10", "solid-js": "^1.7.6" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 5f52209a2..3582b9556 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/svelte": "^3.1.0", - "astro": "^2.10.9", + "@astrojs/svelte": "^3.1.1", + "astro": "^2.10.10", "svelte": "^3.59.1" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index f06c2140a..25a100a0e 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.9", + "astro": "^2.10.10", "vue": "^3.3.4" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index d68e7e3e3..34c0e9ecf 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^5.3.4", - "astro": "^2.10.9" + "astro": "^2.10.10" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 05c0a6c4c..d02b4bf16 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^2.10.9" + "astro": "^2.10.10" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 30a61849a..d2af3dc91 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^5.3.4", - "astro": "^2.10.9", + "astro": "^2.10.10", "html-minifier": "^4.0.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index e8e04fd77..e457e399e 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.9" + "astro": "^2.10.10" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index e72d52d6f..33bc78997 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.9" + "astro": "^2.10.10" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index d87ef12b4..a3767fc02 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.9" + "astro": "^2.10.10" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index d25c37e23..5ebdf2ac2 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "@astrojs/node": "^5.3.4", - "@astrojs/svelte": "^3.1.0", - "astro": "^2.10.9", + "@astrojs/svelte": "^3.1.1", + "astro": "^2.10.10", "svelte": "^3.59.1" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index e60ddd132..7714fb270 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.9" + "astro": "^2.10.10" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index ad5fd3fe8..499638417 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.9", + "astro": "^2.10.10", "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 3487ecbe4..2bf4622ef 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.9" + "astro": "^2.10.10" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 5472ac38e..cf9de5325 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.9", + "astro": "^2.10.10", "preact": "^10.15.1" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index aa1d589d3..b16b1f7e4 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.9", + "astro": "^2.10.10", "nanostores": "^0.8.1", "preact": "^10.15.1" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index e0195c8b7..a3d14ebbf 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.9", + "astro": "^2.10.10", "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 cb464375d..064ab438b 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.9", + "astro": "^2.10.10", "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 8e3a2443b..1f8a6813b 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^2.10.9", + "astro": "^2.10.10", "vitest": "^0.31.4" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index e3865fe33..f52131a66 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,49 @@ # astro +## 2.10.10 + +### Patch Changes + +- [#8127](https://github.com/withastro/astro/pull/8127) [`b12c8471f`](https://github.com/withastro/astro/commit/b12c8471f413c0291de4a9c444bfe3079a192034) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Do not throw Error when users pass an object with a "type" property + +- [#8092](https://github.com/withastro/astro/pull/8092) [`7177f7579`](https://github.com/withastro/astro/commit/7177f7579b6e866f0fd895b3fd079d8ba330b1a9) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Ensure dotfiles are cleaned during static builds + +- [#8122](https://github.com/withastro/astro/pull/8122) [`fa6b68a77`](https://github.com/withastro/astro/commit/fa6b68a776c5b3cc8167fc042b7d305234ebcff9) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Improve fidelity of time stats when running `astro build` + +- [#8070](https://github.com/withastro/astro/pull/8070) [`097a8e4e9`](https://github.com/withastro/astro/commit/097a8e4e916c7df18eafdaa6c8d6ce2991c17ab6) Thanks [@lilnasy](https://github.com/lilnasy)! - Fix a handful of edge cases with prerendered 404/500 pages + +- [#8123](https://github.com/withastro/astro/pull/8123) [`1f6497c33`](https://github.com/withastro/astro/commit/1f6497c3341231ee76fc4538cfe7624cf4721d56) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Open to configured `base` when `astro dev --open` runs + +- [#8105](https://github.com/withastro/astro/pull/8105) [`0e0fa605d`](https://github.com/withastro/astro/commit/0e0fa605d109cc91e08a1ae1cc560ea240fe631b) Thanks [@martrapp](https://github.com/martrapp)! - ViewTransition: bug fix for lost scroll position in browser history + +- [#8116](https://github.com/withastro/astro/pull/8116) [`b290f0a99`](https://github.com/withastro/astro/commit/b290f0a99778a9b9c1045f3cd06b6aee934d7c03) Thanks [@martrapp](https://github.com/martrapp)! - On back navigation only animate view transitions that were animated going forward. + +- [#7778](https://github.com/withastro/astro/pull/7778) [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3) Thanks [@y-nk](https://github.com/y-nk)! - Added support for optimizing remote images from authorized sources when using `astro:assets`. This comes with two new parameters to specify which domains (`image.domains`) and host patterns (`image.remotePatterns`) are authorized for remote images. + + For example, the following configuration will only allow remote images from `astro.build` to be optimized: + + ```ts + // astro.config.mjs + export default defineConfig({ + image: { + domains: ['astro.build'], + }, + }); + ``` + + The following configuration will only allow remote images from HTTPS hosts: + + ```ts + // astro.config.mjs + export default defineConfig({ + image: { + remotePatterns: [{ protocol: 'https' }], + }, + }); + ``` + +- [#8109](https://github.com/withastro/astro/pull/8109) [`da6e3da1c`](https://github.com/withastro/astro/commit/da6e3da1ce00bed625fc568cfe4693713448e93f) Thanks [@martrapp](https://github.com/martrapp)! - fix: reinsert attribute to specify direction of ViewTransition (forward / back) + ## 2.10.9 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index c79eccc60..f8ad63456 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "2.10.9", + "version": "2.10.10", "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/create-astro/CHANGELOG.md b/packages/create-astro/CHANGELOG.md index 84611e1f2..f555a98b0 100644 --- a/packages/create-astro/CHANGELOG.md +++ b/packages/create-astro/CHANGELOG.md @@ -1,5 +1,13 @@ # create-astro +## 3.2.2 + +### Patch Changes + +- [#7944](https://github.com/withastro/astro/pull/7944) [`dff0f0f8d`](https://github.com/withastro/astro/commit/dff0f0f8ddd531c5d92a90ac00fdb86d71f77509) Thanks [@colinhacks](https://github.com/colinhacks)! - Update 'dev' command for Bun users + +- [#8102](https://github.com/withastro/astro/pull/8102) [`e6e1de4f0`](https://github.com/withastro/astro/commit/e6e1de4f08ddba3a7703136a81f275de1976dc9e) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Verify internet connection and that `--template` exists before continuing + ## 3.2.1 ### Patch Changes diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index a62a0eaed..39bd0f315 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -1,6 +1,6 @@ { "name": "create-astro", - "version": "3.2.1", + "version": "3.2.2", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index 128083ae6..b2e059139 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -45,7 +45,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^2.10.9" + "astro": "workspace:^2.10.10" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 890780a91..749f1f532 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.9" + "astro": "workspace:^2.10.10" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index 9cb47b08c..7e2afdb56 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.9", + "astro": "workspace:^2.10.10", "sharp": ">=0.31.0" }, "peerDependenciesMeta": { diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index e60bd7aef..4750e2ec6 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.9" + "astro": "workspace:^2.10.10" }, "devDependencies": { "@astrojs/markdown-remark": "^2.2.1", diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 048e0e1f2..2818546d6 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -45,7 +45,7 @@ "esbuild": "^0.15.18" }, "peerDependencies": { - "astro": "workspace:^2.10.9" + "astro": "workspace:^2.10.10" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index 9247e82c7..fd6a69e82 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -38,7 +38,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^2.10.9" + "astro": "workspace:^2.10.10" }, "devDependencies": { "@types/node": "^18.16.18", diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index c6ccf491c..9471ae8cb 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,27 @@ # @astrojs/react +## 2.3.0 + +### Minor Changes + +- [#8082](https://github.com/withastro/astro/pull/8082) [`16a3fdf93`](https://github.com/withastro/astro/commit/16a3fdf93165a1a0404c1db0973871345b2c591b) Thanks [@matthewp](https://github.com/matthewp)! - Optionally parse React slots as React children. + + This adds a new configuration option for the React integration `experimentalReactChildren`: + + ```js + export default { + integrations: [ + react({ + experimentalReactChildren: true, + }), + ], + }; + ``` + + With this enabled, children passed to React from Astro components via the default slot are parsed as React components. + + This enables better compatibility with certain React components which manipulate their children. + ## 2.2.2 ### Patch Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index e238e21b9..23b19447e 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": "2.2.2", + "version": "2.3.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/solid/CHANGELOG.md b/packages/integrations/solid/CHANGELOG.md index a23dd7f7a..fdd813048 100644 --- a/packages/integrations/solid/CHANGELOG.md +++ b/packages/integrations/solid/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/solid-js +## 2.2.1 + +### Patch Changes + +- [#8107](https://github.com/withastro/astro/pull/8107) [`5b4b78245`](https://github.com/withastro/astro/commit/5b4b782451ba9a7d685d56990b471740616e9610) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Update `babel-preset-solid` dependency to `^1.7.7` + ## 2.2.0 ### Minor Changes diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index 991ff579f..4e3fef843 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/solid-js", - "version": "2.2.0", + "version": "2.2.1", "description": "Use Solid components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md index 4f13fe9c1..8a7bd4344 100644 --- a/packages/integrations/svelte/CHANGELOG.md +++ b/packages/integrations/svelte/CHANGELOG.md @@ -1,5 +1,14 @@ # @astrojs/svelte +## 3.1.1 + +### Patch Changes + +- [#7291](https://github.com/withastro/astro/pull/7291) [`0bf2cca5d`](https://github.com/withastro/astro/commit/0bf2cca5d7fe1fb025feae00ab3c12ed80f9ea9a) Thanks [@kitschpatrol](https://github.com/kitschpatrol)! - Filter unknown `class` prop warnings + +- Updated dependencies [[`b12c8471f`](https://github.com/withastro/astro/commit/b12c8471f413c0291de4a9c444bfe3079a192034), [`7177f7579`](https://github.com/withastro/astro/commit/7177f7579b6e866f0fd895b3fd079d8ba330b1a9), [`fa6b68a77`](https://github.com/withastro/astro/commit/fa6b68a776c5b3cc8167fc042b7d305234ebcff9), [`097a8e4e9`](https://github.com/withastro/astro/commit/097a8e4e916c7df18eafdaa6c8d6ce2991c17ab6), [`1f6497c33`](https://github.com/withastro/astro/commit/1f6497c3341231ee76fc4538cfe7624cf4721d56), [`0e0fa605d`](https://github.com/withastro/astro/commit/0e0fa605d109cc91e08a1ae1cc560ea240fe631b), [`b290f0a99`](https://github.com/withastro/astro/commit/b290f0a99778a9b9c1045f3cd06b6aee934d7c03), [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3), [`da6e3da1c`](https://github.com/withastro/astro/commit/da6e3da1ce00bed625fc568cfe4693713448e93f)]: + - astro@2.10.10 + ## 3.1.0 ### Minor Changes diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 3ff627cc8..0d5e5b8ff 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/svelte", - "version": "3.1.0", + "version": "3.1.1", "description": "Use Svelte components within Astro", "type": "module", "types": "./dist/index.d.ts", @@ -48,7 +48,7 @@ "vite": "^4.4.6" }, "peerDependencies": { - "astro": "workspace:^2.10.9", + "astro": "workspace:^2.10.10", "svelte": "^3.55.0 || ^4.0.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 726d4f83f..d2aee1e95 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.9", + "astro": "workspace:^2.10.10", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index d25560453..e60fed4b0 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,14 @@ # @astrojs/vercel +## 3.8.2 + +### Patch Changes + +- [#7778](https://github.com/withastro/astro/pull/7778) [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3) Thanks [@y-nk](https://github.com/y-nk)! - Update image support to work with latest version of Astro + +- Updated dependencies [[`b12c8471f`](https://github.com/withastro/astro/commit/b12c8471f413c0291de4a9c444bfe3079a192034), [`7177f7579`](https://github.com/withastro/astro/commit/7177f7579b6e866f0fd895b3fd079d8ba330b1a9), [`fa6b68a77`](https://github.com/withastro/astro/commit/fa6b68a776c5b3cc8167fc042b7d305234ebcff9), [`097a8e4e9`](https://github.com/withastro/astro/commit/097a8e4e916c7df18eafdaa6c8d6ce2991c17ab6), [`1f6497c33`](https://github.com/withastro/astro/commit/1f6497c3341231ee76fc4538cfe7624cf4721d56), [`0e0fa605d`](https://github.com/withastro/astro/commit/0e0fa605d109cc91e08a1ae1cc560ea240fe631b), [`b290f0a99`](https://github.com/withastro/astro/commit/b290f0a99778a9b9c1045f3cd06b6aee934d7c03), [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3), [`da6e3da1c`](https://github.com/withastro/astro/commit/da6e3da1ce00bed625fc568cfe4693713448e93f)]: + - astro@2.10.10 + ## 3.8.1 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 9c5891cd9..bfd6f2e3e 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.1", + "version": "3.8.2", "type": "module", "author": "withastro", "license": "MIT", @@ -61,7 +61,7 @@ "web-vitals": "^3.3.2" }, "peerDependencies": { - "astro": "workspace:^2.10.9" + "astro": "workspace:^2.10.10" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.2", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 8319527e3..8a9c69eea 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.9", + "astro": "workspace:^2.10.10", "vue": "^3.2.30" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15bc70591..ccaa11fec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,7 +128,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/blog: @@ -143,19 +143,19 @@ importers: specifier: ^2.0.2 version: link:../../packages/integrations/sitemap astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/deno: dependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro devDependencies: '@astrojs/deno': @@ -174,7 +174,7 @@ importers: specifier: ^3.12.2 version: 3.12.2 astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/framework-lit: @@ -186,7 +186,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro lit: specifier: ^2.7.5 @@ -198,19 +198,19 @@ importers: specifier: ^2.2.2 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^2.2.2 + specifier: ^2.3.0 version: link:../../packages/integrations/react '@astrojs/solid-js': - specifier: ^2.2.0 + specifier: ^2.2.1 version: link:../../packages/integrations/solid '@astrojs/svelte': - specifier: ^3.1.0 + specifier: ^3.1.1 version: link:../../packages/integrations/svelte '@astrojs/vue': specifier: ^2.2.1 version: link:../../packages/integrations/vue astro: - specifier: ^2.10.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 version: link:../../packages/astro preact: specifier: ^10.15.1 @@ -249,7 +249,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^2.2.2 + specifier: ^2.3.0 version: link:../../packages/integrations/react '@types/react': specifier: ^18.2.13 @@ -258,7 +258,7 @@ importers: specifier: ^18.2.6 version: 18.2.6 astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -270,10 +270,10 @@ importers: examples/framework-solid: dependencies: '@astrojs/solid-js': - specifier: ^2.2.0 + specifier: ^2.2.1 version: link:../../packages/integrations/solid astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro solid-js: specifier: ^1.7.6 @@ -282,10 +282,10 @@ importers: examples/framework-svelte: dependencies: '@astrojs/svelte': - specifier: ^3.1.0 + specifier: ^3.1.1 version: link:../../packages/integrations/svelte astro: - specifier: ^2.10.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 version: link:../../packages/astro vue: specifier: ^3.3.4 @@ -309,13 +309,13 @@ importers: specifier: ^5.3.4 version: link:../../packages/integrations/node astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/middleware: @@ -324,7 +324,7 @@ importers: specifier: ^5.3.4 version: link:../../packages/integrations/node astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,19 +333,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro examples/ssr: @@ -354,10 +354,10 @@ importers: specifier: ^5.3.4 version: link:../../packages/integrations/node '@astrojs/svelte': - specifier: ^3.1.0 + specifier: ^3.1.1 version: link:../../packages/integrations/svelte astro: - specifier: ^2.10.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 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.9 + specifier: ^2.10.10 version: link:../../packages/astro autoprefixer: specifier: ^10.4.14 @@ -462,7 +462,7 @@ importers: examples/with-vite-plugin-pwa: dependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro vite-plugin-pwa: specifier: 0.14.7 @@ -474,7 +474,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^2.10.9 + specifier: ^2.10.10 version: link:../../packages/astro vitest: specifier: ^0.31.4 @@ -18566,21 +18566,25 @@ packages: file:packages/astro/test/fixtures/css-assets/packages/font-awesome: resolution: {directory: packages/astro/test/fixtures/css-assets/packages/font-awesome, type: directory} name: '@test/astro-font-awesome-package' + version: 0.0.1 dev: false file:packages/astro/test/fixtures/multiple-renderers/renderers/one: resolution: {directory: packages/astro/test/fixtures/multiple-renderers/renderers/one, type: directory} name: '@test/astro-renderer-one' + version: 1.0.0 dev: false file:packages/astro/test/fixtures/multiple-renderers/renderers/two: resolution: {directory: packages/astro/test/fixtures/multiple-renderers/renderers/two, type: directory} name: '@test/astro-renderer-two' + version: 1.0.0 dev: false file:packages/astro/test/fixtures/solid-component/deps/solid-jsx-component: resolution: {directory: packages/astro/test/fixtures/solid-component/deps/solid-jsx-component, type: directory} name: '@test/solid-jsx-component' + version: 0.0.0 dependencies: solid-js: 1.7.6 dev: false From 8c0a4ed106efeda286f0aae8b959008f9462b5ec Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 18 Aug 2023 10:26:07 -0500 Subject: [PATCH 11/20] fix(react): add missing export (#8137) --- .changeset/kind-bears-pretend.md | 5 +++++ packages/integrations/react/package.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/kind-bears-pretend.md diff --git a/.changeset/kind-bears-pretend.md b/.changeset/kind-bears-pretend.md new file mode 100644 index 000000000..92f0374a1 --- /dev/null +++ b/.changeset/kind-bears-pretend.md @@ -0,0 +1,5 @@ +--- +'@astrojs/react': patch +--- + +Fix missing export for new `experimentalReactChildren` option diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 23b19447e..3b4e015e2 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -26,7 +26,8 @@ "./server.js": "./server.js", "./server-v17.js": "./server-v17.js", "./package.json": "./package.json", - "./jsx-runtime": "./jsx-runtime.js" + "./jsx-runtime": "./jsx-runtime.js", + "./vnode-children.js": "./vnode-children.js" }, "files": [ "dist", From 97c8760d78ffd172149f7776442725861576fba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Alves?= <71379045+andremralves@users.noreply.github.com> Date: Fri, 18 Aug 2023 12:27:44 -0300 Subject: [PATCH 12/20] Fix 404 response leading to an infinite loop when there is no 404 page (#8136) * fix: 404 response leads to infinite loop * chore: changeset --------- Co-authored-by: Nate Moore --- .changeset/lemon-comics-jump.md | 5 +++++ packages/astro/src/vite-plugin-astro-server/route.ts | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/lemon-comics-jump.md diff --git a/.changeset/lemon-comics-jump.md b/.changeset/lemon-comics-jump.md new file mode 100644 index 000000000..f2c9255f3 --- /dev/null +++ b/.changeset/lemon-comics-jump.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix 404 response leading to an infinite loop when there is no 404 page. diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts index f58d248a3..f387d07a4 100644 --- a/packages/astro/src/vite-plugin-astro-server/route.ts +++ b/packages/astro/src/vite-plugin-astro-server/route.ts @@ -259,7 +259,7 @@ export async function handleRoute({ await writeWebResponse(incomingResponse, response); } } else { - if (result.status === 404) { + if (result.status === 404 && has404Route(manifestData)) { const fourOhFourRoute = await matchRoute('/404', env, manifestData); return handleRoute({ ...options, @@ -380,3 +380,7 @@ function getStatus(matchedRoute?: MatchedRoute): 404 | 500 | undefined { if (matchedRoute.route.route === '/404') return 404; if (matchedRoute.route.route === '/500') return 500; } + +function has404Route(manifest: ManifestData): RouteData | undefined { + return manifest.routes.find((route) => route.route === '/404') +} From ae766f31fe71c0a1d6d91225c8a10a9a6f60565a Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Fri, 18 Aug 2023 15:30:30 +0000 Subject: [PATCH 13/20] [ci] format --- packages/astro/src/vite-plugin-astro-server/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts index f387d07a4..fa9941168 100644 --- a/packages/astro/src/vite-plugin-astro-server/route.ts +++ b/packages/astro/src/vite-plugin-astro-server/route.ts @@ -382,5 +382,5 @@ function getStatus(matchedRoute?: MatchedRoute): 404 | 500 | undefined { } function has404Route(manifest: ManifestData): RouteData | undefined { - return manifest.routes.find((route) => route.route === '/404') + return manifest.routes.find((route) => route.route === '/404'); } From e3c030e5d3bef916bc5319327b0c978a355031e3 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Fri, 18 Aug 2023 08:36:25 -0700 Subject: [PATCH 14/20] [ci] release (#8138) Co-authored-by: github-actions[bot] --- .changeset/kind-bears-pretend.md | 5 -- .changeset/lemon-comics-jump.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/deno/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 4 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 4 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 6 ++ packages/astro/package.json | 2 +- packages/integrations/cloudflare/package.json | 2 +- packages/integrations/deno/package.json | 2 +- packages/integrations/image/package.json | 2 +- packages/integrations/markdoc/package.json | 2 +- packages/integrations/netlify/package.json | 2 +- packages/integrations/node/package.json | 2 +- packages/integrations/react/CHANGELOG.md | 6 ++ packages/integrations/react/package.json | 2 +- packages/integrations/svelte/package.json | 2 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/package.json | 2 +- packages/integrations/vue/package.json | 2 +- pnpm-lock.yaml | 58 +++++++++---------- 44 files changed, 82 insertions(+), 80 deletions(-) delete mode 100644 .changeset/kind-bears-pretend.md delete mode 100644 .changeset/lemon-comics-jump.md diff --git a/.changeset/kind-bears-pretend.md b/.changeset/kind-bears-pretend.md deleted file mode 100644 index 92f0374a1..000000000 --- a/.changeset/kind-bears-pretend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/react': patch ---- - -Fix missing export for new `experimentalReactChildren` option diff --git a/.changeset/lemon-comics-jump.md b/.changeset/lemon-comics-jump.md deleted file mode 100644 index f2c9255f3..000000000 --- a/.changeset/lemon-comics-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix 404 response leading to an infinite loop when there is no 404 page. diff --git a/examples/basics/package.json b/examples/basics/package.json index 47598d43b..327a7e527 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.10" + "astro": "^2.10.11" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index ccdbedb20..99c9c062c 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.2", - "astro": "^2.10.10" + "astro": "^2.10.11" } } diff --git a/examples/component/package.json b/examples/component/package.json index 8ac6a6b9e..53bc84264 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^2.10.10" + "astro": "^2.10.11" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/deno/package.json b/examples/deno/package.json index 1596f1804..7719618f2 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.10" + "astro": "^2.10.11" }, "devDependencies": { "@astrojs/deno": "^4.3.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 44ebe9c8f..00b806cb5 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.10" + "astro": "^2.10.11" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 896e6ccc1..461e44cff 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.10", + "astro": "^2.10.11", "lit": "^2.7.5" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 640b1a61d..46fb34b20 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@astrojs/preact": "^2.2.2", - "@astrojs/react": "^2.3.0", + "@astrojs/react": "^2.3.1", "@astrojs/solid-js": "^2.2.1", "@astrojs/svelte": "^3.1.1", "@astrojs/vue": "^2.2.1", - "astro": "^2.10.10", + "astro": "^2.10.11", "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 3940efbe9..133b890cd 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.10", + "astro": "^2.10.11", "preact": "^10.15.1" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index fd4eade55..a6fa6497e 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^2.3.0", + "@astrojs/react": "^2.3.1", "@types/react": "^18.2.13", "@types/react-dom": "^18.2.6", - "astro": "^2.10.10", + "astro": "^2.10.11", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 9566b6bc5..451e3b0b9 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^2.2.1", - "astro": "^2.10.10", + "astro": "^2.10.11", "solid-js": "^1.7.6" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 3582b9556..69ede4479 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^3.1.1", - "astro": "^2.10.10", + "astro": "^2.10.11", "svelte": "^3.59.1" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 25a100a0e..9a61401a7 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.10", + "astro": "^2.10.11", "vue": "^3.3.4" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 34c0e9ecf..3c0a76fd9 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^5.3.4", - "astro": "^2.10.10" + "astro": "^2.10.11" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index d02b4bf16..ee3d63df7 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^2.10.10" + "astro": "^2.10.11" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index d2af3dc91..1f37358fc 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^5.3.4", - "astro": "^2.10.10", + "astro": "^2.10.11", "html-minifier": "^4.0.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index e457e399e..f05419d47 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.10" + "astro": "^2.10.11" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 33bc78997..ddc7868ca 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.10" + "astro": "^2.10.11" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index a3767fc02..8450f3315 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.10" + "astro": "^2.10.11" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 5ebdf2ac2..284308ad6 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^5.3.4", "@astrojs/svelte": "^3.1.1", - "astro": "^2.10.10", + "astro": "^2.10.11", "svelte": "^3.59.1" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 7714fb270..1e16cc35a 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.10" + "astro": "^2.10.11" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 499638417..20c0f5e15 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.10", + "astro": "^2.10.11", "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 2bf4622ef..cbb416f0d 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.10" + "astro": "^2.10.11" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index cf9de5325..6291e05c8 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.10", + "astro": "^2.10.11", "preact": "^10.15.1" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index b16b1f7e4..52085fa61 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.10", + "astro": "^2.10.11", "nanostores": "^0.8.1", "preact": "^10.15.1" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index a3d14ebbf..7a81f6c20 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.10", + "astro": "^2.10.11", "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 064ab438b..6604cde8a 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.10", + "astro": "^2.10.11", "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 1f8a6813b..e4113369f 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^2.10.10", + "astro": "^2.10.11", "vitest": "^0.31.4" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index f52131a66..5bc5890fe 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 2.10.11 + +### Patch Changes + +- [#8136](https://github.com/withastro/astro/pull/8136) [`97c8760d7`](https://github.com/withastro/astro/commit/97c8760d78ffd172149f7776442725861576fba7) Thanks [@andremralves](https://github.com/andremralves)! - Fix 404 response leading to an infinite loop when there is no 404 page. + ## 2.10.10 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index f8ad63456..64132d88c 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "2.10.10", + "version": "2.10.11", "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/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index b2e059139..e876236f2 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -45,7 +45,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^2.10.10" + "astro": "workspace:^2.10.11" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 749f1f532..0ba36dd68 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.10" + "astro": "workspace:^2.10.11" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index 7e2afdb56..387347800 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.10", + "astro": "workspace:^2.10.11", "sharp": ">=0.31.0" }, "peerDependenciesMeta": { diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 4750e2ec6..5565c3a0c 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.10" + "astro": "workspace:^2.10.11" }, "devDependencies": { "@astrojs/markdown-remark": "^2.2.1", diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 2818546d6..7bbd54c69 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -45,7 +45,7 @@ "esbuild": "^0.15.18" }, "peerDependencies": { - "astro": "workspace:^2.10.10" + "astro": "workspace:^2.10.11" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index fd6a69e82..3c6ba45cc 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -38,7 +38,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^2.10.10" + "astro": "workspace:^2.10.11" }, "devDependencies": { "@types/node": "^18.16.18", diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index 9471ae8cb..28e84a83a 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/react +## 2.3.1 + +### Patch Changes + +- [#8137](https://github.com/withastro/astro/pull/8137) [`8c0a4ed10`](https://github.com/withastro/astro/commit/8c0a4ed106efeda286f0aae8b959008f9462b5ec) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fix missing export for new `experimentalReactChildren` option + ## 2.3.0 ### Minor Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 3b4e015e2..bc1256947 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": "2.3.0", + "version": "2.3.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 0d5e5b8ff..4ff1a607b 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.10", + "astro": "workspace:^2.10.11", "svelte": "^3.55.0 || ^4.0.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index d2aee1e95..07bba0efa 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.10", + "astro": "workspace:^2.10.11", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index bfd6f2e3e..f58f0c5b9 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -61,7 +61,7 @@ "web-vitals": "^3.3.2" }, "peerDependencies": { - "astro": "workspace:^2.10.10" + "astro": "workspace:^2.10.11" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.2", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 8a9c69eea..c3acbbf67 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.10", + "astro": "workspace:^2.10.11", "vue": "^3.2.30" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ccaa11fec..bf9ebd7d6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,7 +128,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/blog: @@ -143,19 +143,19 @@ importers: specifier: ^2.0.2 version: link:../../packages/integrations/sitemap astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/deno: dependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro devDependencies: '@astrojs/deno': @@ -174,7 +174,7 @@ importers: specifier: ^3.12.2 version: 3.12.2 astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/framework-lit: @@ -186,7 +186,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro lit: specifier: ^2.7.5 @@ -198,7 +198,7 @@ importers: specifier: ^2.2.2 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^2.3.0 + specifier: ^2.3.1 version: link:../../packages/integrations/react '@astrojs/solid-js': specifier: ^2.2.1 @@ -210,7 +210,7 @@ importers: specifier: ^2.2.1 version: link:../../packages/integrations/vue astro: - specifier: ^2.10.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 version: link:../../packages/astro preact: specifier: ^10.15.1 @@ -249,7 +249,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^2.3.0 + specifier: ^2.3.1 version: link:../../packages/integrations/react '@types/react': specifier: ^18.2.13 @@ -258,7 +258,7 @@ importers: specifier: ^18.2.6 version: 18.2.6 astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -273,7 +273,7 @@ importers: specifier: ^2.2.1 version: link:../../packages/integrations/solid astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro solid-js: specifier: ^1.7.6 @@ -285,7 +285,7 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/svelte astro: - specifier: ^2.10.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 version: link:../../packages/astro vue: specifier: ^3.3.4 @@ -309,13 +309,13 @@ importers: specifier: ^5.3.4 version: link:../../packages/integrations/node astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/middleware: @@ -324,7 +324,7 @@ importers: specifier: ^5.3.4 version: link:../../packages/integrations/node astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,19 +333,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro examples/ssr: @@ -357,7 +357,7 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/svelte astro: - specifier: ^2.10.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 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.10 + specifier: ^2.10.11 version: link:../../packages/astro autoprefixer: specifier: ^10.4.14 @@ -462,7 +462,7 @@ importers: examples/with-vite-plugin-pwa: dependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro vite-plugin-pwa: specifier: 0.14.7 @@ -474,7 +474,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^2.10.10 + specifier: ^2.10.11 version: link:../../packages/astro vitest: specifier: ^0.31.4 From 04caa99c48ce604ca3b90302ff0df8dcdbeee650 Mon Sep 17 00:00:00 2001 From: Arsh <69170106+lilnasy@users.noreply.github.com> Date: Sat, 19 Aug 2023 01:12:53 +0530 Subject: [PATCH 15/20] fix(data collections): normalize file paths for DataEntry.id (#8144) * normalize file paths for DataEntry.id * add changeset --- .changeset/twenty-mirrors-remember.md | 5 +++++ packages/astro/src/content/utils.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/twenty-mirrors-remember.md diff --git a/.changeset/twenty-mirrors-remember.md b/.changeset/twenty-mirrors-remember.md new file mode 100644 index 000000000..4d758d420 --- /dev/null +++ b/.changeset/twenty-mirrors-remember.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixed an issue where data entries' id included backslashes instead of forward slashes on Windows. diff --git a/packages/astro/src/content/utils.ts b/packages/astro/src/content/utils.ts index d273dc105..23a305426 100644 --- a/packages/astro/src/content/utils.ts +++ b/packages/astro/src/content/utils.ts @@ -209,7 +209,7 @@ export function getDataEntryId({ collection, }: Pick & { entry: URL; collection: string }): string { const relativePath = getRelativeEntryPath(entry, collection, contentDir); - const withoutFileExt = relativePath.replace(new RegExp(path.extname(relativePath) + '$'), ''); + const withoutFileExt = normalizePath(relativePath).replace(new RegExp(path.extname(relativePath) + '$'), ''); return withoutFileExt; } From be2d60285e43f0629974ff86de037190c586d265 Mon Sep 17 00:00:00 2001 From: matthewp Date: Fri, 18 Aug 2023 19:45:55 +0000 Subject: [PATCH 16/20] [ci] format --- packages/astro/src/content/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/content/utils.ts b/packages/astro/src/content/utils.ts index 23a305426..d02bd8669 100644 --- a/packages/astro/src/content/utils.ts +++ b/packages/astro/src/content/utils.ts @@ -209,7 +209,10 @@ export function getDataEntryId({ collection, }: Pick & { entry: URL; collection: string }): string { const relativePath = getRelativeEntryPath(entry, collection, contentDir); - const withoutFileExt = normalizePath(relativePath).replace(new RegExp(path.extname(relativePath) + '$'), ''); + const withoutFileExt = normalizePath(relativePath).replace( + new RegExp(path.extname(relativePath) + '$'), + '' + ); return withoutFileExt; } From 4c15c069691ca25efcb9ebb7d9b45605cd136ed3 Mon Sep 17 00:00:00 2001 From: Arsh <69170106+lilnasy@users.noreply.github.com> Date: Sat, 19 Aug 2023 02:21:46 +0530 Subject: [PATCH 17/20] fix(node): delegate preview's not found and error handling to core/app (#8141) * fix(node): delegate preview's not found and error handling to core/app * add changeset --------- Co-authored-by: Nate Moore --- .changeset/rude-ducks-exist.md | 5 +++++ packages/integrations/node/src/preview.ts | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 .changeset/rude-ducks-exist.md diff --git a/.changeset/rude-ducks-exist.md b/.changeset/rude-ducks-exist.md new file mode 100644 index 000000000..8c4147904 --- /dev/null +++ b/.changeset/rude-ducks-exist.md @@ -0,0 +1,5 @@ +--- +'@astrojs/node': patch +--- + +Fixed an issue where the preview mode handled 404 and 500 routes differently from running app with node directly. diff --git a/packages/integrations/node/src/preview.ts b/packages/integrations/node/src/preview.ts index 4a4db4632..62a4301c1 100644 --- a/packages/integrations/node/src/preview.ts +++ b/packages/integrations/node/src/preview.ts @@ -38,15 +38,7 @@ const preview: CreatePreviewServer = async function ({ } const handler: http.RequestListener = (req, res) => { - ssrHandler(req, res, (ssrErr: any) => { - if (ssrErr) { - res.writeHead(500); - res.end(ssrErr.toString()); - } else { - res.writeHead(404); - res.end(); - } - }); + ssrHandler(req, res); }; const baseWithoutTrailingSlash: string = base.endsWith('/') From 531cc3e490bc3bc1b896eeaec05664571df5bb24 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 18 Aug 2023 17:08:18 -0400 Subject: [PATCH 18/20] Fix missing package file regression (#8149) --- .changeset/early-owls-attend.md | 5 +++++ packages/integrations/react/package.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/early-owls-attend.md diff --git a/.changeset/early-owls-attend.md b/.changeset/early-owls-attend.md new file mode 100644 index 000000000..a6069ad66 --- /dev/null +++ b/.changeset/early-owls-attend.md @@ -0,0 +1,5 @@ +--- +'@astrojs/react': patch +--- + +Fix missing package file regression diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index bc1256947..b9313626d 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -37,7 +37,8 @@ "jsx-runtime.js", "server.js", "server-v17.js", - "static-html.js" + "static-html.js", + "vnode-children.js" ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", From 34c39a0c96ee5aed74ceae851a512b271db7630d Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:13:25 -0700 Subject: [PATCH 19/20] [ci] release (#8145) Co-authored-by: github-actions[bot] --- .changeset/early-owls-attend.md | 5 -- .changeset/rude-ducks-exist.md | 5 -- .changeset/twenty-mirrors-remember.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/deno/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 4 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 4 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 4 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 4 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 4 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 6 ++ packages/astro/package.json | 2 +- packages/integrations/cloudflare/package.json | 2 +- packages/integrations/deno/package.json | 2 +- packages/integrations/image/package.json | 2 +- packages/integrations/markdoc/package.json | 2 +- packages/integrations/netlify/package.json | 2 +- packages/integrations/node/CHANGELOG.md | 9 +++ packages/integrations/node/package.json | 4 +- packages/integrations/react/CHANGELOG.md | 6 ++ packages/integrations/react/package.json | 2 +- packages/integrations/svelte/package.json | 2 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/package.json | 2 +- packages/integrations/vue/package.json | 2 +- pnpm-lock.yaml | 64 +++++++++---------- 46 files changed, 98 insertions(+), 92 deletions(-) delete mode 100644 .changeset/early-owls-attend.md delete mode 100644 .changeset/rude-ducks-exist.md delete mode 100644 .changeset/twenty-mirrors-remember.md diff --git a/.changeset/early-owls-attend.md b/.changeset/early-owls-attend.md deleted file mode 100644 index a6069ad66..000000000 --- a/.changeset/early-owls-attend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/react': patch ---- - -Fix missing package file regression diff --git a/.changeset/rude-ducks-exist.md b/.changeset/rude-ducks-exist.md deleted file mode 100644 index 8c4147904..000000000 --- a/.changeset/rude-ducks-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/node': patch ---- - -Fixed an issue where the preview mode handled 404 and 500 routes differently from running app with node directly. diff --git a/.changeset/twenty-mirrors-remember.md b/.changeset/twenty-mirrors-remember.md deleted file mode 100644 index 4d758d420..000000000 --- a/.changeset/twenty-mirrors-remember.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixed an issue where data entries' id included backslashes instead of forward slashes on Windows. diff --git a/examples/basics/package.json b/examples/basics/package.json index 327a7e527..be9c119d9 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.11" + "astro": "^2.10.12" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 99c9c062c..cde510061 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.2", - "astro": "^2.10.11" + "astro": "^2.10.12" } } diff --git a/examples/component/package.json b/examples/component/package.json index 53bc84264..9fdf53f02 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^2.10.11" + "astro": "^2.10.12" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/deno/package.json b/examples/deno/package.json index 7719618f2..af9bd52e5 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.11" + "astro": "^2.10.12" }, "devDependencies": { "@astrojs/deno": "^4.3.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 00b806cb5..3e29949ee 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.11" + "astro": "^2.10.12" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 461e44cff..b59d380a9 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.11", + "astro": "^2.10.12", "lit": "^2.7.5" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 46fb34b20..635a0850a 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@astrojs/preact": "^2.2.2", - "@astrojs/react": "^2.3.1", + "@astrojs/react": "^2.3.2", "@astrojs/solid-js": "^2.2.1", "@astrojs/svelte": "^3.1.1", "@astrojs/vue": "^2.2.1", - "astro": "^2.10.11", + "astro": "^2.10.12", "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 133b890cd..369207651 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.11", + "astro": "^2.10.12", "preact": "^10.15.1" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index a6fa6497e..07cad9df5 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^2.3.1", + "@astrojs/react": "^2.3.2", "@types/react": "^18.2.13", "@types/react-dom": "^18.2.6", - "astro": "^2.10.11", + "astro": "^2.10.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 451e3b0b9..fb7ac65d4 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^2.2.1", - "astro": "^2.10.11", + "astro": "^2.10.12", "solid-js": "^1.7.6" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 69ede4479..c28e9d307 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^3.1.1", - "astro": "^2.10.11", + "astro": "^2.10.12", "svelte": "^3.59.1" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 9a61401a7..de1156a57 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.11", + "astro": "^2.10.12", "vue": "^3.3.4" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 3c0a76fd9..d6665045f 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/node": "^5.3.4", - "astro": "^2.10.11" + "@astrojs/node": "^5.3.5", + "astro": "^2.10.12" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index ee3d63df7..32a4b58c0 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^2.10.11" + "astro": "^2.10.12" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 1f37358fc..58be0adba 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.4", - "astro": "^2.10.11", + "@astrojs/node": "^5.3.5", + "astro": "^2.10.12", "html-minifier": "^4.0.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index f05419d47..4dc601202 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.11" + "astro": "^2.10.12" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index ddc7868ca..6d32ad775 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.11" + "astro": "^2.10.12" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 8450f3315..a9236cd0f 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^2.10.11" + "astro": "^2.10.12" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 284308ad6..fb7939c56 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.4", + "@astrojs/node": "^5.3.5", "@astrojs/svelte": "^3.1.1", - "astro": "^2.10.11", + "astro": "^2.10.12", "svelte": "^3.59.1" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 1e16cc35a..a5be72ba1 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.11" + "astro": "^2.10.12" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 20c0f5e15..020eeeca3 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.11", + "astro": "^2.10.12", "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 cbb416f0d..2352c3836 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.11" + "astro": "^2.10.12" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 6291e05c8..2bab6606a 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.11", + "astro": "^2.10.12", "preact": "^10.15.1" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 52085fa61..dc33ed08a 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.11", + "astro": "^2.10.12", "nanostores": "^0.8.1", "preact": "^10.15.1" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 7a81f6c20..1a270703e 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.11", + "astro": "^2.10.12", "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 6604cde8a..80e058ec6 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.11", + "astro": "^2.10.12", "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 e4113369f..cdfecbc4b 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^2.10.11", + "astro": "^2.10.12", "vitest": "^0.31.4" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 5bc5890fe..f26dae2f7 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 2.10.12 + +### Patch Changes + +- [#8144](https://github.com/withastro/astro/pull/8144) [`04caa99c4`](https://github.com/withastro/astro/commit/04caa99c48ce604ca3b90302ff0df8dcdbeee650) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixed an issue where data entries' id included backslashes instead of forward slashes on Windows. + ## 2.10.11 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 64132d88c..2a97d12d1 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "2.10.11", + "version": "2.10.12", "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/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index e876236f2..007b6c769 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -45,7 +45,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^2.10.11" + "astro": "workspace:^2.10.12" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 0ba36dd68..53c1811e5 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.11" + "astro": "workspace:^2.10.12" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index 387347800..72b7441ef 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.11", + "astro": "workspace:^2.10.12", "sharp": ">=0.31.0" }, "peerDependenciesMeta": { diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 5565c3a0c..c18266f6c 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.11" + "astro": "workspace:^2.10.12" }, "devDependencies": { "@astrojs/markdown-remark": "^2.2.1", diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 7bbd54c69..eca52ef3e 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -45,7 +45,7 @@ "esbuild": "^0.15.18" }, "peerDependencies": { - "astro": "workspace:^2.10.11" + "astro": "workspace:^2.10.12" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md index e85a81d33..f68040272 100644 --- a/packages/integrations/node/CHANGELOG.md +++ b/packages/integrations/node/CHANGELOG.md @@ -1,5 +1,14 @@ # @astrojs/node +## 5.3.5 + +### Patch Changes + +- [#8141](https://github.com/withastro/astro/pull/8141) [`4c15c0696`](https://github.com/withastro/astro/commit/4c15c069691ca25efcb9ebb7d9b45605cd136ed3) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixed an issue where the preview mode handled 404 and 500 routes differently from running app with node directly. + +- Updated dependencies [[`04caa99c4`](https://github.com/withastro/astro/commit/04caa99c48ce604ca3b90302ff0df8dcdbeee650)]: + - astro@2.10.12 + ## 5.3.4 ### Patch Changes diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index 3c6ba45cc..26cf81cd0 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.4", + "version": "5.3.5", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -38,7 +38,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^2.10.11" + "astro": "workspace:^2.10.12" }, "devDependencies": { "@types/node": "^18.16.18", diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index 28e84a83a..403ed56b5 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/react +## 2.3.2 + +### Patch Changes + +- [#8149](https://github.com/withastro/astro/pull/8149) [`531cc3e49`](https://github.com/withastro/astro/commit/531cc3e490bc3bc1b896eeaec05664571df5bb24) Thanks [@matthewp](https://github.com/matthewp)! - Fix missing package file regression + ## 2.3.1 ### Patch Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index b9313626d..682811c7c 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": "2.3.1", + "version": "2.3.2", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 4ff1a607b..749830646 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.11", + "astro": "workspace:^2.10.12", "svelte": "^3.55.0 || ^4.0.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 07bba0efa..b8110e89d 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.11", + "astro": "workspace:^2.10.12", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index f58f0c5b9..8f4ca0a55 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -61,7 +61,7 @@ "web-vitals": "^3.3.2" }, "peerDependencies": { - "astro": "workspace:^2.10.11" + "astro": "workspace:^2.10.12" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.2", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index c3acbbf67..c2e2ee113 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.11", + "astro": "workspace:^2.10.12", "vue": "^3.2.30" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bf9ebd7d6..43f0707d0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,7 +128,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/blog: @@ -143,19 +143,19 @@ importers: specifier: ^2.0.2 version: link:../../packages/integrations/sitemap astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/deno: dependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro devDependencies: '@astrojs/deno': @@ -174,7 +174,7 @@ importers: specifier: ^3.12.2 version: 3.12.2 astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/framework-lit: @@ -186,7 +186,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro lit: specifier: ^2.7.5 @@ -198,7 +198,7 @@ importers: specifier: ^2.2.2 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^2.3.1 + specifier: ^2.3.2 version: link:../../packages/integrations/react '@astrojs/solid-js': specifier: ^2.2.1 @@ -210,7 +210,7 @@ importers: specifier: ^2.2.1 version: link:../../packages/integrations/vue astro: - specifier: ^2.10.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 version: link:../../packages/astro preact: specifier: ^10.15.1 @@ -249,7 +249,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^2.3.1 + specifier: ^2.3.2 version: link:../../packages/integrations/react '@types/react': specifier: ^18.2.13 @@ -258,7 +258,7 @@ importers: specifier: ^18.2.6 version: 18.2.6 astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -273,7 +273,7 @@ importers: specifier: ^2.2.1 version: link:../../packages/integrations/solid astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro solid-js: specifier: ^1.7.6 @@ -285,7 +285,7 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/svelte astro: - specifier: ^2.10.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 version: link:../../packages/astro vue: specifier: ^3.3.4 @@ -306,25 +306,25 @@ importers: examples/hackernews: dependencies: '@astrojs/node': - specifier: ^5.3.4 + specifier: ^5.3.5 version: link:../../packages/integrations/node astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/middleware: dependencies: '@astrojs/node': - specifier: ^5.3.4 + specifier: ^5.3.5 version: link:../../packages/integrations/node astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,31 +333,31 @@ importers: examples/minimal: dependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro examples/ssr: dependencies: '@astrojs/node': - specifier: ^5.3.4 + specifier: ^5.3.5 version: link:../../packages/integrations/node '@astrojs/svelte': specifier: ^3.1.1 version: link:../../packages/integrations/svelte astro: - specifier: ^2.10.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 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.11 + specifier: ^2.10.12 version: link:../../packages/astro autoprefixer: specifier: ^10.4.14 @@ -462,7 +462,7 @@ importers: examples/with-vite-plugin-pwa: dependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro vite-plugin-pwa: specifier: 0.14.7 @@ -474,7 +474,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^2.10.11 + specifier: ^2.10.12 version: link:../../packages/astro vitest: specifier: ^0.31.4 From 95120efbe817163663492181cbeb225849354493 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Mon, 21 Aug 2023 12:35:49 +0200 Subject: [PATCH 20/20] fix(assets): Add missing type for imageConfig export (#8171) --- .changeset/many-ears-drum.md | 5 +++++ packages/astro/client-base.d.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/many-ears-drum.md diff --git a/.changeset/many-ears-drum.md b/.changeset/many-ears-drum.md new file mode 100644 index 000000000..f728408a0 --- /dev/null +++ b/.changeset/many-ears-drum.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix missing type for `imageConfig` export from `astro:assets` diff --git a/packages/astro/client-base.d.ts b/packages/astro/client-base.d.ts index 3b0ee4901..6bd60da8c 100644 --- a/packages/astro/client-base.d.ts +++ b/packages/astro/client-base.d.ts @@ -53,6 +53,7 @@ declare module 'astro:assets' { | import('./dist/assets/types.js').UnresolvedImageTransform ) => Promise; getConfiguredImageService: typeof import('./dist/assets/index.js').getConfiguredImageService; + imageConfig: import('./dist/@types/astro').AstroConfig['image']; Image: typeof import('./components/Image.astro').default; }; @@ -69,7 +70,7 @@ declare module 'astro:assets' { export type RemoteImageProps = Simplify< import('./dist/assets/types.js').RemoteImageProps >; - export const { getImage, getConfiguredImageService, Image }: AstroAssets; + export const { getImage, getConfiguredImageService, imageConfig, Image }: AstroAssets; } declare module 'astro:transitions' {