diff --git a/.changeset/angry-cheetahs-march.md b/.changeset/angry-cheetahs-march.md deleted file mode 100644 index f1df23f84..000000000 --- a/.changeset/angry-cheetahs-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/native': patch ---- - -Match supported components to what is exported from the latest version of React Native (0.61.5). diff --git a/.changeset/brave-rice-yawn.md b/.changeset/brave-rice-yawn.md deleted file mode 100644 index 963f46ab9..000000000 --- a/.changeset/brave-rice-yawn.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/eslint-plugin': major -'eslint-plugin-emotion': major ---- - -Rename `eslint-plugin-emotion` to `@emotion/eslint-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` and `emotion/` with `@emotion/` in your rules config in your ESLint config. diff --git a/.changeset/breezy-carpets-smile.md b/.changeset/breezy-carpets-smile.md deleted file mode 100644 index 3b0c602c5..000000000 --- a/.changeset/breezy-carpets-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': major ---- - -`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. diff --git a/.changeset/clever-emus-watch.md b/.changeset/clever-emus-watch.md deleted file mode 100644 index b64492864..000000000 --- a/.changeset/clever-emus-watch.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/babel-plugin': minor -'@emotion/babel-preset-css-prop': minor ---- - -Adjust how arrays passed to css prop are transformed so function elements can be resolved at runtime. diff --git a/.changeset/cool-candles-lie.md b/.changeset/cool-candles-lie.md deleted file mode 100644 index ae506c88c..000000000 --- a/.changeset/cool-candles-lie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/is-prop-valid': major ---- - -Allow `isPropValid` to take any `PropertyKey` as an argument (instead of just `string`). diff --git a/.changeset/cool-carpets-wave.md b/.changeset/cool-carpets-wave.md deleted file mode 100644 index d5749346f..000000000 --- a/.changeset/cool-carpets-wave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/cache': patch ---- - -Styles are now correctly extracted from the correct cache (`key`-sensitive) on the server. diff --git a/.changeset/curvy-timers-decide.md b/.changeset/curvy-timers-decide.md deleted file mode 100644 index 7cb73ccc8..000000000 --- a/.changeset/curvy-timers-decide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/styled': major ---- - -Remove support for deprecated `innerRef` prop diff --git a/.changeset/cyan-jobs-carry.md b/.changeset/cyan-jobs-carry.md deleted file mode 100644 index a9f060ad5..000000000 --- a/.changeset/cyan-jobs-carry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/styled': minor ---- - -Added basic TS type support for `as` prop on styled components. It's possible to pass any component to it but it has no effect on other accepted props. This means that it's not 100% type-safe so use it sparingly and with care. diff --git a/.changeset/dry-frogs-perform.md b/.changeset/dry-frogs-perform.md deleted file mode 100644 index 8804a2ee4..000000000 --- a/.changeset/dry-frogs-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/react': patch ---- - -Fixed styles inserted by `` component not inheriting `speedy` option from a cache passed to a wrapping ``. diff --git a/.changeset/eighty-grapes-rule.md b/.changeset/eighty-grapes-rule.md deleted file mode 100644 index 766b8072d..000000000 --- a/.changeset/eighty-grapes-rule.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': patch ---- - -`@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. diff --git a/.changeset/eleven-apes-cheer.md b/.changeset/eleven-apes-cheer.md deleted file mode 100644 index 87f61f76a..000000000 --- a/.changeset/eleven-apes-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': minor ---- - -Improve support for Enzyme's shallow rendering with the addition of the `@emotion/jest/enzyme-serializer` snapshot serializer. diff --git a/.changeset/famous-bats-grow.md b/.changeset/famous-bats-grow.md deleted file mode 100644 index beec5957e..000000000 --- a/.changeset/famous-bats-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': minor ---- - -Improved printing of nested at-rules. diff --git a/.changeset/few-donkeys-check.md b/.changeset/few-donkeys-check.md deleted file mode 100644 index e9891df5a..000000000 --- a/.changeset/few-donkeys-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/serialize': patch ---- - -An additional semicolon is now inserted after interpolated arrays to cover cases when it doesn't have a trailing semi itself and thus breaking composition with styles coming after it. diff --git a/.changeset/five-paws-try.md b/.changeset/five-paws-try.md deleted file mode 100644 index c8b4a3dab..000000000 --- a/.changeset/five-paws-try.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/native': minor -'@emotion/primitives': minor ---- - -`@emotion/native` & `@emotion/primitives` packages come with macros now. Both can be used as `@emotion/native/macro` & `@emotion/primitives/macro` respectively. diff --git a/.changeset/five-spoons-roll.md b/.changeset/five-spoons-roll.md deleted file mode 100644 index ef4dc55c0..000000000 --- a/.changeset/five-spoons-roll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/serialize': patch ---- - -Throw error about invalid content property values instead of just logging error to the console. diff --git a/.changeset/flat-adults-add.md b/.changeset/flat-adults-add.md deleted file mode 100644 index 48b3b2163..000000000 --- a/.changeset/flat-adults-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': patch ---- - -Take specificity into account when matching styles diff --git a/.changeset/fluffy-fireants-collect.md b/.changeset/fluffy-fireants-collect.md deleted file mode 100644 index 9449636c5..000000000 --- a/.changeset/fluffy-fireants-collect.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/react': patch -'@emotion/styled': patch ---- - -Fixed TS compatibility under [PnP](https://classic.yarnpkg.com/en/docs/pnp/) environments by making `@types/react` an optional peer dependency. diff --git a/.changeset/four-cars-tell.md b/.changeset/four-cars-tell.md deleted file mode 100644 index 4c1d0afba..000000000 --- a/.changeset/four-cars-tell.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@emotion/react': major -'@emotion/styled': major ---- - -It's now easier to provide a type for `Theme`. Instead of creating custom instances (like before) you can augment the builtin `Theme` interface like this: - -```ts -import '@emotion/react' - -declare module '@emotion/react' { - export interface Theme { - primaryColor: string - secondaryColor: string - } -} -``` diff --git a/.changeset/fresh-clouds-tell.md b/.changeset/fresh-clouds-tell.md deleted file mode 100644 index 36d4ea8d9..000000000 --- a/.changeset/fresh-clouds-tell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': patch ---- - -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. diff --git a/.changeset/gentle-owls-chew.md b/.changeset/gentle-owls-chew.md deleted file mode 100644 index 32cbaf88c..000000000 --- a/.changeset/gentle-owls-chew.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/sheet': patch ---- - -Generated style elements got `data-s="1"` attribute so `@emotion/cache` can recognize them as being already owned by another Emotion copy to avoid messing up existing style elements when initializing a new copy. diff --git a/.changeset/giant-oranges-impress.md b/.changeset/giant-oranges-impress.md deleted file mode 100644 index 90a3adc17..000000000 --- a/.changeset/giant-oranges-impress.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/babel-plugin': major -'@emotion/babel-preset-css-prop': major ---- - -Removed support for the `instances` option, any usage of it should be replaced with the `importMap` option diff --git a/.changeset/gorgeous-steaks-report.md b/.changeset/gorgeous-steaks-report.md deleted file mode 100644 index 2ebd5d14d..000000000 --- a/.changeset/gorgeous-steaks-report.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/cache': minor -'@emotion/sheet': minor ---- - -The new `prepend` option can make Emotion add style tags at the beginning of the specified DOM container instead of the end. diff --git a/.changeset/green-scissors-scream.md b/.changeset/green-scissors-scream.md deleted file mode 100644 index 76d5eb2b9..000000000 --- a/.changeset/green-scissors-scream.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@emotion/babel-plugin': minor ---- - -Added support for converting assignment expressions to labels in cases like this: - -```js -styles = css`` -Timeline.Item = styled.li`` -Timeline.Item.Anchor = styled.a`` -``` diff --git a/.changeset/green-zoos-greet.md b/.changeset/green-zoos-greet.md deleted file mode 100644 index 3fdc80566..000000000 --- a/.changeset/green-zoos-greet.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@emotion/native': major -'@emotion/primitives': major -'@emotion/primitives-core': major ---- - -Updated `css-to-react-native` dependency to the 3.x version - it comes with some breaking changes listed [here](https://github.com/styled-components/css-to-react-native/releases/tag/v3.0.0). diff --git a/.changeset/grumpy-news-wonder.md b/.changeset/grumpy-news-wonder.md deleted file mode 100644 index f22caaf8f..000000000 --- a/.changeset/grumpy-news-wonder.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/babel-plugin': major -'babel-plugin-emotion': major ---- - -Rename `babel-plugin-emotion` to `@emotion/babel-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` in your Babel config. diff --git a/.changeset/healthy-peaches-speak.md b/.changeset/healthy-peaches-speak.md deleted file mode 100644 index 574bb2579..000000000 --- a/.changeset/healthy-peaches-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/sheet': patch ---- - -Removed mentions of `maxLength` option in types & docs as it has been removed some time ago. diff --git a/.changeset/honest-terms-mate.md b/.changeset/honest-terms-mate.md deleted file mode 100644 index a5204bbbe..000000000 --- a/.changeset/honest-terms-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/utils': patch ---- - -Fixed TypeScript definition of the `EmotionCache` by replacing the non-existent `stylis` method with `insert` that is available at runtime. diff --git a/.changeset/large-snakes-ring.md b/.changeset/large-snakes-ring.md deleted file mode 100644 index d4ccc025c..000000000 --- a/.changeset/large-snakes-ring.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/babel-plugin': minor -'@emotion/babel-preset-css-prop': minor ---- - -Allow `labelFormat` option to be a function. diff --git a/.changeset/lazy-elephants-stare.md b/.changeset/lazy-elephants-stare.md deleted file mode 100644 index dd2a95c2f..000000000 --- a/.changeset/lazy-elephants-stare.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/react': patch -'@emotion/serialize': patch ---- - -Fix to what location generated source maps are pointing in case of composed styles. diff --git a/.changeset/light-mice-relate.md b/.changeset/light-mice-relate.md deleted file mode 100644 index d61cb57be..000000000 --- a/.changeset/light-mice-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/babel-plugin': patch ---- - -Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such diff --git a/.changeset/long-apes-admire.md b/.changeset/long-apes-admire.md deleted file mode 100644 index c4b21dcbe..000000000 --- a/.changeset/long-apes-admire.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@emotion/react': major -'@emotion/styled': major ---- - -TypeScript types have been significantly restructured. These changes: - -- reduce build times when using Emotion, especially in larger projects -- it's no longer necessary to manually specify generic parameters for your Emotion components in many cases -- union types as props are better supported and should be inferred properly -- the `css` function has been restricted to prevent passing invalid types -- `styled`'s generic parameter has been changed, if you were specifying the `ComponentType` you will need to remove that generic parameter -- `styled` no longer takes a second `ExtraProps` parameter - instead of that move it to after the `styled` call. So instead of writing `styled(MyComponent)({})` you should now be writing `styled(MyComponent)({})` - -If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred. diff --git a/.changeset/lovely-owls-remember.md b/.changeset/lovely-owls-remember.md deleted file mode 100644 index 871947c9c..000000000 --- a/.changeset/lovely-owls-remember.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/react': minor ---- - -Support functions in arrays passed to `css` prop and `Global`'s styles prop. This allows for composition of theme-accepting functions. diff --git a/.changeset/lovely-wasps-reply.md b/.changeset/lovely-wasps-reply.md deleted file mode 100644 index 6fc51dea2..000000000 --- a/.changeset/lovely-wasps-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/babel-plugin': patch ---- - -Fixed an issue in our tagged template expressions minifier which has caused whitespace before nested orphaned pseudo selectors being incorrectly removed. In a selector like `& :hover` the whitespace before colon has a semantic meaning and needs to be preserved. diff --git a/.changeset/mean-deers-confess.md b/.changeset/mean-deers-confess.md deleted file mode 100644 index d2c99fce7..000000000 --- a/.changeset/mean-deers-confess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': major ---- - -Added the `T` parameter to the `Matchers` interface in the TypeScript definitions to make this module compatible with `@types/jest@^24.0.20`. diff --git a/.changeset/mean-drinks-watch.md b/.changeset/mean-drinks-watch.md deleted file mode 100644 index 632d19ad8..000000000 --- a/.changeset/mean-drinks-watch.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@emotion/react': major -'@emotion/server': major -'@emotion/styled': major ---- - -`[data-emotion]` attribute on SSRed styled has changed. You should never rely on it though. diff --git a/.changeset/modern-grapes-obey.md b/.changeset/modern-grapes-obey.md deleted file mode 100644 index 101947bfe..000000000 --- a/.changeset/modern-grapes-obey.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/babel-plugin': major ---- - -Drop Babel 6 support diff --git a/.changeset/moody-ravens-deny.md b/.changeset/moody-ravens-deny.md deleted file mode 100644 index 87cb8de4f..000000000 --- a/.changeset/moody-ravens-deny.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@emotion/react': patch ---- - -The way in which we provide TypeScript support for the `css` prop has changed. Based on the usage of our JSX factories, we can add support for `css` prop only for components that support `className` prop (as our JSX factory functions take the provided `css` prop, resolve it and pass the generated `className` to the rendered component). - -For the classic runtime this has been implemented using technique described [here](https://www.typescriptlang.org/docs/handbook/jsx.html#factory-functions). What is important - we no longer extend any global interfaces, so people shouldn't bump anymore into type conflicts for the `css` prop when using different libraries with `css` prop support, such as `styled-components`. - -For the automatic runtime this has been implemented by exporting `JSX` namespace from the appropriate entries but this is only supported in **TypeScript 4.1 or higher**. - -However, if you are stuck with older version of TypeScript or using the classic runtime implicitly by using our `@emotion/babel-preset-css-prop` then it's not possible to leverage leverage `css` prop support being added conditionally based on a type of rendered component. For those cases we have added a special file that can be imported once to add support for the `css` prop globally, for all components. Use it like this: - -```ts -/// -``` - -In this particular case we are forced to extend the existing `React.Attributes` interface. Previously we've been extending both `React.DOMAttributes` and `JSX.IntrinsicAttributes`. This change is really minor and shouldn't affect any consuming code. diff --git a/.changeset/moody-stingrays-sort.md b/.changeset/moody-stingrays-sort.md deleted file mode 100644 index a2b998262..000000000 --- a/.changeset/moody-stingrays-sort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/react': minor ---- - -`Global` imported from macro entry (`@emotion/react/macro`) gets source maps generated now when inline css-less expression is used as value of the `styles` prop. diff --git a/.changeset/neat-geese-knock.md b/.changeset/neat-geese-knock.md deleted file mode 100644 index 2c49d15ec..000000000 --- a/.changeset/neat-geese-knock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/babel-plugin': minor ---- - -Requirements for a label extraction have been relaxed. In certain situations it was previously required for a containing function to have a PascalCased name. diff --git a/.changeset/nervous-clouds-brush.md b/.changeset/nervous-clouds-brush.md deleted file mode 100644 index 2641f4514..000000000 --- a/.changeset/nervous-clouds-brush.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/react': major -'@emotion/core': major ---- - -Rename `@emotion/core` to `@emotion/react`. Please change any imports of `@emotion/core` to import `@emotion/react` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. diff --git a/.changeset/nervous-nails-develop.md b/.changeset/nervous-nails-develop.md deleted file mode 100644 index 6bbb3f706..000000000 --- a/.changeset/nervous-nails-develop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': major ---- - -Refactored to use new serializers API which has been introduced in Jest 21. diff --git a/.changeset/nice-apples-arrive.md b/.changeset/nice-apples-arrive.md deleted file mode 100644 index dcf9b1e70..000000000 --- a/.changeset/nice-apples-arrive.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@emotion/native': patch -'@emotion/primitives': patch -'@emotion/primitives-core': patch ---- - -Fixed an issue with styles being lost for nested factory calls like: - -```js -const bgColor = color => css` - background-color: ${color}; -` - -const Text = styled.Text` - color: hotpink; - ${({ backgroundColor }) => bgColor(backgroundColor)}; -` -``` diff --git a/.changeset/nine-mugs-care.md b/.changeset/nine-mugs-care.md deleted file mode 100644 index 37d54a5f5..000000000 --- a/.changeset/nine-mugs-care.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@emotion/react': patch -'@emotion/is-prop-valid': patch -'@emotion/serialize': patch ---- - -Add missing `#__PURE__` annotations diff --git a/.changeset/odd-flowers-breathe.md b/.changeset/odd-flowers-breathe.md deleted file mode 100644 index b9d52adf8..000000000 --- a/.changeset/odd-flowers-breathe.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/css': major -'create-emotion': major ---- - -Move create `create-emotion` to `@emotion/css/create-instance`. Please change any imports of `create-emotion` to import `@emotion/css/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. diff --git a/.changeset/odd-geese-matter.md b/.changeset/odd-geese-matter.md deleted file mode 100644 index 76b62ebee..000000000 --- a/.changeset/odd-geese-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/sheet': minor ---- - -Added `hydrate` method which can be used for SSRed styles. They become a part of a sheet and can be flushed. diff --git a/.changeset/odd-poems-sort.md b/.changeset/odd-poems-sort.md deleted file mode 100644 index ada45b915..000000000 --- a/.changeset/odd-poems-sort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': minor ---- - -Fixed an issue with all styles being recognized as changed in Jest 25 on unrelated changes. diff --git a/.changeset/polite-impalas-doubt.md b/.changeset/polite-impalas-doubt.md deleted file mode 100644 index b306d0beb..000000000 --- a/.changeset/polite-impalas-doubt.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@emotion/babel-plugin': major -'@emotion/babel-preset-css-prop': major ---- - -`autoLabel` option no longer is a simple boolean. Instead we accept now 3 values: `dev-only` (the default), `always` and `never`. - -Each possible value for this option produces different output code: - -- with `dev-only` we optimize the production code, so there are no labels added there, but at the same time we keep labels for development environments, -- with `always` we always add labels when possible, -- with `never` we disable this entirely and no labels are added. diff --git a/.changeset/polite-shirts-smell.md b/.changeset/polite-shirts-smell.md deleted file mode 100644 index 096db5513..000000000 --- a/.changeset/polite-shirts-smell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/cache': patch ---- - -Fixed issue with SSRed styles causing a React rehydration mismatch between server & client when cache was created in render. diff --git a/.changeset/polite-ties-rest.md b/.changeset/polite-ties-rest.md deleted file mode 100644 index faca9abb2..000000000 --- a/.changeset/polite-ties-rest.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@emotion/cache': patch ---- - -From now on an empty rule will get inserted into the DOM in non-production environments if it gets created by the user. This helps to grab used `key`s from the (JS)DOM even for caches that have not inserted any actual rules to the document yet. It allows `@emotion/jest` to find those and serialize Emotion classes properly in situations like this: - -```js -import styled from '@emotion/styled/macro' -import { render } from '@testing-library/react' -const Div = styled.div`` -test('foo', () => { - const { container } = render(
) - expect(container).toMatchSnapshot() -}) -``` diff --git a/.changeset/polite-tips-attend.md b/.changeset/polite-tips-attend.md deleted file mode 100644 index 044d73f89..000000000 --- a/.changeset/polite-tips-attend.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@emotion/styled': minor ---- - -Added `CreateStyled` overload to handle when `shouldForwardProp` is a custom type guard for intrinsic props. - -As an example, if you want to override the type of the `color` prop: - -```ts -export const Box = styled('div', { - shouldForwardProp: ( - propName - ): propName is Exclude => - propName !== 'color' -})<{ color: Array }>(props => ({ - color: props.color[0] -})) -; -``` diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index bd1552ec4..000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "mode": "exit", - "tag": "rc", - "initialVersions": { - "babel-plugin-emotion": "10.0.23", - "@emotion/babel-plugin-jsx-pragmatic": "0.1.4", - "@emotion/babel-preset-css-prop": "10.0.23", - "@emotion/cache": "10.0.19", - "@emotion/core": "10.0.22", - "create-emotion": "10.0.14", - "create-emotion-server": "10.0.14", - "@emotion/css": "10.0.22", - "emotion": "10.0.23", - "emotion-server": "10.0.17", - "emotion-theming": "10.0.19", - "eslint-plugin-emotion": "10.0.14", - "@emotion/hash": "0.7.3", - "@emotion/is-prop-valid": "0.8.5", - "jest-emotion": "10.0.17", - "@emotion/memoize": "0.7.3", - "@emotion/native": "10.0.22", - "@emotion/primitives": "10.0.24", - "@emotion/primitives-core": "10.0.22", - "@emotion/serialize": "0.11.14", - "@emotion/sheet": "0.9.3", - "@emotion/styled": "10.0.23", - "@emotion/styled-base": "10.0.24", - "@emotion/stylis": "0.8.4", - "@emotion/unitless": "0.7.4", - "@emotion/utils": "0.11.2", - "@emotion/weak-memoize": "0.2.4", - "example": "0.6.17", - "my-razzle-app": "0.1.3", - "babel-preset-emotion-dev": "9.2.6", - "babel-tester": "0.4.5", - "benchmarks": "0.8.27", - "old-babel-tester": "0.4.5", - "ssr-benchmarks": "0.8.13", - "test-utils": "0.3.2", - "emotion-site": "9.3.0", - "@emotion/babel-plugin": "11.0.0-next.6", - "@emotion/eslint-plugin": "10.0.14", - "@emotion/jest": "11.0.0-next.7", - "@emotion/react": "11.0.0-next.7", - "@emotion/server": "11.0.0-next.0", - "@emotion/css-prettifier": "1.0.0-next.0" - }, - "changesets": [ - "angry-cheetahs-march", - "angry-rats-type", - "brave-rice-yawn", - "breezy-carpets-smile", - "clever-emus-watch", - "cool-candles-lie", - "cool-carpets-wave", - "curvy-timers-decide", - "cyan-jobs-carry", - "dry-frogs-perform", - "eleven-apes-cheer", - "famous-bats-grow", - "few-donkeys-check", - "five-paws-try", - "five-spoons-roll", - "flat-adults-add", - "fluffy-fireants-collect", - "four-cars-tell", - "fresh-clouds-tell", - "gentle-owls-chew", - "giant-oranges-impress", - "gorgeous-steaks-report", - "green-scissors-scream", - "green-zoos-greet", - "grumpy-news-wonder", - "healthy-peaches-speak", - "honest-terms-mate", - "large-snakes-ring", - "lazy-elephants-stare", - "light-mice-relate", - "long-apes-admire", - "lovely-owls-remember", - "lovely-wasps-reply", - "mean-deers-confess", - "mean-drinks-watch", - "modern-grapes-obey", - "modern-lizards-tickle", - "moody-ravens-deny", - "moody-stingrays-sort", - "neat-geese-knock", - "neat-pugs-deny", - "nervous-clouds-brush", - "nervous-nails-develop", - "nice-apples-arrive", - "nine-mugs-care", - "odd-flowers-breathe", - "odd-geese-matter", - "odd-poems-sort", - "polite-impalas-doubt", - "polite-shirts-smell", - "polite-ties-rest", - "polite-tips-attend", - "purple-teachers-clean", - "rare-toes-grow", - "rotten-adults-guess", - "rotten-onions-hide", - "rotten-yaks-protect", - "selfish-pans-enjoy", - "shaggy-cheetahs-vanish", - "sharp-frogs-applaud", - "shiny-knives-tell", - "silver-bulldogs-beg", - "smooth-carpets-matter", - "soft-moose-attend", - "sour-poets-move", - "sour-suns-repeat", - "spotty-cars-camp", - "spotty-llamas-mate", - "strange-pumas-suffer", - "stupid-radios-draw", - "sweet-hotels-return", - "tall-weeks-compete", - "tiny-eels-shout", - "tough-fans-do", - "tricky-bears-hope", - "two-baboons-mate", - "two-kiwis-give", - "violet-spiders-itch", - "warm-ties-drop", - "weak-islands-confess", - "wet-cycles-fail", - "wicked-mails-obey", - "witty-dots-return", - "young-sloths-relate", - "zany-cougars-shop", - "zany-spoons-sparkle" - ] -} diff --git a/.changeset/purple-teachers-clean.md b/.changeset/purple-teachers-clean.md deleted file mode 100644 index 068ae39e3..000000000 --- a/.changeset/purple-teachers-clean.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/jest': major -'jest-emotion': major ---- - -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`. diff --git a/.changeset/rare-toes-grow.md b/.changeset/rare-toes-grow.md deleted file mode 100644 index f1271495e..000000000 --- a/.changeset/rare-toes-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': patch ---- - -Match rules in declarations with component used as a selector diff --git a/.changeset/rotten-adults-guess.md b/.changeset/rotten-adults-guess.md deleted file mode 100644 index 0f2e8256f..000000000 --- a/.changeset/rotten-adults-guess.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/server': major -'emotion-server': major ---- - -Rename `emotion-server` to `@emotion/server`. Please change any imports of `emotion-server` to import `@emotion/server` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. diff --git a/.changeset/rotten-onions-hide.md b/.changeset/rotten-onions-hide.md deleted file mode 100644 index b61eb8a0e..000000000 --- a/.changeset/rotten-onions-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/styled': minor ---- - -Custom `shouldForwardProp` is being preserved now when using `.withComponent`. Also, when passing an additional `shouldForwardProp` in `.withComponent`'s options (like this: `SomeComponent.withComponent('span', { shouldForwardProp })`) it's being composed with the potentially existing `shouldForwardProp`. diff --git a/.changeset/rotten-yaks-protect.md b/.changeset/rotten-yaks-protect.md deleted file mode 100644 index 1f083b275..000000000 --- a/.changeset/rotten-yaks-protect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': major ---- - -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. diff --git a/.changeset/selfish-pans-enjoy.md b/.changeset/selfish-pans-enjoy.md deleted file mode 100644 index f392dd06e..000000000 --- a/.changeset/selfish-pans-enjoy.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@emotion/native': major -'@emotion/primitives': major -'@emotion/primitives-core': major ---- - -Functions are no longer accepted as values for the `style` prop. This unifies the behavior with the web version of Emotion as `style`'s equivalent is `className` prop and functions are not resolved for it. diff --git a/.changeset/shaggy-cheetahs-vanish.md b/.changeset/shaggy-cheetahs-vanish.md deleted file mode 100644 index b4003deb5..000000000 --- a/.changeset/shaggy-cheetahs-vanish.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/css': major -'emotion': major ---- - -Rename `emotion` to `@emotion/css`. Please change any imports of `emotion` to import `@emotion/css` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. diff --git a/.changeset/sharp-frogs-applaud.md b/.changeset/sharp-frogs-applaud.md deleted file mode 100644 index 6d38d5ac1..000000000 --- a/.changeset/sharp-frogs-applaud.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@emotion/css': major ---- - -Removed support for interpolating class names returned from `css`, so this will no longer be possible: - -```js -const cls1 = css` - color: blue; -` -const cls2 = css` - & .${cls1} { - color: red; - } -` -``` - -This has already been deprecated for the lifetime of v10. diff --git a/.changeset/shiny-knives-tell.md b/.changeset/shiny-knives-tell.md deleted file mode 100644 index 72388dc93..000000000 --- a/.changeset/shiny-knives-tell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/react': patch ---- - -Add a dev-only warning about styles created with `css` from `@emotion/react` being passed to `cx` from ``. diff --git a/.changeset/short-lobsters-fix.md b/.changeset/short-lobsters-fix.md deleted file mode 100644 index 7344dee1d..000000000 --- a/.changeset/short-lobsters-fix.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@emotion/css': major -'@emotion/react': major -'@emotion/styled': major ---- - -UMD filenames have been changed. diff --git a/.changeset/silver-bulldogs-beg.md b/.changeset/silver-bulldogs-beg.md deleted file mode 100644 index bae2268ac..000000000 --- a/.changeset/silver-bulldogs-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/eslint-plugin': minor ---- - -Respect `syntax-preference` rule when using css prop. diff --git a/.changeset/slow-tables-shave.md b/.changeset/slow-tables-shave.md deleted file mode 100644 index c4b011fff..000000000 --- a/.changeset/slow-tables-shave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/babel-plugin': major ---- - -`cssPropOptimization` defaults now to `true` regardless of the `@emotion/react` import presence. diff --git a/.changeset/smooth-carpets-matter.md b/.changeset/smooth-carpets-matter.md deleted file mode 100644 index 3d540d6e3..000000000 --- a/.changeset/smooth-carpets-matter.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@emotion/react': major -'@emotion/css': major ---- - -Removed default export from `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/react/macro` has been added to account for this use case and appropriate changes has been made to `@emotion/babel-plugin` to facilitate those changes. - -If you have used `@emotion/css` directly (it was always reexported from `@emotion/react`) or you have been using its macro then you should update your code like this: - -```diff --import css from '@emotion/css' -+import { css } from '@emotion/react' - -// or --import css from '@emotion/css/macro' -+import { css } from '@emotion/react/macro' -``` - -You can also use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin` to do this for you. diff --git a/.changeset/soft-moose-attend.md b/.changeset/soft-moose-attend.md deleted file mode 100644 index b94c1edd9..000000000 --- a/.changeset/soft-moose-attend.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/server': major -'create-emotion-server': major ---- - -Move `create-emotion-server` to `@emotion/server/create-instance`. Please change any imports of `create-emotion-server` to import `@emotion/server/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. diff --git a/.changeset/sour-poets-move.md b/.changeset/sour-poets-move.md deleted file mode 100644 index 97c6edadd..000000000 --- a/.changeset/sour-poets-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/react': patch ---- - -Warn if `@emotion/react` is initialized more than once in the same development environment. diff --git a/.changeset/sour-suns-repeat.md b/.changeset/sour-suns-repeat.md deleted file mode 100644 index ef3db10b3..000000000 --- a/.changeset/sour-suns-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/cache': major ---- - -From now on `key` option is required. Please make sure it's unique (and not equal to `"css"`) as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements. diff --git a/.changeset/spotty-cars-camp.md b/.changeset/spotty-cars-camp.md deleted file mode 100644 index f3b39cc8c..000000000 --- a/.changeset/spotty-cars-camp.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@emotion/react': minor -'@emotion/css': minor -'@emotion/serialize': minor -'@emotion/styled': minor ---- - -Upgraded [`csstype`](https://www.npmjs.com/package/csstype) dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise. diff --git a/.changeset/spotty-llamas-mate.md b/.changeset/spotty-llamas-mate.md deleted file mode 100644 index a7a5f7645..000000000 --- a/.changeset/spotty-llamas-mate.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/styled-base': major -'@emotion/styled': major ---- - -Removed support for `@emotion/styled-base` package. It has been moved to `@emotion/styled` and is available as `@emotion/styled/base`. This simplifies how the regular and base versions relate to each other and eliminates problems with stricter package managers when `@emotion/styled-base` was not installed explicitly by a user. diff --git a/.changeset/strange-pumas-suffer.md b/.changeset/strange-pumas-suffer.md deleted file mode 100644 index 739534dc9..000000000 --- a/.changeset/strange-pumas-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/styled': patch ---- - -`StyledComponent` Flow type is now polymorphic, that means you can now define the component prop types to get better type safety. diff --git a/.changeset/strong-cooks-drum.md b/.changeset/strong-cooks-drum.md deleted file mode 100644 index 7e98d053d..000000000 --- a/.changeset/strong-cooks-drum.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@emotion/native': major -'@emotion/primitives': major -'@emotion/primitives-core': major ---- - -`StyleSheet.create` is used now under the hood. This means that when used in combination with React Native Web atomic class names are applied on components instead of inline styles. diff --git a/.changeset/stupid-radios-draw.md b/.changeset/stupid-radios-draw.md deleted file mode 100644 index a06f9b32a..000000000 --- a/.changeset/stupid-radios-draw.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/babel-plugin': minor -'@emotion/babel-preset-css-prop': minor ---- - -Added the `importMap` option which allows you to tell `@emotion/babel-plugin` what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms diff --git a/.changeset/sweet-hotels-return.md b/.changeset/sweet-hotels-return.md deleted file mode 100644 index 5494a366c..000000000 --- a/.changeset/sweet-hotels-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/css': major ---- - -The `key` option is now required when creating a custom instance of a cache. Please make sure it's unique (and not equal to `'css'`) as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements. diff --git a/.changeset/tall-weeks-compete.md b/.changeset/tall-weeks-compete.md deleted file mode 100644 index f1f5e1a4a..000000000 --- a/.changeset/tall-weeks-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/native': minor ---- - -Added TypeScript type definitions. diff --git a/.changeset/tiny-eels-shout.md b/.changeset/tiny-eels-shout.md deleted file mode 100644 index a0af5a271..000000000 --- a/.changeset/tiny-eels-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': patch ---- - -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. diff --git a/.changeset/tough-fans-do.md b/.changeset/tough-fans-do.md deleted file mode 100644 index 00b9a7885..000000000 --- a/.changeset/tough-fans-do.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/sheet': major ---- - -`@import` rules are no longer special-cased - they no longer are always inserted at the beginning of the stylesheet. The responsibility to put them first has been moved to a consumer of this package. diff --git a/.changeset/tricky-bears-hope.md b/.changeset/tricky-bears-hope.md deleted file mode 100644 index 6e1640ee9..000000000 --- a/.changeset/tricky-bears-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/serialize': major ---- - -Reworked `Interpolation`-related types. Correct types should now be provided to all flavours of Emotion. diff --git a/.changeset/two-baboons-mate.md b/.changeset/two-baboons-mate.md deleted file mode 100644 index 7cd493de3..000000000 --- a/.changeset/two-baboons-mate.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@emotion/react': major -'@emotion/native': major -'@emotion/primitives-core': major -'@emotion/primitives': major -'@emotion/styled': major ---- - -Use hooks internally for improved bundle size and a better tree in React DevTools diff --git a/.changeset/two-cooks-kiss.md b/.changeset/two-cooks-kiss.md deleted file mode 100644 index c52110f40..000000000 --- a/.changeset/two-cooks-kiss.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@emotion/native': minor -'@emotion/primitives': minor -'@emotion/primitives-core': minor ---- - -Added support for the `as` prop. diff --git a/.changeset/two-kiwis-give.md b/.changeset/two-kiwis-give.md deleted file mode 100644 index d78a9c4a2..000000000 --- a/.changeset/two-kiwis-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/babel-plugin': minor ---- - -`Global` gets handled by the Babel plugin now - this gives inline css-less expressions source maps. diff --git a/.changeset/violet-spiders-itch.md b/.changeset/violet-spiders-itch.md deleted file mode 100644 index 4df9cdde9..000000000 --- a/.changeset/violet-spiders-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/eslint-plugin': minor ---- - -Added `@emotion/pkg-renaming` rule for Emotion 11 migration. diff --git a/.changeset/warm-ties-drop.md b/.changeset/warm-ties-drop.md deleted file mode 100644 index c80928b0d..000000000 --- a/.changeset/warm-ties-drop.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@emotion/cache': major -'@emotion/css': major -'@emotion/react': major -'@emotion/styled': major ---- - -The parser we use ([Stylis](https://github.com/thysultan/stylis.js)) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster 🚀 - -It has been completely rewritten and comes with some breaking changes. The most notable ones that might affect Emotion users are: - -- plugins written for the former Stylis v3 are not compatible with the new version. To learn more on how to write a plugin for Stylis v4 you can check out its [README](https://github.com/thysultan/stylis.js#middleware) and the source code of core plugins. -- vendor-prefixing was previously customizable using `prefix` option. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. The `prefix` option is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not. -- the prefixer is now just a plugin which happens to be included in the default `stylisPlugins`. If you plan to use custom `stylisPlugins` and you want to have your styles prefixed automatically you must include prefixer in your custom `stylisPlugins`. You can import `prefixer` from the `stylis` module to do that. -- `@import` rules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles. diff --git a/.changeset/weak-islands-confess.md b/.changeset/weak-islands-confess.md deleted file mode 100644 index 34b866e87..000000000 --- a/.changeset/weak-islands-confess.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/react': major -'emotion-theming': major ---- - -`emotion-theming` has been removed and all its exports were moved to `@emotion/react` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/react'` from now on. diff --git a/.changeset/weak-pears-design.md b/.changeset/weak-pears-design.md deleted file mode 100644 index 2c9657104..000000000 --- a/.changeset/weak-pears-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/babel-preset-css-prop': major ---- - -Removed `runtime` option that was introduced to this preset and deprecated shortly after that. If you want to configure `runtime: "automatic"`, replace `@emotion/babel-preset-css-prop` with `@babel/preset-react` and `@emotion/babel-plugin`. You can find out how to configure things properly here: https://emotion.sh/docs/css-prop#babel-preset diff --git a/.changeset/wet-cycles-fail.md b/.changeset/wet-cycles-fail.md deleted file mode 100644 index 4f341c5fa..000000000 --- a/.changeset/wet-cycles-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/jest': major ---- - -`@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. diff --git a/.changeset/wicked-mails-obey.md b/.changeset/wicked-mails-obey.md deleted file mode 100644 index a9eed5e76..000000000 --- a/.changeset/wicked-mails-obey.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@emotion/native': minor -'@emotion/primitives': minor ---- - -Added basic support for accepting custom `shouldForwardProp` option. diff --git a/.changeset/witty-dots-return.md b/.changeset/witty-dots-return.md deleted file mode 100644 index 6b729b906..000000000 --- a/.changeset/witty-dots-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/utils': major ---- - -`insertStyles` no longer calls `cache.insert` with a scoped class name as a selector when inserting keyframes. The change is internal and has no effect on Emotion users. diff --git a/.changeset/young-sloths-relate.md b/.changeset/young-sloths-relate.md deleted file mode 100644 index 7fd96d6c7..000000000 --- a/.changeset/young-sloths-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/css': patch ---- - -Added `speedy` method to the TS type declaration of the `sheet` object available on Emotion instances. In addition to that - `StyleSheet` type is no longer exported from this package and instead `CSSStyleSheet` is available now. The `StyleSheet` type might still be imported from `@emotion/sheet`, but it has no `speedy` method and thus it's not the same as what is available in this package as `CSSStyleSheet`. diff --git a/.changeset/zany-cougars-shop.md b/.changeset/zany-cougars-shop.md deleted file mode 100644 index b8cdf13a6..000000000 --- a/.changeset/zany-cougars-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@emotion/is-prop-valid": minor ---- - -`translate` got added to the list of the valid props. diff --git a/.changeset/zany-spoons-sparkle.md b/.changeset/zany-spoons-sparkle.md deleted file mode 100644 index 823a09889..000000000 --- a/.changeset/zany-spoons-sparkle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@emotion/eslint-plugin': minor ---- - -ESLint 7 has been added to the peer dependency range (ESLint 6 keeps being supported). diff --git a/packages/babel-plugin/CHANGELOG.md b/packages/babel-plugin/CHANGELOG.md index 4d68b067d..be39c7411 100644 --- a/packages/babel-plugin/CHANGELOG.md +++ b/packages/babel-plugin/CHANGELOG.md @@ -1,5 +1,54 @@ # @emotion/babel-plugin +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `babel-plugin-emotion` to `@emotion/babel-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` in your Babel config. + +* [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1) [#1220](https://github.com/emotion-js/emotion/pull/1220) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Removed support for the `instances` option, any usage of it should be replaced with the `importMap` option + +* [`c65c5d88`](https://github.com/emotion-js/emotion/commit/c65c5d887002d76557eaefcb98091d795b13f9a9) [#1622](https://github.com/emotion-js/emotion/pull/1622) Thanks [@Andarist](https://github.com/Andarist)! - Drop Babel 6 support + +- [`c7850e61`](https://github.com/emotion-js/emotion/commit/c7850e61211d6aa26a3388399889a6072ee2f1fe) [#1656](https://github.com/emotion-js/emotion/pull/1656) Thanks [@Andarist](https://github.com/Andarist)! - `autoLabel` option no longer is a simple boolean. Instead we accept now 3 values: `dev-only` (the default), `always` and `never`. + + Each possible value for this option produces different output code: + + - with `dev-only` we optimize the production code, so there are no labels added there, but at the same time we keep labels for development environments, + - with `always` we always add labels when possible, + - with `never` we disable this entirely and no labels are added. + +* [`b7d21373`](https://github.com/emotion-js/emotion/commit/b7d21373d967d0f958dd59aaaa650047e23e8e8b) [#2080](https://github.com/emotion-js/emotion/pull/2080) Thanks [@Andarist](https://github.com/Andarist)! - `cssPropOptimization` defaults now to `true` regardless of the `@emotion/react` import presence. + +### Minor Changes + +- [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1) [#1220](https://github.com/emotion-js/emotion/pull/1220) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added the `importMap` option which allows you to tell `@emotion/babel-plugin` what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms + +- [`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8) [#1130](https://github.com/emotion-js/emotion/pull/1130) Thanks [@jtmthf](https://github.com/jtmthf)! - Adjust how arrays passed to css prop are transformed so function elements can be resolved at runtime. + +* [`5e803106`](https://github.com/emotion-js/emotion/commit/5e803106d391b7c036bdf634318b80337a1d9b70) [#1893](https://github.com/emotion-js/emotion/pull/1893) Thanks [@Andarist](https://github.com/Andarist)! - Added support for converting assignment expressions to labels in cases like this: + + ```js + styles = css`` + Timeline.Item = styled.li`` + Timeline.Item.Anchor = styled.a`` + ``` + +- [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d) [#1651](https://github.com/emotion-js/emotion/pull/1651) Thanks [@Andarist](https://github.com/Andarist)! - Allow `labelFormat` option to be a function. + +* [`5c7ec859`](https://github.com/emotion-js/emotion/commit/5c7ec85904633a11185066fa591dc8969f3f2ff2) [#1805](https://github.com/emotion-js/emotion/pull/1805) Thanks [@Andarist](https://github.com/Andarist)! - Requirements for a label extraction have been relaxed. In certain situations it was previously required for a containing function to have a PascalCased name. + +* [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd) [#1639](https://github.com/emotion-js/emotion/pull/1639) Thanks [@Andarist](https://github.com/Andarist)! - `Global` gets handled by the Babel plugin now - this gives inline css-less expressions source maps. + +### Patch Changes + +- [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0) [#1602](https://github.com/emotion-js/emotion/pull/1602) Thanks [@Andarist](https://github.com/Andarist)! - Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such + +* [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf) [#1817](https://github.com/emotion-js/emotion/pull/1817) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue in our tagged template expressions minifier which has caused whitespace before nested orphaned pseudo selectors being incorrectly removed. In a selector like `& :hover` the whitespace before colon has a semantic meaning and needs to be preserved. + +* Updated dependencies [[`e3d7db87`](https://github.com/emotion-js/emotion/commit/e3d7db87deaac95817404760112417ac1fa1b56d), [`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387), [`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85), [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07), [`c6431074`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b)]: + - @emotion/serialize@1.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/babel-plugin/package.json b/packages/babel-plugin/package.json index 231c30ccd..40053366a 100644 --- a/packages/babel-plugin/package.json +++ b/packages/babel-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/babel-plugin", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.", "main": "dist/emotion-babel-plugin.cjs.js", "module": "dist/emotion-babel-plugin.esm.js", @@ -18,7 +18,7 @@ "@babel/runtime": "^7.7.2", "@emotion/hash": "^0.8.0", "@emotion/memoize": "^0.7.4", - "@emotion/serialize": "^1.0.0-rc.0", + "@emotion/serialize": "^1.0.0", "babel-plugin-macros": "^2.6.1", "convert-source-map": "^1.5.0", "escape-string-regexp": "^4.0.0", diff --git a/packages/babel-preset-css-prop/CHANGELOG.md b/packages/babel-preset-css-prop/CHANGELOG.md index 0d0ff69a3..4d3780317 100644 --- a/packages/babel-preset-css-prop/CHANGELOG.md +++ b/packages/babel-preset-css-prop/CHANGELOG.md @@ -1,5 +1,34 @@ # @emotion/babel-preset-css-prop +## 11.0.0 + +### Major Changes + +- [`9e3671c4`](https://github.com/emotion-js/emotion/commit/9e3671c466975fb31cd45431e25cb60ffb677a70) [#2076](https://github.com/emotion-js/emotion/pull/2076) Thanks [@Andarist](https://github.com/Andarist)! - Removed `runtime` option that was introduced to this preset and deprecated shortly after that. If you want to configure `runtime: "automatic"`, replace `@emotion/babel-preset-css-prop` with `@babel/preset-react` and `@emotion/babel-plugin`. You can find out how to configure things properly here: https://emotion.sh/docs/css-prop#babel-preset + +- [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1) [#1220](https://github.com/emotion-js/emotion/pull/1220) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Removed support for the `instances` option, any usage of it should be replaced with the `importMap` option + +* [`c7850e61`](https://github.com/emotion-js/emotion/commit/c7850e61211d6aa26a3388399889a6072ee2f1fe) [#1656](https://github.com/emotion-js/emotion/pull/1656) Thanks [@Andarist](https://github.com/Andarist)! - `autoLabel` option no longer is a simple boolean. Instead we accept now 3 values: `dev-only` (the default), `always` and `never`. + + Each possible value for this option produces different output code: + + - with `dev-only` we optimize the production code, so there are no labels added there, but at the same time we keep labels for development environments, + - with `always` we always add labels when possible, + - with `never` we disable this entirely and no labels are added. + +### Minor Changes + +- [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1) [#1220](https://github.com/emotion-js/emotion/pull/1220) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added the `importMap` option which allows you to tell `@emotion/babel-plugin` what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms + +- [`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8) [#1130](https://github.com/emotion-js/emotion/pull/1130) Thanks [@jtmthf](https://github.com/jtmthf)! - Adjust how arrays passed to css prop are transformed so function elements can be resolved at runtime. + +* [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d) [#1651](https://github.com/emotion-js/emotion/pull/1651) Thanks [@Andarist](https://github.com/Andarist)! - Allow `labelFormat` option to be a function. + +### Patch Changes + +- Updated dependencies [[`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`5e803106`](https://github.com/emotion-js/emotion/commit/5e803106d391b7c036bdf634318b80337a1d9b70), [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1), [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d), [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`c65c5d88`](https://github.com/emotion-js/emotion/commit/c65c5d887002d76557eaefcb98091d795b13f9a9), [`5c7ec859`](https://github.com/emotion-js/emotion/commit/5c7ec85904633a11185066fa591dc8969f3f2ff2), [`c7850e61`](https://github.com/emotion-js/emotion/commit/c7850e61211d6aa26a3388399889a6072ee2f1fe), [`b7d21373`](https://github.com/emotion-js/emotion/commit/b7d21373d967d0f958dd59aaaa650047e23e8e8b), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd)]: + - @emotion/babel-plugin@11.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/babel-preset-css-prop/package.json b/packages/babel-preset-css-prop/package.json index f164a30e0..51562073d 100644 --- a/packages/babel-preset-css-prop/package.json +++ b/packages/babel-preset-css-prop/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/babel-preset-css-prop", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "A babel preset to automatically enable emotion's css prop", "main": "dist/emotion-babel-preset-css-prop.cjs.js", "module": "dist/emotion-babel-preset-css-prop.esm.js", @@ -12,7 +12,7 @@ "dependencies": { "@babel/plugin-transform-react-jsx": "^7.12.1", "@babel/runtime": "^7.7.2", - "@emotion/babel-plugin": "^11.0.0-rc.0", + "@emotion/babel-plugin": "^11.0.0", "@emotion/babel-plugin-jsx-pragmatic": "^0.1.5" }, "peerDependencies": { diff --git a/packages/cache/CHANGELOG.md b/packages/cache/CHANGELOG.md index cf1333ffb..a2f3254ed 100644 --- a/packages/cache/CHANGELOG.md +++ b/packages/cache/CHANGELOG.md @@ -1,5 +1,46 @@ # @emotion/cache +## 11.0.0 + +### Major Changes + +- [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d) [#1572](https://github.com/emotion-js/emotion/pull/1572) Thanks [@Andarist](https://github.com/Andarist)! - From now on `key` option is required. Please make sure it's unique (and not equal to `"css"`) as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements. + +* [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf) [#1817](https://github.com/emotion-js/emotion/pull/1817) Thanks [@Andarist](https://github.com/Andarist)! - The parser we use ([Stylis](https://github.com/thysultan/stylis.js)) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster 🚀 + + It has been completely rewritten and comes with some breaking changes. The most notable ones that might affect Emotion users are: + + - plugins written for the former Stylis v3 are not compatible with the new version. To learn more on how to write a plugin for Stylis v4 you can check out its [README](https://github.com/thysultan/stylis.js#middleware) and the source code of core plugins. + - vendor-prefixing was previously customizable using `prefix` option. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. The `prefix` option is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not. + - the prefixer is now just a plugin which happens to be included in the default `stylisPlugins`. If you plan to use custom `stylisPlugins` and you want to have your styles prefixed automatically you must include prefixer in your custom `stylisPlugins`. You can import `prefixer` from the `stylis` module to do that. + - `@import` rules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles. + +### Minor Changes + +- [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c) [#1473](https://github.com/emotion-js/emotion/pull/1473) Thanks [@jcharry](https://github.com/jcharry)! - The new `prepend` option can make Emotion add style tags at the beginning of the specified DOM container instead of the end. + +### Patch Changes + +- [`a8eb4e75`](https://github.com/emotion-js/emotion/commit/a8eb4e75eed26763dc4f82ddd9bb49af4552768b) [#1998](https://github.com/emotion-js/emotion/pull/1998) Thanks [@Andarist](https://github.com/Andarist)! - Styles are now correctly extracted from the correct cache (`key`-sensitive) on the server. + +* [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d) [#1572](https://github.com/emotion-js/emotion/pull/1572) Thanks [@Andarist](https://github.com/Andarist)! - Fixed issue with SSRed styles causing a React rehydration mismatch between server & client when cache was created in render. + +- [`39be057b`](https://github.com/emotion-js/emotion/commit/39be057b1a0c6b76f2cb7a455cb8bc35fe875ba0) [#1997](https://github.com/emotion-js/emotion/pull/1997) Thanks [@Andarist](https://github.com/Andarist)! - From now on an empty rule will get inserted into the DOM in non-production environments if it gets created by the user. This helps to grab used `key`s from the (JS)DOM even for caches that have not inserted any actual rules to the document yet. It allows `@emotion/jest` to find those and serialize Emotion classes properly in situations like this: + + ```js + import styled from '@emotion/styled/macro' + import { render } from '@testing-library/react' + const Div = styled.div`` + test('foo', () => { + const { container } = render(
) + expect(container).toMatchSnapshot() + }) + ``` + +- Updated dependencies [[`42df3f3b`](https://github.com/emotion-js/emotion/commit/42df3f3bc01526eed61cedba106d86b9e3807f9d), [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c), [`1e4a741d`](https://github.com/emotion-js/emotion/commit/1e4a741de6424d3d9c1f3ca9695e1953bed3a194), [`debaad9a`](https://github.com/emotion-js/emotion/commit/debaad9ab4bd6c80312092826d9146f3d29c0899), [`dfe79aca`](https://github.com/emotion-js/emotion/commit/dfe79aca696fc688f960218b16afee197926fe71), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf)]: + - @emotion/sheet@1.0.0 + - @emotion/utils@1.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/cache/package.json b/packages/cache/package.json index 94eae2f7f..e82185cbb 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/cache", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "emotion's cache", "main": "dist/emotion-cache.cjs.js", "module": "dist/emotion-cache.esm.js", @@ -16,8 +16,8 @@ }, "dependencies": { "@emotion/memoize": "^0.7.4", - "@emotion/sheet": "^1.0.0-rc.0", - "@emotion/utils": "^1.0.0-rc.0", + "@emotion/sheet": "^1.0.0", + "@emotion/utils": "^1.0.0", "@emotion/weak-memoize": "^0.2.5", "stylis": "^4.0.3" }, diff --git a/packages/css-prettifier/CHANGELOG.md b/packages/css-prettifier/CHANGELOG.md index b4d884d14..653b148a8 100644 --- a/packages/css-prettifier/CHANGELOG.md +++ b/packages/css-prettifier/CHANGELOG.md @@ -1 +1,3 @@ # @emotion/css-prettifier + +## 1.0.0 diff --git a/packages/css-prettifier/package.json b/packages/css-prettifier/package.json index 95dd70a3b..267c18d3c 100644 --- a/packages/css-prettifier/package.json +++ b/packages/css-prettifier/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/css-prettifier", - "version": "1.0.0-next.0", + "version": "1.0.0", "description": "Simple Stylis-based CSS prettifier", "scripts": { "test:typescript": "exit 0" diff --git a/packages/css/CHANGELOG.md b/packages/css/CHANGELOG.md index 7cc4b0f42..862c48049 100644 --- a/packages/css/CHANGELOG.md +++ b/packages/css/CHANGELOG.md @@ -1,5 +1,71 @@ # emotion +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `emotion` to `@emotion/css`. Please change any imports of `emotion` to import `@emotion/css` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + +* [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Move create `create-emotion` to `@emotion/css/create-instance`. Please change any imports of `create-emotion` to import `@emotion/css/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + +- [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d) [#1572](https://github.com/emotion-js/emotion/pull/1572) Thanks [@Andarist](https://github.com/Andarist)! - The `key` option is now required when creating a custom instance of a cache. Please make sure it's unique (and not equal to `'css'`) as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements. + +* [`5bea60b1`](https://github.com/emotion-js/emotion/commit/5bea60b1ffab85fbc965532006c3a94ea139f0bf) [#1807](https://github.com/emotion-js/emotion/pull/1807) Thanks [@Andarist](https://github.com/Andarist)! - Removed support for interpolating class names returned from `css`, so this will no longer be possible: + + ```js + const cls1 = css` + color: blue; + ` + const cls2 = css` + & .${cls1} { + color: red; + } + ` + ``` + + This has already been deprecated for the lifetime of v10. + +* [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41) [#1630](https://github.com/emotion-js/emotion/pull/1630) Thanks [@Andarist](https://github.com/Andarist)! - Removed default export from `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/react/macro` has been added to account for this use case and appropriate changes has been made to `@emotion/babel-plugin` to facilitate those changes. + + If you have used `@emotion/css` directly (it was always reexported from `@emotion/react`) or you have been using its macro then you should update your code like this: + + ```diff + -import css from '@emotion/css' + +import { css } from '@emotion/react' + + // or + -import css from '@emotion/css/macro' + +import { css } from '@emotion/react/macro' + ``` + + You can also use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin` to do this for you. + +* [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf) [#1817](https://github.com/emotion-js/emotion/pull/1817) Thanks [@Andarist](https://github.com/Andarist)! - The parser we use ([Stylis](https://github.com/thysultan/stylis.js)) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster 🚀 + + It has been completely rewritten and comes with some breaking changes. The most notable ones that might affect Emotion users are: + + - plugins written for the former Stylis v3 are not compatible with the new version. To learn more on how to write a plugin for Stylis v4 you can check out its [README](https://github.com/thysultan/stylis.js#middleware) and the source code of core plugins. + - vendor-prefixing was previously customizable using `prefix` option. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. The `prefix` option is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not. + - the prefixer is now just a plugin which happens to be included in the default `stylisPlugins`. If you plan to use custom `stylisPlugins` and you want to have your styles prefixed automatically you must include prefixer in your custom `stylisPlugins`. You can import `prefixer` from the `stylis` module to do that. + - `@import` rules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles. + +- [`cf56694`](https://github.com/emotion-js/emotion/commit/cf56694d54d0b2bd6208f561d8ce829da4918952) [#2088](https://github.com/emotion-js/emotion/pull/2088) Thanks [@Andarist](https://github.com/Andarist)! - UMD filenames have been changed. + +### Minor Changes + +- [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07) [#1956](https://github.com/emotion-js/emotion/pull/1956) Thanks [@eps1lon](https://github.com/eps1lon)! - Upgraded [`csstype`](https://www.npmjs.com/package/csstype) dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise. + +### Patch Changes + +- [`6d32d82b`](https://github.com/emotion-js/emotion/commit/6d32d82beb45b18e5f18a37932b862ad19b17044) [#1848](https://github.com/emotion-js/emotion/pull/1848) Thanks [@osdiab](https://github.com/osdiab)! - Added `speedy` method to the TS type declaration of the `sheet` object available on Emotion instances. In addition to that - `StyleSheet` type is no longer exported from this package and instead `CSSStyleSheet` is available now. The `StyleSheet` type might still be imported from `@emotion/sheet`, but it has no `speedy` method and thus it's not the same as what is available in this package as `CSSStyleSheet`. + +- Updated dependencies [[`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8), [`a8eb4e75`](https://github.com/emotion-js/emotion/commit/a8eb4e75eed26763dc4f82ddd9bb49af4552768b), [`e3d7db87`](https://github.com/emotion-js/emotion/commit/e3d7db87deaac95817404760112417ac1fa1b56d), [`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387), [`42df3f3b`](https://github.com/emotion-js/emotion/commit/42df3f3bc01526eed61cedba106d86b9e3807f9d), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c), [`5e803106`](https://github.com/emotion-js/emotion/commit/5e803106d391b7c036bdf634318b80337a1d9b70), [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1), [`1e4a741d`](https://github.com/emotion-js/emotion/commit/1e4a741de6424d3d9c1f3ca9695e1953bed3a194), [`debaad9a`](https://github.com/emotion-js/emotion/commit/debaad9ab4bd6c80312092826d9146f3d29c0899), [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d), [`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403), [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`c65c5d88`](https://github.com/emotion-js/emotion/commit/c65c5d887002d76557eaefcb98091d795b13f9a9), [`5c7ec859`](https://github.com/emotion-js/emotion/commit/5c7ec85904633a11185066fa591dc8969f3f2ff2), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85), [`dfe79aca`](https://github.com/emotion-js/emotion/commit/dfe79aca696fc688f960218b16afee197926fe71), [`c7850e61`](https://github.com/emotion-js/emotion/commit/c7850e61211d6aa26a3388399889a6072ee2f1fe), [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d), [`39be057b`](https://github.com/emotion-js/emotion/commit/39be057b1a0c6b76f2cb7a455cb8bc35fe875ba0), [`b7d21373`](https://github.com/emotion-js/emotion/commit/b7d21373d967d0f958dd59aaaa650047e23e8e8b), [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d), [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`c6431074`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b), [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf)]: + - @emotion/babel-plugin@11.0.0 + - @emotion/cache@11.0.0 + - @emotion/serialize@1.0.0 + - @emotion/sheet@1.0.0 + - @emotion/utils@1.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/css/package.json b/packages/css/package.json index f2fe71532..a93170f92 100644 --- a/packages/css/package.json +++ b/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/css", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "The Next Generation of CSS-in-JS.", "main": "dist/emotion-css.cjs.js", "module": "dist/emotion-css.esm.js", @@ -18,11 +18,11 @@ "test:typescript": "dtslint types" }, "dependencies": { - "@emotion/babel-plugin": "^11.0.0-rc.0", - "@emotion/cache": "^11.0.0-rc.0", - "@emotion/serialize": "^1.0.0-rc.0", - "@emotion/sheet": "^1.0.0-rc.0", - "@emotion/utils": "^1.0.0-rc.0" + "@emotion/babel-plugin": "^11.0.0", + "@emotion/cache": "^11.0.0", + "@emotion/serialize": "^1.0.0", + "@emotion/sheet": "^1.0.0", + "@emotion/utils": "^1.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index d8e730b09..235cb61ed 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,5 +1,19 @@ # @emotion/eslint-plugin +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `eslint-plugin-emotion` to `@emotion/eslint-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` and `emotion/` with `@emotion/` in your rules config in your ESLint config. + +### Minor Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added `@emotion/pkg-renaming` rule for Emotion 11 migration. + +* [`8b59959f`](https://github.com/emotion-js/emotion/commit/8b59959f0929799f050089b05cafb39ca2c57d2d) [#1659](https://github.com/emotion-js/emotion/pull/1659) Thanks [@Andarist](https://github.com/Andarist)! - Respect `syntax-preference` rule when using css prop. + +* [`58e8c110`](https://github.com/emotion-js/emotion/commit/58e8c110a6d307ef89513015476d6c50d19e77b1) [#2034](https://github.com/emotion-js/emotion/pull/2034) Thanks [@Andarist](https://github.com/Andarist)! - ESLint 7 has been added to the peer dependency range (ESLint 6 keeps being supported). + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 6408a16cb..fbc4f3368 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/eslint-plugin", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "ESLint rules for emotion", "scripts": { "test:typescript": "exit 0" diff --git a/packages/is-prop-valid/CHANGELOG.md b/packages/is-prop-valid/CHANGELOG.md index 397b1fa1e..2f058080b 100644 --- a/packages/is-prop-valid/CHANGELOG.md +++ b/packages/is-prop-valid/CHANGELOG.md @@ -1,5 +1,19 @@ # @emotion/is-prop-valid +## 1.0.0 + +### Major Changes + +- [`923ded01`](https://github.com/emotion-js/emotion/commit/923ded01e2399a242206d590f6646f13aba110e4) [#1643](https://github.com/emotion-js/emotion/pull/1643) Thanks [@JakeGinnivan](https://github.com/JakeGinnivan)! - Allow `isPropValid` to take any `PropertyKey` as an argument (instead of just `string`). + +### Minor Changes + +- [`69446cb5`](https://github.com/emotion-js/emotion/commit/69446cb5bfb644beb877a1edb00ee46c014636d5) [#1971](https://github.com/emotion-js/emotion/pull/1971) Thanks [@mjcampagna](https://github.com/mjcampagna)! - `translate` got added to the list of the valid props. + +### Patch Changes + +- [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85) [#1613](https://github.com/emotion-js/emotion/pull/1613) Thanks [@Andarist](https://github.com/Andarist)! - Add missing `#__PURE__` annotations + ## 1.0.0-rc.0 ### Minor Changes diff --git a/packages/is-prop-valid/package.json b/packages/is-prop-valid/package.json index 4be6aa6c2..380fd0303 100644 --- a/packages/is-prop-valid/package.json +++ b/packages/is-prop-valid/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/is-prop-valid", - "version": "1.0.0-rc.0", + "version": "1.0.0", "description": "A function to check whether a prop is valid for HTML and SVG elements", "main": "dist/emotion-is-prop-valid.cjs.js", "module": "dist/emotion-is-prop-valid.esm.js", diff --git a/packages/jest/CHANGELOG.md b/packages/jest/CHANGELOG.md index af15ad91c..5638fcca7 100644 --- a/packages/jest/CHANGELOG.md +++ b/packages/jest/CHANGELOG.md @@ -1,5 +1,44 @@ # @emotion/jest +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/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`](https://github.com/emotion-js/emotion/commit/ca599c5f392b5b1f51430dc9d8b263ed54856401) [#1901](https://github.com/emotion-js/emotion/pull/1901) Thanks [@Andarist](https://github.com/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`](https://github.com/emotion-js/emotion/commit/ca599c5f392b5b1f51430dc9d8b263ed54856401) [#1901](https://github.com/emotion-js/emotion/pull/1901) Thanks [@Andarist](https://github.com/Andarist)! - Refactored to use new serializers API which has been introduced in Jest 21. + +* [`cd77efbf`](https://github.com/emotion-js/emotion/commit/cd77efbf263486e2b189221f4076e1098d78c379) [#1920](https://github.com/emotion-js/emotion/pull/1920) Thanks [@Andarist](https://github.com/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`](https://github.com/emotion-js/emotion/commit/cd77efbf263486e2b189221f4076e1098d78c379) [#1920](https://github.com/emotion-js/emotion/pull/1920) Thanks [@Andarist](https://github.com/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`](https://github.com/emotion-js/emotion/commit/702f3fd22aab8f3cb09dd547c07b9045ca5c3d9c) [#1620](https://github.com/emotion-js/emotion/pull/1620) Thanks [@spudly](https://github.com/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`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Improve support for Enzyme's shallow rendering with the addition of the `@emotion/jest/enzyme-serializer` snapshot serializer. + +* [`ca599c5f`](https://github.com/emotion-js/emotion/commit/ca599c5f392b5b1f51430dc9d8b263ed54856401) [#1901](https://github.com/emotion-js/emotion/pull/1901) Thanks [@Andarist](https://github.com/Andarist)! - Improved printing of nested at-rules. + +- [`ca599c5f`](https://github.com/emotion-js/emotion/commit/ca599c5f392b5b1f51430dc9d8b263ed54856401) [#1901](https://github.com/emotion-js/emotion/pull/1901) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with all styles being recognized as changed in Jest 25 on unrelated changes. + +### Patch Changes + +- [`e67a5be9`](https://github.com/emotion-js/emotion/commit/e67a5be9bffaa12f9ae0e366983dced4c3716f84) [#1604](https://github.com/emotion-js/emotion/pull/1604) Thanks [@Andarist](https://github.com/Andarist)! - Take specificity into account when matching styles + +* [`8a88e771`](https://github.com/emotion-js/emotion/commit/8a88e77113aef127b0404f4f0b66fd6ee69391f0) [#1880](https://github.com/emotion-js/emotion/pull/1880) Thanks [@Jimmydalecleveland](https://github.com/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. + +- [`e67a5be9`](https://github.com/emotion-js/emotion/commit/e67a5be9bffaa12f9ae0e366983dced4c3716f84) [#1604](https://github.com/emotion-js/emotion/pull/1604) Thanks [@Andarist](https://github.com/Andarist)! - Match rules in declarations with component used as a selector + +* [`ae8c1d9d`](https://github.com/emotion-js/emotion/commit/ae8c1d9dfa9ec605c90937f6e77c2a2642c94bd7) [#1902](https://github.com/emotion-js/emotion/pull/1902) Thanks [@Andarist](https://github.com/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`](https://github.com/emotion-js/emotion/commit/3abcf673d6d2ea8d802602dde1d5af33af75ac4c) [#2043](https://github.com/emotion-js/emotion/pull/2043) Thanks [@Andarist](https://github.com/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 diff --git a/packages/jest/package.json b/packages/jest/package.json index 09716fcc1..fdbd6ca36 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/jest", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "Jest utilities for emotion", "main": "dist/emotion-jest.cjs.js", "module": "dist/emotion-jest.esm.js", @@ -17,7 +17,7 @@ }, "dependencies": { "@babel/runtime": "^7.7.2", - "@emotion/css-prettifier": "^1.0.0-next.0", + "@emotion/css-prettifier": "^1.0.0", "chalk": "^4.1.0", "specificity": "^0.4.1", "stylis": "^4.0.3" @@ -35,8 +35,8 @@ } }, "devDependencies": { - "@emotion/css": "11.0.0-rc.0", - "@emotion/react": "11.0.0-rc.0", + "@emotion/css": "11.0.0", + "@emotion/react": "11.0.0", "@types/jest": "^26.0.14", "dtslint": "^0.3.0", "enzyme-to-json": "^3.6.1", diff --git a/packages/native/CHANGELOG.md b/packages/native/CHANGELOG.md index fb06595a3..f858a2283 100644 --- a/packages/native/CHANGELOG.md +++ b/packages/native/CHANGELOG.md @@ -1,5 +1,47 @@ # @emotion/native +## 11.0.0 + +### Major Changes + +- [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9) [#2014](https://github.com/emotion-js/emotion/pull/2014) Thanks [@Andarist](https://github.com/Andarist)! - Functions are no longer accepted as values for the `style` prop. This unifies the behavior with the web version of Emotion as `style`'s equivalent is `className` prop and functions are not resolved for it. + +* [`139ea336`](https://github.com/emotion-js/emotion/commit/139ea336c7f49a3246813238e388e164b80de4da) [#2060](https://github.com/emotion-js/emotion/pull/2060) Thanks [@efoken](https://github.com/efoken)! - `StyleSheet.create` is used now under the hood. This means that when used in combination with React Native Web atomic class names are applied on components instead of inline styles. + +- [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Use hooks internally for improved bundle size and a better tree in React DevTools + +* [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9) [#2014](https://github.com/emotion-js/emotion/pull/2014) Thanks [@Andarist](https://github.com/Andarist)! - Updated `css-to-react-native` dependency to the 3.x version - it comes with some breaking changes listed [here](https://github.com/styled-components/css-to-react-native/releases/tag/v3.0.0). + +### Minor Changes + +- [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41) [#1630](https://github.com/emotion-js/emotion/pull/1630) Thanks [@Andarist](https://github.com/Andarist)! - `@emotion/native` & `@emotion/primitives` packages come with macros now. Both can be used as `@emotion/native/macro` & `@emotion/primitives/macro` respectively. + +* [`456be9a6`](https://github.com/emotion-js/emotion/commit/456be9a602d7d0bac291617f69f59f5ed30d1b84) [#1634](https://github.com/emotion-js/emotion/pull/1634) Thanks [@patsissons](https://github.com/patsissons)! - Added TypeScript type definitions. + +- [`2d597857`](https://github.com/emotion-js/emotion/commit/2d5978579f758163663c1bfb40e7d76bc24ae26a) [#2058](https://github.com/emotion-js/emotion/pull/2058) Thanks [@efoken](https://github.com/efoken)! - Added support for the `as` prop. + +* [`f1b7c9d6`](https://github.com/emotion-js/emotion/commit/f1b7c9d6dcdb45a02d7c7dce8c3fff28e14ed3ec) [#1642](https://github.com/emotion-js/emotion/pull/1642) Thanks [@Andarist](https://github.com/Andarist)! - Added basic support for accepting custom `shouldForwardProp` option. + +### Patch Changes + +- [`11fc27f8`](https://github.com/emotion-js/emotion/commit/11fc27f8fa00661353cc7650111afaa068399aca) [#1750](https://github.com/emotion-js/emotion/pull/1750) Thanks [@Zn4rK](https://github.com/Zn4rK)! - Match supported components to what is exported from the latest version of React Native (0.61.5). + +* [`db16ac35`](https://github.com/emotion-js/emotion/commit/db16ac358ded4cc04fbd649700716b7cb3b3e40a) [#2013](https://github.com/emotion-js/emotion/pull/2013) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with styles being lost for nested factory calls like: + + ```js + const bgColor = color => css` + background-color: ${color}; + ` + + const Text = styled.Text` + color: hotpink; + ${({ backgroundColor }) => bgColor(backgroundColor)}; + ` + ``` + +* Updated dependencies [[`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9), [`db16ac35`](https://github.com/emotion-js/emotion/commit/db16ac358ded4cc04fbd649700716b7cb3b3e40a), [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9), [`139ea336`](https://github.com/emotion-js/emotion/commit/139ea336c7f49a3246813238e388e164b80de4da), [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967), [`2d597857`](https://github.com/emotion-js/emotion/commit/2d5978579f758163663c1bfb40e7d76bc24ae26a)]: + - @emotion/primitives-core@11.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/native/package.json b/packages/native/package.json index 99943b1dd..5f47f810d 100644 --- a/packages/native/package.json +++ b/packages/native/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/native", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "Style and render React Native components using emotion", "main": "dist/emotion-native.cjs.js", "module": "dist/emotion-native.esm.js", @@ -22,7 +22,7 @@ "react-native": "^0.63.2" }, "dependencies": { - "@emotion/primitives-core": "^11.0.0-rc.0" + "@emotion/primitives-core": "^11.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0", diff --git a/packages/primitives-core/CHANGELOG.md b/packages/primitives-core/CHANGELOG.md index 97da8c3f5..d25d40d4f 100644 --- a/packages/primitives-core/CHANGELOG.md +++ b/packages/primitives-core/CHANGELOG.md @@ -1,5 +1,36 @@ # @emotion/primitives-core +## 11.0.0 + +### Major Changes + +- [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9) [#2014](https://github.com/emotion-js/emotion/pull/2014) Thanks [@Andarist](https://github.com/Andarist)! - Functions are no longer accepted as values for the `style` prop. This unifies the behavior with the web version of Emotion as `style`'s equivalent is `className` prop and functions are not resolved for it. + +* [`139ea336`](https://github.com/emotion-js/emotion/commit/139ea336c7f49a3246813238e388e164b80de4da) [#2060](https://github.com/emotion-js/emotion/pull/2060) Thanks [@efoken](https://github.com/efoken)! - `StyleSheet.create` is used now under the hood. This means that when used in combination with React Native Web atomic class names are applied on components instead of inline styles. + +- [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Use hooks internally for improved bundle size and a better tree in React DevTools + +* [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9) [#2014](https://github.com/emotion-js/emotion/pull/2014) Thanks [@Andarist](https://github.com/Andarist)! - Updated `css-to-react-native` dependency to the 3.x version - it comes with some breaking changes listed [here](https://github.com/styled-components/css-to-react-native/releases/tag/v3.0.0). + +### Minor Changes + +- [`2d597857`](https://github.com/emotion-js/emotion/commit/2d5978579f758163663c1bfb40e7d76bc24ae26a) [#2058](https://github.com/emotion-js/emotion/pull/2058) Thanks [@efoken](https://github.com/efoken)! - Added support for the `as` prop. + +### Patch Changes + +- [`db16ac35`](https://github.com/emotion-js/emotion/commit/db16ac358ded4cc04fbd649700716b7cb3b3e40a) [#2013](https://github.com/emotion-js/emotion/pull/2013) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with styles being lost for nested factory calls like: + + ```js + const bgColor = color => css` + background-color: ${color}; + ` + + const Text = styled.Text` + color: hotpink; + ${({ backgroundColor }) => bgColor(backgroundColor)}; + ` + ``` + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/primitives-core/package.json b/packages/primitives-core/package.json index 5dca04c13..3921a6c23 100644 --- a/packages/primitives-core/package.json +++ b/packages/primitives-core/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/primitives-core", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "Shared utilities for emotion primitives and native", "main": "dist/emotion-primitives-core.cjs.js", "module": "dist/emotion-primitives-core.esm.js", @@ -20,7 +20,7 @@ "react": ">=16.8.0" }, "devDependencies": { - "@emotion/react": "11.0.0-rc.0", + "@emotion/react": "11.0.0", "react": "16.14.0" }, "homepage": "https://emotion.sh", diff --git a/packages/primitives/CHANGELOG.md b/packages/primitives/CHANGELOG.md index b65d79404..3db875250 100644 --- a/packages/primitives/CHANGELOG.md +++ b/packages/primitives/CHANGELOG.md @@ -1,5 +1,45 @@ # @emotion/primitives +## 11.0.0 + +### Major Changes + +- [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9) [#2014](https://github.com/emotion-js/emotion/pull/2014) Thanks [@Andarist](https://github.com/Andarist)! - Functions are no longer accepted as values for the `style` prop. This unifies the behavior with the web version of Emotion as `style`'s equivalent is `className` prop and functions are not resolved for it. + +* [`139ea336`](https://github.com/emotion-js/emotion/commit/139ea336c7f49a3246813238e388e164b80de4da) [#2060](https://github.com/emotion-js/emotion/pull/2060) Thanks [@efoken](https://github.com/efoken)! - `StyleSheet.create` is used now under the hood. This means that when used in combination with React Native Web atomic class names are applied on components instead of inline styles. + +- [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Use hooks internally for improved bundle size and a better tree in React DevTools + +* [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9) [#2014](https://github.com/emotion-js/emotion/pull/2014) Thanks [@Andarist](https://github.com/Andarist)! - Updated `css-to-react-native` dependency to the 3.x version - it comes with some breaking changes listed [here](https://github.com/styled-components/css-to-react-native/releases/tag/v3.0.0). + +### Minor Changes + +- [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41) [#1630](https://github.com/emotion-js/emotion/pull/1630) Thanks [@Andarist](https://github.com/Andarist)! - `@emotion/native` & `@emotion/primitives` packages come with macros now. Both can be used as `@emotion/native/macro` & `@emotion/primitives/macro` respectively. + +* [`2d597857`](https://github.com/emotion-js/emotion/commit/2d5978579f758163663c1bfb40e7d76bc24ae26a) [#2058](https://github.com/emotion-js/emotion/pull/2058) Thanks [@efoken](https://github.com/efoken)! - Added support for the `as` prop. + +- [`f1b7c9d6`](https://github.com/emotion-js/emotion/commit/f1b7c9d6dcdb45a02d7c7dce8c3fff28e14ed3ec) [#1642](https://github.com/emotion-js/emotion/pull/1642) Thanks [@Andarist](https://github.com/Andarist)! - Added basic support for accepting custom `shouldForwardProp` option. + +### Patch Changes + +- [`db16ac35`](https://github.com/emotion-js/emotion/commit/db16ac358ded4cc04fbd649700716b7cb3b3e40a) [#2013](https://github.com/emotion-js/emotion/pull/2013) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with styles being lost for nested factory calls like: + + ```js + const bgColor = color => css` + background-color: ${color}; + ` + + const Text = styled.Text` + color: hotpink; + ${({ backgroundColor }) => bgColor(backgroundColor)}; + ` + ``` + +- Updated dependencies [[`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8), [`923ded01`](https://github.com/emotion-js/emotion/commit/923ded01e2399a242206d590f6646f13aba110e4), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`5e803106`](https://github.com/emotion-js/emotion/commit/5e803106d391b7c036bdf634318b80337a1d9b70), [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9), [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1), [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d), [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`c65c5d88`](https://github.com/emotion-js/emotion/commit/c65c5d887002d76557eaefcb98091d795b13f9a9), [`5c7ec859`](https://github.com/emotion-js/emotion/commit/5c7ec85904633a11185066fa591dc8969f3f2ff2), [`db16ac35`](https://github.com/emotion-js/emotion/commit/db16ac358ded4cc04fbd649700716b7cb3b3e40a), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85), [`c7850e61`](https://github.com/emotion-js/emotion/commit/c7850e61211d6aa26a3388399889a6072ee2f1fe), [`95ea2839`](https://github.com/emotion-js/emotion/commit/95ea2839890629748894b3942d26f608f203d3f9), [`b7d21373`](https://github.com/emotion-js/emotion/commit/b7d21373d967d0f958dd59aaaa650047e23e8e8b), [`139ea336`](https://github.com/emotion-js/emotion/commit/139ea336c7f49a3246813238e388e164b80de4da), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967), [`2d597857`](https://github.com/emotion-js/emotion/commit/2d5978579f758163663c1bfb40e7d76bc24ae26a), [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd), [`69446cb5`](https://github.com/emotion-js/emotion/commit/69446cb5bfb644beb877a1edb00ee46c014636d5)]: + - @emotion/babel-plugin@11.0.0 + - @emotion/is-prop-valid@1.0.0 + - @emotion/primitives-core@11.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 9cd830a9f..c9088fd4e 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/primitives", - "version": "11.0.0-rc.0", + "version": "11.0.0", "main": "dist/emotion-primitives.cjs.js", "module": "dist/emotion-primitives.esm.js", "scripts": { @@ -12,9 +12,9 @@ "macro.js" ], "dependencies": { - "@emotion/babel-plugin": "^11.0.0-rc.0", - "@emotion/is-prop-valid": "^1.0.0-rc.0", - "@emotion/primitives-core": "^11.0.0-rc.0" + "@emotion/babel-plugin": "^11.0.0", + "@emotion/is-prop-valid": "^1.0.0", + "@emotion/primitives-core": "^11.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index c709fd95a..53e931e3c 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,109 @@ # @emotion/react +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `@emotion/core` to `@emotion/react`. Please change any imports of `@emotion/core` to import `@emotion/react` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + +* [`cbb8b796`](https://github.com/emotion-js/emotion/commit/cbb8b7965c2923cf1922d724de556374323bff61) [#1628](https://github.com/emotion-js/emotion/pull/1628) Thanks [@Andarist](https://github.com/Andarist)! - `emotion-theming` has been removed and all its exports were moved to `@emotion/react` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/react'` from now on. + +- [`a72e6dc`](https://github.com/emotion-js/emotion/commit/a72e6dc0f326b7d3d6067698d433018ee8c4cbf1) [#1501](https://github.com/emotion-js/emotion/pull/1501) Thanks [@JakeGinnivan](https://github.com/JakeGinnivan)! - TypeScript types have been significantly restructured. These changes: + + - reduce build times when using Emotion, especially in larger projects + - it's no longer necessary to manually specify generic parameters for your Emotion components in many cases + - union types as props are better supported and should be inferred properly + - the `css` function has been restricted to prevent passing invalid types + - `styled`'s generic parameter has been changed, if you were specifying the `ComponentType` you will need to remove that generic parameter + - `styled` no longer takes a second `ExtraProps` parameter - instead of that move it to after the `styled` call. So instead of writing `styled(MyComponent)({})` you should now be writing `styled(MyComponent)({})` + + If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred. + +* [`c6431074`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b) [#1609](https://github.com/emotion-js/emotion/pull/1609) Thanks [@tomsseisums](https://github.com/tomsseisums)! - It's now easier to provide a type for `Theme`. Instead of creating custom instances (like before) you can augment the builtin `Theme` interface like this: + + ```ts + import '@emotion/react' + + declare module '@emotion/react' { + export interface Theme { + primaryColor: string + secondaryColor: string + } + } + ``` + +- [`f57a7229`](https://github.com/emotion-js/emotion/commit/f57a72299cd4025a725bd5bd1b966a8f9df16cd8) [#1941](https://github.com/emotion-js/emotion/pull/1941) Thanks [@Andarist](https://github.com/Andarist)! - The way in which we provide TypeScript support for the `css` prop has changed. Based on the usage of our JSX factories, we can add support for `css` prop only for components that support `className` prop (as our JSX factory functions take the provided `css` prop, resolve it and pass the generated `className` to the rendered component). + + For the classic runtime this has been implemented using technique described [here](https://www.typescriptlang.org/docs/handbook/jsx.html#factory-functions). What is important - we no longer extend any global interfaces, so people shouldn't bump anymore into type conflicts for the `css` prop when using different libraries with `css` prop support, such as `styled-components`. + + For the automatic runtime this has been implemented by exporting `JSX` namespace from the appropriate entries but this is only supported in **TypeScript 4.1 or higher**. + + However, if you are stuck with older version of TypeScript or using the classic runtime implicitly by using our `@emotion/babel-preset-css-prop` then it's not possible to leverage leverage `css` prop support being added conditionally based on a type of rendered component. For those cases we have added a special file that can be imported once to add support for the `css` prop globally, for all components. Use it like this: + + ```ts + /// + ``` + + In this particular case we are forced to extend the existing `React.Attributes` interface. Previously we've been extending both `React.DOMAttributes` and `JSX.IntrinsicAttributes`. This change is really minor and shouldn't affect any consuming code. + +- [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41) [#1630](https://github.com/emotion-js/emotion/pull/1630) Thanks [@Andarist](https://github.com/Andarist)! - Removed default export from `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/react/macro` has been added to account for this use case and appropriate changes has been made to `@emotion/babel-plugin` to facilitate those changes. + + If you have used `@emotion/css` directly (it was always reexported from `@emotion/react`) or you have been using its macro then you should update your code like this: + + ```diff + -import css from '@emotion/css' + +import { css } from '@emotion/react' + + // or + -import css from '@emotion/css/macro' + +import { css } from '@emotion/react/macro' + ``` + + You can also use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin` to do this for you. + +* [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Use hooks internally for improved bundle size and a better tree in React DevTools + +- [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf) [#1817](https://github.com/emotion-js/emotion/pull/1817) Thanks [@Andarist](https://github.com/Andarist)! - The parser we use ([Stylis](https://github.com/thysultan/stylis.js)) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster 🚀 + + It has been completely rewritten and comes with some breaking changes. The most notable ones that might affect Emotion users are: + + - plugins written for the former Stylis v3 are not compatible with the new version. To learn more on how to write a plugin for Stylis v4 you can check out its [README](https://github.com/thysultan/stylis.js#middleware) and the source code of core plugins. + - vendor-prefixing was previously customizable using `prefix` option. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. The `prefix` option is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not. + - the prefixer is now just a plugin which happens to be included in the default `stylisPlugins`. If you plan to use custom `stylisPlugins` and you want to have your styles prefixed automatically you must include prefixer in your custom `stylisPlugins`. You can import `prefixer` from the `stylis` module to do that. + - `@import` rules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles. + +* [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d) [#1572](https://github.com/emotion-js/emotion/pull/1572) Thanks [@Andarist](https://github.com/Andarist)! - `[data-emotion]` attribute on SSRed styled has changed. You should never rely on it though. + +* [`cf56694`](https://github.com/emotion-js/emotion/commit/cf56694d54d0b2bd6208f561d8ce829da4918952) [#2088](https://github.com/emotion-js/emotion/pull/2088) Thanks [@Andarist](https://github.com/Andarist)! - UMD filenames have been changed. + +### Minor Changes + +- [`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8) [#1130](https://github.com/emotion-js/emotion/pull/1130) Thanks [@jtmthf](https://github.com/jtmthf)! - Support functions in arrays passed to `css` prop and `Global`'s styles prop. This allows for composition of theme-accepting functions. + +* [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd) [#1639](https://github.com/emotion-js/emotion/pull/1639) Thanks [@Andarist](https://github.com/Andarist)! - `Global` imported from macro entry (`@emotion/react/macro`) gets source maps generated now when inline css-less expression is used as value of the `styles` prop. + +- [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07) [#1956](https://github.com/emotion-js/emotion/pull/1956) Thanks [@eps1lon](https://github.com/eps1lon)! - Upgraded [`csstype`](https://www.npmjs.com/package/csstype) dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise. + +### Patch Changes + +- [`7dea6d7a`](https://github.com/emotion-js/emotion/commit/7dea6d7a9a87f00cf9b695b58a2f65b67e17fabd) [#1734](https://github.com/emotion-js/emotion/pull/1734) Thanks [@Andarist](https://github.com/Andarist)! - Fixed styles inserted by `` component not inheriting `speedy` option from a cache passed to a wrapping ``. + +- [`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403) [#1653](https://github.com/emotion-js/emotion/pull/1653) Thanks [@Andarist](https://github.com/Andarist)! - Fix to what location generated source maps are pointing in case of composed styles. + +* [`75e2f9e1`](https://github.com/emotion-js/emotion/commit/75e2f9e1848bc0161f8db3c663438ada3042ae66) [#1810](https://github.com/emotion-js/emotion/pull/1810) Thanks [@Andarist](https://github.com/Andarist)! - Add a dev-only warning about styles created with `css` from `@emotion/react` being passed to `cx` from ``. + +- [`d62d9101`](https://github.com/emotion-js/emotion/commit/d62d9101bc75e6bc9644ae588d2a6e4bf4d69285) [#1677](https://github.com/emotion-js/emotion/pull/1677) Thanks [@ajs139](https://github.com/ajs139)! - Warn if `@emotion/react` is initialized more than once in the same development environment. + +- [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85) [#1613](https://github.com/emotion-js/emotion/pull/1613) Thanks [@Andarist](https://github.com/Andarist)! - Add missing `#__PURE__` annotations + +* [`58dc08a6`](https://github.com/emotion-js/emotion/commit/58dc08a6a013fb5cfa10bb85e06e53a8ff7eeb51) [#1837](https://github.com/emotion-js/emotion/pull/1837) Thanks [@arcanis](https://github.com/arcanis)! - Fixed TS compatibility under [PnP](https://classic.yarnpkg.com/en/docs/pnp/) environments by making `@types/react` an optional peer dependency. + +- Updated dependencies [[`a8eb4e75`](https://github.com/emotion-js/emotion/commit/a8eb4e75eed26763dc4f82ddd9bb49af4552768b), [`e3d7db87`](https://github.com/emotion-js/emotion/commit/e3d7db87deaac95817404760112417ac1fa1b56d), [`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387), [`42df3f3b`](https://github.com/emotion-js/emotion/commit/42df3f3bc01526eed61cedba106d86b9e3807f9d), [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c), [`1e4a741d`](https://github.com/emotion-js/emotion/commit/1e4a741de6424d3d9c1f3ca9695e1953bed3a194), [`debaad9a`](https://github.com/emotion-js/emotion/commit/debaad9ab4bd6c80312092826d9146f3d29c0899), [`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85), [`dfe79aca`](https://github.com/emotion-js/emotion/commit/dfe79aca696fc688f960218b16afee197926fe71), [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d), [`39be057b`](https://github.com/emotion-js/emotion/commit/39be057b1a0c6b76f2cb7a455cb8bc35fe875ba0), [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d), [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`c6431074`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf)]: + - @emotion/cache@11.0.0 + - @emotion/serialize@1.0.0 + - @emotion/sheet@1.0.0 + - @emotion/utils@1.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/react/package.json b/packages/react/package.json index f8c04d20a..b9bcffe60 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/react", - "version": "11.0.0-rc.0", + "version": "11.0.0", "main": "dist/emotion-react.cjs.js", "module": "dist/emotion-react.esm.js", "browser": { @@ -25,10 +25,10 @@ }, "dependencies": { "@babel/runtime": "^7.7.2", - "@emotion/cache": "^11.0.0-rc.0", - "@emotion/serialize": "^1.0.0-rc.0", - "@emotion/sheet": "^1.0.0-rc.0", - "@emotion/utils": "^1.0.0-rc.0", + "@emotion/cache": "^11.0.0", + "@emotion/serialize": "^1.0.0", + "@emotion/sheet": "^1.0.0", + "@emotion/utils": "^1.0.0", "@emotion/weak-memoize": "^0.2.5", "hoist-non-react-statics": "^3.3.1" }, @@ -46,10 +46,10 @@ }, "devDependencies": { "@babel/core": "^7.7.2", - "@emotion/css": "11.0.0-rc.0", - "@emotion/css-prettifier": "1.0.0-next.0", - "@emotion/server": "11.0.0-rc.0", - "@emotion/styled": "11.0.0-rc.0", + "@emotion/css": "11.0.0", + "@emotion/css-prettifier": "1.0.0", + "@emotion/server": "11.0.0", + "@emotion/styled": "11.0.0", "@types/react": "^16.9.11", "dtslint": "^0.3.0", "html-tag-names": "^1.1.2", diff --git a/packages/serialize/CHANGELOG.md b/packages/serialize/CHANGELOG.md index cac7121a5..18e4ae450 100644 --- a/packages/serialize/CHANGELOG.md +++ b/packages/serialize/CHANGELOG.md @@ -1,5 +1,28 @@ # @emotion/serialize +## 1.0.0 + +### Major Changes + +- [`c6431074`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b) [#1609](https://github.com/emotion-js/emotion/pull/1609) Thanks [@tomsseisums](https://github.com/tomsseisums)! - Reworked `Interpolation`-related types. Correct types should now be provided to all flavours of Emotion. + +### Minor Changes + +- [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07) [#1956](https://github.com/emotion-js/emotion/pull/1956) Thanks [@eps1lon](https://github.com/eps1lon)! - Upgraded [`csstype`](https://www.npmjs.com/package/csstype) dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise. + +### Patch Changes + +- [`e3d7db87`](https://github.com/emotion-js/emotion/commit/e3d7db87deaac95817404760112417ac1fa1b56d) [#1732](https://github.com/emotion-js/emotion/pull/1732) Thanks [@Andarist](https://github.com/Andarist)! - An additional semicolon is now inserted after interpolated arrays to cover cases when it doesn't have a trailing semi itself and thus breaking composition with styles coming after it. + +* [`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387) [#1611](https://github.com/emotion-js/emotion/pull/1611) Thanks [@Andarist](https://github.com/Andarist)! - Throw error about invalid content property values instead of just logging error to the console. + +- [`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403) [#1653](https://github.com/emotion-js/emotion/pull/1653) Thanks [@Andarist](https://github.com/Andarist)! - Fix to what location generated source maps are pointing in case of composed styles. + +* [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85) [#1613](https://github.com/emotion-js/emotion/pull/1613) Thanks [@Andarist](https://github.com/Andarist)! - Add missing `#__PURE__` annotations + +* Updated dependencies [[`debaad9a`](https://github.com/emotion-js/emotion/commit/debaad9ab4bd6c80312092826d9146f3d29c0899), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf)]: + - @emotion/utils@1.0.0 + ## 1.0.0-rc.0 ### Major Changes diff --git a/packages/serialize/package.json b/packages/serialize/package.json index 3b8e28df6..f8a56c806 100644 --- a/packages/serialize/package.json +++ b/packages/serialize/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/serialize", - "version": "1.0.0-rc.0", + "version": "1.0.0", "description": "serialization utils for emotion", "main": "dist/emotion-serialize.cjs.js", "module": "dist/emotion-serialize.esm.js", @@ -17,7 +17,7 @@ "@emotion/hash": "^0.8.0", "@emotion/memoize": "^0.7.4", "@emotion/unitless": "^0.7.5", - "@emotion/utils": "^1.0.0-rc.0", + "@emotion/utils": "^1.0.0", "csstype": "^3.0.2" }, "devDependencies": { diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md index c5f9129ba..9e09eaf27 100644 --- a/packages/server/CHANGELOG.md +++ b/packages/server/CHANGELOG.md @@ -1,5 +1,20 @@ # @emotion/server +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `emotion-server` to `@emotion/server`. Please change any imports of `emotion-server` to import `@emotion/server` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + +* [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Move `create-emotion-server` to `@emotion/server/create-instance`. Please change any imports of `create-emotion-server` to import `@emotion/server/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + +* [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d) [#1572](https://github.com/emotion-js/emotion/pull/1572) Thanks [@Andarist](https://github.com/Andarist)! - `[data-emotion]` attribute on SSRed styled has changed. You should never rely on it though. + +### Patch Changes + +- Updated dependencies [[`debaad9a`](https://github.com/emotion-js/emotion/commit/debaad9ab4bd6c80312092826d9146f3d29c0899), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf)]: + - @emotion/utils@1.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/server/package.json b/packages/server/package.json index c6f053b3b..f55476971 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/server", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "Extract and inline critical css with emotion for server side rendering.", "main": "dist/emotion-server.cjs.js", "types": "types/index.d.ts", @@ -14,7 +14,7 @@ "test:typescript": "dtslint types" }, "dependencies": { - "@emotion/utils": "^1.0.0-rc.0", + "@emotion/utils": "^1.0.0", "html-tokenize": "^2.0.0", "multipipe": "^1.0.2", "through": "^2.3.8" @@ -28,9 +28,9 @@ } }, "devDependencies": { - "@emotion/babel-plugin": "11.0.0-rc.0", - "@emotion/css": "11.0.0-rc.0", - "@emotion/css-prettifier": "1.0.0-next.0", + "@emotion/babel-plugin": "11.0.0", + "@emotion/css": "11.0.0", + "@emotion/css-prettifier": "1.0.0", "@types/node": "^10.11.4", "dtslint": "^0.3.0" }, diff --git a/packages/sheet/CHANGELOG.md b/packages/sheet/CHANGELOG.md index 1d7af3882..9fd62e3b6 100644 --- a/packages/sheet/CHANGELOG.md +++ b/packages/sheet/CHANGELOG.md @@ -1,5 +1,23 @@ # @emotion/sheet +## 1.0.0 + +### Major Changes + +- [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf) [#1817](https://github.com/emotion-js/emotion/pull/1817) Thanks [@Andarist](https://github.com/Andarist)! - `@import` rules are no longer special-cased - they no longer are always inserted at the beginning of the stylesheet. The responsibility to put them first has been moved to a consumer of this package. + +### Minor Changes + +- [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c) [#1473](https://github.com/emotion-js/emotion/pull/1473) Thanks [@jcharry](https://github.com/jcharry)! - The new `prepend` option can make Emotion add style tags at the beginning of the specified DOM container instead of the end. + +* [`dfe79aca`](https://github.com/emotion-js/emotion/commit/dfe79aca696fc688f960218b16afee197926fe71) [#1696](https://github.com/emotion-js/emotion/pull/1696) Thanks [@Andarist](https://github.com/Andarist)! - Added `hydrate` method which can be used for SSRed styles. They become a part of a sheet and can be flushed. + +### Patch Changes + +- [`42df3f3b`](https://github.com/emotion-js/emotion/commit/42df3f3bc01526eed61cedba106d86b9e3807f9d) [#2028](https://github.com/emotion-js/emotion/pull/2028) Thanks [@Andarist](https://github.com/Andarist)! - Generated style elements got `data-s="1"` attribute so `@emotion/cache` can recognize them as being already owned by another Emotion copy to avoid messing up existing style elements when initializing a new copy. + +* [`1e4a741d`](https://github.com/emotion-js/emotion/commit/1e4a741de6424d3d9c1f3ca9695e1953bed3a194) [#1697](https://github.com/emotion-js/emotion/pull/1697) Thanks [@Andarist](https://github.com/Andarist)! - Removed mentions of `maxLength` option in types & docs as it has been removed some time ago. + ## 1.0.0-rc.0 ### Major Changes diff --git a/packages/sheet/package.json b/packages/sheet/package.json index b870c3af5..2435af1aa 100644 --- a/packages/sheet/package.json +++ b/packages/sheet/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/sheet", - "version": "1.0.0-rc.0", + "version": "1.0.0", "description": "emotion's stylesheet", "main": "dist/emotion-sheet.cjs.js", "module": "dist/emotion-sheet.esm.js", diff --git a/packages/styled/CHANGELOG.md b/packages/styled/CHANGELOG.md index 9685909d1..9a2398b6d 100644 --- a/packages/styled/CHANGELOG.md +++ b/packages/styled/CHANGELOG.md @@ -1,5 +1,88 @@ # @emotion/styled +## 11.0.0 + +### Major Changes + +- [`f9feab1a`](https://github.com/emotion-js/emotion/commit/f9feab1a5d1ca88e53c3f7a063be5d5871cc93e8) [#1575](https://github.com/emotion-js/emotion/pull/1575) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Removed support for `@emotion/styled-base` package. It has been moved to `@emotion/styled` and is available as `@emotion/styled/base`. This simplifies how the regular and base versions relate to each other and eliminates problems with stricter package managers when `@emotion/styled-base` was not installed explicitly by a user. + +* [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Remove support for deprecated `innerRef` prop + +* [`a72e6dc`](https://github.com/emotion-js/emotion/commit/a72e6dc0f326b7d3d6067698d433018ee8c4cbf1) [#1501](https://github.com/emotion-js/emotion/pull/1501) Thanks [@JakeGinnivan](https://github.com/JakeGinnivan)! - TypeScript types have been significantly restructured. These changes: + + - reduce build times when using Emotion, especially in larger projects + - it's no longer necessary to manually specify generic parameters for your Emotion components in many cases + - union types as props are better supported and should be inferred properly + - the `css` function has been restricted to prevent passing invalid types + - `styled`'s generic parameter has been changed, if you were specifying the `ComponentType` you will need to remove that generic parameter + - `styled` no longer takes a second `ExtraProps` parameter - instead of that move it to after the `styled` call. So instead of writing `styled(MyComponent)({})` you should now be writing `styled(MyComponent)({})` + + If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred. + +- [`c6431074`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b) [#1609](https://github.com/emotion-js/emotion/pull/1609) Thanks [@tomsseisums](https://github.com/tomsseisums)! - It's now easier to provide a type for `Theme`. Instead of creating custom instances (like before) you can augment the builtin `Theme` interface like this: + + ```ts + import '@emotion/react' + + declare module '@emotion/react' { + export interface Theme { + primaryColor: string + secondaryColor: string + } + } + ``` + +- [`105de5c8`](https://github.com/emotion-js/emotion/commit/105de5c8752be0983c000e1e26462dc8fcf0708d) [#1572](https://github.com/emotion-js/emotion/pull/1572) Thanks [@Andarist](https://github.com/Andarist)! - `[data-emotion]` attribute on SSRed styled has changed. You should never rely on it though. + +* [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Use hooks internally for improved bundle size and a better tree in React DevTools + +- [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf) [#1817](https://github.com/emotion-js/emotion/pull/1817) Thanks [@Andarist](https://github.com/Andarist)! - The parser we use ([Stylis](https://github.com/thysultan/stylis.js)) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster 🚀 + + It has been completely rewritten and comes with some breaking changes. The most notable ones that might affect Emotion users are: + + - plugins written for the former Stylis v3 are not compatible with the new version. To learn more on how to write a plugin for Stylis v4 you can check out its [README](https://github.com/thysultan/stylis.js#middleware) and the source code of core plugins. + - vendor-prefixing was previously customizable using `prefix` option. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. The `prefix` option is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not. + - the prefixer is now just a plugin which happens to be included in the default `stylisPlugins`. If you plan to use custom `stylisPlugins` and you want to have your styles prefixed automatically you must include prefixer in your custom `stylisPlugins`. You can import `prefixer` from the `stylis` module to do that. + - `@import` rules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles. + +* [`cf56694`](https://github.com/emotion-js/emotion/commit/cf56694d54d0b2bd6208f561d8ce829da4918952) [#2088](https://github.com/emotion-js/emotion/pull/2088) Thanks [@Andarist](https://github.com/Andarist)! - UMD filenames have been changed. + +### Minor Changes + +- [`4d3b60d0`](https://github.com/emotion-js/emotion/commit/4d3b60d0d448a61d762ee150e6cb7a2c995ccc2f) [#1874](https://github.com/emotion-js/emotion/pull/1874) Thanks [@connor-baer](https://github.com/connor-baer)! - Added basic TS type support for `as` prop on styled components. It's possible to pass any component to it but it has no effect on other accepted props. This means that it's not 100% type-safe so use it sparingly and with care. + +* [`ad77ed24`](https://github.com/emotion-js/emotion/commit/ad77ed24b4bfe62d6c80f0498cd7e76863e2f28e) [#1624](https://github.com/emotion-js/emotion/pull/1624) Thanks [@JakeGinnivan](https://github.com/JakeGinnivan)! - Added `CreateStyled` overload to handle when `shouldForwardProp` is a custom type guard for intrinsic props. + + As an example, if you want to override the type of the `color` prop: + + ```ts + export const Box = styled('div', { + shouldForwardProp: ( + propName + ): propName is Exclude => + propName !== 'color' + })<{ color: Array }>(props => ({ + color: props.color[0] + })) + ; + ``` + +- [`18c0d5f4`](https://github.com/emotion-js/emotion/commit/18c0d5f4fbe59545c335eab2e0a28d414db33a36) [#1668](https://github.com/emotion-js/emotion/pull/1668) Thanks [@animecyc](https://github.com/animecyc)! - Custom `shouldForwardProp` is being preserved now when using `.withComponent`. Also, when passing an additional `shouldForwardProp` in `.withComponent`'s options (like this: `SomeComponent.withComponent('span', { shouldForwardProp })`) it's being composed with the potentially existing `shouldForwardProp`. + +* [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07) [#1956](https://github.com/emotion-js/emotion/pull/1956) Thanks [@eps1lon](https://github.com/eps1lon)! - Upgraded [`csstype`](https://www.npmjs.com/package/csstype) dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise. + +### Patch Changes + +- [`22935470`](https://github.com/emotion-js/emotion/commit/2293547000ce78d044d054d17564f6c2aa670687) [#1588](https://github.com/emotion-js/emotion/pull/1588) Thanks [@FezVrasta](https://github.com/FezVrasta)! - `StyledComponent` Flow type is now polymorphic, that means you can now define the component prop types to get better type safety. + +* [`58dc08a6`](https://github.com/emotion-js/emotion/commit/58dc08a6a013fb5cfa10bb85e06e53a8ff7eeb51) [#1837](https://github.com/emotion-js/emotion/pull/1837) Thanks [@arcanis](https://github.com/arcanis)! - Fixed TS compatibility under [PnP](https://classic.yarnpkg.com/en/docs/pnp/) environments by making `@types/react` an optional peer dependency. + +- Updated dependencies [[`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8), [`923ded01`](https://github.com/emotion-js/emotion/commit/923ded01e2399a242206d590f6646f13aba110e4), [`e3d7db87`](https://github.com/emotion-js/emotion/commit/e3d7db87deaac95817404760112417ac1fa1b56d), [`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`5e803106`](https://github.com/emotion-js/emotion/commit/5e803106d391b7c036bdf634318b80337a1d9b70), [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1), [`debaad9a`](https://github.com/emotion-js/emotion/commit/debaad9ab4bd6c80312092826d9146f3d29c0899), [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d), [`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403), [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`c65c5d88`](https://github.com/emotion-js/emotion/commit/c65c5d887002d76557eaefcb98091d795b13f9a9), [`5c7ec859`](https://github.com/emotion-js/emotion/commit/5c7ec85904633a11185066fa591dc8969f3f2ff2), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85), [`c7850e61`](https://github.com/emotion-js/emotion/commit/c7850e61211d6aa26a3388399889a6072ee2f1fe), [`b7d21373`](https://github.com/emotion-js/emotion/commit/b7d21373d967d0f958dd59aaaa650047e23e8e8b), [`5d692a6a`](https://github.com/emotion-js/emotion/commit/5d692a6a8102b3faabefb773dd0145b123668a07), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`c6431074`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b), [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`69446cb5`](https://github.com/emotion-js/emotion/commit/69446cb5bfb644beb877a1edb00ee46c014636d5)]: + - @emotion/babel-plugin@11.0.0 + - @emotion/is-prop-valid@1.0.0 + - @emotion/serialize@1.0.0 + - @emotion/utils@1.0.0 + ## 11.0.0-rc.0 ### Major Changes diff --git a/packages/styled/package.json b/packages/styled/package.json index b754c2b78..c6004455a 100644 --- a/packages/styled/package.json +++ b/packages/styled/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/styled", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "styled API for emotion", "main": "dist/emotion-styled.cjs.js", "module": "dist/emotion-styled.esm.js", @@ -12,10 +12,10 @@ }, "dependencies": { "@babel/runtime": "^7.7.2", - "@emotion/babel-plugin": "^11.0.0-rc.0", - "@emotion/is-prop-valid": "^1.0.0-rc.0", - "@emotion/serialize": "^1.0.0-rc.0", - "@emotion/utils": "^1.0.0-rc.0" + "@emotion/babel-plugin": "^11.0.0", + "@emotion/is-prop-valid": "^1.0.0", + "@emotion/serialize": "^1.0.0", + "@emotion/utils": "^1.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0", @@ -32,7 +32,7 @@ }, "devDependencies": { "@babel/core": "^7.7.2", - "@emotion/react": "11.0.0-rc.0", + "@emotion/react": "11.0.0", "dtslint": "^0.3.0", "react": "16.14.0" }, diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 411892de2..1acae95ef 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @emotion/utils +## 1.0.0 + +### Major Changes + +- [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf) [#1817](https://github.com/emotion-js/emotion/pull/1817) Thanks [@Andarist](https://github.com/Andarist)! - `insertStyles` no longer calls `cache.insert` with a scoped class name as a selector when inserting keyframes. The change is internal and has no effect on Emotion users. + +### Patch Changes + +- [`debaad9a`](https://github.com/emotion-js/emotion/commit/debaad9ab4bd6c80312092826d9146f3d29c0899) [#1999](https://github.com/emotion-js/emotion/pull/1999) Thanks [@RoystonS](https://github.com/RoystonS)! - Fixed TypeScript definition of the `EmotionCache` by replacing the non-existent `stylis` method with `insert` that is available at runtime. + ## 1.0.0-rc.0 ### Major Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index c1ab3a7cd..7eb4b91fd 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/utils", - "version": "1.0.0-rc.0", + "version": "1.0.0", "description": "internal utils for emotion", "main": "dist/emotion-utils.cjs.js", "module": "dist/emotion-utils.esm.js", diff --git a/removed-packages/babel-plugin-emotion/CHANGELOG.md b/removed-packages/babel-plugin-emotion/CHANGELOG.md index 53f9535f7..161e4064c 100644 --- a/removed-packages/babel-plugin-emotion/CHANGELOG.md +++ b/removed-packages/babel-plugin-emotion/CHANGELOG.md @@ -1,5 +1,11 @@ # babel-plugin-emotion +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `babel-plugin-emotion` to `@emotion/babel-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` in your Babel config. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/babel-plugin-emotion/package.json b/removed-packages/babel-plugin-emotion/package.json index ee187e35b..750ff0443 100644 --- a/removed-packages/babel-plugin-emotion/package.json +++ b/removed-packages/babel-plugin-emotion/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-emotion", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.", "main": "dist/babel-plugin-emotion.cjs.js", "files": [ diff --git a/removed-packages/core/CHANGELOG.md b/removed-packages/core/CHANGELOG.md index 4a6869063..230a4ab8f 100644 --- a/removed-packages/core/CHANGELOG.md +++ b/removed-packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/core +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `@emotion/core` to `@emotion/react`. Please change any imports of `@emotion/core` to import `@emotion/react` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/core/package.json b/removed-packages/core/package.json index d9b5c5e78..e274a6c51 100644 --- a/removed-packages/core/package.json +++ b/removed-packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/core", - "version": "11.0.0-rc.0", + "version": "11.0.0", "main": "dist/emotion-core.cjs.js", "types": "types/index.d.ts", "files": [ diff --git a/removed-packages/create-emotion-server/CHANGELOG.md b/removed-packages/create-emotion-server/CHANGELOG.md index 5713a7444..9b450d2ba 100644 --- a/removed-packages/create-emotion-server/CHANGELOG.md +++ b/removed-packages/create-emotion-server/CHANGELOG.md @@ -1,5 +1,11 @@ # create-emotion-server +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Move `create-emotion-server` to `@emotion/server/create-instance`. Please change any imports of `create-emotion-server` to import `@emotion/server/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/create-emotion-server/package.json b/removed-packages/create-emotion-server/package.json index 6b59ab948..5900635e2 100644 --- a/removed-packages/create-emotion-server/package.json +++ b/removed-packages/create-emotion-server/package.json @@ -1,6 +1,6 @@ { "name": "create-emotion-server", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "SSR and style extraction tooling for emotion, The Next Generation of CSS-in-JS.", "main": "dist/create-emotion-server.cjs.js", "types": "types/index.d.ts", diff --git a/removed-packages/create-emotion/CHANGELOG.md b/removed-packages/create-emotion/CHANGELOG.md index ece286432..c805d3a2b 100644 --- a/removed-packages/create-emotion/CHANGELOG.md +++ b/removed-packages/create-emotion/CHANGELOG.md @@ -1,5 +1,11 @@ # create-emotion +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Move create `create-emotion` to `@emotion/css/create-instance`. Please change any imports of `create-emotion` to import `@emotion/css/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/create-emotion/package.json b/removed-packages/create-emotion/package.json index d9599aa7e..0d2b1a199 100644 --- a/removed-packages/create-emotion/package.json +++ b/removed-packages/create-emotion/package.json @@ -1,6 +1,6 @@ { "name": "create-emotion", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "The Next Generation of CSS-in-JS.", "main": "dist/create-emotion.cjs.js", "files": [ diff --git a/removed-packages/emotion-server/CHANGELOG.md b/removed-packages/emotion-server/CHANGELOG.md index 74f73b7ec..be55d13a1 100644 --- a/removed-packages/emotion-server/CHANGELOG.md +++ b/removed-packages/emotion-server/CHANGELOG.md @@ -1,5 +1,11 @@ # emotion-server +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `emotion-server` to `@emotion/server`. Please change any imports of `emotion-server` to import `@emotion/server` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/emotion-server/package.json b/removed-packages/emotion-server/package.json index 849919cdd..744fa3a80 100644 --- a/removed-packages/emotion-server/package.json +++ b/removed-packages/emotion-server/package.json @@ -1,6 +1,6 @@ { "name": "emotion-server", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "Extract and inline critical css with emotion for server side rendering.", "main": "dist/emotion-server.cjs.js", "types": "types/index.d.ts", diff --git a/removed-packages/emotion-theming/CHANGELOG.md b/removed-packages/emotion-theming/CHANGELOG.md index 67d823af2..35fa57a68 100644 --- a/removed-packages/emotion-theming/CHANGELOG.md +++ b/removed-packages/emotion-theming/CHANGELOG.md @@ -1,5 +1,11 @@ # emotion-theming +## 11.0.0 + +### Major Changes + +- [`cbb8b796`](https://github.com/emotion-js/emotion/commit/cbb8b7965c2923cf1922d724de556374323bff61) [#1628](https://github.com/emotion-js/emotion/pull/1628) Thanks [@Andarist](https://github.com/Andarist)! - `emotion-theming` has been removed and all its exports were moved to `@emotion/react` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/react'` from now on. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/emotion-theming/package.json b/removed-packages/emotion-theming/package.json index 1211ecc7d..07ea86c77 100644 --- a/removed-packages/emotion-theming/package.json +++ b/removed-packages/emotion-theming/package.json @@ -1,6 +1,6 @@ { "name": "emotion-theming", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "A CSS-in-JS theming solution, inspired by styled-components", "main": "dist/emotion-theming.cjs.js", "files": ["dist"], diff --git a/removed-packages/emotion/CHANGELOG.md b/removed-packages/emotion/CHANGELOG.md index 7015e3aa5..9c0b111cf 100644 --- a/removed-packages/emotion/CHANGELOG.md +++ b/removed-packages/emotion/CHANGELOG.md @@ -1,5 +1,11 @@ # emotion +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `emotion` to `@emotion/css`. Please change any imports of `emotion` to import `@emotion/css` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/emotion/package.json b/removed-packages/emotion/package.json index f5e9067f5..661770af7 100644 --- a/removed-packages/emotion/package.json +++ b/removed-packages/emotion/package.json @@ -1,6 +1,6 @@ { "name": "emotion", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "The Next Generation of CSS-in-JS.", "main": "dist/emotion.cjs.js", "module": "dist/emotion.esm.js", diff --git a/removed-packages/eslint-plugin-emotion/CHANGELOG.md b/removed-packages/eslint-plugin-emotion/CHANGELOG.md index 5496ca7cd..2a63ddbb6 100644 --- a/removed-packages/eslint-plugin-emotion/CHANGELOG.md +++ b/removed-packages/eslint-plugin-emotion/CHANGELOG.md @@ -1,5 +1,11 @@ # eslint-plugin-emotion +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Rename `eslint-plugin-emotion` to `@emotion/eslint-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` and `emotion/` with `@emotion/` in your rules config in your ESLint config. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/eslint-plugin-emotion/package.json b/removed-packages/eslint-plugin-emotion/package.json index 55112454b..1939c7602 100644 --- a/removed-packages/eslint-plugin-emotion/package.json +++ b/removed-packages/eslint-plugin-emotion/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-emotion", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "ESLint rules for emotion", "scripts": { "test:typescript": "exit 0" diff --git a/removed-packages/jest-emotion/CHANGELOG.md b/removed-packages/jest-emotion/CHANGELOG.md index 031d98fdc..d8081e271 100644 --- a/removed-packages/jest-emotion/CHANGELOG.md +++ b/removed-packages/jest-emotion/CHANGELOG.md @@ -1,5 +1,11 @@ # jest-emotion +## 11.0.0 + +### Major Changes + +- [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1675](https://github.com/emotion-js/emotion/pull/1675) Thanks [@mitchellhamilton](https://github.com/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`. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/jest-emotion/package.json b/removed-packages/jest-emotion/package.json index 9ebfbb05d..1345cf55f 100644 --- a/removed-packages/jest-emotion/package.json +++ b/removed-packages/jest-emotion/package.json @@ -1,7 +1,6 @@ - { "name": "jest-emotion", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "Jest utilities for emotion", "main": "dist/jest-emotion.cjs.js", "types": "types/index.d.ts", diff --git a/removed-packages/styled-base/CHANGELOG.md b/removed-packages/styled-base/CHANGELOG.md index e0c3c9485..590ae8e9a 100644 --- a/removed-packages/styled-base/CHANGELOG.md +++ b/removed-packages/styled-base/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/styled-base +## 11.0.0 + +### Major Changes + +- [`f9feab1a`](https://github.com/emotion-js/emotion/commit/f9feab1a5d1ca88e53c3f7a063be5d5871cc93e8) [#1575](https://github.com/emotion-js/emotion/pull/1575) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Removed support for `@emotion/styled-base` package. It has been moved to `@emotion/styled` and is available as `@emotion/styled/base`. This simplifies how the regular and base versions relate to each other and eliminates problems with stricter package managers when `@emotion/styled-base` was not installed explicitly by a user. + ## 11.0.0-rc.0 ### Major Changes diff --git a/removed-packages/styled-base/package.json b/removed-packages/styled-base/package.json index a0cbaf68f..ff1767bd0 100644 --- a/removed-packages/styled-base/package.json +++ b/removed-packages/styled-base/package.json @@ -1,6 +1,6 @@ { "name": "@emotion/styled-base", - "version": "11.0.0-rc.0", + "version": "11.0.0", "description": "Deprecated package which became `@emotion/styled/base`", "main": "dist/emotion-styled-base.cjs.js", "license": "MIT", diff --git a/scripts/benchmarks/CHANGELOG.md b/scripts/benchmarks/CHANGELOG.md index 8756500ed..a81aaaa3d 100644 --- a/scripts/benchmarks/CHANGELOG.md +++ b/scripts/benchmarks/CHANGELOG.md @@ -1,5 +1,12 @@ # benchmarks +## 0.8.28 + +### Patch Changes + +- Updated dependencies [[`c672175b`](https://github.com/emotion-js/emotion/commit/c672175b52e86de43b3d4092a8fe34b2023ceae8), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`5e803106`](https://github.com/emotion-js/emotion/commit/5e803106d391b7c036bdf634318b80337a1d9b70), [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1), [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d), [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`9e998e37`](https://github.com/emotion-js/emotion/commit/9e998e3755c217027ad1be0af4c64644fe14c6bf), [`c65c5d88`](https://github.com/emotion-js/emotion/commit/c65c5d887002d76557eaefcb98091d795b13f9a9), [`5c7ec859`](https://github.com/emotion-js/emotion/commit/5c7ec85904633a11185066fa591dc8969f3f2ff2), [`c7850e61`](https://github.com/emotion-js/emotion/commit/c7850e61211d6aa26a3388399889a6072ee2f1fe), [`b7d21373`](https://github.com/emotion-js/emotion/commit/b7d21373d967d0f958dd59aaaa650047e23e8e8b), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd)]: + - @emotion/babel-plugin@11.0.0 + ## 0.8.28-next.1 ### Patch Changes diff --git a/scripts/benchmarks/package.json b/scripts/benchmarks/package.json index 12fc23c1f..de68c7b83 100644 --- a/scripts/benchmarks/package.json +++ b/scripts/benchmarks/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "benchmarks", - "version": "0.8.28-next.1", + "version": "0.8.28", "scripts": { "start": "parcel src/index.html", "build": "parcel build src/index.html --public-url .", @@ -10,7 +10,7 @@ }, "dependencies": { "@babel/core": "^7.7.2", - "@emotion/babel-plugin": "^11.0.0-next.6", + "@emotion/babel-plugin": "^11.0.0", "babel-plugin-react-native-web": "^0.9.6", "d3-scale-chromatic": "^1.3.0", "http-server": "^0.11.1",