Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/babel-plugin-emotion/CHANGELOG.md
#	packages/babel-plugin-emotion/__tests__/__snapshots__/css-requires-options.js.snap
#	packages/babel-plugin-emotion/__tests__/__snapshots__/css.js.snap
#	packages/babel-plugin-emotion/__tests__/__snapshots__/index.js.snap
#	packages/babel-plugin-emotion/__tests__/css-requires-options.js
#	packages/babel-plugin-emotion/__tests__/index.js
#	packages/babel-plugin-emotion/src/css-macro.js
#	packages/babel-plugin-emotion/src/emotion-macro.js
#	packages/babel-plugin-emotion/src/styled-macro.js
#	packages/babel-plugin-emotion/src/utils/strings.js
#	packages/babel-plugin/LICENSE
#	packages/babel-plugin/__tests__/__fixtures__/core-with-component.js
#	packages/babel-plugin/__tests__/__fixtures__/label-transpiled-by-ts-with-interpolations.js
#	packages/babel-plugin/__tests__/__snapshots__/css.js.snap
#	packages/babel-plugin/__tests__/css-macro/__fixtures__/label-transpiled-by-ts.js
#	packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts-with-interpolations.js
#	packages/babel-plugin/__tests__/source-maps/__fixtures__/css-transpiled-by-ts.js
#	packages/babel-plugin/__tests__/source-maps/__snapshots__/index.js.snap
#	packages/babel-plugin/src/utils/checks.js
#	packages/babel-plugin/src/utils/get-styled-options.js
#	packages/babel-plugin/src/utils/transform-expression-with-styles.js
#	packages/babel-plugin/src/utils/ts-output-utils.js
#	packages/babel-preset-css-prop/CHANGELOG.md
#	packages/babel-preset-css-prop/package.json
#	packages/cache/CHANGELOG.md
#	packages/cache/package.json
#	packages/core/CHANGELOG.md
#	packages/core/package.json
#	packages/create-emotion-server/CHANGELOG.md
#	packages/create-emotion/CHANGELOG.md
#	packages/create-emotion/package.json
#	packages/css/CHANGELOG.md
#	packages/css/package.json
#	packages/emotion-server/CHANGELOG.md
#	packages/emotion-theming/CHANGELOG.md
#	packages/emotion-theming/package.json
#	packages/emotion/CHANGELOG.md
#	packages/eslint-plugin-emotion/CHANGELOG.md
#	packages/eslint-plugin/LICENSE
#	packages/is-prop-valid/CHANGELOG.md
#	packages/is-prop-valid/package.json
#	packages/jest-emotion/CHANGELOG.md
#	packages/jest/LICENSE
#	packages/jest/package.json
#	packages/native/CHANGELOG.md
#	packages/native/package.json
#	packages/primitives-core/CHANGELOG.md
#	packages/primitives-core/package.json
#	packages/primitives/CHANGELOG.md
#	packages/primitives/package.json
#	packages/serialize/CHANGELOG.md
#	packages/serialize/package.json
#	packages/sheet/CHANGELOG.md
#	packages/sheet/package.json
#	packages/styled-base/CHANGELOG.md
#	packages/styled-base/package.json
#	packages/styled/CHANGELOG.md
#	packages/styled/package.json
#	removed-packages/babel-plugin-emotion/package.json
#	removed-packages/create-emotion-server/package.json
#	removed-packages/emotion-server/package.json
#	removed-packages/emotion/package.json
#	removed-packages/eslint-plugin-emotion/package.json
  • Loading branch information
Andarist committed Feb 27, 2020
2 parents 11fc27f + 4a7673a commit 7bff037
Show file tree
Hide file tree
Showing 77 changed files with 1,073 additions and 149 deletions.
38 changes: 5 additions & 33 deletions .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)
4 changes: 2 additions & 2 deletions 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
Expand Down
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions 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
Expand Down
21 changes: 21 additions & 0 deletions 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.
18 changes: 18 additions & 0 deletions packages/babel-plugin/CHANGELOG.md
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions 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.
@@ -0,0 +1,6 @@
// @flow
import styled from '@emotion/styled'

const MyComponent = styled.div({ color: 'hotpink' })

const OtherComponent = MyComponent.withComponent('section')
Expand Up @@ -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
Expand Down
34 changes: 30 additions & 4 deletions packages/babel-plugin/__tests__/__snapshots__/css.js.snap
Expand Up @@ -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
Expand All @@ -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`] = `
Expand Down

0 comments on commit 7bff037

Please sign in to comment.