Skip to content

Commit

Permalink
Merge branch 'main' into get-entry-serial
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed May 22, 2023
2 parents a2c70c0 + 0616ef2 commit 47181b5
Show file tree
Hide file tree
Showing 59 changed files with 438 additions and 199 deletions.
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdoc": "^0.1.2",
"@astrojs/markdoc": "^0.2.0",
"astro": "^2.4.1",
"kleur": "^4.1.5"
}
Expand Down
14 changes: 14 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# astro

## 2.5.1

### Patch Changes

- [#7128](https://github.com/withastro/astro/pull/7128) [`72f686a68`](https://github.com/withastro/astro/commit/72f686a68930de52f9a274c13c98acad59925b31) Thanks [@johannesspohr](https://github.com/johannesspohr)! - Fix routes created by `injectRoute` for SSR

- [#7132](https://github.com/withastro/astro/pull/7132) [`319a0a7a0`](https://github.com/withastro/astro/commit/319a0a7a0a6a950387c942b467746d590bb32fda) Thanks [@ematipico](https://github.com/ematipico)! - Emit middleware as an entrypoint during build

- [#7036](https://github.com/withastro/astro/pull/7036) [`852d59a8d`](https://github.com/withastro/astro/commit/852d59a8d68e124f10852609e0f1619d5838ac76) Thanks [@ematipico](https://github.com/ematipico)! - Emit pages as dynamic import chunks during the build

- [#7126](https://github.com/withastro/astro/pull/7126) [`530fb9ebe`](https://github.com/withastro/astro/commit/530fb9ebee77646921ec29d45d9b66484bdfb521) Thanks [@bluwy](https://github.com/bluwy)! - Add route information when warning of `getStaticPaths()` ignored

- [#7118](https://github.com/withastro/astro/pull/7118) [`3257dd289`](https://github.com/withastro/astro/commit/3257dd28901c785a6a661211b98c5ef2cb3b9aa4) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix unnecessary warning showing on start when a collection folder was empty. The warning was also enhanced to add more information about possible causes.

## 2.5.0

### Minor Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/astro/e2e/client-only.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.afterAll(async () => {

test.describe('Client only', () => {
test('React counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = await page.locator('#react-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -33,7 +33,7 @@ test.describe('Client only', () => {
});

test('Preact counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = await page.locator('#preact-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -51,7 +51,7 @@ test.describe('Client only', () => {
});

test('Solid counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = await page.locator('#solid-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -69,7 +69,7 @@ test.describe('Client only', () => {
});

test('Vue counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = await page.locator('#vue-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -87,7 +87,7 @@ test.describe('Client only', () => {
});

test('Svelte counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = await page.locator('#svelte-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand Down
10 changes: 5 additions & 5 deletions packages/astro/e2e/errors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test.afterAll(async ({ astro }) => {

test.describe('Error display', () => {
test('detect syntax errors in template', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/astro-syntax-error'));
await page.goto(astro.resolveUrl('/astro-syntax-error'), { waitUntil: 'networkidle' });

const message = (await getErrorOverlayContent(page)).message;
expect(message).toMatch('Unexpected "}"');
Expand All @@ -37,7 +37,7 @@ test.describe('Error display', () => {
});

test('shows useful error when frontmatter import is not found', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/import-not-found'));
await page.goto(astro.resolveUrl('/import-not-found'), { waitUntil: 'networkidle' });

const message = (await getErrorOverlayContent(page)).message;
expect(message).toMatch('Could not import ../abc.astro');
Expand All @@ -53,7 +53,7 @@ test.describe('Error display', () => {
});

test('shows correct file path when a page has an error', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/import-not-found'));
await page.goto(astro.resolveUrl('/import-not-found'), { waitUntil: 'networkidle' });

const { fileLocation, absoluteFileLocation } = await getErrorOverlayContent(page);
const absoluteFileUrl = 'file://' + absoluteFileLocation.replace(/:\d+:\d+$/, '');
Expand All @@ -64,7 +64,7 @@ test.describe('Error display', () => {
});

test('shows correct file path when a component has an error', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/preact-runtime-error'));
await page.goto(astro.resolveUrl('/preact-runtime-error'), { waitUntil: 'networkidle' });

const { fileLocation, absoluteFileLocation } = await getErrorOverlayContent(page);
const absoluteFileUrl = 'file://' + absoluteFileLocation.replace(/:\d+:\d+$/, '');
Expand All @@ -75,7 +75,7 @@ test.describe('Error display', () => {
});

test('framework errors recover when fixed', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/svelte-syntax-error'));
await page.goto(astro.resolveUrl('/svelte-syntax-error'), { waitUntil: 'networkidle' });

const message = (await getErrorOverlayContent(page)).message;
expect(message).toMatch('</div> attempted to close an element that was not open');
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/hydration-race.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.afterEach(async () => {

test.describe('Hydration race', () => {
test('Islands inside of slots hydrate', async ({ page, astro }) => {
await page.goto('/slot');
await page.goto(astro.resolveUrl('/slot'));

const html = await page.content();

Expand Down
24 changes: 12 additions & 12 deletions packages/astro/e2e/multiple-frameworks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.afterAll(async () => {

test.skip('Multiple frameworks', () => {
test.skip('React counter', async ({ page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#react-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -30,7 +30,7 @@ test.skip('Multiple frameworks', () => {
});

test('Preact counter', async ({ page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#preact-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -45,7 +45,7 @@ test.skip('Multiple frameworks', () => {
});

test.skip('Solid counter', async ({ page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#solid-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -60,7 +60,7 @@ test.skip('Multiple frameworks', () => {
});

test('Vue counter', async ({ page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#vue-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -75,7 +75,7 @@ test.skip('Multiple frameworks', () => {
});

test('Svelte counter', async ({ page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#svelte-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -90,7 +90,7 @@ test.skip('Multiple frameworks', () => {
});

test('Astro components', async ({ page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const aComponent = page.locator('#astro-a');
await expect(aComponent, 'component is visible').toBeVisible();
Expand All @@ -103,7 +103,7 @@ test.skip('Multiple frameworks', () => {

test.describe('HMR', () => {
test('Page template', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const slot = page.locator('#preact-counter + .counter-message');
await expect(slot, 'initial slot content').toHaveText('Hello Preact!');
Expand All @@ -116,7 +116,7 @@ test.skip('Multiple frameworks', () => {
});

test('React component', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const count = page.locator('#react-counter pre');
await expect(count, 'initial count updated to 0').toHaveText('0');
Expand All @@ -129,7 +129,7 @@ test.skip('Multiple frameworks', () => {
});

test('Preact component', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const count = page.locator('#preact-counter pre');
await expect(count, 'initial count updated to 0').toHaveText('0');
Expand All @@ -142,7 +142,7 @@ test.skip('Multiple frameworks', () => {
});

test('Solid component', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const count = page.locator('#solid-counter pre');
await expect(count, 'initial count updated to 0').toHaveText('0');
Expand All @@ -157,7 +157,7 @@ test.skip('Multiple frameworks', () => {
// TODO: re-enable this test when #3559 is fixed
// https://github.com/withastro/astro/issues/3559
test.skip('Vue component', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const count = page.locator('#vue-counter pre');
await expect(count, 'initial count updated to 0').toHaveText('0');
Expand All @@ -172,7 +172,7 @@ test.skip('Multiple frameworks', () => {
// TODO: track down a reliability issue in this test
// It seems to lost connection to the vite server in CI
test.skip('Svelte component', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const count = page.locator('#svelte-counter pre');
await expect(count, 'initial count is 0').toHaveText('0');
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/e2e/namespaced-component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ test.afterAll(async () => {
});

test.describe('Hydrating namespaced components', () => {
test('Preact Component', async ({ page }) => {
await page.goto('/');
test('Preact Component', async ({ astro, page }) => {
await page.goto(astro.resolveUrl('/'));

// Counter declared with: <ns.components.PreactCounter id="preact-counter-namespace" client:load>
const namespacedCounter = page.locator('#preact-counter-namespace');
Expand Down Expand Up @@ -54,8 +54,8 @@ test.describe('Hydrating namespaced components', () => {
await expect(namedCount, 'count incremented by 1').toHaveText('1');
});

test('MDX', async ({ page }) => {
await page.goto('/mdx');
test('MDX', async ({ astro, page }) => {
await page.goto(astro.resolveUrl('/mdx'));

// Counter declared with: <ns.components.PreactCounter id="preact-counter-namespace" client:load>
const namespacedCounter = page.locator('#preact-counter-namespace');
Expand Down
10 changes: 5 additions & 5 deletions packages/astro/e2e/nested-in-preact.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.afterAll(async () => {

test.describe('Nested Frameworks in Preact', () => {
test('React counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#react-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -32,7 +32,7 @@ test.describe('Nested Frameworks in Preact', () => {
});

test('Preact counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#preact-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -49,7 +49,7 @@ test.describe('Nested Frameworks in Preact', () => {
});

test('Solid counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#solid-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -66,7 +66,7 @@ test.describe('Nested Frameworks in Preact', () => {
});

test('Vue counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#vue-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -83,7 +83,7 @@ test.describe('Nested Frameworks in Preact', () => {
});

test('Svelte counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#svelte-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand Down
10 changes: 5 additions & 5 deletions packages/astro/e2e/nested-in-react.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.afterAll(async () => {

test.describe('Nested Frameworks in React', () => {
test('React counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#react-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -32,7 +32,7 @@ test.describe('Nested Frameworks in React', () => {
});

test('Preact counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#preact-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -49,7 +49,7 @@ test.describe('Nested Frameworks in React', () => {
});

test('Solid counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#solid-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -66,7 +66,7 @@ test.describe('Nested Frameworks in React', () => {
});

test('Vue counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#vue-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -83,7 +83,7 @@ test.describe('Nested Frameworks in React', () => {
});

test('Svelte counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#svelte-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand Down
10 changes: 5 additions & 5 deletions packages/astro/e2e/nested-in-solid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.afterAll(async () => {

test.describe('Nested Frameworks in Solid', () => {
test('React counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#react-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -32,7 +32,7 @@ test.describe('Nested Frameworks in Solid', () => {
});

test('Preact counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#preact-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -49,7 +49,7 @@ test.describe('Nested Frameworks in Solid', () => {
});

test('Solid counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#solid-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -66,7 +66,7 @@ test.describe('Nested Frameworks in Solid', () => {
});

test('Vue counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#vue-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand All @@ -83,7 +83,7 @@ test.describe('Nested Frameworks in Solid', () => {
});

test('Svelte counter', async ({ astro, page }) => {
await page.goto('/');
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#svelte-counter');
await expect(counter, 'component is visible').toBeVisible();
Expand Down
Loading

0 comments on commit 47181b5

Please sign in to comment.