Skip to content

Commit

Permalink
chore: non-suffixed version are actually higher than suffixed
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 9, 2023
1 parent a54c8c6 commit f5de048
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,5 @@ jobs:
- name: Install
run: nci

- name: Build
run: nr build

- name: Test
run: nr test
9 changes: 2 additions & 7 deletions bump.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@ export default defineConfig({
if (!subVersion)
subVersion = '0'

if (Number.isNaN(Number(subVersion)))
return

if (mainVersion !== eslintVersion) {
mainVersion = eslintVersion
subVersion = '0'
}
else {
subVersion = String(Number(subVersion) + 1)
}
if (subVersion === '0')
return mainVersion
else
return `${mainVersion}-${subVersion}`

return `${mainVersion}-${subVersion}`
},
})
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
"lib"
],
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint-ts .",
"release": "bumpp && npm publish",
"test": "vitest",
Expand Down

0 comments on commit f5de048

Please sign in to comment.