Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ab0e2744
Unverified
Commit
ab0e2744
authored
Nov 17, 2020
by
Joe Haddad
Committed by
GitHub
Nov 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade `styled-jsx` (#19241)
This fixes compatibility with React 17 and `styled-jsx`. Fixes #19242
parent
c283442e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
5 deletions
+29
-5
package.json
packages/next/package.json
+1
-1
colored-blue.js
test/integration/client-navigation/lib/colored-blue.js
+6
-0
styled-jsx-external.js
...ntegration/client-navigation/pages/styled-jsx-external.js
+9
-0
index.test.js
test/integration/client-navigation/test/index.test.js
+1
-0
rendering.js
test/integration/client-navigation/test/rendering.js
+8
-0
yarn.lock
yarn.lock
+4
-4
No files found.
packages/next/package.json
View file @
ab0e2744
...
...
@@ -98,7 +98,7 @@
"schema-utils"
:
"2.7.1"
,
"stream-browserify"
:
"3.0.0"
,
"style-loader"
:
"1.2.1"
,
"styled-jsx"
:
"3.3.
1
"
,
"styled-jsx"
:
"3.3.
2
"
,
"use-subscription"
:
"1.5.1"
,
"vm-browserify"
:
"1.1.2"
,
"watchpack"
:
"2.0.0-beta.13"
,
...
...
test/integration/client-navigation/lib/colored-blue.js
0 → 100644
View file @
ab0e2744
import
{
css
}
from
'styled-jsx/css'
export
const
pBlue
=
css
.
resolve
`
p {
color: blue;
}
`
test/integration/client-navigation/pages/styled-jsx-external.js
0 → 100644
View file @
ab0e2744
import
{
pBlue
}
from
'../lib/colored-blue'
export
default
()
=>
(
<
div
>
<
p
id
=
"blue-box"
className
=
{
pBlue
.
className
}
>
This
is
blue
<
/p
>
{
pBlue
.
styles
}
<
/div
>
)
test/integration/client-navigation/test/index.test.js
View file @
ab0e2744
...
...
@@ -39,6 +39,7 @@ describe('Client Navigation', () => {
'/fragment-syntax'
,
'/custom-extension'
,
'/styled-jsx'
,
'/styled-jsx-external'
,
'/with-cdm'
,
'/url-prop'
,
'/url-prop-override'
,
...
...
test/integration/client-navigation/test/rendering.js
View file @
ab0e2744
...
...
@@ -205,6 +205,14 @@ export default function (render, fetch, ctx) {
expect
(
style
.
text
().
includes
(
`p.
${
styleId
}
{color:blue`
)).
toBeTruthy
()
})
test
(
'renders styled jsx external'
,
async
()
=>
{
const
$
=
await
get
$
(
'/styled-jsx-external'
)
const
styleId
=
$
(
'#blue-box'
).
attr
(
'class'
)
const
style
=
$
(
'style'
)
expect
(
style
.
text
().
includes
(
`p.
${
styleId
}
{color:blue`
)).
toBeTruthy
()
})
test
(
'renders properties populated asynchronously'
,
async
()
=>
{
const
html
=
await
render
(
'/async-props'
)
expect
(
html
.
includes
(
'Diego Milito'
)).
toBeTruthy
()
...
...
yarn.lock
View file @
ab0e2744
...
...
@@ -15358,10 +15358,10 @@ styled-jsx-plugin-postcss@3.0.2:
postcss "^7.0.2"
postcss-load-plugins "^2.3.0"
styled-jsx@3.3.
1
:
version "3.3.
1
"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.3.
1.tgz#d79f306c42c99cefbe8e76f35dad8100dc5c9ecc
"
integrity sha512-
RhW71t3k95E3g7Zq3lEBk+kmf+p4ZME7c5tfsYf9M5mq6CgIvFXkbvhawL2gWriXLRlMyKAYACE89Qa2JnTqUw
==
styled-jsx@3.3.
2
:
version "3.3.
2
"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.3.
2.tgz#2474601a26670a6049fb4d3f94bd91695b3ce018
"
integrity sha512-
daAkGd5mqhbBhLd6jYAjYBa9LpxYCzsgo/f6qzPdFxVB8yoGbhxvzQgkC0pfmCVvW3JuAEBn0UzFLBfkHVZG1g
==
dependencies:
"@babel/types" "7.8.3"
babel-plugin-syntax-jsx "6.18.0"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment