Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy authored May 2, 2023
2 parents 2d8dad1 + 72c6bf0 commit c207c40
Show file tree
Hide file tree
Showing 194 changed files with 2,011 additions and 1,123 deletions.
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@example/*", "@test/*"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
Expand Down
5 changes: 5 additions & 0 deletions .changeset/loud-bears-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix `astro-entry` error on build with multiple JSX frameworks
5 changes: 5 additions & 0 deletions .changeset/nice-jars-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix getImage type
5 changes: 5 additions & 0 deletions .changeset/popular-bats-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Changed where various parts of the build pipeline look to decide if a page should be prerendered. They now exclusively consider PageBuildData, allowing integrations to participate in the decision.
5 changes: 0 additions & 5 deletions .changeset/quiet-cougars-fix.md

This file was deleted.

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

Inline `process.env` boolean values (`0`, `1`, `true`, `false`) during the build. This helps with DCE and allows for better `export const prerender` detection.
5 changes: 5 additions & 0 deletions .changeset/shy-games-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix content render imports flow
6 changes: 6 additions & 0 deletions .changeset/thick-frogs-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@astrojs/image': patch
'astro': patch
---

Update allowed Sharp versions to support 0.32.0
5 changes: 5 additions & 0 deletions .changeset/wise-geckos-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/vercel': minor
---

Add support for using the Vercel Image Optimization API through `astro:assets`
33 changes: 27 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Status
run: git status

# Lint autofix cannot run on forks, so just skip those! See https://github.com/wearerequired/lint-action/issues/13
- name: Lint (External)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
Expand Down Expand Up @@ -79,17 +76,22 @@ jobs:
- name: Format Check
run: pnpm run format --check

# Build primes out build caches for Turbo
# Build primes out Turbo build cache and pnpm cache
build:
name: "Build: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 3
strategy:
matrix:
OS: [ubuntu-latest]
OS: [ubuntu-latest, windows-latest]
NODE_VERSION: [16]
fail-fast: true
steps:
# Disable crlf so all OS can share the same Turbo cache
# https://github.com/actions/checkout/issues/135
- name: Disable git crlf
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -105,7 +107,9 @@ jobs:
- name: Install dependencies
run: pnpm install

# Only build in ubuntu as windows can share the build cache
- name: Build Packages
if: ${{ matrix.os == 'ubuntu-latest' }}
run: pnpm run build

test:
Expand All @@ -126,6 +130,9 @@ jobs:
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- name: Disable git crlf
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v3

Expand Down Expand Up @@ -165,6 +172,9 @@ jobs:
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- name: Disable git crlf
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v3

Expand Down Expand Up @@ -198,6 +208,9 @@ jobs:
env:
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- name: Disable git crlf
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -219,10 +232,18 @@ jobs:
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

# Reset lockfile changes so that Turbo can reuse the old build cache
- name: Reset lockfile changes
run: git reset --hard

- name: Build Packages
run: pnpm run build

- name: Remove docs translations except for English and Korean
run: find smoke/docs/src/content/docs ! -name 'en' ! -name 'ko' -type d -mindepth 1 -maxdepth 1 -exec rm -rf {} +

- name: Test
run: pnpm run test:smoke
env:
SKIP_OG: 1
SKIP_OG: true
PUBLIC_TWO_LANG: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ packages/integrations/**/.netlify/
# ignore content collection generated files
packages/**/test/**/fixtures/**/.astro/
packages/**/test/**/fixtures/**/env.d.ts
packages/**/e2e/**/fixtures/**/.astro/
packages/**/e2e/**/fixtures/**/env.d.ts
examples/**/.astro/
examples/**/env.d.ts
23 changes: 23 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
printWidth: 100,
semi: true,
singleQuote: true,
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',
},
},
],
};
32 changes: 0 additions & 32 deletions .prettierrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion benchmark/packages/timer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"server-destroy": "^1.0.1"
},
"peerDependencies": {
"astro": "workspace:^2.0.18"
"astro": "workspace:^2.3.2"
},
"devDependencies": {
"@types/server-destroy": "^1.0.1",
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.3.1"
"astro": "^2.3.2"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"@astrojs/mdx": "^0.19.0",
"@astrojs/rss": "^2.3.2",
"@astrojs/rss": "^2.4.0",
"@astrojs/sitemap": "^1.2.2"
}
}
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": "^2.3.1"
"astro": "^2.3.2"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
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": "^2.3.1"
"astro": "^2.3.2"
},
"devDependencies": {
"@astrojs/deno": "^4.1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"alpinejs": "^3.10.2",
"@astrojs/alpinejs": "^0.2.1",
"@types/alpinejs": "^3.7.0"
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"lit": "^2.7.0",
"@astrojs/lit": "^2.0.1",
"@webcomponents/template-shadowroot": "^0.2.1"
Expand Down
15 changes: 9 additions & 6 deletions examples/framework-lit/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ import { MyCounter } from '../components/my-counter.js';
<Lorem />

{
/**
* Our VS Code extension does not currently properly typecheck attributes on Lit components
* As such, the following code will result in a TypeScript error inside the editor, nonetheless, it works in Astro!
*/
(
/**
* Our editor tooling does not currently properly typecheck attributes on imported Lit components. As such, without a
* pragma directive telling TypeScript to ignore the error, the line below will result in an error in the editor.
* Nonetheless, this code works in Astro itself!
*/
// @ts-expect-error
<CalcAdd num={0} />
)
}
{/** @ts-expect-error */}
<CalcAdd num={0} />
</body>
</html>
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"preact": "^10.7.3",
"@astrojs/preact": "^2.1.0",
"@preact/signals": "^1.1.0"
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^2.1.1",
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 @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"solid-js": "^1.4.3",
"@astrojs/solid-js": "^2.1.0"
}
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 @@ -13,6 +13,6 @@
"dependencies": {
"svelte": "^3.48.0",
"@astrojs/svelte": "^2.1.0",
"astro": "^2.3.1"
"astro": "^2.3.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1",
"astro": "^2.3.2",
"vue": "^3.2.37",
"@astrojs/vue": "^2.1.1"
}
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": "^5.1.1",
"astro": "^2.3.1"
"astro": "^2.3.2"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^2.3.1"
"astro": "^2.3.2"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1"
"astro": "^2.3.2"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.3.1"
"astro": "^2.3.2"
}
}
Loading

0 comments on commit c207c40

Please sign in to comment.