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
7f54585f
Unverified
Commit
7f54585f
authored
Aug 11, 2022
by
Jiachi Liu
Committed by
GitHub
Aug 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump styled-jsx and remove manual types creation (#39506)
parent
d158c0c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
27 deletions
+8
-27
package.json
packages/next/package.json
+1
-1
taskfile.js
packages/next/taskfile.js
+1
-21
pnpm-lock.yaml
pnpm-lock.yaml
+6
-5
No files found.
packages/next/package.json
View file @
7f54585f
...
@@ -257,7 +257,7 @@
...
@@ -257,7 +257,7 @@
"string-hash"
:
"1.1.3"
,
"string-hash"
:
"1.1.3"
,
"string_decoder"
:
"1.3.0"
,
"string_decoder"
:
"1.3.0"
,
"strip-ansi"
:
"6.0.0"
,
"strip-ansi"
:
"6.0.0"
,
"styled-jsx"
:
"5.0.
3
"
,
"styled-jsx"
:
"5.0.
4
"
,
"tar"
:
"6.1.11"
,
"tar"
:
"6.1.11"
,
"taskr"
:
"1.1.0"
,
"taskr"
:
"1.1.0"
,
"terser"
:
"5.14.1"
,
"terser"
:
"5.14.1"
,
...
...
packages/next/taskfile.js
View file @
7f54585f
...
@@ -56,33 +56,13 @@ export async function copy_styled_jsx_assets(task, opts) {
...
@@ -56,33 +56,13 @@ export async function copy_styled_jsx_assets(task, opts) {
// Separate type files into different folders to avoid conflicts between
// Separate type files into different folders to avoid conflicts between
// dev dep `styled-jsx` and `next/dist/styled-jsx` for duplicated declare modules
// dev dep `styled-jsx` and `next/dist/styled-jsx` for duplicated declare modules
const
typesDir
=
join
(
outputDir
,
'types'
)
const
typesDir
=
join
(
outputDir
,
'types'
)
let
typeReferences
=
''
let
globalTypesContent
=
''
await
fs
.
ensureDir
(
outputDir
)
await
fs
.
ensureDir
(
typesDir
)
await
fs
.
ensureDir
(
typesDir
)
for
(
const
file
of
typeFiles
)
{
for
(
const
file
of
typeFiles
)
{
const
fileNoExt
=
file
.
replace
(
/
\.
d
\.
ts/
,
''
)
const
content
=
await
fs
.
readFile
(
join
(
styledJsxPath
,
file
),
'utf8'
)
let
content
=
await
fs
.
readFile
(
join
(
styledJsxPath
,
file
),
'utf8'
)
if
(
file
===
'index.d.ts'
)
{
const
styledJsxIdx
=
content
.
indexOf
(
`declare module 'styled-jsx' {`
)
globalTypesContent
=
content
.
substring
(
0
,
styledJsxIdx
)
content
=
content
.
substring
(
styledJsxIdx
)
.
replace
(
'React.'
,
`import('react').`
)
}
await
fs
.
writeFile
(
join
(
typesDir
,
file
),
content
)
await
fs
.
writeFile
(
join
(
typesDir
,
file
),
content
)
typeReferences
+=
`/// <reference types="./
${
fileNoExt
}
" />\n`
}
}
await
fs
.
writeFile
(
join
(
typesDir
,
'global.d.ts'
),
`
${
typeReferences
}
\n
${
globalTypesContent
}
`
)
for
(
const
file
of
jsFiles
)
{
for
(
const
file
of
jsFiles
)
{
const
content
=
await
fs
.
readFile
(
join
(
styledJsxPath
,
file
),
'utf8'
)
const
content
=
await
fs
.
readFile
(
join
(
styledJsxPath
,
file
),
'utf8'
)
const
distFile
=
join
(
outputDir
,
file
)
const
distFile
=
join
(
outputDir
,
file
)
...
...
pnpm-lock.yaml
View file @
7f54585f
...
@@ -561,7 +561,7 @@ importers:
...
@@ -561,7 +561,7 @@ importers:
string_decoder
:
1.3.0
string_decoder
:
1.3.0
string-hash
:
1.1.3
string-hash
:
1.1.3
strip-ansi
:
6.0.0
strip-ansi
:
6.0.0
styled-jsx
:
5.0.
3
styled-jsx
:
5.0.
4
tar
:
6.1.11
tar
:
6.1.11
taskr
:
1.1.0
taskr
:
1.1.0
terser
:
5.14.1
terser
:
5.14.1
...
@@ -750,7 +750,7 @@ importers:
...
@@ -750,7 +750,7 @@ importers:
string_decoder
:
1.3.0
string_decoder
:
1.3.0
string-hash
:
1.1.3
string-hash
:
1.1.3
strip-ansi
:
6.0.0
strip-ansi
:
6.0.0
styled-jsx
:
5.0.
3
_@babel+core@7.18.0
styled-jsx
:
5.0.
4
_@babel+core@7.18.0
tar
:
6.1.11
tar
:
6.1.11
taskr
:
1.1.0
taskr
:
1.1.0
terser
:
5.14.1
terser
:
5.14.1
...
@@ -10454,6 +10454,7 @@ packages:
...
@@ -10454,6 +10454,7 @@ packages:
eslint
:
^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
eslint
:
^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
dependencies
:
dependencies
:
eslint
:
7.32.0
eslint
:
7.32.0
dev
:
false
/eslint-plugin-react/7.23.2_eslint@7.24.0
:
/eslint-plugin-react/7.23.2_eslint@7.24.0
:
resolution
:
{
integrity
:
sha512-AfjgFQB+nYszudkxRkTFu0UR1zEQig0ArVMPloKhxwlwkzaw/fBiH0QWcBBhZONlXqQC51+nfqFrkn4EzHcGBw==
}
resolution
:
{
integrity
:
sha512-AfjgFQB+nYszudkxRkTFu0UR1zEQig0ArVMPloKhxwlwkzaw/fBiH0QWcBBhZONlXqQC51+nfqFrkn4EzHcGBw==
}
...
@@ -18448,7 +18449,7 @@ packages:
...
@@ -18448,7 +18449,7 @@ packages:
dev
:
true
dev
:
true
/querystring/0.2.0
:
/querystring/0.2.0
:
resolution
:
{
integrity
:
sha
512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g=
=
}
resolution
:
{
integrity
:
sha
1-sgmEkgO7Jd+CDadW50cAWHhSFiA
=
}
engines
:
{
node
:
'
>=0.4.x'
}
engines
:
{
node
:
'
>=0.4.x'
}
deprecated
:
The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
deprecated
:
The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
dev
:
true
dev
:
true
...
@@ -20559,8 +20560,8 @@ packages:
...
@@ -20559,8 +20560,8 @@ packages:
postcss-load-plugins
:
2.3.0
postcss-load-plugins
:
2.3.0
dev
:
true
dev
:
true
/styled-jsx/5.0.
3
_@babel+core@7.18.0
:
/styled-jsx/5.0.
4
_@babel+core@7.18.0
:
resolution
:
{
integrity
:
sha512-
v82oihjxFj2WJtQiodZIDjJpnmVcE71HTCVylxdcQHU0ocnI0rGhJ0+5A3311NMQUx0KFJ+18RSHNlfIgcSU8g
==
}
resolution
:
{
integrity
:
sha512-
sDFWLbg4zR+UkNzfk5lPilyIgtpddfxXEULxhujorr5jtePTUqiPDc5BC0v1NRqTr/WaFBGQQUoYToGlF4B2KQ
==
}
engines
:
{
node
:
'
>=
12.0.0'
}
engines
:
{
node
:
'
>=
12.0.0'
}
peerDependencies
:
peerDependencies
:
'
@babel/core'
:
'
*'
'
@babel/core'
:
'
*'
...
...
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