Skip to content

Releases: withastro/compiler

@astrojs/compiler@3.0.1

16 Mar 14:49
41515e4

Choose a tag to compare

Patch Changes

  • 05ef961: Fix scoped CSS nesting so descendant selectors without & inside nested rules are not incorrectly re-scoped.

@astrojs/compiler@3.0.0

06 Mar 15:51
8870738

Choose a tag to compare

Major Changes

  • c05e16e: Removes the first argument of $$result.createAstro()

    $$result.createAstro() does not accept an AstroGlobalPartial as the first argument anymore:

    -const Astro = $$result.createAstro($$Astro, $$props, $$slots);
    +const Astro = $$result.createAstro($$props, $$slots);
  • c05e16e: Removes renderScript from TransformOptions. It is now the default and only behavior

  • c05e16e: Removes experimentalScriptOrder from TransformOptions. It is now the default and only behavior

Patch Changes

  • 811e90f: Fixes an issue where server:defer was treated like a transition directive, causing ViewTransitions CSS to be included even when no transition:* directives were used.

  • 755f046: Fixes a CSS scoping regression where selectors using the nesting selector (&) with pseudo-classes or pseudo-elements (e.g. &:last-of-type, &::before) inside :global() contexts would incorrectly receive a duplicate scope attribute.

  • f89451a: Fixed an issue where explicit <html> and <head> tags were removed from output when a JSX comment appeared between DOCTYPE and the <html> tag.

  • 8275bdd: Fixes a bug where trailing whitespaces were preserved before <style> tags after transformation, in certain cases. Now trailing whitespaces are correctly removed.

  • 56ef0ca: Fixes TSX output to transform top-level returns into throws in order to avoid downstream TypeScript parsing issues

  • e329d20: Fix slot attribute stripped inside expression

  • 02de370: fixed a bug where the Astro compiler incorrectly handled the 'as' property name in Props interfaces.

    This allows Astro components to use 'as' as a prop name (common pattern for polymorphic components) without breaking TypeScript type inference. The Props type is now correctly preserved when destructuring objects with an 'as'
    property.

  • 615eb21: Fix CSS nesting so nested selectors without an ampersand are parsed and scoped correctly.

@astrojs/compiler@3.0.0-beta.1

17 Feb 15:40
670135b

Choose a tag to compare

Pre-release

Patch Changes

  • 755f046: Fixes a CSS scoping regression where selectors using the nesting selector (&) with pseudo-classes or pseudo-elements (e.g. &:last-of-type, &::before) inside :global() contexts would incorrectly receive a duplicate scope attribute.
  • f89451a: Fixed an issue where explicit <html> and <head> tags were removed from output when a JSX comment appeared between DOCTYPE and the <html> tag.
  • 8275bdd: Fixes a bug where trailing whitespaces were preserved before <style> tags after transformation, in certain cases. Now trailing whitespaces are correctly removed.
  • e329d20: Fix slot attribute stripped inside expression
  • 615eb21: Fix CSS nesting so nested selectors without an ampersand are parsed and scoped correctly.

@astrojs/compiler@2.13.1

05 Feb 19:35
ada082e

Choose a tag to compare

Patch Changes

  • 357b8fe: Fixes a panic when parsing files with a closing frontmatter fence (---) but no opening fence. The compiler now returns a helpful diagnostic error instead of crashing.
  • cba568f: Fixes the "Unterminated string literal" error when using multiline attribute values on components.

@astrojs/compiler@3.0.0-beta.0

05 Feb 19:46
d3fabe0

Choose a tag to compare

Pre-release

Major Changes

  • c05e16e: Removes the first argument of $$result.createAstro()

    $$result.createAstro() does not accept an AstroGlobalPartial as the first argument anymore:

    -const Astro = $$result.createAstro($$Astro, $$props, $$slots);
    +const Astro = $$result.createAstro($$props, $$slots);
  • c05e16e: Removes renderScript from TransformOptions. It is now the default and only behavior

  • c05e16e: Removes experimentalScriptOrder from TransformOptions. It is now the default and only behavior

@astrojs/compiler@2.13.0

15 Sep 08:09
ceaea3f

Choose a tag to compare

Minor Changes

  • 59f7759: Support HTML element

    Based on the recent commit history, this change appears to be related to fixing issue #1093 regarding selectedcontent parsing in customizable selects. The element is part of the new Customizable Select Element API
    in HTML, used within elements to display the currently selected option(s).

  • 89c80fe: Adds a walkAsync utility function that returns a Promise from the tree traversal process.

    Unlike the existing walk function which doesn't provide a way to wait for traversal completion, walkAsync allows consumers to await the full traversal of the AST.

Patch Changes

  • 2a27aca: Fixes a potential parsing issue with head content defined in a component where another component is rendered first.
  • 1264286: Fixes a CSS scoping issue when a selector contains only pseudo selectors.

@astrojs/compiler@2.12.2

09 Jun 08:52
ab9b285

Choose a tag to compare

Patch Changes

  • 950635e: Reverts a change where view transitions were made async to accomodate the CSP requirements.

@astrojs/compiler@2.12.1

07 Jun 05:37
3fd20b0

Choose a tag to compare

Patch Changes

  • 138c07f: Improves detection of function body opening curly brace for exported functions.
  • 4a967ab: Fixes a bug where view transition names got lost after update to Astro 5.9

@astrojs/compiler@2.12.0

01 May 11:54
394ef06

Choose a tag to compare

Minor Changes

  • e428ae0: Add head propagation metadata to server islands

@astrojs/compiler@2.11.0

12 Mar 09:31
29c596f

Choose a tag to compare

Minor Changes

  • 0399d55: Add an experimental flag experimentalScriptOrder that corrects the order styles & scripts are rendered within a component. When enabled, the order styles & scripts are rendered will be consistent with the order they are defined.

Patch Changes

  • c758d7e: Add async properly when await used inside fragment