diff --git a/.changeset/dirty-carrots-sit.md b/.changeset/dirty-carrots-sit.md deleted file mode 100644 index 336a8a595..000000000 --- a/.changeset/dirty-carrots-sit.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@compiled/babel-plugin': minor ---- - -Fix `@compiled/babel-plugin` to not require `cssMap()` to be called prior to use. - -Example, this failed before for no reason other than the fact that our `state.cssMap` was generated _after_ `JSXElement` and `JSXOpeningElement` were ran. - -```tsx -import { cssMap } from '@compiled/react'; -export default () =>
; -const styles = cssMap({ root: { padding: 8 } }); -``` diff --git a/.changeset/silent-geese-wonder.md b/.changeset/silent-geese-wonder.md deleted file mode 100644 index ffeef80ee..000000000 --- a/.changeset/silent-geese-wonder.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@compiled/babel-plugin': minor ---- - -Throw an error when compiling a `cssMap` object where we expect a `css` or nested `cssMap` object. - -Example of code that silently fails today, using `styles` directly: - -```tsx -import { cssMap } from '@compiled/react'; -const styles = cssMap({ root: { padding: 8 } }); -export default () =>
; -``` - -What we expect to see instead, using `styles.root` instead: - -```tsx -import { cssMap } from '@compiled/react'; -const styles = cssMap({ root: { padding: 8 } }); -export default () =>
; -``` diff --git a/packages/babel-plugin/CHANGELOG.md b/packages/babel-plugin/CHANGELOG.md index 55fdeeebe..45397d80c 100644 --- a/packages/babel-plugin/CHANGELOG.md +++ b/packages/babel-plugin/CHANGELOG.md @@ -1,5 +1,37 @@ # @compiled/babel-plugin +## 0.35.0 + +### Minor Changes + +- 34e5339a: Fix `@compiled/babel-plugin` to not require `cssMap()` to be called prior to use. + + Example, this failed before for no reason other than the fact that our `state.cssMap` was generated _after_ `JSXElement` and `JSXOpeningElement` were ran. + + ```tsx + import { cssMap } from '@compiled/react'; + export default () =>
; + const styles = cssMap({ root: { padding: 8 } }); + ``` + +- 34e5339a: Throw an error when compiling a `cssMap` object where we expect a `css` or nested `cssMap` object. + + Example of code that silently fails today, using `styles` directly: + + ```tsx + import { cssMap } from '@compiled/react'; + const styles = cssMap({ root: { padding: 8 } }); + export default () =>
; + ``` + + What we expect to see instead, using `styles.root` instead: + + ```tsx + import { cssMap } from '@compiled/react'; + const styles = cssMap({ root: { padding: 8 } }); + export default () =>
; + ``` + ## 0.34.0 ### Minor Changes diff --git a/packages/babel-plugin/package.json b/packages/babel-plugin/package.json index a7fe04e4c..d6709ace3 100644 --- a/packages/babel-plugin/package.json +++ b/packages/babel-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@compiled/babel-plugin", - "version": "0.34.0", + "version": "0.35.0", "description": "A familiar and performant compile time CSS-in-JS library for React.", "homepage": "https://compiledcssinjs.com/docs/pkg-babel-plugin", "bugs": "https://github.com/atlassian-labs/compiled/issues/new?assignees=&labels=bug&template=bug_report.md", diff --git a/packages/parcel-transformer/CHANGELOG.md b/packages/parcel-transformer/CHANGELOG.md index 133a93cc1..e2fb17e06 100644 --- a/packages/parcel-transformer/CHANGELOG.md +++ b/packages/parcel-transformer/CHANGELOG.md @@ -1,5 +1,13 @@ # @compiled/parcel-transformer +## 0.18.3 + +### Patch Changes + +- Updated dependencies [34e5339a] +- Updated dependencies [34e5339a] + - @compiled/babel-plugin@0.35.0 + ## 0.18.2 ### Patch Changes diff --git a/packages/parcel-transformer/package.json b/packages/parcel-transformer/package.json index 9c3874b07..91f62d495 100644 --- a/packages/parcel-transformer/package.json +++ b/packages/parcel-transformer/package.json @@ -1,6 +1,6 @@ { "name": "@compiled/parcel-transformer", - "version": "0.18.2", + "version": "0.18.3", "description": "A familiar and performant compile time CSS-in-JS library for React.", "homepage": "https://compiledcssinjs.com/docs/pkg-parcel-transformer", "bugs": "https://github.com/atlassian-labs/compiled/issues/new?assignees=&labels=bug&template=bug_report.md", @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.26.0", "@babel/generator": "^7.26.3", - "@compiled/babel-plugin": "^0.34.0", + "@compiled/babel-plugin": "^0.35.0", "@compiled/babel-plugin-strip-runtime": "^0.33.0", "@compiled/utils": "^0.13.1", "@parcel/plugin": "^2.8.3", diff --git a/packages/webpack-loader/CHANGELOG.md b/packages/webpack-loader/CHANGELOG.md index bb341ca89..547b2313d 100644 --- a/packages/webpack-loader/CHANGELOG.md +++ b/packages/webpack-loader/CHANGELOG.md @@ -1,5 +1,13 @@ # @compiled/webpack-loader +## 0.19.2 + +### Patch Changes + +- Updated dependencies [34e5339a] +- Updated dependencies [34e5339a] + - @compiled/babel-plugin@0.35.0 + ## 0.19.1 ### Patch Changes diff --git a/packages/webpack-loader/package.json b/packages/webpack-loader/package.json index f6e3fcd10..390a2e5a7 100644 --- a/packages/webpack-loader/package.json +++ b/packages/webpack-loader/package.json @@ -1,6 +1,6 @@ { "name": "@compiled/webpack-loader", - "version": "0.19.1", + "version": "0.19.2", "description": "A familiar and performant compile time CSS-in-JS library for React.", "homepage": "https://compiledcssinjs.com/docs/pkg-webpack-loader", "bugs": "https://github.com/atlassian-labs/compiled/issues/new?assignees=&labels=bug&template=bug_report.md", @@ -22,7 +22,7 @@ "dependencies": { "@babel/core": "^7.26.0", "@babel/parser": "^7.26.3", - "@compiled/babel-plugin": "^0.34.0", + "@compiled/babel-plugin": "^0.35.0", "@compiled/babel-plugin-strip-runtime": "^0.33.0", "@compiled/css": "^0.18.0", "@compiled/utils": "^0.13.1",