diff --git a/.changeset/calm-houses-carry.md b/.changeset/calm-houses-carry.md new file mode 100644 index 000000000..4e614e623 --- /dev/null +++ b/.changeset/calm-houses-carry.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +fix(astro): add support for `src/content/config.mts` files diff --git a/.changeset/chatty-walls-happen.md b/.changeset/chatty-walls-happen.md deleted file mode 100644 index 58fe5e6ed..000000000 --- a/.changeset/chatty-walls-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixed a case where dynamic imports tried to preload inlined stylesheets. diff --git a/.changeset/empty-rings-bow.md b/.changeset/empty-rings-bow.md deleted file mode 100644 index fd928d548..000000000 --- a/.changeset/empty-rings-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes remote assets caching logic to not use expired assets diff --git a/.changeset/fair-countries-admire.md b/.changeset/fair-countries-admire.md deleted file mode 100644 index 1868ab016..000000000 --- a/.changeset/fair-countries-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -Removed vite warnings. diff --git a/.changeset/friendly-clocks-act.md b/.changeset/friendly-clocks-act.md deleted file mode 100644 index 43c694880..000000000 --- a/.changeset/friendly-clocks-act.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'create-astro': patch -'astro': patch ---- - -Support detecting Bun when logging messages with package manager information. diff --git a/.changeset/gold-weeks-hammer.md b/.changeset/gold-weeks-hammer.md new file mode 100644 index 000000000..4f6946116 --- /dev/null +++ b/.changeset/gold-weeks-hammer.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Minify the HTML of the redicts emitted during the build. diff --git a/.changeset/gorgeous-dancers-divide.md b/.changeset/gorgeous-dancers-divide.md new file mode 100644 index 000000000..f9b8217e9 --- /dev/null +++ b/.changeset/gorgeous-dancers-divide.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Do not add type="text/css" to inline style tag diff --git a/.changeset/grumpy-hotels-heal.md b/.changeset/grumpy-hotels-heal.md new file mode 100644 index 000000000..f171c91fb --- /dev/null +++ b/.changeset/grumpy-hotels-heal.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Prevent client:only styles from being removed in dev (View Transitions) diff --git a/.changeset/hip-cats-jump.md b/.changeset/hip-cats-jump.md deleted file mode 100644 index f728408a0..000000000 --- a/.changeset/hip-cats-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix missing type for `imageConfig` export from `astro:assets` diff --git a/.changeset/itchy-clouds-design.md b/.changeset/itchy-clouds-design.md new file mode 100644 index 000000000..b6d5046e3 --- /dev/null +++ b/.changeset/itchy-clouds-design.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +chore: correct description of `attribute` option in `scopedStyleStrategy` diff --git a/.changeset/modern-guests-float.md b/.changeset/modern-guests-float.md deleted file mode 100644 index cda74642a..000000000 --- a/.changeset/modern-guests-float.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/vercel': patch ---- - -Fix serverless function naming conflicts for routes with identical filenames but different directory structures diff --git a/.changeset/poor-pears-wash.md b/.changeset/poor-pears-wash.md new file mode 100644 index 000000000..5a7117e93 --- /dev/null +++ b/.changeset/poor-pears-wash.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix lang unspecified code blocks (markdownlint MD040) diff --git a/.changeset/smart-dragons-taste.md b/.changeset/smart-dragons-taste.md new file mode 100644 index 000000000..3b79d9410 --- /dev/null +++ b/.changeset/smart-dragons-taste.md @@ -0,0 +1,5 @@ +--- +'@astrojs/cloudflare': minor +--- + +Add support for Cloudflare Runtime (env vars, caches and req object), using `astro dev` diff --git a/.changeset/spotty-glasses-grin.md b/.changeset/spotty-glasses-grin.md deleted file mode 100644 index 3a903b79d..000000000 --- a/.changeset/spotty-glasses-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/mdx': patch ---- - -Add location data to MDX compile errors diff --git a/.changeset/spotty-tools-rhyme.md b/.changeset/spotty-tools-rhyme.md new file mode 100644 index 000000000..a54691a48 --- /dev/null +++ b/.changeset/spotty-tools-rhyme.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +fix(types): make `image.service` optional diff --git a/.changeset/twelve-cars-tell.md b/.changeset/twelve-cars-tell.md deleted file mode 100644 index a1812d637..000000000 --- a/.changeset/twelve-cars-tell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix markdown page HMR diff --git a/.changeset/weak-kids-roll.md b/.changeset/weak-kids-roll.md deleted file mode 100644 index 7d6d61f42..000000000 --- a/.changeset/weak-kids-roll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix scroll position when navigating back from page w/o ViewTransitions diff --git a/.changeset/witty-readers-behave.md b/.changeset/witty-readers-behave.md new file mode 100644 index 000000000..ec999f763 --- /dev/null +++ b/.changeset/witty-readers-behave.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Bugfixes for back navigation in the view transition client-side router diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01c573e10..cab1fd79f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: strategy: matrix: OS: [ubuntu-latest] - NODE_VERSION: [18, 20] + NODE_VERSION: [18, 20.5.1] include: - os: macos-latest NODE_VERSION: 18 diff --git a/.github/workflows/cleanup-cache.yml b/.github/workflows/cleanup-cache.yml index a3c4d25a4..cf03bbfee 100644 --- a/.github/workflows/cleanup-cache.yml +++ b/.github/workflows/cleanup-cache.yml @@ -1,19 +1,28 @@ name: Cleanup cache on: + schedule: + - cron: "0 11 * * *" pull_request: types: - closed -# Workflow copied from https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries jobs: cleanup: runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v3 - - - name: Cleanup + + - name: Cleanup caches older than 5 days + if: github.event_name == 'schedule' + uses: MyAlbum/purge-cache@v2 + with: + max-age: 432000 + + # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries + - name: Cleanup on PR close + if: github.event_name == 'pull_request' run: | gh extension install actions/gh-actions-cache diff --git a/.prettierignore b/.prettierignore index f53f92086..af84e3433 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,10 +1,3 @@ -# Ignoring these files for now due to https://github.com/withastro/compiler/issues/585 -examples/basics/src/layouts -examples/with-nanostores/src/layouts - -# Ignoring this file for now due to https://github.com/withastro/compiler/issues/485 -packages/markdown/component/Markdown.astro - # Benchmark artifacts benchmark/projects/ benchmark/results/ diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index 39911db2c..000000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,24 +0,0 @@ -// Heads up: This file should be renamed to `.cjs`, however if we did that, changesets wouldn't be able to load it -module.exports = { - printWidth: 100, - semi: true, - singleQuote: true, - tabWidth: 2, - trailingComma: 'es5', - useTabs: true, - plugins: ['prettier-plugin-astro'], - overrides: [ - { - files: ['.*', '*.json', '*.md', '*.toml', '*.yml'], - options: { - useTabs: false, - }, - }, - { - files: ['**/*.astro'], - options: { - parser: 'astro', - }, - }, - ], -}; diff --git a/README.md b/README.md index 3a28ad530..c49b4760e 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Several official projects are maintained outside of this repo: ## Sponsors -Astro is generously supported by Netlify, Storyblok, and several other amazing organizations. +Astro is free, open source software made possible by these wonderful sponsors. [❤️ Sponsor Astro! ❤️](https://github.com/withastro/.github/blob/main/FUNDING.md) @@ -91,7 +91,7 @@ Astro is generously supported by Netlify, Storyblok, and several other amazing o [![Astro's sponsors.](https://astro.build/sponsors.png "Astro's sponsors. -Platinum sponsors: Netlify, storyblok, Vercel, Ship Shape, Google Chrome +Platinum sponsors: Vercel, storyblok, Netlify, Ship Shape, Google Chrome Gold sponsors: ‹div›RIOTS, DEEPGRAM, Transloadit, CloudCannon Sponsors: Monogram, Qoddi, Dimension")](https://github.com/sponsors/withastro) diff --git a/examples/README.md b/examples/README.md index ab0e5a6c0..1482084d4 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,7 +2,7 @@ The easiest way to check out one of these examples on your machine is by running this command in an empty directory: -``` +```sh npm create astro@latest -- --template [EXAMPLE_NAME] ``` @@ -10,12 +10,12 @@ npm create astro@latest -- --template [EXAMPLE_NAME] Visit [awesome-astro](https://github.com/one-aalam/awesome-astro) for a full list of community examples. You can use `npm create astro@latest` to check out any community examples: -``` +```sh npm create astro@latest -- --template [GITHUB_USER]/[REPO_NAME] ``` Paths to examples nested inside of a repo are also supported: -``` +```sh npm create astro@latest -- --template [GITHUB_USER]/[REPO_NAME]/path/to/example ``` diff --git a/examples/basics/README.md b/examples/basics/README.md index 5369073b9..1db3fb399 100644 --- a/examples/basics/README.md +++ b/examples/basics/README.md @@ -1,6 +1,6 @@ # Astro Starter Kit: Basics -``` +```sh npm create astro@latest -- --template basics ``` @@ -16,7 +16,7 @@ npm create astro@latest -- --template basics Inside of your Astro project, you'll see the following folders and files: -``` +```text / ├── public/ │ └── favicon.svg diff --git a/examples/basics/package.json b/examples/basics/package.json index 8bca8d927..d3f7c6b75 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.8" + "astro": "^3.0.12" } } diff --git a/examples/basics/src/layouts/Layout.astro b/examples/basics/src/layouts/Layout.astro index 3345b887c..7b552be19 100644 --- a/examples/basics/src/layouts/Layout.astro +++ b/examples/basics/src/layouts/Layout.astro @@ -1,4 +1,4 @@ ---- +--- interface Props { title: string; } @@ -6,11 +6,11 @@ interface Props { const { title } = Astro.props; --- - + - + @@ -25,15 +25,27 @@ const { title } = Astro.props; --accent: 136, 58, 234; --accent-light: 224, 204, 250; --accent-dark: 49, 10, 101; - --accent-gradient: linear-gradient(45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60%); + --accent-gradient: linear-gradient( + 45deg, + rgb(var(--accent)), + rgb(var(--accent-light)) 30%, + white 60% + ); } html { font-family: system-ui, sans-serif; - background: #13151A; + background: #13151a; background-size: 224px; } code { - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; + font-family: + Menlo, + Monaco, + Lucida Console, + Liberation Mono, + DejaVu Sans Mono, + Bitstream Vera Sans Mono, + Courier New, + monospace; } diff --git a/examples/blog/README.md b/examples/blog/README.md index 67d0cfc2e..758716e07 100644 --- a/examples/blog/README.md +++ b/examples/blog/README.md @@ -1,6 +1,6 @@ # Astro Starter Kit: Blog -``` +```sh npm create astro@latest -- --template blog ``` @@ -25,7 +25,7 @@ Features: Inside of your Astro project, you'll see the following folders and files: -``` +```text ├── public/ ├── src/ │   ├── components/ diff --git a/examples/blog/package.json b/examples/blog/package.json index 347540e05..1ce63f5b7 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^1.0.0", + "@astrojs/mdx": "^1.0.3", "@astrojs/rss": "^3.0.0", "@astrojs/sitemap": "^3.0.0", - "astro": "^3.0.8" + "astro": "^3.0.12" } } diff --git a/examples/blog/src/pages/blog/index.astro b/examples/blog/src/pages/blog/index.astro index a5c329a87..ebbcd3042 100644 --- a/examples/blog/src/pages/blog/index.astro +++ b/examples/blog/src/pages/blog/index.astro @@ -11,7 +11,7 @@ const posts = (await getCollection('blog')).sort( ); --- - + diff --git a/examples/blog/src/pages/index.astro b/examples/blog/src/pages/index.astro index 26f070da5..1c8be6135 100644 --- a/examples/blog/src/pages/index.astro +++ b/examples/blog/src/pages/index.astro @@ -5,7 +5,7 @@ import Footer from '../components/Footer.astro'; import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; --- - + @@ -16,14 +16,14 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';

🧑‍🚀 Hello, Astronaut!

Welcome to the official Astro blog starter template. This - template serves as a lightweight, minimally-styled starting point for anyone looking to build - a personal website, blog, or portfolio with Astro. + template serves as a lightweight, minimally-styled starting point for anyone looking to + build a personal website, blog, or portfolio with Astro.

This template comes with a few integrations already configured in your astro.config.mjs file. You can customize your setup with - Astro Integrations to add tools like Tailwind, - React, or Vue to your project. + Astro Integrations to add tools like + Tailwind, React, or Vue to your project.

Here are a few ideas on how to get started with the template: