Skip to content

Commit

Permalink
Merge branch 'main' into 404-trailing-slash
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-lefebvre authored Dec 15, 2023
2 parents f33ece1 + c01580a commit 4505ba5
Show file tree
Hide file tree
Showing 567 changed files with 12,547 additions and 10,036 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-avocados-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Prevent Partytown from hijacking history APIs
5 changes: 0 additions & 5 deletions .changeset/brave-taxis-arrive.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/lorem-ipsum-dolor
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes static builds when `config.outDir` is located outside of the astro project
5 changes: 0 additions & 5 deletions .changeset/quick-toes-peel.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/selfish-parents-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Improves the error message when a middleware doesn't return a `Response`
5 changes: 5 additions & 0 deletions .changeset/thirty-hats-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Correctly merge headers from the original response when an error page is rendered
34 changes: 0 additions & 34 deletions .devcontainer/with-vite-plugin-pwa/devcontainer.json

This file was deleted.

10 changes: 10 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ module.exports = {
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-explicit-any': 'off',

// Enforce separate type imports for type-only imports to avoid bundling unneeded code
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
fixStyle: 'separate-type-imports',
disallowTypeAnnotations: false,
},
],

// These rules enabled by the preset configs don't work well for us
'@typescript-eslint/await-thenable': 'off',
'prefer-const': 'off',
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
- "1-legacy"
- "2-legacy"
- "3-legacy"
- next

defaults:
Expand Down
15 changes: 8 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

We welcome contributions of any size and skill level. As an open source project, we believe in giving back to our contributors and are happy to help with guidance on PRs, technical writing, and turning any feature idea into a reality.

> **Tip for new contributors:**
> Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
> [!Tip] > **For new contributors:** Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
## Quick Guide

Expand Down Expand Up @@ -46,7 +45,8 @@ To get started, create a codespace for this repository by clicking this 👇

Your new codespace will open in a web-based version of Visual Studio Code. All development dependencies will be preinstalled, and the tests will run automatically ensuring you've got a green base from which to start working.

**Note**: Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
> [!Note]
> Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
### Development

Expand Down Expand Up @@ -187,7 +187,7 @@ Understanding in which environment code runs, and at which stage in the process,

Active Astro development happens on the [`main`](https://github.com/withastro/astro/tree/main) branch. `main` always reflects the latest code.

> **Note:**
> [!Note]
> During certain periods, we put `main` into a [**prerelease**](https://github.com/changesets/changesets/blob/main/docs/prereleases.md#prereleases) state. Read more about [Releasing Astro](#releasing-astro).
### `latest`
Expand All @@ -198,7 +198,8 @@ By default, `create-astro` and [astro.new](https://astro.new) point to this bran

## Releasing Astro

_Note: Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro._
> [!Note]
> Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro.
The repo is set up with automatic releases, using the changeset GitHub action & bot.

Expand Down Expand Up @@ -247,7 +248,7 @@ If you have gotten permission from the core contributors, you can enter into pre
- Run: `pnpm exec changeset pre enter next` in the project root
- Create a new PR from the changes created by this command
- Review, approve, and more the PR to enter prerelease mode.
- If successful, The "Version Packages" PR (if one exists) will now say "Version Packages (next)".
- If successful, The "[ci] release" PR (if one exists) will now say "[ci] release (next)".

### Exiting prerelease mode

Expand All @@ -256,7 +257,7 @@ Exiting prerelease mode should happen once an experimental release is ready to g
- Run: `pnpm exec changeset pre exit` in the project root
- Create a new PR from the changes created by this command.
- Review, approve, and more the PR to enter prerelease mode.
- If successful, The "Version Packages (next)" PR (if one exists) will now say "Version Packages".
- If successful, The "[ci] release (next)" PR (if one exists) will now say "[ci] release".

### Releasing `astro@latest` while in prerelease mode

Expand Down
2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


"""
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/sveltejs/kit repository:

Expand All @@ -33,7 +32,6 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""


"""
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/vitejs/vite repository:

Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
<br/><br/>
</p>

<div align="center">

![Build Status](https://github.com/withastro/astro/actions/workflows/ci.yml/badge.svg)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/withastro/astro/blob/main/LICENSE)
[![npm version](https://badge.fury.io/js/astro.svg)](https://badge.fury.io/js/astro)

</div>

## Install

The **recommended** way to install the latest version of Astro is by running the command below:
Expand Down Expand Up @@ -60,7 +68,6 @@ Join us on [Discord](https://astro.build/chat) to meet other maintainers. We'll
| [@astrojs/tailwind](packages/integrations/tailwind) | [![astro version](https://img.shields.io/npm/v/@astrojs/tailwind.svg?label=%20)](packages/integrations/tailwind/CHANGELOG.md) |
| [@astrojs/alpinejs](packages/integrations/alpinejs) | [![astro version](https://img.shields.io/npm/v/@astrojs/alpinejs.svg?label=%20)](packages/integrations/alpinejs/CHANGELOG.md) |
| [@astrojs/mdx](packages/integrations/mdx) | [![astro version](https://img.shields.io/npm/v/@astrojs/mdx.svg?label=%20)](packages/integrations/mdx/CHANGELOG.md) |
| [@astrojs/prefetch](packages/integrations/prefetch) | [![astro version](https://img.shields.io/npm/v/@astrojs/prefetch.svg?label=%20)](packages/integrations/prefetch/CHANGELOG.md) |

[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6178/badge)](https://bestpractices.coreinfrastructure.org/projects/6178)

Expand Down
2 changes: 1 addition & 1 deletion benchmark/packages/timer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"astro": "workspace:*"
},
"devDependencies": {
"@types/server-destroy": "^1.0.1",
"@types/server-destroy": "^1.0.3",
"astro": "workspace:*",
"astro-scripts": "workspace:*"
}
Expand Down
1 change: 1 addition & 0 deletions benchmark/packages/timer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export function getAdapter(): AstroAdapter {
serverEntrypoint: '@benchmark/timer/server.js',
previewEntrypoint: '@benchmark/timer/preview.js',
exports: ['handler'],
supportedAstroFeatures: {},
};
}

Expand Down
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.5.5"
"astro": "^4.0.5"
}
}
6 changes: 3 additions & 3 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^1.1.5",
"@astrojs/rss": "^3.0.0",
"@astrojs/mdx": "^2.0.1",
"@astrojs/rss": "^4.0.1",
"@astrojs/sitemap": "^3.0.3",
"astro": "^3.5.5"
"astro": "^4.0.5"
}
}
1 change: 1 addition & 0 deletions examples/blog/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineCollection, z } from 'astro:content';

const blog = defineCollection({
type: 'content',
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
Expand Down
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": "^3.5.5"
"astro": "^4.0.5"
},
"peerDependencies": {
"astro": "^3.0.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@astrojs/alpinejs": "^0.3.1",
"@types/alpinejs": "^3.7.2",
"alpinejs": "^3.12.3",
"astro": "^3.5.5"
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^4.0.5"
}
}
4 changes: 2 additions & 2 deletions examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/lit": "^3.0.3",
"@astrojs/lit": "^4.0.0",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^3.5.5",
"astro": "^4.0.5",
"lit": "^2.8.0"
}
}
16 changes: 8 additions & 8 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
},
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@astrojs/react": "^3.0.5",
"@astrojs/react": "^3.0.7",
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^4.0.4",
"@astrojs/vue": "^3.0.4",
"astro": "^3.5.5",
"preact": "^10.17.1",
"@astrojs/svelte": "^5.0.1",
"@astrojs/vue": "^4.0.3",
"astro": "^4.0.5",
"preact": "^10.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"solid-js": "^1.7.11",
"svelte": "^4.2.0",
"vue": "^3.3.4"
"solid-js": "^1.8.5",
"svelte": "^4.2.5",
"vue": "^3.3.8"
}
}
4 changes: 2 additions & 2 deletions examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@preact/signals": "^1.2.1",
"astro": "^3.5.5",
"preact": "^10.17.1"
"astro": "^4.0.5",
"preact": "^10.19.2"
}
}
8 changes: 4 additions & 4 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.0.5",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"astro": "^3.5.5",
"@astrojs/react": "^3.0.7",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.0.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^3.0.2",
"astro": "^3.5.5",
"solid-js": "^1.7.11"
"astro": "^4.0.5",
"solid-js": "^1.8.5"
}
}
6 changes: 3 additions & 3 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/svelte": "^4.0.4",
"astro": "^3.5.5",
"svelte": "^4.2.0"
"@astrojs/svelte": "^5.0.1",
"astro": "^4.0.5",
"svelte": "^4.2.5"
}
}
6 changes: 3 additions & 3 deletions examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/vue": "^3.0.4",
"astro": "^3.5.5",
"vue": "^3.3.4"
"@astrojs/vue": "^4.0.3",
"astro": "^4.0.5",
"vue": "^3.3.8"
}
}
29 changes: 10 additions & 19 deletions examples/framework-vue/src/components/Counter.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
<script setup lang="ts">
import { ref } from 'vue';
const count = ref(0);
const add = () => count.value++;
const subtract = () => count.value--;
</script>

<template>
<div class="counter">
<button @click="subtract()">-</button>
<button @click="subtract">-</button>
<pre>{{ count }}</pre>
<button @click="add()">+</button>
<button @click="add">+</button>
</div>
<div class="counter-message">
<slot />
</div>
</template>

<script lang="ts">
import { ref } from 'vue';
export default {
setup() {
const count = ref(0);
const add = () => (count.value = count.value + 1);
const subtract = () => (count.value = count.value - 1);
return {
count,
add,
subtract,
};
},
};
</script>

<style>
.counter {
display: grid;
Expand Down
Loading

0 comments on commit 4505ba5

Please sign in to comment.