Skip to content

Commit

Permalink
Merge branch 'main' into feat/directory-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Aug 8, 2022
2 parents 75d18c8 + 2c71a99 commit a1aa4a8
Show file tree
Hide file tree
Showing 524 changed files with 7,804 additions and 6,035 deletions.
5 changes: 0 additions & 5 deletions .changeset/clever-nails-pump.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fifty-apricots-clap.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/five-singers-notice.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/giant-dolls-reply.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lucky-phones-mix.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quick-onions-itch.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/shy-kids-hug.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/slow-terms-repeat.md

This file was deleted.

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

Fix client build sourcemap generation
5 changes: 5 additions & 0 deletions .changeset/thick-ducks-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fix custom 404 pages when using `astro preview` (#4113)
50 changes: 28 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
FORCE_COLOR: true
ASTRO_TELEMETRY_DISABLED: true


jobs:
lint:
name: Lint
Expand Down Expand Up @@ -79,8 +80,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [14]
OS: [ubuntu-latest]
NODE_VERSION: [14]
fail-fast: true
steps:
- name: Checkout
Expand All @@ -89,10 +90,10 @@ jobs:
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.1

- name: Setup node@${{ matrix.node_version }}
- name: Setup node@${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
node-version: ${{ matrix.NODE_VERSION }}
cache: 'pnpm'

- name: Install dependencies
Expand All @@ -102,30 +103,31 @@ jobs:
run: pnpm run build

test:
name: 'Test: ${{ matrix.os }} (node@${{ matrix.node_version }})'
name: 'Test: ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})'
runs-on: ${{ matrix.os }}
needs: build
strategy:
matrix:
os: [ubuntu-latest]
node_version: [14, 16]
OS: [ubuntu-latest, windows-latest]
# TODO: Enable node@18!
NODE_VERSION: [14, 16]
include:
- os: windows-latest
node_version: 14
- os: macos-latest
node_version: 14
NODE_VERSION: 14
fail-fast: false
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Setup node@${{ matrix.node_version }}
- name: Setup node@${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
node-version: ${{ matrix.NODE_VERSION }}
cache: 'pnpm'

- name: Use Deno
Expand All @@ -143,26 +145,28 @@ jobs:
run: pnpm run test

e2e:
name: 'Test (E2E): ${{ matrix.os }} (node@${{ matrix.node_version }})'
name: 'Test (E2E): ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})'
runs-on: ${{ matrix.os }}
timeout-minutes: 20
needs: build
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node_version: [14]
OS: [ubuntu-latest, windows-latest]
NODE_VERSION: [14]
fail-fast: false
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Setup node@${{ matrix.node_version }}
- name: Setup node@${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
node-version: ${{ matrix.NODE_VERSION }}
cache: 'pnpm'

- name: Install dependencies
Expand All @@ -175,24 +179,26 @@ jobs:
run: pnpm run test:e2e

smoke:
name: 'Test (Smoke): ${{ matrix.os }} (node@${{ matrix.node_version }})'
name: 'Test (Smoke): ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})'
runs-on: ${{ matrix.os }}
needs: build
strategy:
matrix:
os: [ubuntu-latest]
node_version: [14]
OS: [ubuntu-latest]
NODE_VERSION: [14]
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Setup node@${{ matrix.node_version }}
- name: Setup node@${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
node-version: ${{ matrix.NODE_VERSION }}
cache: 'pnpm'

- name: Checkout docs
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM gitpod/workspace-node

# Install latest pnpm
RUN pnpm i -g pnpm
RUN curl -fsSL https://get.pnpm.io/install.sh | SHELL=`which bash` bash -

# Install deno in gitpod
RUN curl -fsSL https://deno.land/x/install/install.sh | sh
Expand Down
2 changes: 1 addition & 1 deletion .gitpod/gitpod-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
fi

# Wait for VSCode to be ready (port 23000)
gp await-port 23000 > /dev/null 2>&1
gp ports await 23000 > /dev/null 2>&1

echo "Loading example project:" $EXAMPLE_PROJECT

Expand Down
10 changes: 7 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# To be removed with ".astro" parsing is ready
# Also, be sure to remove "pluginSearchDirs" from config
**/*.astro
# Ignoring these files for now due to https://github.com/withastro/compiler/issues/318
examples/basics/src/layouts
examples/blog/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

# Deep Directories
**/dist
Expand Down
10 changes: 8 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": true,
"plugins": ["./node_modules/prettier-plugin-astro"],
"overrides": [
{
"files": [".*", "*.json", "*.md", "*.toml", "*.yml"],
"options": {
"useTabs": false
}
},
{
"files": ["**/*.astro"],
"options": {
"parser": "astro"
}
}
],
"pluginSearchDirs": ["./assets"]
]
}
1 change: 0 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Astro Examples Library


The easiest way to check out one of these examples on your machine is by running this command in an empty directory:

```
Expand Down
14 changes: 8 additions & 6 deletions examples/basics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ Any static assets, like images, can be placed in the `public/` directory.

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :---------------- | :------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| Command | Action |
| :--------------------- | :------------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` |
| `npm run astro --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Expand Down
5 changes: 3 additions & 2 deletions examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview"
"preview": "astro preview",
"astro": "astro"
},
"devDependencies": {
"astro": "^1.0.0-rc.1"
"astro": "^1.0.0-rc.7"
}
}
4 changes: 3 additions & 1 deletion examples/basics/src/components/Card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export interface Props {
body: string;
href: string;
}
const { href, title, body } = Astro.props;
const { href, title, body } = Astro.props as Props;
---

<li class="link-card">
Expand Down Expand Up @@ -69,6 +70,7 @@ const { href, title, body } = Astro.props;
}

.link-card:is(:hover, :focus-within) h2 span {
will-change: transform;
transform: translateX(2px);
}
</style>
1 change: 1 addition & 0 deletions examples/basics/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
5 changes: 3 additions & 2 deletions examples/basics/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
import Layout from '../layouts/Layout.astro';
import Card from '../components/Card.astro';
---

<Layout title="Welcome to Astro.">
Expand Down Expand Up @@ -86,6 +86,7 @@ import Card from "../components/Card.astro";
border-radius: 4px;
padding: 0.15em 0.25em;
}

.link-card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
Expand Down
4 changes: 2 additions & 2 deletions examples/basics/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
54 changes: 0 additions & 54 deletions examples/blog-multiple-authors/README.md

This file was deleted.

Loading

0 comments on commit a1aa4a8

Please sign in to comment.