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
588a9c10
Unverified
Commit
588a9c10
authored
Feb 07, 2023
by
Jan Kaifer
Committed by
GitHub
Feb 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate from yarn to pnpm (#45652)
parent
12e41754
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
repo-setup.js
.github/actions/next-stats-action/src/prepare/repo-setup.js
+21
-6
No files found.
.github/actions/next-stats-action/src/prepare/repo-setup.js
View file @
588a9c10
...
...
@@ -137,7 +137,7 @@ module.exports = (actionInfo) => {
if
(
!
pkgData
.
files
)
{
pkgData
.
files
=
[]
}
pkgData
.
files
.
push
(
'native'
)
pkgData
.
files
.
push
(
'native
/*
'
)
require
(
'console'
).
log
(
'using swc binaries: '
,
await
exec
(
`ls
${
path
.
join
(
path
.
dirname
(
pkgDataPath
),
'native'
)}
`
)
...
...
@@ -154,11 +154,18 @@ module.exports = (actionInfo) => {
pkgData
.
dependencies
[
'@next/swc'
]
=
pkgDatas
.
get
(
'@next/swc'
).
packedPkgPath
}
else
{
pkgData
.
files
.
push
(
'native'
)
pkgData
.
files
.
push
(
'native
/*
'
)
}
}
}
if
(
pkgData
?.
scripts
?.
prepublishOnly
)
{
// There's a bug in `pnpm pack` where it will run
// the prepublishOnly script and that will fail.
// See https://github.com/pnpm/pnpm/issues/2941
delete
pkgData
.
scripts
.
prepublishOnly
}
await
fs
.
writeFile
(
pkgDataPath
,
JSON
.
stringify
(
pkgData
,
null
,
2
),
...
...
@@ -170,11 +177,19 @@ module.exports = (actionInfo) => {
// to the correct versions
await
Promise
.
all
(
Array
.
from
(
pkgDatas
.
keys
()).
map
(
async
(
pkgName
)
=>
{
const
{
pkg
,
pkgPath
}
=
pkgDatas
.
get
(
pkgName
)
await
exec
(
`cd
${
pkgPath
}
&& yarn pack -f '
${
pkg
}
-packed.tgz'`
,
true
const
{
pkg
,
pkgPath
,
pkgData
,
packedPkgPath
}
=
pkgDatas
.
get
(
pkgName
)
// Copied from pnpm source: https://github.com/pnpm/pnpm/blob/5a5512f14c47f4778b8d2b6d957fb12c7ef40127/releasing/plugin-commands-publishing/src/pack.ts#L96
const
tmpTarball
=
path
.
join
(
pkgPath
,
`
${
pkgData
.
name
.
replace
(
'@'
,
''
).
replace
(
'/'
,
'-'
)}
-
${
pkgData
.
version
}
.tgz`
)
await
execa
(
'pnpm'
,
[
'pack'
],
{
cwd
:
pkgPath
,
})
await
fs
.
copyFile
(
tmpTarball
,
packedPkgPath
)
})
)
...
...
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