Skip to content

Commit

Permalink
Merge branch 'main' into docs/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Sep 2, 2024
2 parents f9b049a + 645f4e2 commit b4791e8
Show file tree
Hide file tree
Showing 400 changed files with 3,270 additions and 12,734 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-zebras-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes typo in documenting the `fallbackType` property in i18n routing
5 changes: 5 additions & 0 deletions .changeset/odd-tips-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Correctly handles content layer data where the transformed value does not match the input schema
13 changes: 7 additions & 6 deletions benchmark/bench/cli-startup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fileURLToPath } from 'node:url';
import { execaCommand } from 'execa';
import { exec } from 'tinyexec';
import { markdownTable } from 'markdown-table';
import { astroBin, calculateStat } from './_util.js';

Expand All @@ -14,11 +14,11 @@ export async function run(projectDir, outputFile) {
const root = fileURLToPath(projectDir);

console.log('Benchmarking `astro --help`...');
const helpStat = await benchmarkCommand(`node ${astroBin} --help`, root);
const helpStat = await benchmarkCommand('node', [astroBin, '--help'], root);
console.log('Done');

console.log('Benchmarking `astro info`...');
const infoStat = await benchmarkCommand(`node ${astroBin} info`, root);
console.log('Benchmarking `astro preferences list`...');
const infoStat = await benchmarkCommand('node', [astroBin, 'preferences', 'list'], root);
console.log('Done');

console.log('Result preview:');
Expand All @@ -35,16 +35,17 @@ export async function run(projectDir, outputFile) {

/**
* @param {string} command
* @param {string[]} args
* @param {string} root
* @returns {Promise<import('./_util.js').Stat>}
*/
async function benchmarkCommand(command, root) {
async function benchmarkCommand(command, args, root) {
/** @type {number[]} */
const durations = [];

for (let i = 0; i < 10; i++) {
const start = performance.now();
await execaCommand(command, { cwd: root });
await exec(command, args, { nodeOptions: { cwd: root } });
durations.push(performance.now() - start);
}

Expand Down
14 changes: 8 additions & 6 deletions benchmark/bench/memory.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { execaCommand } from 'execa';
import { exec } from 'tinyexec';
import { markdownTable } from 'markdown-table';
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
Expand All @@ -18,11 +18,13 @@ export async function run(projectDir, outputFile) {
const outputFilePath = fileURLToPath(outputFile);

console.log('Building and benchmarking...');
await execaCommand(`node --expose-gc --max_old_space_size=10000 ${astroBin} build --silent`, {
cwd: root,
stdio: 'inherit',
env: {
ASTRO_TIMER_PATH: outputFilePath,
await exec('node', ['--expose-gc', '--max_old_space_size=10000', astroBin, 'build'], {
nodeOptions: {
cwd: root,
stdio: 'inherit',
env: {
ASTRO_TIMER_PATH: outputFilePath,
},
},
});

Expand Down
18 changes: 11 additions & 7 deletions benchmark/bench/render.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { execaCommand } from 'execa';
import { exec } from 'tinyexec';
import { markdownTable } from 'markdown-table';
import fs from 'node:fs/promises';
import http from 'node:http';
Expand All @@ -20,15 +20,19 @@ export async function run(projectDir, outputFile) {
const root = fileURLToPath(projectDir);

console.log('Building...');
await execaCommand(`${astroBin} build`, {
cwd: root,
stdio: 'inherit',
await exec(astroBin, ['build'], {
nodeOptions: {
cwd: root,
stdio: 'inherit',
},
});

console.log('Previewing...');
const previewProcess = execaCommand(`${astroBin} preview --port ${port}`, {
cwd: root,
stdio: 'inherit',
const previewProcess = exec(astroBin, ['preview', '--port', port], {
nodeOptions: {
cwd: root,
stdio: 'inherit',
},
});

console.log('Waiting for server ready...');
Expand Down
10 changes: 6 additions & 4 deletions benchmark/bench/server-stress.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import autocannon from 'autocannon';
import { execaCommand } from 'execa';
import { exec } from 'tinyexec';
import { markdownTable } from 'markdown-table';
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
Expand All @@ -19,9 +19,11 @@ export async function run(projectDir, outputFile) {
const root = fileURLToPath(projectDir);

console.log('Building...');
await execaCommand(`${astroBin} build`, {
cwd: root,
stdio: 'inherit',
await exec(astroBin, ['build'], {
nodeOptions: {
cwd: root,
stdio: 'inherit',
},
});

console.log('Previewing...');
Expand Down
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
},
"dependencies": {
"@astrojs/mdx": "workspace:*",
"@astrojs/node": "workspace:*",
"@astrojs/node": "^8.3.3",
"@benchmark/timer": "workspace:*",
"astro": "workspace:*",
"autocannon": "^7.15.0",
"execa": "^8.0.1",
"markdown-table": "^3.0.3",
"mri": "^1.2.0",
"port-authority": "^2.0.1",
"pretty-bytes": "^6.1.1",
"sharp": "^0.33.3"
"sharp": "^0.33.3",
"tinyexec": "^0.3.0"
}
}
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": "^4.14.6"
"astro": "^4.15.1"
}
}
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": "^3.1.5",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
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": "^4.14.6"
"astro": "^4.15.1"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/container-with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^4.14.6",
"astro": "^4.15.1",
"@astrojs/react": "^3.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vitest": "^2.0.5"
},
"devDependencies": {
"@types/react": "^18.3.4",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0"
}
}
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.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.1",
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
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": "^4.3.0",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.14.6",
"astro": "^4.15.1",
"lit": "^3.2.0"
}
}
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"@astrojs/solid-js": "^4.4.1",
"@astrojs/svelte": "^5.7.0",
"@astrojs/vue": "^4.5.0",
"@types/react": "^18.3.4",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^4.14.6",
"astro": "^4.15.1",
"preact": "^10.23.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
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.5.2",
"@preact/signals": "^1.3.0",
"astro": "^4.14.6",
"astro": "^4.15.1",
"preact": "^10.23.2"
}
}
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
},
"dependencies": {
"@astrojs/react": "^3.6.2",
"@types/react": "^18.3.4",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^4.14.6",
"astro": "^4.15.1",
"react": "^18.3.1",
"react-dom": "^18.3.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 @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.1",
"astro": "^4.14.6",
"astro": "^4.15.1",
"solid-js": "^1.8.22"
}
}
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": "^5.7.0",
"astro": "^4.14.6",
"astro": "^4.15.1",
"svelte": "^4.2.19"
}
}
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": "^4.5.0",
"astro": "^4.14.6",
"astro": "^4.15.1",
"vue": "^3.4.38"
}
}
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": "^8.3.3",
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
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": "^4.14.6"
"astro": "^4.15.1"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.3.3",
"astro": "^4.14.6",
"astro": "^4.15.1",
"html-minifier": "^4.0.0"
},
"devDependencies": {
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": "^4.14.6"
"astro": "^4.15.1"
}
}
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": "^4.14.6"
"astro": "^4.15.1"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
8 changes: 4 additions & 4 deletions examples/server-islands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"@astrojs/react": "^3.6.2",
"@astrojs/tailwind": "^5.1.0",
"@fortawesome/fontawesome-free": "^6.6.0",
"@tailwindcss/forms": "^0.5.7",
"@types/react": "^18.3.4",
"@tailwindcss/forms": "^0.5.8",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^4.14.6",
"postcss": "^8.4.41",
"astro": "^4.15.1",
"postcss": "^8.4.43",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwindcss": "^3.4.10"
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.3.3",
"@astrojs/svelte": "^5.7.0",
"astro": "^4.14.6",
"astro": "^4.15.1",
"svelte": "^4.2.19"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.14.6",
"astro": "^4.15.1",
"sass": "^1.77.8",
"sharp": "^0.33.3"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/toolbar-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.3.3",
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.11.4",
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^5.2.0",
"astro": "^4.14.6",
"astro": "^4.15.1",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.14.6"
"astro": "^4.15.1"
}
}
Loading

0 comments on commit b4791e8

Please sign in to comment.