Skip to content

Commit

Permalink
chore: fix order of commits since in release script (#15058)
Browse files Browse the repository at this point in the history
Co-authored-by: 翠 / green <[email protected]>
  • Loading branch information
patak-dev and sapphi-red committed Nov 21, 2023
1 parent 47551a6 commit 2116f0e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@types/micromatch": "^4.0.5",
"@types/node": "^20.9.0",
"@types/picomatch": "^2.3.3",
"@types/semver": "^7.5.4",
"@types/sass": "~1.43.1",
"@types/stylus": "^0.48.42",
"@types/ws": "^8.5.9",
Expand All @@ -80,6 +81,7 @@
"prettier": "3.1.0",
"rimraf": "^5.0.5",
"rollup": "^4.2.0",
"semver": "^7.5.4",
"simple-git-hooks": "^2.9.0",
"tslib": "^2.6.2",
"tsx": "^4.1.2",
Expand Down
19 changes: 10 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions scripts/releaseUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { readdirSync, writeFileSync } from 'node:fs'
import path from 'node:path'
import semver from 'semver'
import colors from 'picocolors'
import type { Options as ExecaOptions, ExecaReturnValue } from 'execa'
import { execa } from 'execa'
Expand All @@ -20,8 +21,9 @@ export async function getLatestTag(pkgName: string): Promise<string> {
const prefix = pkgName === 'vite' ? 'v' : `${pkgName}@`
return tags
.filter((tag) => tag.startsWith(prefix))
.sort((a, b) => a.localeCompare(b, 'en', { numeric: true }))
.reverse()[0]
.sort((a, b) =>
semver.rcompare(a.slice(prefix.length), b.slice(prefix.length)),
)[0]
}

export async function logRecentCommits(pkgName: string): Promise<void> {
Expand Down

0 comments on commit 2116f0e

Please sign in to comment.