Skip to content

Commit

Permalink
Prevent ViewTransition script from being added by mistake (#8268) (#8270
Browse files Browse the repository at this point in the history
)

* Prevent ViewTransition script from being added by mistake

* Add the 2-legacy branch to CI
  • Loading branch information
matthewp authored Aug 29, 2023
1 parent 8450379 commit e7f872e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
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);
});
});

0 comments on commit e7f872e

Please sign in to comment.