summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/swift-taxis-sing.md5
-rw-r--r--.github/workflows/release.yml1
-rw-r--r--packages/astro/components/index.ts1
-rw-r--r--packages/astro/test/code-component.test.js7
4 files changed, 13 insertions, 1 deletions
diff --git a/.changeset/swift-taxis-sing.md b/.changeset/swift-taxis-sing.md
new file mode 100644
index 000000000..9b8bdebb4
--- /dev/null
+++ b/.changeset/swift-taxis-sing.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Prevent ViewTransition script from being added by mistake
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f952f6c6b..7161a0d0f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,6 +5,7 @@ on:
branches:
- main
- "1-legacy"
+ - "2-legacy"
- next
defaults:
diff --git a/packages/astro/components/index.ts b/packages/astro/components/index.ts
index 6bd537087..864c7cc3b 100644
--- a/packages/astro/components/index.ts
+++ b/packages/astro/components/index.ts
@@ -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';
diff --git a/packages/astro/test/code-component.test.js b/packages/astro/test/code-component.test.js
index c80107681..8481e95d8 100644
--- a/packages/astro/test/code-component.test.js
+++ b/packages/astro/test/code-component.test.js
@@ -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);
+ });
});