Skip to content

Latest commit

Β 

History

History
275 lines (149 loc) Β· 21.3 KB

CHANGELOG.md

File metadata and controls

275 lines (149 loc) Β· 21.3 KB

@emotion/jest

11.8.0

Patch Changes

  • #2600 2f27156a Thanks @Andarist! - Adjusted Enzyme-related code path to accomodate for changes related to the refactor around using React.useInsertionEffect.

11.7.1

Patch Changes

  • #2590 1554a7e2 Thanks @Andarist! - Upgraded and pinned the version of Stylis - the CSS parser that Emotion uses under the hood.

  • Updated dependencies [1554a7e2]:

    • @emotion/css-prettifier@1.0.1

11.6.0

Minor Changes

  • #2542 eb013d25 Thanks @eps1lon, @Andarist! - Adjusted the serialization logic to unwrap rendered elements from Fragments that had to be added to fix hydration mismatches caused by React.useId usage (the upcoming API of the React 18).

11.5.0

Minor Changes

Patch Changes

  • #2457 218e4f78 Thanks @jcleefw! - Add RegExp as a valid type for the target option accepted by toHaveStyleRule.

11.3.0

Patch Changes

11.2.1

Patch Changes

  • 66ccd43e #2269 Thanks @mskelton! - Fixed the Enzyme serializer to work properly with conditional styles passed to the css prop.
  • 66ccd43e #2269 Thanks @mskelton! - Fixed the Enzyme serializer to always print composed styles (for example using arrays), which are passed to the css prop, correctly.

11.2.0

Minor Changes

  • 0c31ed05 #2233 Thanks @ajs139! - Fixed an issue with Enzyme snapshots for components using an array as the css prop - those should be printed OK now.

11.1.0

Minor Changes

  • c470c855 #2109 Thanks @Andarist! - createEnzymeSerializer export has been removed from the root entrypoint and moved to a dedicated @emotion/jest/enzyme entrypoint. This is unfortunate because it could be considered a breaking change but it has been decided to treat this as a bug fix. It was never the intention to export this from the root entrypoint - enzyme-to-json has been marked as an optional peer dependency of @emotion/jest since the release and it was the package structure that did not match this expectation by mistake.

11.0.0

Major Changes

  • b8476e08 #1675 Thanks @mitchellhamilton! - Rename jest-emotion to @emotion/jest. Please replace "snapshotSerializers": ["jest-emotion"] with "snapshotSerializers": ["@emotion/jest/serializer"] if you're using the snapshot serializer. Also replace any imports of jest-emotion with @emotion/jest or use the @emotion/pkg-renaming ESLint rule from @emotion/eslint-plugin.
  • ca599c5f #1901 Thanks @Andarist! - test & print are no longer exported as named exports. If you want to access the default serializer just access the default export. This means that @emotion/jest(previously jest-emotion) can't be used directly in the snapshotSerializers option, you should use @emotion/jest/serializer instead for this.

  • ca599c5f #1901 Thanks @Andarist! - Refactored to use new serializers API which has been introduced in Jest 21.

  • cd77efbf #1920 Thanks @Andarist! - The root entry (@emotion/jest) no longer has default and serializer exports. You can still import createSerializer from it to create your own serializer if needed.

  • cd77efbf #1920 Thanks @Andarist! - @emotion/jest/serializer's main purpose is compatibility with Jest's snapshotSerializers option, so it no longer has a default export - it only has test & serialize exports. You can import createSerializer from the root entry (@emotion/jest) and create your own serializer if needed.

  • 702f3fd2 #1620 Thanks @spudly! - Added the T parameter to the Matchers interface in the TypeScript definitions to make this module compatible with @types/jest@^24.0.20.

Minor Changes

  • b8476e08 #1675 Thanks @mitchellhamilton! - Improve support for Enzyme's shallow rendering with the addition of the @emotion/jest/enzyme-serializer snapshot serializer.
  • ca599c5f #1901 Thanks @Andarist! - Fixed an issue with all styles being recognized as changed in Jest 25 on unrelated changes.

Patch Changes

  • 8a88e771 #1880 Thanks @Jimmydalecleveland! - Improved stability of the generated snapshots - styles are extracted now based on the order in which the associated with them class names appear in the serialized elements rather than based on the order of the actual rules in the document.
  • ae8c1d9d #1902 Thanks @Andarist! - Added support for handling regular React elements (objects returned from React.createElement) in the serializer and toHaveStyleRule matcher. It's possible to get those elements when traversing Enzyme's trees.

  • 3abcf673 #2043 Thanks @Andarist! - @types/jest has been moved from the dependencies to the optional peer dependencies as it should not be installed automatically for users not using TypeScript.

  • Updated dependencies []:

    • @emotion/css-prettifier@1.0.0

11.0.0-rc.0

Major Changes

11.0.0-next.19

Patch Changes

  • 5d094b57 #2027 Thanks @Andarist! - Fixed an issue with serializing Enzyme's ReactWrapper (what is returned from mount) with props containing elements without the css prop.

11.0.0-next.17

11.0.0-next.16

11.0.0-next.15

Patch Changes

  • 8a88e771 #1880 Thanks @Jimmydalecleveland! - Improved stability of the generated snapshots - styles are extracted now based on the order in which the associated with them class names appear in the serialized elements rather than based on the order of the actual rules in the document.
  • ae8c1d9d #1902 Thanks @Andarist! - Added support for handling regular React elements (objects returned from React.createElement) in the serializer and toHaveStyleRule matcher. It's possible to get those elements when traversing Enzyme's trees.

11.0.0-next.14

Major Changes

  • cd77efbf #1920 Thanks @Andarist! - The root entry (@emotion/jest) no longer has default and serializer exports. You can still import createSerializer from it to create your own serializer if needed.
  • cd77efbf #1920 Thanks @Andarist! - @emotion/jest/enzyme entrypoint has been renamed to @emotion/jest/enzyme-serializer. It's main purpose is compatibility with Jest's snapshotSerializers option, so it no longer has a default export - it only has test & serialize exports.. You can import createEnzymeSerializer from the root entry (@emotion/jest) and create your own serializer if needed.
  • cd77efbf #1920 Thanks @Andarist! - @emotion/jest/serializer's main purpose is compatibility with Jest's snapshotSerializers option, so it no longer has a default export - it only has test & serialize exports. You can import createSerializer from the root entry (@emotion/jest) and create your own serializer if needed.

Patch Changes

11.0.0-next.13

Major Changes

  • ca599c5f #1901 Thanks @Andarist! - test & print are no longer exported as named exports. If you want to access the default serializer just access the default export. This means that @emotion/jest(previously jest-emotion) can't be used directly in the snapshotSerializers option, you should use @emotion/jest/serializer instead for this.
  • ca599c5f #1901 Thanks @Andarist! - Refactored to use new serializers API which has been introduced in Jest 21.

Minor Changes

  • ca599c5f #1901 Thanks @Andarist! - Fixed an issue with all styles being recognized as changed in Jest 25 on unrelated changed.

Patch Changes

  • Updated dependencies [9e998e37]:
    • @emotion/css@11.0.0-next.13
    • @emotion/react@11.0.0-next.13

11.0.0-next.12

Patch Changes

11.0.0-next.10

Major Changes

  • b8476e08 #1675 Thanks @mitchellhamilton! - Rename jest-emotion to @emotion/jest. Please replace "snapshotSerializers": ["jest-emotion"] with "snapshotSerializers": ["@emotion/jest"] if you're using the snapshot serializer. Also replace any imports of jest-emotion with @emotion/jest or use the @emotion/pkg-renaming ESLint rule from @emotion/eslint-plugin.

Minor Changes

  • b8476e08 #1675 Thanks @mitchellhamilton! - Improve support for Enzyme's shallow rendering with the addition of the @emotion/jest/enzyme snapshot serializer

Patch Changes

11.0.0-next.7

Patch Changes

  • Updated dependencies [5c55fd17]:
    • @emotion/core@11.0.0-next.7

11.0.0-next.4

Major Changes

  • 702f3fd2 #973 Thanks @spudly! - Added the T parameter to the Matchers interface in the TypeScript definitions to make this module compatible with @types/jest@^24.0.20.

Patch Changes

  • Updated dependencies []:
    • @emotion/core@11.0.0-next.4

11.0.0-next.3

Patch Changes

  • Updated dependencies [a085003d]:
    • @emotion/core@11.0.0-next.3

11.0.0-next.1

Patch Changes

  • e67a5be9 #967 Thanks @Andarist! - Match rules in declarations with component used as a selector
  • Updated dependencies []:
    • @emotion/core@11.0.0-next.1

11.0.0-next.0

Major Changes

  • 302bdba1 #1600 Thanks @mitchellhamilton! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number

Patch Changes

  • Updated dependencies [302bdba1]:
    • @emotion/core@11.0.0-next.0
    • emotion@11.0.0-next.0

10.0.32

Patch Changes

10.0.27

Patch Changes

10.0.26

Patch Changes

  • b3c5b8de #1667 Thanks @Andarist! - Revert improved support for Enzyme's shallow rendering - its release was an unforseen breaking change.

10.0.25

Patch Changes

10.0.17

Patch Changes

10.0.14

Patch Changes

10.0.11

Patch Changes