diff --git a/.changeset/chilly-zoos-exist.md b/.changeset/chilly-zoos-exist.md new file mode 100644 index 000000000000..02532a135841 --- /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 b8c446a1553f..63856c82e8f4 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 f871b2856367..be2a4e5e45ba 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 9a16845870a1..55de82a23e83 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: