Skip to content

Commit

Permalink
Merge branch 'main' into fix/mdx-image-component
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Sep 13, 2023
2 parents fdd2b48 + c92e0ac commit 783e31f
Show file tree
Hide file tree
Showing 346 changed files with 1,628 additions and 2,072 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-doors-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Adds support for using AVIF (`.avif`) files with the Image component. Importing an AVIF file will now correctly return the same object shape as other image file types. See the [Image docs](https://docs.astro.build/en/guides/images/#update-existing-img-tags) for more information on the different properties available on the returned object.
5 changes: 5 additions & 0 deletions .changeset/grumpy-seas-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/markdown-remark': minor
---

feat(markdown): Add support for `imageReference` paths when collecting images
5 changes: 5 additions & 0 deletions .changeset/long-trees-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Add types for the object syntax for `style` (ex: `style={{color: 'red'}}`)
5 changes: 5 additions & 0 deletions .changeset/slow-mirrors-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Improved error messages around `astro:assets`
5 changes: 5 additions & 0 deletions .changeset/ten-kings-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': minor
---

Improve startup performance by removing dependencies, lazily initializing async contextual values
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { builtinModules } = require('module');

module.exports = {
extends: [
'plugin:@typescript-eslint/recommended-type-checked',
Expand Down Expand Up @@ -54,6 +56,19 @@ module.exports = {
'prefer-const': 'off',
},
overrides: [
{
// Ensure Node builtins aren't included in Astro's server runtime
files: ['packages/astro/src/runtime/**/*.ts'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [...builtinModules],
patterns: ['node:*'],
},
],
},
},
{
files: ['packages/**/test/*.js', 'packages/**/*.js'],
env: {
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 1 addition & 4 deletions benchmark/packages/timer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2022",
"outDir": "./dist",
"target": "ES2022"
"outDir": "./dist"
}
}
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

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]
```

## Community Examples

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
```
4 changes: 2 additions & 2 deletions examples/basics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro Starter Kit: Basics

```
```sh
npm create astro@latest -- --template basics
```

Expand All @@ -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
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.0.12"
"astro": "^3.0.13"
}
}
4 changes: 2 additions & 2 deletions examples/blog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro Starter Kit: Blog

```
```sh
npm create astro@latest -- --template blog
```

Expand All @@ -25,7 +25,7 @@ Features:

Inside of your Astro project, you'll see the following folders and files:

```
```text
├── public/
├── src/
│   ├── components/
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/mdx": "^1.0.3",
"@astrojs/rss": "^3.0.0",
"@astrojs/sitemap": "^3.0.0",
"astro": "^3.0.12"
"astro": "^3.0.13"
}
}
4 changes: 2 additions & 2 deletions examples/component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a template for an Astro component library. Use this template for writing components to use in multiple projects or publish to NPM.

```
```sh
npm create astro@latest -- --template component
```

Expand All @@ -14,7 +14,7 @@ npm create astro@latest -- --template component

Inside of your Astro project, you'll see the following folders and files:

```
```text
/
├── index.ts
├── src
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.0.12"
"astro": "^3.0.13"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/deno)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/deno/devcontainer.json)

```
```sh
npm create astro@latest -- --template deno
```

Expand All @@ -16,7 +16,7 @@ npm create astro@latest -- --template deno

Inside of your Astro project, you'll see the following folders and files:

```
```text
/
├── public/
│ └── favicon.svg
Expand Down
2 changes: 1 addition & 1 deletion examples/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.0.12"
"astro": "^3.0.13"
},
"devDependencies": {
"@astrojs/deno": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro + AlpineJS Example

```
```sh
npm create astro@latest -- --template framework-alpine
```

Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.3.0",
"@types/alpinejs": "^3.7.2",
"alpinejs": "^3.12.3",
"astro": "^3.0.12"
"astro": "^3.0.13"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro + Lit Example

```
```sh
npm create astro@latest -- --template framework-lit
```

Expand Down
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^3.0.0",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^3.0.12",
"astro": "^3.0.13",
"lit": "^2.8.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kitchen Sink: Microfrontends with Astro

```
```sh
npm create astro@latest -- --template framework-multiple
```

Expand Down
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/solid-js": "^3.0.1",
"@astrojs/svelte": "^4.0.2",
"@astrojs/vue": "^3.0.0",
"astro": "^3.0.12",
"astro": "^3.0.13",
"preact": "^10.17.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro + Preact Example

```
```sh
npm create astro@latest -- --template framework-preact
```

Expand Down
2 changes: 1 addition & 1 deletion 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.0",
"@preact/signals": "^1.2.1",
"astro": "^3.0.12",
"astro": "^3.0.13",
"preact": "^10.17.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro + React Example

```
```sh
npm create astro@latest -- --template framework-react
```

Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^3.0.2",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"astro": "^3.0.12",
"astro": "^3.0.13",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro + Solid.js Example

```
```sh
npm create astro@latest -- --template framework-solid
```

Expand Down
2 changes: 1 addition & 1 deletion 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.1",
"astro": "^3.0.12",
"astro": "^3.0.13",
"solid-js": "^1.7.11"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro + Svelte Example

```
```sh
npm create astro@latest -- --template framework-svelte
```

Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^4.0.2",
"astro": "^3.0.12",
"astro": "^3.0.13",
"svelte": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro + Vue Example

```
```sh
npm create astro@latest -- --template framework-vue
```

Expand Down
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^3.0.0",
"astro": "^3.0.12",
"astro": "^3.0.13",
"vue": "^3.3.4"
}
}
4 changes: 2 additions & 2 deletions examples/hackernews/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Astro Starter Kit: Hackernews

```
```sh
npm create astro@latest -- --template hackernews
```

Expand All @@ -14,7 +14,7 @@ npm create astro@latest -- --template hackernews

Inside of your Astro project, you'll see the following folders and files:

```
```text
/
├── public/
│ └── favicon.svg
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^6.0.0",
"astro": "^3.0.12"
"astro": "^3.0.13"
}
}
Loading

0 comments on commit 783e31f

Please sign in to comment.