Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent ViewTransition script from being added by mistake #8268

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/swift-taxis-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Prevent ViewTransition script from being added by mistake
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"
- "2-legacy"
- next

defaults:
Expand Down
1 change: 0 additions & 1 deletion packages/astro/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default as Code } from './Code.astro';
export { default as Debug } from './Debug.astro';
export { default as ViewTransitions } from './ViewTransitions.astro';
7 changes: 7 additions & 0 deletions packages/astro/test/code-component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ describe('Code component', () => {
let $ = cheerio.load(html);
expect($('pre').attr('is:raw')).to.equal(undefined);
});

// ViewTransitions bug
it('No script should be added to the page', async () => {
let html = await fixture.readFile('/index.html');
let $ = cheerio.load(html);
expect($('script')).to.have.a.lengthOf(0);
});
});