summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-10-28 16:13:31 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-28 16:13:31 -0400
commit7d678c9ed05a33380a2153df54abdf87d374f970 (patch)
tree19fa40118e417d73a3b7027de6ab36269b50f90c
parent06d016a7411a9450bf5d416a6828c6535d1ee1de (diff)
downloadastro-7d678c9ed05a33380a2153df54abdf87d374f970.tar.gz
astro-7d678c9ed05a33380a2153df54abdf87d374f970.tar.zst
astro-7d678c9ed05a33380a2153df54abdf87d374f970.zip
Upgrade compiler to latest (#5243)
* Upgrade compiler to latest * Adding a changeset * Update tests for IIFE wrapping * Update .changeset/chilly-zoos-exist.md Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
-rw-r--r--.changeset/chilly-zoos-exist.md5
-rw-r--r--packages/astro/package.json2
-rw-r--r--packages/astro/test/astro-directives.test.js4
-rw-r--r--pnpm-lock.yaml8
4 files changed, 12 insertions, 7 deletions
diff --git a/.changeset/chilly-zoos-exist.md b/.changeset/chilly-zoos-exist.md
new file mode 100644
index 000000000..02532a135
--- /dev/null
+++ b/.changeset/chilly-zoos-exist.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Upgrade `@astrojs/compiler` to 0.29.x
diff --git a/packages/astro/package.json b/packages/astro/package.json
index b8c446a15..63856c82e 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -100,7 +100,7 @@
"test:e2e:match": "playwright test -g"
},
"dependencies": {
- "@astrojs/compiler": "^0.28.0",
+ "@astrojs/compiler": "^0.29.5",
"@astrojs/language-server": "^0.26.2",
"@astrojs/markdown-remark": "^1.1.3",
"@astrojs/telemetry": "^1.0.1",
diff --git a/packages/astro/test/astro-directives.test.js b/packages/astro/test/astro-directives.test.js
index f871b2856..be2a4e5e4 100644
--- a/packages/astro/test/astro-directives.test.js
+++ b/packages/astro/test/astro-directives.test.js
@@ -19,8 +19,8 @@ describe('Directives', async () => {
let i = 0;
for (const script of $('script').toArray()) {
// Wrap script in scope ({}) to avoid redeclaration errors
- expect($(script).text().at(0)).to.equal('{');
- expect($(script).text().at(-1)).to.equal('}');
+ expect($(script).text().startsWith('(function(){')).to.equal(true);
+ expect($(script).text().endsWith('})();')).to.equal(true);
if (i < 2) {
// Inline defined variables
expect($(script).toString()).to.include('const foo = "bar"');
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9a1684587..55de82a23 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -362,7 +362,7 @@ importers:
packages/astro:
specifiers:
- '@astrojs/compiler': ^0.28.0
+ '@astrojs/compiler': ^0.29.5
'@astrojs/language-server': ^0.26.2
'@astrojs/markdown-remark': ^1.1.3
'@astrojs/telemetry': ^1.0.1
@@ -459,7 +459,7 @@ importers:
yargs-parser: ^21.0.1
zod: ^3.17.3
dependencies:
- '@astrojs/compiler': 0.28.1
+ '@astrojs/compiler': 0.29.5
'@astrojs/language-server': 0.26.2
'@astrojs/markdown-remark': link:../markdown/remark
'@astrojs/telemetry': link:../telemetry
@@ -3813,8 +3813,8 @@ packages:
resolution: {integrity: sha512-vBMPy9ok4iLapSyCCT1qsZ9dK7LkVFl9mObtLEmWiec9myGHS9h2kQY2xzPeFNJiWXUf9O6tSyQpQTy5As/p3g==}
dev: false
- /@astrojs/compiler/0.28.1:
- resolution: {integrity: sha512-rcuQs5kcT6OshfJxXkZ2Tn61V4/5UAmvZKma/qmNhpAdBkGk6J/1gJ/Gxa2sAS6WNUjUyVo5BRrdsNGW36qkoQ==}
+ /@astrojs/compiler/0.29.5:
+ resolution: {integrity: sha512-XpSJyBO6ha5mGqsD71ie83SOcv3p7zKq6qzngyeLKhccCXtf9Zn/4tGbi/Iq4YmkRBNCjLEkF0wZMYWY+eJYAA==}
dev: false
/@astrojs/language-server/0.26.2: