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
b6a2c4cd
Unverified
Commit
b6a2c4cd
authored
May 25, 2025
by
JJ Kasper
Committed by
GitHub
May 25, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[release-legacy] fix: set `stable` dist tag for backport releases ins…"
This reverts commit
2bb5ed21
.
parent
20fabb95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
30 deletions
+5
-30
publish-release.js
scripts/publish-release.js
+5
-30
No files found.
scripts/publish-release.js
View file @
b6a2c4cd
...
...
@@ -3,7 +3,6 @@
const
path
=
require
(
'path'
)
const
execa
=
require
(
'execa'
)
const
semver
=
require
(
'semver'
)
const
{
Sema
}
=
require
(
'async-sema'
)
const
{
execSync
}
=
require
(
'child_process'
)
const
fs
=
require
(
'fs'
)
...
...
@@ -33,34 +32,6 @@ const cwd = process.cwd()
}
throw
err
}
let
tag
=
isCanary
?
'canary'
:
isReleaseCandidate
?
'rc'
:
'latest'
try
{
if
(
!
isCanary
&&
!
isReleaseCandidate
)
{
const
version
=
JSON
.
parse
(
await
fs
.
promises
.
readFile
(
path
.
join
(
cwd
,
'lerna.json'
),
'utf-8'
)
).
version
const
res
=
await
fetch
(
`https://registry.npmjs.org/-/package/next/dist-tags`
)
const
tags
=
await
res
.
json
()
if
(
semver
.
lt
(
version
,
tags
.
latest
))
{
// If the current version is less than the latest, it means this
// is a backport release. Since NPM sets the 'latest' tag by default
// during publishing, when users install `next@latest`, they might
// get the backported version instead of the actual "latest" version.
// Therefore, we explicitly set the tag as 'stable' for backports.
tag
=
'stable'
}
}
}
catch
(
error
)
{
console
.
log
(
'Failed to fetch Next.js dist tags from the NPM registry.'
)
throw
error
}
console
.
log
(
`Publishing
${
isCanary
?
'canary'
:
isReleaseCandidate
?
'rc'
:
'stable'
}
`
)
...
...
@@ -86,7 +57,11 @@ const cwd = process.cwd()
'--access'
,
'public'
,
'--ignore-scripts'
,
[
'--tag'
,
tag
],
...(
isCanary
?
[
'--tag'
,
'canary'
]
:
isReleaseCandidate
?
[
'--tag'
,
'rc'
]
:
[]),
],
{
stdio
:
'pipe'
}
)
...
...
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