Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Aug 1, 2023
2 parents fd88098 + e1e958a commit a8e1272
Show file tree
Hide file tree
Showing 359 changed files with 6,929 additions and 2,622 deletions.
8 changes: 0 additions & 8 deletions .changeset/great-days-judge.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/happy-carrots-lick.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/pink-deers-grab.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/smart-hairs-lick.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/stupid-trains-move.md

This file was deleted.

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

Fix: ignore `.json` files nested in subdirectories within content collection directories starting with an `_` underscore.
35 changes: 35 additions & 0 deletions .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Cleanup cache

on:
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
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: ${{ github.repository_owner == 'withastro' && github.event.head_commit.message != '[ci] format' }}
uses: withastro/automation/.github/workflows/congratsbot.yml@main
with:
EMOJIS: '🎉,🎊,🧑‍🚀,🥳,🙌,🚀,👏,<:houston_golden:1068575433647456447>,<:astrocoin:894990669515489301>,<:astro_pride:1085944201587458169>'
EMOJIS: '🎉,🎊,🧑‍🚀,🥳,🙌,🚀,👏,<:houston_golden:1068575433647456447>,<:astrocoin:894990669515489301>,<:astro_pride:1130501345326157854>'
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- "1-legacy"
- next

defaults:
run:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/test-hosts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Hosted tests

on:
schedule:
- cron: '0 0 * * 0'

env:
ASTRO_TELEMETRY_DISABLED: true
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_TEST_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_TEST_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_TEST_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TEST_AUTH_TOKEN }}
FORCE_COLOR: true

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Install Hosts CLIs
run: pnpm install --global netlify-cli vercel

- name: Deploy Vercel
working-directory: ./packages/integrations/vercel/test/hosted/hosted-astro-project
run:
pnpm run build
vercel --prod --prebuilt

- name: Deploy Netlify
working-directory: ./packages/integrations/netlify/test/hosted/hosted-astro-project
run:
pnpm run build
netlify deploy --prod

- name: Test both hosts
run:
pnpm run test:e2e:hosts
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist/
*.tsbuildinfo
.DS_Store
.vercel
.netlify
_site/
scripts/smoke/*-main/
scripts/memory/project/src/pages/
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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/

# Deep Directories
**/dist
**/smoke
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm create astro@latest -- --template basics

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png)
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)

## 🚀 Project Structure

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": "^2.8.4"
"astro": "^2.9.7"
}
}
20 changes: 9 additions & 11 deletions examples/basics/src/components/Card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,23 @@ const { href, title, body } = Astro.props;
.link-card {
list-style: none;
display: flex;
padding: 0.25rem;
background-color: white;
padding: 1px;
background-color: #23262d;
background-image: none;
background-size: 400%;
border-radius: 0.6rem;
border-radius: 7px;
background-position: 100%;
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.link-card > a {
width: 100%;
text-decoration: none;
line-height: 1.4;
padding: 1rem 1.3rem;
border-radius: 0.35rem;
color: #111;
background-color: white;
padding: calc(1.5rem - 1px);
border-radius: 8px;
color: white;
background-color: #23262d;
opacity: 0.8;
}
h2 {
Expand All @@ -51,13 +50,12 @@ const { href, title, body } = Astro.props;
p {
margin-top: 0.5rem;
margin-bottom: 0;
color: #444;
}
.link-card:is(:hover, :focus-within) {
background-position: 0;
background-image: var(--accent-gradient);
}
.link-card:is(:hover, :focus-within) h2 {
color: rgb(var(--accent));
color: rgb(var(--accent-light));
}
</style>
11 changes: 7 additions & 4 deletions examples/basics/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
interface Props {
title: string;
}
Expand All @@ -22,12 +22,15 @@ const { title } = Astro.props;
</html>
<style is:global>
:root {
--accent: 124, 58, 237;
--accent-gradient: linear-gradient(45deg, rgb(var(--accent)), #da62c4 30%, white 60%);
--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%);
}
html {
font-family: system-ui, sans-serif;
background-color: #F6F6F6;
background: #13151A;
background-size: 224px;
}
code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Expand Down
75 changes: 58 additions & 17 deletions examples/basics/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ import Card from '../components/Card.astro';

<Layout title="Welcome to Astro.">
<main>
<svg
class="astro-a"
width="495"
height="623"
viewBox="0 0 495 623"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M167.19 364.254C83.4786 364.254 0 404.819 0 404.819C0 404.819 141.781 19.4876 142.087 18.7291C146.434 7.33701 153.027 0 162.289 0H332.441C341.703 0 348.574 7.33701 352.643 18.7291C352.92 19.5022 494.716 404.819 494.716 404.819C494.716 404.819 426.67 364.254 327.525 364.254L264.41 169.408C262.047 159.985 255.147 153.581 247.358 153.581C239.569 153.581 232.669 159.985 230.306 169.408L167.19 364.254ZM160.869 530.172C160.877 530.18 160.885 530.187 160.894 530.195L160.867 530.181C160.868 530.178 160.868 530.175 160.869 530.172ZM136.218 411.348C124.476 450.467 132.698 504.458 160.869 530.172C160.997 529.696 161.125 529.242 161.248 528.804C161.502 527.907 161.737 527.073 161.917 526.233C165.446 509.895 178.754 499.52 195.577 500.01C211.969 500.487 220.67 508.765 223.202 527.254C224.141 534.12 224.23 541.131 224.319 548.105C224.328 548.834 224.337 549.563 224.347 550.291C224.563 566.098 228.657 580.707 237.264 593.914C245.413 606.426 256.108 615.943 270.749 622.478C270.593 621.952 270.463 621.508 270.35 621.126C270.045 620.086 269.872 619.499 269.685 618.911C258.909 585.935 266.668 563.266 295.344 543.933C298.254 541.971 301.187 540.041 304.12 538.112C310.591 533.854 317.059 529.599 323.279 525.007C345.88 508.329 360.09 486.327 363.431 457.844C364.805 446.148 363.781 434.657 359.848 423.275C358.176 424.287 356.587 425.295 355.042 426.275C351.744 428.366 348.647 430.33 345.382 431.934C303.466 452.507 259.152 455.053 214.03 448.245C184.802 443.834 156.584 436.019 136.218 411.348Z"
fill="url(#paint0_linear_1805_24383)"></path>
<defs>
<linearGradient
id="paint0_linear_1805_24383"
x1="247.358"
y1="0"
x2="247.358"
y2="622.479"
gradientUnits="userSpaceOnUse"
>
<stop stop-opacity="0.9"></stop>
<stop offset="1" stop-opacity="0.2"></stop>
</linearGradient>
</defs>
</svg>
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
<p class="instructions">
To get started, open the directory <code>src/pages</code> in your project.<br />
Expand Down Expand Up @@ -38,13 +65,28 @@ import Card from '../components/Card.astro';
<style>
main {
margin: auto;
padding: 1.5rem;
max-width: 60ch;
padding: 1rem;
width: 800px;
max-width: calc(100% - 2rem);
color: white;
font-size: 20px;
line-height: 1.6;
}
.astro-a {
position: absolute;
top: -32px;
left: 50%;
transform: translatex(-50%);
width: 220px;
height: auto;
z-index: -1;
}
h1 {
font-size: 3rem;
font-weight: 800;
margin: 0;
font-size: 4rem;
font-weight: 700;
line-height: 1;
text-align: center;
margin-bottom: 1em;
}
.text-gradient {
background-image: var(--accent-gradient);
Expand All @@ -54,28 +96,27 @@ import Card from '../components/Card.astro';
background-position: 0%;
}
.instructions {
line-height: 1.6;
margin: 1rem 0;
border: 1px solid rgba(var(--accent), 25%);
background-color: white;
padding: 1rem;
border-radius: 0.4rem;
margin-bottom: 2rem;
border: 1px solid rgba(var(--accent-light), 25%);
background: linear-gradient(rgba(var(--accent-dark), 66%), rgba(var(--accent-dark), 33%));
padding: 1.5rem;
border-radius: 8px;
}
.instructions code {
font-size: 0.875em;
font-size: 0.8em;
font-weight: bold;
background: rgba(var(--accent), 12%);
color: rgb(var(--accent));
background: rgba(var(--accent-light), 12%);
color: rgb(var(--accent-light));
border-radius: 4px;
padding: 0.3em 0.45em;
padding: 0.3em 0.4em;
}
.instructions strong {
color: rgb(var(--accent));
color: rgb(var(--accent-light));
}
.link-card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
gap: 1rem;
gap: 2rem;
padding: 0;
}
</style>
2 changes: 1 addition & 1 deletion examples/blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm create astro@latest -- --template blog

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![blog](https://user-images.githubusercontent.com/4677417/186189140-4ef17aac-c3c9-4918-a8c2-ce86ba1bb394.png)
![blog](https://github.com/withastro/astro/assets/2244813/ff10799f-a816-4703-b967-c78997e8323d)

Features:

Expand Down
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/rss": "^2.4.3",
"@astrojs/sitemap": "^2.0.0",
"astro": "^2.8.4"
"@astrojs/sitemap": "^2.0.1",
"astro": "^2.9.7"
}
}
Binary file added examples/blog/public/blog-placeholder-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/blog/public/blog-placeholder-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/blog/public/blog-placeholder-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/blog/public/blog-placeholder-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/blog/public/blog-placeholder-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/blog/public/fonts/atkinson-bold.woff
Binary file not shown.
Binary file added examples/blog/public/fonts/atkinson-regular.woff
Binary file not shown.
Binary file removed examples/blog/public/placeholder-hero.jpg
Binary file not shown.
Binary file removed examples/blog/public/placeholder-social.jpg
Binary file not shown.
Loading

0 comments on commit a8e1272

Please sign in to comment.