Compare commits

..

1 commit

Author SHA1 Message Date
github-actions[bot]
b74f5952b7 [ci] release 2023-10-11 05:08:11 +00:00
45 changed files with 88 additions and 96 deletions

View file

@ -1,5 +0,0 @@
---
'astro': patch
---
Fixed an issue where the transitions router did not work within framework components.

View file

@ -1,5 +0,0 @@
---
'@astrojs/cloudflare': patch
---
fixes `AdvancedRuntime` & `DirectoryRuntime` types to work woth Cloudflare caches

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -14,6 +14,6 @@
"@astrojs/mdx": "^1.1.1",
"@astrojs/rss": "^3.0.0",
"@astrojs/sitemap": "^3.0.1",
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^3.2.4"
"astro": "^3.2.5"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"

View file

@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.3.1",
"@types/alpinejs": "^3.7.2",
"alpinejs": "^3.12.3",
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^3.0.1",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^3.2.4",
"astro": "^3.2.5",
"lit": "^2.8.0"
}
}

View file

@ -16,7 +16,7 @@
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^4.0.3",
"@astrojs/vue": "^3.0.1",
"astro": "^3.2.4",
"astro": "^3.2.5",
"preact": "^10.17.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@preact/signals": "^1.2.1",
"astro": "^3.2.4",
"astro": "^3.2.5",
"preact": "^10.17.1"
}
}

View file

@ -14,7 +14,7 @@
"@astrojs/react": "^3.0.3",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"astro": "^3.2.4",
"astro": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^3.0.2",
"astro": "^3.2.4",
"astro": "^3.2.5",
"solid-js": "^1.7.11"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^4.0.3",
"astro": "^3.2.4",
"astro": "^3.2.5",
"svelte": "^4.2.0"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^3.0.1",
"astro": "^3.2.4",
"astro": "^3.2.5",
"vue": "^3.3.4"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^6.0.3",
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^3.2.4"
"astro": "^3.2.5"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"

View file

@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^6.0.3",
"astro": "^3.2.4",
"astro": "^3.2.5",
"html-minifier": "^4.0.0"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^6.0.3",
"@astrojs/svelte": "^4.0.3",
"astro": "^3.2.4",
"astro": "^3.2.5",
"svelte": "^4.2.0"
}
}

View file

@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.0.2",
"@astrojs/node": "^6.0.3",
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.5.2",
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^3.2.1",
"astro": "^3.2.4",
"astro": "^3.2.5",
"hast-util-select": "^5.0.5",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.2.4"
"astro": "^3.2.5"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^1.1.1",
"@astrojs/preact": "^3.0.1",
"astro": "^3.2.4",
"astro": "^3.2.5",
"preact": "^10.17.1"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@nanostores/preact": "^0.5.0",
"astro": "^3.2.4",
"astro": "^3.2.5",
"nanostores": "^0.9.3",
"preact": "^10.17.1"
}

View file

@ -14,7 +14,7 @@
"@astrojs/mdx": "^1.1.1",
"@astrojs/tailwind": "^5.0.2",
"@types/canvas-confetti": "^1.6.0",
"astro": "^3.2.4",
"astro": "^3.2.5",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.6.0",
"postcss": "^8.4.28",

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.2.4",
"astro": "^3.2.5",
"vite-plugin-pwa": "0.16.4",
"workbox-window": "^7.0.0"
}

View file

@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^3.2.4",
"astro": "^3.2.5",
"vitest": "^0.34.2"
}
}

View file

@ -1,5 +1,11 @@
# astro
## 3.2.5
### Patch Changes
- [#8771](https://github.com/withastro/astro/pull/8771) [`bd5aa1cd3`](https://github.com/withastro/astro/commit/bd5aa1cd35ecbd2784f30dd836ff814684fee02b) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixed an issue where the transitions router did not work within framework components.
## 3.2.4
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "astro",
"version": "3.2.4",
"version": "3.2.5",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",

View file

@ -30,7 +30,7 @@ type RawContentEvent = { name: ChokidarEvent; entry: string };
type ContentEvent = { name: ChokidarEvent; entry: URL };
type DataEntryMetadata = Record<string, never>;
type ContentEntryMetadata = { slug: string, path: string };
type ContentEntryMetadata = { slug: string };
type CollectionEntryMap = {
[collection: string]:
| {
@ -276,7 +276,7 @@ export async function createContentTypesGenerator({
if (!(entryKey in collectionEntryMap[collectionKey].entries)) {
collectionEntryMap[collectionKey] = {
type: 'content',
entries: { ...collectionInfo.entries, [entryKey]: { slug: addedSlug, path: event.entry.toString() } },
entries: { ...collectionInfo.entries, [entryKey]: { slug: addedSlug } },
};
}
return { shouldGenerateTypes: true };
@ -453,15 +453,7 @@ async function writeContentFiles({
)}] }`;
const slugType = JSON.stringify(entryMetadata.slug);
contentTypesStr += [
`${entryKey}: {`,
` id: ${entryKey};`,
` slug: ${slugType};`,
` path: ${JSON.stringify(entryMetadata.path)};`,
` body: string;`,
` collection: ${collectionKey};`,
` data: ${dataType}`,
`} & ${renderType};`].join("\n");
contentTypesStr += `${entryKey}: {\n id: ${entryKey};\n slug: ${slugType};\n body: string;\n collection: ${collectionKey};\n data: ${dataType}\n} & ${renderType};\n`;
}
contentTypesStr += `};\n`;
break;

View file

@ -1,5 +1,15 @@
# @astrojs/cloudflare
## 7.5.3
### Patch Changes
- [#8782](https://github.com/withastro/astro/pull/8782) [`75781643a`](https://github.com/withastro/astro/commit/75781643a2f53656fc3fde3a7f28cb62db40b015) Thanks [@helloimalastair](https://github.com/helloimalastair)! - fixes `AdvancedRuntime` & `DirectoryRuntime` types to work woth Cloudflare caches
- Updated dependencies [[`bd5aa1cd3`](https://github.com/withastro/astro/commit/bd5aa1cd35ecbd2784f30dd836ff814684fee02b)]:
- astro@3.2.5
- @astrojs/underscore-redirects@0.3.1
## 7.5.2
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@astrojs/cloudflare",
"description": "Deploy your site to Cloudflare Workers/Pages",
"version": "7.5.2",
"version": "7.5.3",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@ -48,7 +48,7 @@
"vite": "^4.4.9"
},
"peerDependencies": {
"astro": "workspace:^3.2.4"
"astro": "workspace:^3.2.5"
},
"devDependencies": {
"@types/iarna__toml": "^2.0.2",

View file

@ -75,7 +75,7 @@
"zod": "3.21.1"
},
"peerDependencies": {
"astro": "workspace:^3.2.4"
"astro": "workspace:^3.2.5"
},
"devDependencies": {
"@astrojs/markdown-remark": "workspace:*",

View file

@ -51,7 +51,7 @@
"vfile": "^5.3.7"
},
"peerDependencies": {
"astro": "workspace:^3.2.4"
"astro": "workspace:^3.2.5"
},
"devDependencies": {
"@types/chai": "^4.3.5",

View file

@ -116,14 +116,14 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
if (!id.endsWith('.mdx')) return;
// Read code from file manually to prevent Vite from parsing `import.meta.env` expressions
const { fileId, fileUrl } = getFileInfo(id, config);
const { fileId } = getFileInfo(id, config);
const code = await fs.readFile(fileId, 'utf-8');
const { data: frontmatter, content: pageContent } = parseFrontmatter(code, id);
const vfile = new VFile({ value: pageContent, path: id });
// Ensure `data.astro` is available to all remark plugins
setVfileFrontmatter(vfile, frontmatter, { fileURL: new URL(fileUrl) });
setVfileFrontmatter(vfile, frontmatter);
try {
const compiled = await processor.process(vfile);

View file

@ -37,7 +37,7 @@
"server-destroy": "^1.0.1"
},
"peerDependencies": {
"astro": "workspace:^3.2.4"
"astro": "workspace:^3.2.5"
},
"devDependencies": {
"@types/node": "^18.17.8",

View file

@ -48,7 +48,7 @@
"vite": "^4.4.9"
},
"peerDependencies": {
"astro": "workspace:^3.2.4",
"astro": "workspace:^3.2.5",
"svelte": "^3.55.0 || ^4.0.0"
},
"engines": {

View file

@ -43,7 +43,7 @@
"vite": "^4.4.9"
},
"peerDependencies": {
"astro": "workspace:^3.2.4",
"astro": "workspace:^3.2.5",
"tailwindcss": "^3.0.24"
},
"publishConfig": {

View file

@ -61,7 +61,7 @@
"web-vitals": "^3.4.0"
},
"peerDependencies": {
"astro": "workspace:^3.2.4"
"astro": "workspace:^3.2.5"
},
"devDependencies": {
"@types/set-cookie-parser": "^2.4.3",

View file

@ -56,7 +56,7 @@
"vue": "^3.3.4"
},
"peerDependencies": {
"astro": "workspace:^3.2.4",
"astro": "workspace:^3.2.5",
"vue": "^3.2.30"
},
"engines": {

View file

@ -1,5 +1,5 @@
import type { VFileData as Data, VFile } from 'vfile';
import type { MarkdownAstroData, MarkdownProcessorRenderOptions } from './types.js';
import type { MarkdownAstroData } from './types.js';
function isValidAstroData(obj: unknown): obj is MarkdownAstroData {
if (typeof obj === 'object' && obj !== null && obj.hasOwnProperty('frontmatter')) {
@ -27,15 +27,10 @@ export function safelyGetAstroData(vfileData: Data): MarkdownAstroData | Invalid
return astro;
}
export function setVfileFrontmatter(
vfile: VFile,
frontmatter: Record<string, any>,
renderOpts: MarkdownProcessorRenderOptions | undefined
) {
export function setVfileFrontmatter(vfile: VFile, frontmatter: Record<string, any>) {
vfile.data ??= {};
vfile.data.astro ??= {};
(vfile.data.astro as any).frontmatter = frontmatter;
(vfile.data.astro as any).fileURL = renderOpts?.fileURL;
}
/**

View file

@ -124,9 +124,8 @@ export async function createMarkdownProcessor(
return {
async render(content, renderOpts) {
console.log('url', renderOpts?.fileURL);
const vfile = new VFile({ value: content, path: renderOpts?.fileURL });
setVfileFrontmatter(vfile, renderOpts?.frontmatter ?? {}, renderOpts);
setVfileFrontmatter(vfile, renderOpts?.frontmatter ?? {});
const result: MarkdownVFile = await parser.process(vfile).catch((err) => {
// Ensure that the error message contains the input filename

View file

@ -125,7 +125,7 @@ importers:
examples/basics:
dependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/blog:
@ -140,13 +140,13 @@ importers:
specifier: ^3.0.1
version: link:../../packages/integrations/sitemap
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/framework-alpine:
@ -161,7 +161,7 @@ importers:
specifier: ^3.12.3
version: 3.12.3
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/framework-lit:
@ -173,7 +173,7 @@ importers:
specifier: ^0.2.1
version: 0.2.1
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
lit:
specifier: ^2.8.0
@ -197,7 +197,7 @@ importers:
specifier: ^3.0.1
version: link:../../packages/integrations/vue
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
preact:
specifier: ^10.17.1
@ -227,7 +227,7 @@ importers:
specifier: ^1.2.1
version: 1.2.1(preact@10.17.1)
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
preact:
specifier: ^10.17.1
@ -245,7 +245,7 @@ importers:
specifier: ^18.2.7
version: 18.2.7
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
react:
specifier: ^18.2.0
@ -260,7 +260,7 @@ importers:
specifier: ^3.0.2
version: link:../../packages/integrations/solid
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
solid-js:
specifier: ^1.7.11
@ -272,7 +272,7 @@ importers:
specifier: ^4.0.3
version: link:../../packages/integrations/svelte
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
svelte:
specifier: ^4.2.0
@ -284,7 +284,7 @@ importers:
specifier: ^3.0.1
version: link:../../packages/integrations/vue
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
vue:
specifier: ^3.3.4
@ -296,13 +296,13 @@ importers:
specifier: ^6.0.3
version: link:../../packages/integrations/node
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/middleware:
@ -311,7 +311,7 @@ importers:
specifier: ^6.0.3
version: link:../../packages/integrations/node
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
html-minifier:
specifier: ^4.0.0
@ -320,19 +320,19 @@ importers:
examples/minimal:
dependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/non-html-pages:
dependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/ssr:
@ -344,7 +344,7 @@ importers:
specifier: ^4.0.3
version: link:../../packages/integrations/svelte
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
svelte:
specifier: ^4.2.0
@ -359,7 +359,7 @@ importers:
specifier: ^5.0.2
version: link:../../packages/integrations/tailwind
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/with-markdoc:
@ -368,7 +368,7 @@ importers:
specifier: ^0.5.2
version: link:../../packages/integrations/markdoc
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/with-markdown-plugins:
@ -377,7 +377,7 @@ importers:
specifier: ^3.2.1
version: link:../../packages/markdown/remark
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
hast-util-select:
specifier: ^5.0.5
@ -398,7 +398,7 @@ importers:
examples/with-markdown-shiki:
dependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
examples/with-mdx:
@ -410,7 +410,7 @@ importers:
specifier: ^3.0.1
version: link:../../packages/integrations/preact
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
preact:
specifier: ^10.17.1
@ -425,7 +425,7 @@ importers:
specifier: ^0.5.0
version: 0.5.0(nanostores@0.9.3)(preact@10.17.1)
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
nanostores:
specifier: ^0.9.3
@ -446,7 +446,7 @@ importers:
specifier: ^1.6.0
version: 1.6.0
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.15
@ -464,7 +464,7 @@ importers:
examples/with-vite-plugin-pwa:
dependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
vite-plugin-pwa:
specifier: 0.16.4
@ -476,7 +476,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
specifier: ^3.2.4
specifier: ^3.2.5
version: link:../../packages/astro
vitest:
specifier: ^0.34.2