From 681bbaa5aa1d354ca67ae46848a159d5da8229fb Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 28 Oct 2022 15:34:18 -0400 Subject: [PATCH 1/4] Upgrade compiler to latest --- packages/astro/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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/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: From 23657ab75749f9412e98fc6537f5094d5108d2e2 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 28 Oct 2022 15:35:25 -0400 Subject: [PATCH 2/4] Adding a changeset --- .changeset/chilly-zoos-exist.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/chilly-zoos-exist.md diff --git a/.changeset/chilly-zoos-exist.md b/.changeset/chilly-zoos-exist.md new file mode 100644 index 000000000000..689e5c89da3b --- /dev/null +++ b/.changeset/chilly-zoos-exist.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Upgrade compiler to 0.25.x From 4d44971b1a160552dac7563989bb6d744337fcbc Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 28 Oct 2022 15:45:39 -0400 Subject: [PATCH 3/4] Update tests for IIFE wrapping --- packages/astro/test/astro-directives.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"'); From 3410a8869d774edff4ef5f5e99fd231c8bb4934d Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 28 Oct 2022 15:59:55 -0400 Subject: [PATCH 4/4] Update .changeset/chilly-zoos-exist.md Co-authored-by: Nate Moore --- .changeset/chilly-zoos-exist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/chilly-zoos-exist.md b/.changeset/chilly-zoos-exist.md index 689e5c89da3b..02532a135841 100644 --- a/.changeset/chilly-zoos-exist.md +++ b/.changeset/chilly-zoos-exist.md @@ -2,4 +2,4 @@ 'astro': patch --- -Upgrade compiler to 0.25.x +Upgrade `@astrojs/compiler` to 0.29.x