-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push source maps & labels to cooked/raw arrays in TS-transpiled tagge…
…d template expressions with interpolations (#1761) * check for strings length before performing check * Fix detecting template expressions with interpolations transpiled by TS * Add changeset * update snapshots * tweak changeset Co-authored-by: Mateusz Burzyński <[email protected]>
- Loading branch information
1 parent
12141c5
commit af07afb
Showing
14 changed files
with
260 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'babel-plugin-emotion': patch | ||
--- | ||
|
||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...in-emotion/__tests__/css-macro/__fixtures__/label-transpiled-by-ts-with-interpolations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { __makeTemplateObject } from 'tslib' | ||
import css from '@emotion/css/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 | ||
) |
2 changes: 1 addition & 1 deletion
2
packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/label-transpiled-by-ts.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...in-emotion/__tests__/source-maps/__fixtures__/css-transpiled-by-ts-with-interpolations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { __makeTemplateObject } from 'tslib' | ||
import css from '@emotion/css' | ||
import { hoverStyles } from './styles' | ||
|
||
var templateObject_1 | ||
|
||
css( | ||
templateObject_1 || | ||
(templateObject_1 = __makeTemplateObject( | ||
['\n color: hotpink;\n'], | ||
['\n color: hotpink;\n'] | ||
)), | ||
hoverStyles | ||
) |
1 change: 0 additions & 1 deletion
1
packages/babel-plugin-emotion/__tests__/source-maps/__fixtures__/css-transpiled-by-ts.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import { __makeTemplateObject } from 'tslib' | ||
|
||
import css from '@emotion/css' | ||
|
||
var templateObject_1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.