Skip to content

Commit

Permalink
Merge branch 'main' into arpan-withastro#12252-mdx-islands
Browse files Browse the repository at this point in the history
  • Loading branch information
apatel369 authored Nov 30, 2024
2 parents ff01d35 + 74ee2e4 commit 14ba50f
Show file tree
Hide file tree
Showing 176 changed files with 2,594 additions and 2,018 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-gorillas-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a bug where content types were not generated when first running astro dev unless src/content exists
5 changes: 5 additions & 0 deletions .changeset/breezy-brooms-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Bumps Vite to ^6.0.1 and handles its breaking changes
5 changes: 5 additions & 0 deletions .changeset/eighty-crabs-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/solid-js': patch
---

Updates vite-plugin-solid to handle Vite 6
16 changes: 16 additions & 0 deletions .changeset/fair-ears-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@astrojs/markdoc': minor
'@astrojs/preact': minor
'@astrojs/svelte': minor
'@astrojs/react': minor
'@astrojs/solid-js': minor
'@astrojs/mdx': minor
'@astrojs/vue': minor
'create-astro': minor
'@astrojs/prism': minor
'@astrojs/telemetry': minor
'@astrojs/upgrade': minor
'astro': minor
---

Drops node 21 support
5 changes: 5 additions & 0 deletions .changeset/lemon-frogs-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/svelte': major
---

Updates `@sveltejs/vite-plugin-svelte` to v5 to handle Vite 6
6 changes: 5 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"blue-sloths-stare",
"blue-socks-doubt",
"brave-elephants-fly",
"breezy-brooms-count",
"breezy-colts-promise",
"bright-keys-sell",
"brown-bulldogs-share",
Expand All @@ -56,9 +57,11 @@
"eight-seahorses-attend",
"eighty-bags-cross",
"eighty-boxes-applaud",
"eighty-crabs-cross",
"eighty-donkeys-fly",
"eighty-ligers-punch",
"empty-houses-melt",
"fair-ears-compare",
"five-jars-hear",
"fluffy-jars-live",
"forty-trains-notice",
Expand All @@ -78,6 +81,7 @@
"hungry-jokes-try",
"itchy-toys-march",
"large-zebras-sniff",
"lemon-frogs-wait",
"light-pears-accept",
"long-lions-do",
"long-months-rule",
Expand Down Expand Up @@ -113,6 +117,7 @@
"sixty-coins-worry",
"sixty-fishes-flow",
"sixty-oranges-walk",
"slimy-jeans-train",
"slimy-mice-dance",
"slimy-queens-hang",
"small-ties-sort",
Expand All @@ -133,7 +138,6 @@
"twelve-comics-march",
"twenty-cobras-push",
"unlucky-bobcats-sit",
"unlucky-kids-compete",
"violet-goats-grab",
"wet-foxes-walk",
"wise-carrots-float",
Expand Down
9 changes: 9 additions & 0 deletions .changeset/slimy-jeans-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@astrojs/preact': major
'@astrojs/svelte': major
'@astrojs/react': major
'@astrojs/solid-js': major
'@astrojs/vue': major
---

Updates Vite dependency to v6 to match Astro v5
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@biomejs/biome",
"@types/node",
"@preact/preset-vite", // v2.8.3 starts to use Vite's esbuild for perf, but this conflicts with the react plugin
"astro-embed", // TODO: investigate upgrade (zod import issues with atproto)
"drizzle-orm", // TODO: investigate upgrade (has type issues)
"sharp",

Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/announce.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { setOutput } from './utils.mjs';
const { GITHUB_REF = 'main' } = process.env;
const baseUrl = new URL(`https://github.com/withastro/astro/blob/${GITHUB_REF}/`);

const emojis = ['🎉', '🥳', '🚀', '🧑‍🚀', '🎊', '🏆', '✅', '🤩', '🤖', '🙌'];
const emojis = ['🎉', '🥳', '🚀', '🧑', '🎊', '🏆', '✅', '🤩', '🤖', '🙌'];
const descriptors = [
'new releases',
'hot and fresh updates',
Expand Down Expand Up @@ -141,7 +141,7 @@ async function generateMessage() {
message += `\nAlso ${item(extraVerbs)}:`;

const remainingPackages = packages.filter((p) => p.name !== name);
for (const { name, version, url } of remainingPackages) {
for (const { name, version, _url } of remainingPackages) {
message += `\n• \`${name}@${version}\``;
}

Expand All @@ -159,7 +159,7 @@ async function generateMessage() {

async function run() {
const content = await generateMessage();
console.log(content);
console.info(content);
setOutput('DISCORD_MESSAGE', content);
}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- main
- next
merge_group:
pull_request:
paths-ignore:
Expand Down Expand Up @@ -39,7 +38,7 @@ jobs:
strategy:
matrix:
OS: [ubuntu-latest, windows-latest]
NODE_VERSION: [18]
NODE_VERSION: [22]
fail-fast: true
steps:
# Disable crlf so all OS can share the same Turbo cache
Expand Down Expand Up @@ -86,7 +85,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand All @@ -109,12 +108,12 @@ jobs:
strategy:
matrix:
OS: [ubuntu-latest]
NODE_VERSION: [18, 20]
NODE_VERSION: [18, 20, 22]
include:
- os: macos-14
NODE_VERSION: 18
NODE_VERSION: 22
- os: windows-latest
NODE_VERSION: 18
NODE_VERSION: 22
fail-fast: false
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
Expand Down Expand Up @@ -151,7 +150,7 @@ jobs:
strategy:
matrix:
OS: [ubuntu-latest, windows-latest]
NODE_VERSION: [18]
NODE_VERSION: [22]
fail-fast: false
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
Expand Down Expand Up @@ -188,7 +187,7 @@ jobs:
strategy:
matrix:
OS: [ubuntu-latest, windows-latest]
NODE_VERSION: [18]
NODE_VERSION: [22]
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/continuous_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand All @@ -47,7 +47,7 @@ jobs:
run: pnpm run build

- name: Run the benchmarks
uses: CodSpeedHQ/action@fa1dcde8d58f2ab0b407a6a24d6cc5a8c1444a8c # v3.1.0
uses: CodSpeedHQ/action@513a19673a831f139e8717bf45ead67e47f00044 # v3.2.0
timeout-minutes: 30
with:
run: pnpm benchmark codspeed
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/examples-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow runs when changes to examples are pushed to main.
# It calls a build hook on Netlify that will redeploy preview.astro.new with the latest changes.

name: Redeploy preview.astro.new

on:
push:
branches:
- main
paths:
- 'examples/**'
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Send a POST request to Netlify to rebuild preview.astro.new
run: 'curl -X POST -d {} ${{ env.BUILD_HOOK }}'
env:
BUILD_HOOK: ${{ secrets.NETLIFY_PREVIEWS_BUILD_HOOK }}
2 changes: 1 addition & 1 deletion .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "1-legacy"
- "2-legacy"
- "3-legacy"
- next
- "4-legacy"

defaults:
run:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,21 @@ jobs:
ref: ${{ steps.refs.outputs.head_ref }}
fetch-depth: 0

- run: git fetch origin main:main
- name: Extract base branch from .changeset/config.json
id: getBaseBranch
run: |
baseBranch=$(jq -r '.baseBranch' .changeset/config.json)
echo "baseBranch=${baseBranch}" >> $GITHUB_OUTPUT
- run: git fetch origin ${{ steps.getBaseBranch.outputs.baseBranch }}:${{ steps.getBaseBranch.outputs.baseBranch }}

- name: Setup PNPM
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sync-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
push:
branches:
- main
- next

# Automatically cancel in-progress actions on the same branch
concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: 'pnpm'

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions benchmark/bench/_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const defaultProject = 'project-name';
* Use `console.log` to report the results too. Logs that start with 10 `=`
* and end with 10 `=` will be extracted by CI to display in the PR comment.
* Usually after the first 10 `=` you'll want to add a title like `#### Test`.
* @param {URL} projectDir
* @param {URL} outputFile
* @param {URL} _projectDir
* @param {URL} _outputFile
*/
export async function run(projectDir, outputFile) {}
export async function run(_projectDir, _outputFile) {}
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-beta.11"
"astro": "^4.16.16"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^4.0.0-beta.4",
"@astrojs/mdx": "^3.1.9",
"@astrojs/rss": "^4.0.9",
"@astrojs/sitemap": "^3.2.1",
"astro": "^5.0.0-beta.11"
"astro": "^4.16.16"
}
}
5 changes: 2 additions & 3 deletions examples/blog/src/components/HeaderLink.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import type { HTMLAttributes } from 'astro/types';
type Props = HTMLAttributes<'a'>;
const { href, class: className, ...props } = Astro.props;
const { pathname } = Astro.url;
const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, '');
const subpath = pathname.match(/[^\/]+/g);
const isActive = href === pathname || href === '/' + subpath?.[0];
const isActive = href === pathname || href === '/' + (subpath?.[0] || '');
---

<a href={href} class:list={[className, { active: isActive }]} {...props}>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.0.0-beta.11"
"astro": "^4.16.16"
},
"peerDependencies": {
"astro": "^4.0.0 || ^5.0.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/container-with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^5.0.0-beta.11",
"@astrojs/react": "^3.7.0-beta.1",
"@astrojs/react": "^4.0.0-beta.2",
"astro": "^5.0.0-beta.12",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vitest": "^2.1.4"
"vitest": "^2.1.6"
},
"devDependencies": {
"@types/react": "^18.3.12",
Expand Down
Loading

0 comments on commit 14ba50f

Please sign in to comment.