diff options
author | 2022-03-18 18:16:32 -0500 | |
---|---|---|
committer | 2022-03-18 18:16:32 -0500 | |
commit | 7954541291a3dd7adbc1d5610e0c2e615d3dde46 (patch) | |
tree | cff41086f810d05e5357c1f5b90233d03eb51916 | |
parent | 31a1b40cb8adec4cac3359889d785b997dd3a0b1 (diff) | |
download | astro-7954541291a3dd7adbc1d5610e0c2e615d3dde46.tar.gz astro-7954541291a3dd7adbc1d5610e0c2e615d3dde46.tar.zst astro-7954541291a3dd7adbc1d5610e0c2e615d3dde46.zip |
Update Compiler with new CSS Parser (#2833)
* chore: update compiler
* Update eighty-trees-thank.md
* test: update css test
-rw-r--r-- | .changeset/eighty-trees-thank.md | 7 | ||||
-rw-r--r-- | packages/astro/package.json | 2 | ||||
-rw-r--r-- | packages/astro/test/astro-partial-html.test.js | 2 | ||||
-rw-r--r-- | pnpm-lock.yaml | 9 |
4 files changed, 14 insertions, 6 deletions
diff --git a/.changeset/eighty-trees-thank.md b/.changeset/eighty-trees-thank.md new file mode 100644 index 000000000..271111369 --- /dev/null +++ b/.changeset/eighty-trees-thank.md @@ -0,0 +1,7 @@ +--- +'astro': minor +--- + +This PR introduces a new internal CSS parser for `@astrojs/compiler`. See [`withastro/compiler#329`](https://github.com/withastro/compiler/pull/329) for more details. + +This fixes Astro's support for modern CSS syntax like `@container`, `@layer`, and nesting. **Note** While Astro now correctly parses this modern syntax, it does not automatically compile features for browser compatability purposes. diff --git a/packages/astro/package.json b/packages/astro/package.json index e3e1e7391..5df402378 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -61,7 +61,7 @@ "test:match": "mocha --timeout 20000 -g" }, "dependencies": { - "@astrojs/compiler": "^0.12.1", + "@astrojs/compiler": "^0.13.0", "@astrojs/language-server": "^0.8.10", "@astrojs/markdown-remark": "^0.6.4", "@astrojs/prism": "0.4.0", diff --git a/packages/astro/test/astro-partial-html.test.js b/packages/astro/test/astro-partial-html.test.js index 1c6b43fb6..f2d1852dd 100644 --- a/packages/astro/test/astro-partial-html.test.js +++ b/packages/astro/test/astro-partial-html.test.js @@ -33,7 +33,7 @@ describe('Partial HTML', async () => { }, }) .then((res) => res.text()); - expect(css).to.match(/\.astro-[^{]+{color:red;}/); + expect(css).to.match(/\.astro-[^{]+{color:red}/); }); it('injects framework styles', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60767d54c..c63cb359d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -354,7 +354,7 @@ importers: packages/astro: specifiers: - '@astrojs/compiler': ^0.12.1 + '@astrojs/compiler': ^0.13.0 '@astrojs/language-server': ^0.8.10 '@astrojs/markdown-remark': ^0.6.4 '@astrojs/parser': ^0.22.2 @@ -426,7 +426,7 @@ importers: yargs-parser: ^21.0.1 zod: ^3.13.4 dependencies: - '@astrojs/compiler': 0.12.1 + '@astrojs/compiler': 0.13.0 '@astrojs/language-server': 0.8.10 '@astrojs/markdown-remark': link:../markdown/remark '@astrojs/prism': link:../astro-prism @@ -1554,8 +1554,8 @@ packages: leven: 3.1.0 dev: true - /@astrojs/compiler/0.12.1: - resolution: {integrity: sha512-XpKZyJlnDhszulwwse/1uV+ZiyTpg6xNH5TrriYDVdzB8dUbQLdE7tX4Cxhdw5QrJpV57AaPrPXvJKi1jnIkxw==} + /@astrojs/compiler/0.13.0: + resolution: {integrity: sha512-omPv8V2OG05Nx7cV1PiYKV2GewsVf91kZDRUajPsjAHVEorIDMNV8ekv1gjjgAt8UVKbQYev2hzGhmdyHdo06Q==} dependencies: tsm: 2.2.1 uvu: 0.5.3 @@ -9126,6 +9126,7 @@ packages: /source-map/0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + requiresBuild: true /source-map/0.7.3: resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==} |