diff --git a/.changeset/README.md b/.changeset/README.md index 26f218eda3..4f3b76b096 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -1,36 +1,8 @@ # Changesets -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with `bolt` to help you release components from a mono-repository. You can find the full documentation for it [here](https://www.npmjs.com/package/@changesets/cli) +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) -To help you get started though, here are some things you should know about this folder: - -## Changesets are automatically generated - -Changesets are generated by the `yarn changeset` or `npx changeset` command. As long as you are following a changeset release flow, you shouldn't have any problems. - -## Each changeset is its own folder - -We use hashes by default for these folder names to avoid collisions when generating them, but there's no harm that will come from renaming them. - -## Changesets are automatically removed - -When `changeset bump` or equivalent command is run, all the changeset folders are removed. This is so we only ever use a changeset once. This makes this a very bad place to store any other information. - -## Changesets come in two parts - -You should treat these parts quite differently: - -- `changes.md` is a file you should feel free to edit as much as you want. It will be prepended to your changelog when you next run your version command. -- `changes.json` is a file that includes information about releases, what should be versioned by the version command. We strongly recommend against editing this directly, as you may make a new changeset that puts your bolt repository into an invalid state. - -## I want to edit the information in a `changes.json` - how do I do it safely? - -The best option is to make a new changeset using the changeset command, copy over the `changes.md`, then delete the old changeset. - -## Can I rename the folder for my changeset? - -Absolutely! We need unique hashes to make changesets play nicely with git, but changing your folder from our hash to your own name isn't going to cause any problems. - -## Can I manually delete changesets? - -You can, but you should be aware this will remove the intent to release communicated by the changeset, and should be done with caution. +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) diff --git a/LICENSE b/LICENSE index f24055d5aa..56e808dea1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2016 Kye Hohenberger +Copyright (c) Emotion team and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d68b359a9d..9ee9b0e822 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Look here 👉 _[emotion babel plugin feature table and documentation](https://g - [emotion website](site) [[Demo Here](https://emotion.sh)] - [next-hnpwa-guide-kit](https://github.com/tkh44/next-hnpwa-guide-kit) [[Demo Here](https://hnpwa.life)] - [reactivesearch](https://github.com/appbaseio/reactivesearch), a react UI library for Elasticsearch [[Website](https://opensource.appbase.io/reactivesearch/)] -- [circuit-ui](https://github.com/sumup/circuit-ui), a react component library built at SumUp [[Storybook](https://sumup.github.io/circuit-ui/)] +- [circuit-ui](https://github.com/sumup-oss/circuit-ui), a react component library built at SumUp [[Storybook](https://circuit.sumup.com/?path=/story/introduction-welcome--page)] - **open a PR and add yours!** ### Ecosystem @@ -102,6 +102,9 @@ Look here 👉 _[emotion babel plugin feature table and documentation](https://g - [zefenify.com](https://zefenify.com/about.html) - [sentry.io](https://sentry.io) - [comparett.com](https://comparett.com) +- [Domain.com.au](https://www.domain.com.au) +- [cyberhaven.com](https://cyberhaven.com) +- [CommercialRealEstate.com.au](https://www.commercialrealestate.com.au) ## Contributors diff --git a/packages/babel-plugin-jsx-pragmatic/CHANGELOG.md b/packages/babel-plugin-jsx-pragmatic/CHANGELOG.md index da688f32f6..0b8fb1b1b2 100644 --- a/packages/babel-plugin-jsx-pragmatic/CHANGELOG.md +++ b/packages/babel-plugin-jsx-pragmatic/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/babel-plugin-jsx-pragmatic +## 0.1.5 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.1.4 ### Patch Changes diff --git a/packages/babel-plugin-jsx-pragmatic/LICENSE b/packages/babel-plugin-jsx-pragmatic/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/babel-plugin-jsx-pragmatic/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/babel-plugin/CHANGELOG.md b/packages/babel-plugin/CHANGELOG.md index fc92f012c1..938c0fd8a9 100644 --- a/packages/babel-plugin/CHANGELOG.md +++ b/packages/babel-plugin/CHANGELOG.md @@ -85,6 +85,24 @@ - [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such +## 10.0.28 + +### Patch Changes + +- [`4dfe558`](https://github.com/emotion-js/emotion/commit/4dfe55811a25bf66306aee46f7f0d6c909004c42) [#1731](https://github.com/emotion-js/emotion/pull/1731) Thanks [@ndelangen](https://github.com/ndelangen)! - Fixed an issue with adding `label` & `target` options to `styled`-related calls when those properties were already set, causing those properties to be duplicated. This could have happened for example when transpiling already transpiled code or when providing those options manually (latter being less likely). + +* [`af07afb`](https://github.com/emotion-js/emotion/commit/af07afbe5a887be82f72a12fd6cd1673a32f5263) [#1761](https://github.com/emotion-js/emotion/pull/1761) Thanks [@mansourkheffache](https://github.com/mansourkheffache)! - Push source maps & labels to cooked/raw arrays in TS-transpiled tagged template expressions containing interpolations. This is a case not covered previously by [#1538](https://github.com/emotion-js/emotion/pull/1538). + +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/hash@0.7.4 + - @emotion/memoize@0.7.4 + - @emotion/serialize@0.11.15 + ## 10.0.23 ### Patch Changes diff --git a/packages/babel-plugin/LICENSE b/packages/babel-plugin/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/babel-plugin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/babel-plugin/__tests__/__fixtures__/core-with-component.js b/packages/babel-plugin/__tests__/__fixtures__/core-with-component.js new file mode 100644 index 0000000000..9985981ae0 --- /dev/null +++ b/packages/babel-plugin/__tests__/__fixtures__/core-with-component.js @@ -0,0 +1,6 @@ +// @flow +import styled from '@emotion/styled' + +const MyComponent = styled.div({ color: 'hotpink' }) + +const OtherComponent = MyComponent.withComponent('section') diff --git a/packages/babel-plugin/__tests__/__snapshots__/css-requires-options.js.snap b/packages/babel-plugin/__tests__/__snapshots__/css-requires-options.js.snap index 9c00a5a9b1..03d159730b 100644 --- a/packages/babel-plugin/__tests__/__snapshots__/css-requires-options.js.snap +++ b/packages/babel-plugin/__tests__/__snapshots__/css-requires-options.js.snap @@ -256,10 +256,36 @@ css(process.env.NODE_ENV === \\"production\\" ? { });" `; -exports[`babel css inline label on code transpiled by TS 1`] = ` +exports[`babel css inline label on code transpiled by TS (with interpolations) 1`] = ` " import { __makeTemplateObject } from 'tslib' + import { css } from '@emotion/react' + import { hoverStyles } from './styles' + + var templateObject_1 + + const someVar = css( + templateObject_1 || + (templateObject_1 = __makeTemplateObject( + ['\\\\n color: hotpink;\\\\n'], + ['\\\\n color: hotpink;\\\\n'] + )), + hoverStyles + ) + + + ↓ ↓ ↓ ↓ ↓ ↓ +import { __makeTemplateObject } from 'tslib'; +import { css } from '@emotion/react'; +import { hoverStyles } from './styles'; +var templateObject_1; +const someVar = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n'], ['\\\\n color: hotpink;\\\\n'])), hoverStyles);" +`; + +exports[`babel css inline label on code transpiled by TS 1`] = ` +" + import { __makeTemplateObject } from 'tslib' import { css } from '@emotion/react' var templateObject_1 diff --git a/packages/babel-plugin/__tests__/__snapshots__/css.js.snap b/packages/babel-plugin/__tests__/__snapshots__/css.js.snap index 0905085ed4..6891c496f9 100644 --- a/packages/babel-plugin/__tests__/__snapshots__/css.js.snap +++ b/packages/babel-plugin/__tests__/__snapshots__/css.js.snap @@ -429,8 +429,8 @@ const thing = { `; exports[`emotion-babel-plugin css label-transpiled-by-ts 1`] = ` -"import { css } from '@emotion/react' -import { __makeTemplateObject } from 'tslib' +"import { __makeTemplateObject } from 'tslib' +import { css } from '@emotion/react' var templateObject_1 @@ -445,12 +445,38 @@ const someVar = css( ↓ ↓ ↓ ↓ ↓ ↓ -import { css } from '@emotion/react'; import { __makeTemplateObject } from 'tslib'; +import { css } from '@emotion/react'; var templateObject_1; const someVar = /*#__PURE__*/ -css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IF9fbWFrZVRlbXBsYXRlT2JqZWN0IH0gZnJvbSAndHNsaWInXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNvbnN0IHNvbWVWYXIgPSBjc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSlcbilcbiJdfQ== */\\")], ['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IF9fbWFrZVRlbXBsYXRlT2JqZWN0IH0gZnJvbSAndHNsaWInXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNvbnN0IHNvbWVWYXIgPSBjc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSlcbilcbiJdfQ== */\\")])));" +css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNvbnN0IHNvbWVWYXIgPSBjc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSlcbilcbiJdfQ== */\\")], ['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNvbnN0IHNvbWVWYXIgPSBjc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSlcbilcbiJdfQ== */\\")])));" +`; + +exports[`emotion-babel-plugin css label-transpiled-by-ts-with-interpolations 1`] = ` +"import { __makeTemplateObject } from 'tslib' +import css from '@emotion/react' +import { hoverStyles } from './styles' + +var templateObject_1 + +const someVar = css( + templateObject_1 || + (templateObject_1 = __makeTemplateObject( + ['\\\\n color: hotpink;\\\\n'], + ['\\\\n color: hotpink;\\\\n'] + )), + hoverStyles +) + + + ↓ ↓ ↓ ↓ ↓ ↓ + +import { __makeTemplateObject } from 'tslib'; +import css from '@emotion/react'; +import { hoverStyles } from './styles'; +var templateObject_1; +const someVar = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n'], ['\\\\n color: hotpink;\\\\n'])), hoverStyles);" `; exports[`emotion-babel-plugin css multiple-calls 1`] = ` diff --git a/packages/babel-plugin/__tests__/__snapshots__/index.js.snap b/packages/babel-plugin/__tests__/__snapshots__/index.js.snap index 1401aeaa78..a0b17c0da8 100644 --- a/packages/babel-plugin/__tests__/__snapshots__/index.js.snap +++ b/packages/babel-plugin/__tests__/__snapshots__/index.js.snap @@ -1,5 +1,40 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`@emotion/babel-plugin core-with-component 1`] = ` +"// @flow +import styled from '@emotion/styled' + +const MyComponent = styled.div({ color: 'hotpink' }) + +const OtherComponent = MyComponent.withComponent('section') + + + ↓ ↓ ↓ ↓ ↓ ↓ + +import _styled from \\"@emotion/styled/base\\"; + +function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; } + +// @flow +const MyComponent = _styled(\\"div\\", { + target: \\"eck06en0\\", + label: \\"MyComponent\\" +})(process.env.NODE_ENV === \\"production\\" ? { + name: \\"3sn2xs\\", + styles: \\"color:hotpink\\" +} : { + name: \\"3sn2xs\\", + styles: \\"color:hotpink\\", + map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUtd2l0aC1jb21wb25lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR29CIiwiZmlsZSI6ImNvcmUtd2l0aC1jb21wb25lbnQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmNvbnN0IE15Q29tcG9uZW50ID0gc3R5bGVkLmRpdih7IGNvbG9yOiAnaG90cGluaycgfSlcblxuY29uc3QgT3RoZXJDb21wb25lbnQgPSBNeUNvbXBvbmVudC53aXRoQ29tcG9uZW50KCdzZWN0aW9uJylcbiJdfQ== */\\", + toString: _EMOTION_STRINGIFIED_CSS_ERROR__ +}); + +const OtherComponent = MyComponent.withComponent('section', { + target: \\"eck06en1\\", + label: \\"OtherComponent\\" +});" +`; + exports[`@emotion/babel-plugin core-with-css-import 1`] = ` "/** @jsx jsx */ import { jsx, css } from '@emotion/react' @@ -55,7 +90,9 @@ import { jsx, css } from '@emotion/react'; const SomeComponent = props =>
;" + +/*#__PURE__*/ +css(\\"color:\\", window, \\";\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:SomeComponent\\"), process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUtd2l0aC1jc3MtaW1wb3J0LWR5bmFtaWMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS1kiLCJmaWxlIjoiY29yZS13aXRoLWNzcy1pbXBvcnQtZHluYW1pYy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4LCBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuY29uc3QgU29tZUNvbXBvbmVudCA9IHByb3BzID0+IChcbiAgPGRpdlxuICAgIGNzcz17Y3NzYFxuICAgICAgY29sb3I6ICR7d2luZG93fTtcbiAgICBgfVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbilcbiJdfQ== */\\", process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:SomeComponent\\")} {...props} />;" `; exports[`@emotion/babel-plugin css-prop-complex-array 1`] = ` @@ -84,7 +121,7 @@ const css2 = theme => ({ }); function SomeComponent(props) { - return
{'Emotion'}
; + return
{'Emotion'}
; }" `; diff --git a/packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts-with-interpolations.js b/packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts-with-interpolations.js new file mode 100644 index 0000000000..e69dd88231 --- /dev/null +++ b/packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts-with-interpolations.js @@ -0,0 +1,14 @@ +import { __makeTemplateObject } from 'tslib' +import css from '@emotion/react/macro' +import { hoverStyles } from './styles' + +var templateObject_1 + +const someVar = css( + templateObject_1 || + (templateObject_1 = __makeTemplateObject( + ['\n color: hotpink;\n'], + ['\n color: hotpink;\n'] + )), + hoverStyles +) diff --git a/packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts.js b/packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts.js index c73b64a510..bc126539e6 100644 --- a/packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts.js +++ b/packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts.js @@ -1,5 +1,5 @@ -import { css } from '@emotion/react/macro' import { __makeTemplateObject } from 'tslib' +import { css } from '@emotion/react/macro' var templateObject_1 diff --git a/packages/babel-plugin/__tests__/css-requires-options.js b/packages/babel-plugin/__tests__/css-requires-options.js index 60e3d9e8ef..ce17ed79d5 100644 --- a/packages/babel-plugin/__tests__/css-requires-options.js +++ b/packages/babel-plugin/__tests__/css-requires-options.js @@ -91,7 +91,6 @@ const cases = { 'label on code transpiled by TS': { code: ` import { __makeTemplateObject } from 'tslib' - import { css } from '@emotion/react' var templateObject_1 @@ -115,6 +114,30 @@ const cases = { babelFileName: __filename }, + 'label on code transpiled by TS (with interpolations) ': { + code: ` + import { __makeTemplateObject } from 'tslib' + import { css } from '@emotion/react' + import { hoverStyles } from './styles' + + var templateObject_1 + + const someVar = css( + templateObject_1 || + (templateObject_1 = __makeTemplateObject( + ['\\n color: hotpink;\\n'], + ['\\n color: hotpink;\\n'] + )), + hoverStyles + ) + `, + opts: { + autoLabel: true, + sourceMap: false + }, + filename: __filename + }, + 'code already transpiled by emotion plugin (avoid double transpilation)': { code: ` import { keyframes as _keyframes } from "emotion"; diff --git a/packages/babel-plugin/__tests__/index.js b/packages/babel-plugin/__tests__/index.js index fae24aa1d8..0c64e04611 100644 --- a/packages/babel-plugin/__tests__/index.js +++ b/packages/babel-plugin/__tests__/index.js @@ -2,5 +2,7 @@ import babelTester from 'babel-tester' import plugin from '@emotion/babel-plugin' babelTester('@emotion/babel-plugin', __dirname, { - plugins: [plugin] + // we add a duplicate of our own plugin + // users may run babel twice, and our plugin should be smart enough to not duplicate fields + plugins: [plugin, [plugin, undefined, 'emotion-copy']] }) diff --git a/packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts-with-interpolations.js b/packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts-with-interpolations.js new file mode 100644 index 0000000000..ea4ce8dfa3 --- /dev/null +++ b/packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts-with-interpolations.js @@ -0,0 +1,14 @@ +import { __makeTemplateObject } from 'tslib' +import { css } from '@emotion/react' +import { hoverStyles } from './styles' + +var templateObject_1 + +css( + templateObject_1 || + (templateObject_1 = __makeTemplateObject( + ['\n color: hotpink;\n'], + ['\n color: hotpink;\n'] + )), + hoverStyles +) diff --git a/packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts.js b/packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts.js index c88af98203..9ba8b23674 100644 --- a/packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts.js +++ b/packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts.js @@ -1,5 +1,4 @@ import { __makeTemplateObject } from 'tslib' - import { css } from '@emotion/react' var templateObject_1 diff --git a/packages/babel-plugin/__tests__/source-maps/__snapshots__/index.js.snap b/packages/babel-plugin/__tests__/source-maps/__snapshots__/index.js.snap index 13593500e5..a955147bda 100644 --- a/packages/babel-plugin/__tests__/source-maps/__snapshots__/index.js.snap +++ b/packages/babel-plugin/__tests__/source-maps/__snapshots__/index.js.snap @@ -103,7 +103,6 @@ process.env.NODE_ENV === \\"production\\" ? { exports[`source maps css-transpiled-by-ts 1`] = ` "import { __makeTemplateObject } from 'tslib' - import { css } from '@emotion/react' var templateObject_1 @@ -124,7 +123,35 @@ import { css } from '@emotion/react'; var templateObject_1; /*#__PURE__*/ -css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxudmFyIHRlbXBsYXRlT2JqZWN0XzFcblxuY3NzKFxuICB0ZW1wbGF0ZU9iamVjdF8xIHx8XG4gICAgKHRlbXBsYXRlT2JqZWN0XzEgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChcbiAgICAgIFsnXFxuICBjb2xvcjogaG90cGluaztcXG4nXSxcbiAgICAgIFsnXFxuICBjb2xvcjogaG90cGluaztcXG4nXVxuICAgICkpXG4pXG4iXX0= */\\")], ['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxudmFyIHRlbXBsYXRlT2JqZWN0XzFcblxuY3NzKFxuICB0ZW1wbGF0ZU9iamVjdF8xIHx8XG4gICAgKHRlbXBsYXRlT2JqZWN0XzEgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChcbiAgICAgIFsnXFxuICBjb2xvcjogaG90cGluaztcXG4nXSxcbiAgICAgIFsnXFxuICBjb2xvcjogaG90cGluaztcXG4nXVxuICAgICkpXG4pXG4iXX0= */\\")])));" +css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNzcyhcbiAgdGVtcGxhdGVPYmplY3RfMSB8fFxuICAgICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ10sXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ11cbiAgICApKVxuKVxuIl19 */\\")], ['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNzcyhcbiAgdGVtcGxhdGVPYmplY3RfMSB8fFxuICAgICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ10sXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ11cbiAgICApKVxuKVxuIl19 */\\")])));" +`; + +exports[`source maps css-transpiled-by-ts-with-interpolations 1`] = ` +"import { __makeTemplateObject } from 'tslib' +import { css } from '@emotion/react' +import { hoverStyles } from './styles' + +var templateObject_1 + +css( + templateObject_1 || + (templateObject_1 = __makeTemplateObject( + ['\\\\n color: hotpink;\\\\n'], + ['\\\\n color: hotpink;\\\\n'] + )), + hoverStyles +) + + + ↓ ↓ ↓ ↓ ↓ ↓ + +import { __makeTemplateObject } from 'tslib'; +import { css } from '@emotion/react'; +import { hoverStyles } from './styles'; +var templateObject_1; + +/*#__PURE__*/ +css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgeyBob3ZlclN0eWxlcyB9IGZyb20gJy4vc3R5bGVzJ1xuXG52YXIgdGVtcGxhdGVPYmplY3RfMVxuXG5jc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSksXG4gIGhvdmVyU3R5bGVzXG4pXG4iXX0= */\\")], ['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBfX21ha2VUZW1wbGF0ZU9iamVjdCB9IGZyb20gJ3RzbGliJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgeyBob3ZlclN0eWxlcyB9IGZyb20gJy4vc3R5bGVzJ1xuXG52YXIgdGVtcGxhdGVPYmplY3RfMVxuXG5jc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSksXG4gIGhvdmVyU3R5bGVzXG4pXG4iXX0= */\\")])), hoverStyles);" `; exports[`source maps global-styles-prop 1`] = ` diff --git a/packages/babel-plugin/src/core-macro.js b/packages/babel-plugin/src/core-macro.js index 2db2067d6c..77f39f1244 100644 --- a/packages/babel-plugin/src/core-macro.js +++ b/packages/babel-plugin/src/core-macro.js @@ -19,7 +19,7 @@ export const transformCssCallExpression = ({ sourceMap?: string, annotateAsPure?: boolean }) => { - let { node, isPure } = transformExpressionWithStyles({ + let node = transformExpressionWithStyles({ babel, state, path, @@ -28,10 +28,8 @@ export const transformCssCallExpression = ({ }) if (node) { path.replaceWith(node) - if (isPure) { - path.hoist() - } - } else if (annotateAsPure) { + path.hoist() + } else if (annotateAsPure && path.isCallExpression()) { path.addComment('leading', '#__PURE__') } } diff --git a/packages/babel-plugin/src/emotion-macro.js b/packages/babel-plugin/src/emotion-macro.js index bacbd17ce4..c35bb9552f 100644 --- a/packages/babel-plugin/src/emotion-macro.js +++ b/packages/babel-plugin/src/emotion-macro.js @@ -46,7 +46,7 @@ let createEmotionTransformer = (isPure: boolean) => ({ path.addComment('leading', '#__PURE__') } - let { node } = transformExpressionWithStyles({ + let node = transformExpressionWithStyles({ babel, state, path, diff --git a/packages/babel-plugin/src/styled-macro.js b/packages/babel-plugin/src/styled-macro.js index dbc985d5fe..aef7008dd9 100644 --- a/packages/babel-plugin/src/styled-macro.js +++ b/packages/babel-plugin/src/styled-macro.js @@ -97,7 +97,7 @@ export let styledTransformer = ({ if (reference.parentPath && reference.parentPath.parentPath) { const styledCallPath = reference.parentPath.parentPath - let { node } = transformExpressionWithStyles({ + let node = transformExpressionWithStyles({ path: styledCallPath, state, babel, diff --git a/packages/babel-plugin/src/utils/checks.js b/packages/babel-plugin/src/utils/checks.js deleted file mode 100644 index 07fcc3d122..0000000000 --- a/packages/babel-plugin/src/utils/checks.js +++ /dev/null @@ -1,27 +0,0 @@ -// @flow - -export function isTaggedTemplateExpressionTranspiledByTypeScript(path: *) { - if (path.node.arguments.length !== 1) { - return false - } - - const argPath = path.get('arguments')[0] - - return ( - argPath.isLogicalExpression() && - argPath.get('left').isIdentifier() && - argPath.node.left.name.includes('templateObject') && - argPath.get('right').isAssignmentExpression() && - argPath - .get('right') - .get('right') - .isCallExpression() && - argPath - .get('right') - .get('right') - .get('callee') - .isIdentifier() && - argPath.node.right.right.callee.name.includes('makeTemplateObject') && - argPath.node.right.right.arguments.length === 2 - ) -} diff --git a/packages/babel-plugin/src/utils/get-styled-options.js b/packages/babel-plugin/src/utils/get-styled-options.js index 4c830ca6e6..510b62a571 100644 --- a/packages/babel-plugin/src/utils/get-styled-options.js +++ b/packages/babel-plugin/src/utils/get-styled-options.js @@ -2,23 +2,42 @@ import { getLabelFromPath } from './label' import { getTargetClassName } from './get-target-class-name' +const getKnownProperties = (t: *, node: *) => + new Set( + node.properties + .filter(n => t.isObjectProperty(n) && !n.computed) + .map(n => (t.isIdentifier(n.key) ? n.key.name : n.key.value)) + ) + export let getStyledOptions = (t: *, path: *, state: *) => { const autoLabel = state.opts.autoLabel || 'dev-only' - let properties = [ - t.objectProperty( - t.identifier('target'), - t.stringLiteral(getTargetClassName(state, t)) + + let args = path.node.arguments + let optionsArgument = args.length >= 2 ? args[1] : null + + let properties = [] + let knownProperties = + optionsArgument && t.isObjectExpression(optionsArgument) + ? getKnownProperties(t, optionsArgument) + : new Set() + + if (!knownProperties.has('target')) { + properties.push( + t.objectProperty( + t.identifier('target'), + t.stringLiteral(getTargetClassName(state, t)) + ) ) - ] + } + let label = autoLabel !== 'never' ? getLabelFromPath(path, state, t) : null - if (label) { + + if (label && !knownProperties.has('label')) { properties.push( t.objectProperty(t.identifier('label'), t.stringLiteral(label)) ) } - let args = path.node.arguments - let optionsArgument = args.length >= 2 ? args[1] : null if (optionsArgument) { if (!t.isObjectExpression(optionsArgument)) { return t.callExpression(state.file.addHelper('extends'), [ diff --git a/packages/babel-plugin/src/utils/strings.js b/packages/babel-plugin/src/utils/strings.js index 2573ab2621..b13b0b1288 100644 --- a/packages/babel-plugin/src/utils/strings.js +++ b/packages/babel-plugin/src/utils/strings.js @@ -1,29 +1,5 @@ // @flow -function isTaggedTemplateExpressionTranspiledByTypeScript(path: *) { - if (path.node.arguments.length !== 1) { - return false - } - - const argPath = path.get('arguments')[0] - - return ( - argPath.isLogicalExpression() && - argPath.get('left').isIdentifier() && - argPath.node.left.name.includes('templateObject') && - argPath.get('right').isAssignmentExpression() && - argPath - .get('right') - .get('right') - .isCallExpression() && - argPath - .get('right') - .get('right') - .get('callee') - .isIdentifier() && - argPath.node.right.right.callee.name.includes('makeTemplateObject') && - argPath.node.right.right.arguments.length === 2 - ) -} +import { getTypeScriptMakeTemplateObjectPath } from './ts-output-utils' export const appendStringReturningExpressionToArguments = ( t: *, @@ -38,29 +14,28 @@ export const appendStringReturningExpressionToArguments = ( } else { path.node.arguments[lastIndex] = t.binaryExpression('+', last, expression) } - } else if (isTaggedTemplateExpressionTranspiledByTypeScript(path)) { - const makeTemplateObjectCallPath = path - .get('arguments')[0] - .get('right') - .get('right') - - makeTemplateObjectCallPath.get('arguments').forEach(argPath => { - const elements = argPath.get('elements') - const lastElement = elements[elements.length - 1] - if (typeof expression === 'string') { - lastElement.replaceWith( - t.stringLiteral(lastElement.node.value + expression) - ) - } else { - lastElement.replaceWith( - t.binaryExpression('+', lastElement.node, t.cloneNode(expression)) - ) - } - }) - } else if (typeof expression === 'string') { - path.node.arguments.push(t.stringLiteral(expression)) } else { - path.node.arguments.push(expression) + const makeTemplateObjectCallPath = getTypeScriptMakeTemplateObjectPath(path) + + if (makeTemplateObjectCallPath) { + makeTemplateObjectCallPath.get('arguments').forEach(argPath => { + const elements = argPath.get('elements') + const lastElement = elements[elements.length - 1] + if (typeof expression === 'string') { + lastElement.replaceWith( + t.stringLiteral(lastElement.node.value + expression) + ) + } else { + lastElement.replaceWith( + t.binaryExpression('+', lastElement.node, t.cloneNode(expression)) + ) + } + }) + } else if (typeof expression === 'string') { + path.node.arguments.push(t.stringLiteral(expression)) + } else { + path.node.arguments.push(expression) + } } } diff --git a/packages/babel-plugin/src/utils/transform-expression-with-styles.js b/packages/babel-plugin/src/utils/transform-expression-with-styles.js index 8fcad35a6b..074c0cac20 100644 --- a/packages/babel-plugin/src/utils/transform-expression-with-styles.js +++ b/packages/babel-plugin/src/utils/transform-expression-with-styles.js @@ -40,7 +40,7 @@ export let transformExpressionWithStyles = ({ path: *, shouldLabel: boolean, sourceMap?: string -}): { node?: *, isPure: boolean } => { +}): * => { const autoLabel = state.opts.autoLabel || 'dev-only' let t = babel.types if (t.isTaggedTemplateExpression(path)) { @@ -56,12 +56,7 @@ export let transformExpressionWithStyles = ({ arg => arg.type !== 'SpreadElement' ) - let isPure = true - path.get('arguments').forEach(node => { - if (!node.isPure()) { - isPure = false - } if (t.isObjectExpression(node)) { node.replaceWith(simplifyObject(node.node, t)) } @@ -131,7 +126,7 @@ export let transformExpressionWithStyles = ({ node = createNodeEnvConditional(t, prodNode, devNode) } - return { node, isPure: true } + return node } if (label) { @@ -161,8 +156,5 @@ export let transformExpressionWithStyles = ({ ) appendStringReturningExpressionToArguments(t, path, sourceMapConditional) } - - return { node: undefined, isPure } } - return { node: undefined, isPure: false } } diff --git a/packages/babel-plugin/src/utils/ts-output-utils.js b/packages/babel-plugin/src/utils/ts-output-utils.js new file mode 100644 index 0000000000..b4d537c779 --- /dev/null +++ b/packages/babel-plugin/src/utils/ts-output-utils.js @@ -0,0 +1,25 @@ +// @flow + +// this only works correctly in modules, but we don't run on scripts anyway, so it's fine +// the difference is that in modules template objects are being cached per call site +export function getTypeScriptMakeTemplateObjectPath(path: *) { + if (path.node.arguments.length === 0) { + return null + } + + const firstArgPath = path.get('arguments')[0] + + if ( + firstArgPath.isLogicalExpression() && + firstArgPath.get('left').isIdentifier() && + firstArgPath.get('right').isAssignmentExpression() && + firstArgPath.get('right.right').isCallExpression() && + firstArgPath.get('right.right.callee').isIdentifier() && + firstArgPath.node.right.right.callee.name.includes('makeTemplateObject') && + firstArgPath.node.right.right.arguments.length === 2 + ) { + return firstArgPath.get('right.right') + } + + return null +} diff --git a/packages/babel-preset-css-prop/CHANGELOG.md b/packages/babel-preset-css-prop/CHANGELOG.md index e2362bffec..cf03e49d5b 100644 --- a/packages/babel-preset-css-prop/CHANGELOG.md +++ b/packages/babel-preset-css-prop/CHANGELOG.md @@ -61,6 +61,15 @@ - Updated dependencies [[`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555)]: - babel-plugin-emotion@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - babel-plugin-emotion@10.0.27 + - @emotion/babel-plugin-jsx-pragmatic@0.1.5 + ## 10.0.23 ### Patch Changes diff --git a/packages/babel-preset-css-prop/LICENSE b/packages/babel-preset-css-prop/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/babel-preset-css-prop/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/cache/CHANGELOG.md b/packages/cache/CHANGELOG.md index 47e8946467..6cbc5ad2e2 100644 --- a/packages/cache/CHANGELOG.md +++ b/packages/cache/CHANGELOG.md @@ -25,6 +25,18 @@ - [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/hash@0.7.4 + - @emotion/sheet@0.9.4 + - @emotion/stylis@0.8.5 + - @emotion/utils@0.11.3 + - @emotion/weak-memoize@0.2.5 + ## 10.0.19 - Updated dependencies [c81c0033]: diff --git a/packages/cache/LICENSE b/packages/cache/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/cache/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/css/CHANGELOG.md b/packages/css/CHANGELOG.md index e410dfca88..b93cf1867b 100644 --- a/packages/css/CHANGELOG.md +++ b/packages/css/CHANGELOG.md @@ -35,6 +35,16 @@ - babel-plugin-emotion@11.0.0-next.0 - create-emotion@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - babel-plugin-emotion@10.0.27 + - create-emotion@10.0.27 + - @emotion/stylis@0.8.5 + ## 10.0.23 ### Patch Changes diff --git a/packages/css/LICENSE b/packages/css/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/css/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 8b027e344c..9b62876fc0 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -10,6 +10,12 @@ - [`b8476e08`](https://github.com/emotion-js/emotion/commit/b8476e08af4a2e8de94a112cb0daf6e8e4d56fe1) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Add @emotion/pkg-renaming rule for Emotion 11 migration +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 10.0.14 ### Patch Changes diff --git a/packages/eslint-plugin/LICENSE b/packages/eslint-plugin/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/eslint-plugin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/hash/CHANGELOG.md b/packages/hash/CHANGELOG.md index 6cdb2bc941..5e223db742 100644 --- a/packages/hash/CHANGELOG.md +++ b/packages/hash/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/hash +## 0.7.4 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.7.3 ### Patch Changes diff --git a/packages/hash/LICENSE b/packages/hash/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/hash/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/is-prop-valid/CHANGELOG.md b/packages/is-prop-valid/CHANGELOG.md index 085fc40061..83f6853c95 100644 --- a/packages/is-prop-valid/CHANGELOG.md +++ b/packages/is-prop-valid/CHANGELOG.md @@ -12,6 +12,20 @@ - [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Add missing `#__PURE__` annotations +## 0.8.7 + +### Patch Changes + +- [`12141c5`](https://github.com/emotion-js/emotion/commit/12141c54318c0738b60bf755e033cf6e12238a02) [#1736](https://github.com/emotion-js/emotion/pull/1736) Thanks [@bezoerb](https://github.com/bezoerb)! - Adds inert to the list of allowed props + +## 0.8.6 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/memoize@0.7.4 + ## 0.8.5 ### Patch Changes diff --git a/packages/is-prop-valid/LICENSE b/packages/is-prop-valid/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/is-prop-valid/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/is-prop-valid/src/props.js b/packages/is-prop-valid/src/props.js index 1c5e2f10ff..dddb416736 100644 --- a/packages/is-prop-valid/src/props.js +++ b/packages/is-prop-valid/src/props.js @@ -184,6 +184,8 @@ const props = { autoSave: true, // color is for Safari mask-icon link color: true, + // https://html.spec.whatwg.org/multipage/interaction.html#inert + inert: true, // itemProp, itemScope, itemType are for // Microdata support. See http://schema.org/docs/gs.html itemProp: true, diff --git a/packages/jest/CHANGELOG.md b/packages/jest/CHANGELOG.md index 2de9fbb29d..39aa5f70a5 100644 --- a/packages/jest/CHANGELOG.md +++ b/packages/jest/CHANGELOG.md @@ -63,6 +63,15 @@ - @emotion/core@11.0.0-next.0 - emotion@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/core@10.0.27 + - emotion@10.0.27 + ## 10.0.26 ### Patch Changes diff --git a/packages/jest/LICENSE b/packages/jest/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/jest/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/memoize/CHANGELOG.md b/packages/memoize/CHANGELOG.md index 0ef7c2316e..860bb3cc2b 100644 --- a/packages/memoize/CHANGELOG.md +++ b/packages/memoize/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/memoize +## 0.7.4 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.7.3 ### Patch Changes diff --git a/packages/memoize/LICENSE b/packages/memoize/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/memoize/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/native/CHANGELOG.md b/packages/native/CHANGELOG.md index 4be9415d28..e788436995 100644 --- a/packages/native/CHANGELOG.md +++ b/packages/native/CHANGELOG.md @@ -107,6 +107,15 @@ - emotion-theming@11.0.0-next.0 - @emotion/primitives-core@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - emotion-theming@10.0.27 + - @emotion/primitives-core@10.0.27 + ## 10.0.22 ### Patch Changes diff --git a/packages/native/LICENSE b/packages/native/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/native/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/primitives-core/CHANGELOG.md b/packages/primitives-core/CHANGELOG.md index 9fe46517a7..a2b5e101be 100644 --- a/packages/primitives-core/CHANGELOG.md +++ b/packages/primitives-core/CHANGELOG.md @@ -85,6 +85,14 @@ - Updated dependencies [[`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555)]: - @emotion/core@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/core@10.0.27 + ## 10.0.22 ### Patch Changes diff --git a/packages/primitives-core/LICENSE b/packages/primitives-core/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/primitives-core/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/primitives/CHANGELOG.md b/packages/primitives/CHANGELOG.md index 5255b21399..61ccd5a572 100644 --- a/packages/primitives/CHANGELOG.md +++ b/packages/primitives/CHANGELOG.md @@ -106,6 +106,25 @@ - emotion-theming@11.0.0-next.0 - @emotion/primitives-core@11.0.0-next.0 +## 10.0.28 + +### Patch Changes + +- Updated dependencies [[`4dfe558`](https://github.com/emotion-js/emotion/commit/4dfe55811a25bf66306aee46f7f0d6c909004c42), [`af07afb`](https://github.com/emotion-js/emotion/commit/af07afbe5a887be82f72a12fd6cd1673a32f5263), [`12141c5`](https://github.com/emotion-js/emotion/commit/12141c54318c0738b60bf755e033cf6e12238a02)]: + - babel-plugin-emotion@10.0.28 + - @emotion/is-prop-valid@0.8.7 + +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - babel-plugin-emotion@10.0.27 + - emotion-theming@10.0.27 + - @emotion/is-prop-valid@0.8.6 + - @emotion/primitives-core@10.0.27 + ## 10.0.24 ### Patch Changes diff --git a/packages/primitives/LICENSE b/packages/primitives/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/primitives/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index e0fceb4aed..0dd15b76cf 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -132,6 +132,28 @@ - emotion-theming@11.0.0-next.0 - @emotion/styled@11.0.0-next.0 +## 10.0.28 + +### Patch Changes + +- [`d0b2a94`](https://github.com/emotion-js/emotion/commit/d0b2a94ab9d5648667447dbd78e7a2e3e93de42a) [#1714](https://github.com/emotion-js/emotion/pull/1714) Thanks [@Andarist](https://github.com/Andarist)! - Fixed label extraction from the stack traces in FireFox and Safari. We have failed to match a label in Emotion wrappers like Theme UI which caused SSR mismatches in mentioned browsers. This has affected only development builds. + +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/cache@10.0.27 + - @emotion/css@10.0.27 + - emotion-server@10.0.27 + - emotion-theming@10.0.27 + - emotion@10.0.27 + - @emotion/serialize@0.11.15 + - @emotion/sheet@0.9.4 + - @emotion/styled@10.0.27 + - @emotion/utils@0.11.3 + ## 10.0.22 ### Patch Changes diff --git a/packages/react/LICENSE b/packages/react/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/react/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/react/src/jsx.js b/packages/react/src/jsx.js index 6048f2642f..3285b7e471 100644 --- a/packages/react/src/jsx.js +++ b/packages/react/src/jsx.js @@ -153,7 +153,7 @@ export const jsx: typeof React.createElement = function( ) if (!match) { // safari and firefox - match = error.stack.match(/^.*\n([A-Z][A-Za-z$]+)@/) + match = error.stack.match(/.*\n([A-Z][A-Za-z$]+)@/) } if (match) { newProps[labelPropName] = sanitizeIdentifier(match[1]) diff --git a/packages/serialize/CHANGELOG.md b/packages/serialize/CHANGELOG.md index 6966243798..b9506c76b7 100644 --- a/packages/serialize/CHANGELOG.md +++ b/packages/serialize/CHANGELOG.md @@ -64,6 +64,17 @@ to `StyledComponent` +## 0.11.15 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/hash@0.7.4 + - @emotion/memoize@0.7.4 + - @emotion/unitless@0.7.5 + - @emotion/utils@0.11.3 + ## 0.11.14 ### Patch Changes diff --git a/packages/serialize/LICENSE b/packages/serialize/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/serialize/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md index 8c23fc99a0..39ab08a7c6 100644 --- a/packages/server/CHANGELOG.md +++ b/packages/server/CHANGELOG.md @@ -28,6 +28,16 @@ - create-emotion-server@11.0.0-next.0 - emotion@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - babel-plugin-emotion@10.0.27 + - create-emotion-server@10.0.27 + - emotion@10.0.27 + ## 10.0.17 ### Patch Changes diff --git a/packages/server/LICENSE b/packages/server/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/server/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/sheet/CHANGELOG.md b/packages/sheet/CHANGELOG.md index 5e32a5f2fc..db8fcf9761 100644 --- a/packages/sheet/CHANGELOG.md +++ b/packages/sheet/CHANGELOG.md @@ -16,6 +16,12 @@ - [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c) [#1473](https://github.com/emotion-js/emotion/pull/1473) Thanks [@jcharry](https://github.com/jcharry)! - Accept new `prepend` option to allow for adding style tags at the beginning of the specified DOM container. +## 0.9.4 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.9.3 ### Patch Changes diff --git a/packages/sheet/LICENSE b/packages/sheet/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/sheet/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/styled/CHANGELOG.md b/packages/styled/CHANGELOG.md index abf5eca87a..5cfc1ff2b5 100644 --- a/packages/styled/CHANGELOG.md +++ b/packages/styled/CHANGELOG.md @@ -187,6 +187,16 @@ - @emotion/core@11.0.0-next.0 - @emotion/styled-base@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - babel-plugin-emotion@10.0.27 + - @emotion/core@10.0.27 + - @emotion/styled-base@10.0.27 + ## 10.0.23 ### Patch Changes diff --git a/packages/styled/LICENSE b/packages/styled/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/styled/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/stylis/CHANGELOG.md b/packages/stylis/CHANGELOG.md index 1e048f1206..d6378a3748 100644 --- a/packages/stylis/CHANGELOG.md +++ b/packages/stylis/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/stylis +## 0.8.5 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.8.4 ### Patch Changes diff --git a/packages/stylis/LICENSE b/packages/stylis/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/stylis/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/unitless/CHANGELOG.md b/packages/unitless/CHANGELOG.md index 81972bed91..71b2eff220 100644 --- a/packages/unitless/CHANGELOG.md +++ b/packages/unitless/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/unitless +## 0.7.5 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.7.4 ### Patch Changes diff --git a/packages/unitless/LICENSE b/packages/unitless/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/unitless/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 4745ff2465..c17fa40ba1 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/utils +## 0.11.3 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.11.2 ### Patch Changes diff --git a/packages/utils/LICENSE b/packages/utils/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/utils/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/weak-memoize/CHANGELOG.md b/packages/weak-memoize/CHANGELOG.md index 56de8a529b..45c1da64a7 100644 --- a/packages/weak-memoize/CHANGELOG.md +++ b/packages/weak-memoize/CHANGELOG.md @@ -1,5 +1,11 @@ # @emotion/weak-memoize +## 0.2.5 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 0.2.4 ### Patch Changes diff --git a/packages/weak-memoize/LICENSE b/packages/weak-memoize/LICENSE new file mode 100644 index 0000000000..56e808dea1 --- /dev/null +++ b/packages/weak-memoize/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/removed-packages/babel-plugin-emotion/CHANGELOG.md b/removed-packages/babel-plugin-emotion/CHANGELOG.md index 1fcfdc56a5..c3416e8f2d 100644 --- a/removed-packages/babel-plugin-emotion/CHANGELOG.md +++ b/removed-packages/babel-plugin-emotion/CHANGELOG.md @@ -88,6 +88,24 @@ - [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such +## 10.0.28 + +### Patch Changes + +- [`4dfe558`](https://github.com/emotion-js/emotion/commit/4dfe55811a25bf66306aee46f7f0d6c909004c42) [#1731](https://github.com/emotion-js/emotion/pull/1731) Thanks [@ndelangen](https://github.com/ndelangen)! - Fixed an issue with adding `label` & `target` options to `styled`-related calls when those properties were already set, causing those properties to be duplicated. This could have happened for example when transpiling already transpiled code or when providing those options manually (latter being less likely). + +* [`af07afb`](https://github.com/emotion-js/emotion/commit/af07afbe5a887be82f72a12fd6cd1673a32f5263) [#1761](https://github.com/emotion-js/emotion/pull/1761) Thanks [@mansourkheffache](https://github.com/mansourkheffache)! - Push source maps & labels to cooked/raw arrays in TS-transpiled tagged template expressions containing interpolations. This is a case not covered previously by [#1538](https://github.com/emotion-js/emotion/pull/1538). + +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/hash@0.7.4 + - @emotion/memoize@0.7.4 + - @emotion/serialize@0.11.15 + ## 10.0.23 ### Patch Changes diff --git a/removed-packages/core/CHANGELOG.md b/removed-packages/core/CHANGELOG.md index 79eb7fdfb5..0d2c94849c 100644 --- a/removed-packages/core/CHANGELOG.md +++ b/removed-packages/core/CHANGELOG.md @@ -145,6 +145,28 @@ - emotion-theming@11.0.0-next.0 - @emotion/styled@11.0.0-next.0 +## 10.0.28 + +### Patch Changes + +- [`d0b2a94`](https://github.com/emotion-js/emotion/commit/d0b2a94ab9d5648667447dbd78e7a2e3e93de42a) [#1714](https://github.com/emotion-js/emotion/pull/1714) Thanks [@Andarist](https://github.com/Andarist)! - Fixed label extraction from the stack traces in FireFox and Safari. We have failed to match a label in Emotion wrappers like Theme UI which caused SSR mismatches in mentioned browsers. This has affected only development builds. + +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/cache@10.0.27 + - @emotion/css@10.0.27 + - emotion-server@10.0.27 + - emotion-theming@10.0.27 + - emotion@10.0.27 + - @emotion/serialize@0.11.15 + - @emotion/sheet@0.9.4 + - @emotion/styled@10.0.27 + - @emotion/utils@0.11.3 + ## 10.0.22 ### Patch Changes diff --git a/removed-packages/create-emotion-server/CHANGELOG.md b/removed-packages/create-emotion-server/CHANGELOG.md index 8451aea48f..9b7bdf831a 100644 --- a/removed-packages/create-emotion-server/CHANGELOG.md +++ b/removed-packages/create-emotion-server/CHANGELOG.md @@ -12,6 +12,14 @@ - [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/utils@0.11.3 + ## 10.0.14 ### Patch Changes diff --git a/removed-packages/create-emotion/CHANGELOG.md b/removed-packages/create-emotion/CHANGELOG.md index da22541774..9474f60994 100644 --- a/removed-packages/create-emotion/CHANGELOG.md +++ b/removed-packages/create-emotion/CHANGELOG.md @@ -47,6 +47,18 @@ - @emotion/cache@11.0.0-next.0 - create-emotion-server@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/cache@10.0.27 + - create-emotion-server@10.0.27 + - @emotion/serialize@0.11.15 + - @emotion/sheet@0.9.4 + - @emotion/utils@0.11.3 + ## 10.0.14 ### Patch Changes diff --git a/removed-packages/emotion-theming/CHANGELOG.md b/removed-packages/emotion-theming/CHANGELOG.md index 9337c6d4be..5dc190ab90 100644 --- a/removed-packages/emotion-theming/CHANGELOG.md +++ b/removed-packages/emotion-theming/CHANGELOG.md @@ -96,6 +96,16 @@ - @emotion/core@11.0.0-next.0 - @emotion/styled@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/core@10.0.27 + - @emotion/styled@10.0.27 + - @emotion/weak-memoize@0.2.5 + ## 10.0.19 ### Patch Changes diff --git a/removed-packages/emotion/CHANGELOG.md b/removed-packages/emotion/CHANGELOG.md index e86309bddc..b05164acb7 100644 --- a/removed-packages/emotion/CHANGELOG.md +++ b/removed-packages/emotion/CHANGELOG.md @@ -26,6 +26,16 @@ - babel-plugin-emotion@11.0.0-next.0 - create-emotion@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - babel-plugin-emotion@10.0.27 + - create-emotion@10.0.27 + - @emotion/stylis@0.8.5 + ## 10.0.23 ### Patch Changes diff --git a/removed-packages/eslint-plugin-emotion/CHANGELOG.md b/removed-packages/eslint-plugin-emotion/CHANGELOG.md index 85800a8c90..65a1b456e0 100644 --- a/removed-packages/eslint-plugin-emotion/CHANGELOG.md +++ b/removed-packages/eslint-plugin-emotion/CHANGELOG.md @@ -12,6 +12,12 @@ - [`8b59959`](https://github.com/emotion-js/emotion/commit/8b59959f0929799f050089b05cafb39ca2c57d2d) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Respect `syntax-preference` rule when using css prop. +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file + ## 10.0.14 ### Patch Changes diff --git a/removed-packages/jest-emotion/CHANGELOG.md b/removed-packages/jest-emotion/CHANGELOG.md index 4c7c27abc2..26c11d149d 100644 --- a/removed-packages/jest-emotion/CHANGELOG.md +++ b/removed-packages/jest-emotion/CHANGELOG.md @@ -53,6 +53,15 @@ - @emotion/core@11.0.0-next.0 - emotion@11.0.0-next.0 +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/core@10.0.27 + - emotion@10.0.27 + ## 10.0.25 ### Patch Changes diff --git a/removed-packages/styled-base/CHANGELOG.md b/removed-packages/styled-base/CHANGELOG.md index 5367be53f8..675ebd0a1a 100644 --- a/removed-packages/styled-base/CHANGELOG.md +++ b/removed-packages/styled-base/CHANGELOG.md @@ -5,3 +5,22 @@ ### 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. + +## 10.0.28 + +### Patch Changes + +- Updated dependencies [[`12141c5`](https://github.com/emotion-js/emotion/commit/12141c54318c0738b60bf755e033cf6e12238a02), [`d0b2a94`](https://github.com/emotion-js/emotion/commit/d0b2a94ab9d5648667447dbd78e7a2e3e93de42a)]: + - @emotion/is-prop-valid@0.8.7 + - @emotion/core@10.0.28 + +## 10.0.27 + +### Patch Changes + +- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file +- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]: + - @emotion/core@10.0.27 + - @emotion/is-prop-valid@0.8.6 + - @emotion/serialize@0.11.15 + - @emotion/utils@0.11.3