diff --git a/.changeset/css-prop-intrinsic-element-names.md b/.changeset/css-prop-intrinsic-element-names.md deleted file mode 100644 index d8d64dce..00000000 --- a/.changeset/css-prop-intrinsic-element-names.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'babel-plugin-styled-components': patch ---- - -The `css` prop now works on custom elements like `` and ``, on lowercase names with no variable of that name in scope like `` and ``, and on hyphenated members like ``. These used to compile to code that referenced a variable that doesn't exist, like `styled(clipPath)`, and threw when it ran. A lowercase name that does match a variable, like `` after `const myButton = styled.button`, still styles that variable. diff --git a/.changeset/css-prop-local-component-order.md b/.changeset/css-prop-local-component-order.md deleted file mode 100644 index c8df68ef..00000000 --- a/.changeset/css-prop-local-component-order.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'babel-plugin-styled-components': patch ---- - -Fix a `ReferenceError: Cannot access 'x' before initialization` when the `css` prop is used on a component declared in the same file (such as `const { Paragraph } = Typography`) and the css reads a `const` declared further down; the generated component now follows every value its css reads. diff --git a/.changeset/support-babel-8.md b/.changeset/support-babel-8.md deleted file mode 100644 index 82143015..00000000 --- a/.changeset/support-babel-8.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'babel-plugin-styled-components': minor ---- - -Support Babel 8. The plugin now installs alongside `@babel/core@8` without peer dependency warnings or errors, and the `css` prop transform no longer crashes with `t.jSXIdentifier is not a function` on Babel 8. The plugin also no longer depends on `@babel/plugin-syntax-jsx`, which only accepted Babel 7 as a peer. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8020a3c2..94305aaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # babel-plugin-styled-components +## 2.4.0 + +### Minor Changes + +- 9e4200b: Support Babel 8. The plugin now installs alongside `@babel/core@8` without peer dependency warnings or errors, and the `css` prop transform no longer crashes with `t.jSXIdentifier is not a function` on Babel 8. The plugin also no longer depends on `@babel/plugin-syntax-jsx`, which only accepted Babel 7 as a peer. + +### Patch Changes + +- 9e4200b: The `css` prop now works on custom elements like `` and ``, on lowercase names with no variable of that name in scope like `` and ``, and on hyphenated members like ``. These used to compile to code that referenced a variable that doesn't exist, like `styled(clipPath)`, and threw when it ran. A lowercase name that does match a variable, like `` after `const myButton = styled.button`, still styles that variable. +- 62f7cc1: Fix a `ReferenceError: Cannot access 'x' before initialization` when the `css` prop is used on a component declared in the same file (such as `const { Paragraph } = Typography`) and the css reads a `const` declared further down; the generated component now follows every value its css reads. + ## 2.3.1 ### Patch Changes diff --git a/package.json b/package.json index a22298c1..9bb752bd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "2.3.1", + "version": "2.4.0", "name": "babel-plugin-styled-components", "description": "Improve the debugging experience and add server-side rendering support to styled-components", "repository": "styled-components/babel-plugin-styled-components",