Skip to content

Commit

Permalink
Merge branch 'main' into sitemap-xsl
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-lefebvre authored Oct 1, 2024
2 parents c261600 + 76c5fbd commit f1b4f08
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 180 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-candles-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Adds missing filePath property on content layer entries
5 changes: 5 additions & 0 deletions .changeset/real-nails-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix installing non-stable versions of integrations with `astro add`
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"acorn": "^8.12.1",
"aria-query": "^5.3.2",
"axobject-query": "^4.1.0",
"boxen": "7.1.1",
"boxen": "8.0.1",
"ci-info": "^4.0.0",
"clsx": "^2.1.1",
"common-ancestor-path": "^1.0.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/astro/src/cli/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ async function resolveRangeToInstallSpecifier(name: string, range: string): Prom
if (versions instanceof Error) return name;
// Filter out any prerelease versions, but fallback if there are no stable versions
const stableVersions = versions.filter((v) => !v.includes('-'));
const maxStable = maxSatisfying(stableVersions.length !== 0 ? stableVersions : versions, range);
const maxStable = maxSatisfying(stableVersions, range) ?? maxSatisfying(versions, range);
if (!maxStable) return name;
return `${name}@^${maxStable}`;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/content/types-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ async function writeContentFiles({
contentTypesStr += `};\n`;
break;
case CONTENT_LAYER_TYPE:
dataTypesStr += `${collectionKey}: Record<string, {\n id: string;\n collection: ${collectionKey};\n data: ${dataType};\n rendered?: RenderedContent \n}>;\n`;
dataTypesStr += `${collectionKey}: Record<string, {\n id: string;\n collection: ${collectionKey};\n data: ${dataType};\n rendered?: RenderedContent;\n filePath?: string \n}>;\n`;
break;
case 'data':
if (collectionEntryKeys.length === 0) {
Expand Down
Loading

0 comments on commit f1b4f08

Please sign in to comment.