Skip to content

Commit 9806a45

Browse files
committed
feat!: migrate to unbuild, drop CJS build
1 parent 2dd80c1 commit 9806a45

7 files changed

+1339
-2260
lines changed

bin/bumpp.js bin/bumpp.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22
'use strict'
3-
import('../dist/cli.js')
3+
import('../dist/cli.mjs')
44
.then(r => r.main())

build.config.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
entries: [
5+
'src/index',
6+
'src/cli',
7+
],
8+
declaration: true,
9+
clean: true,
10+
rollup: {
11+
inlineDependencies: true,
12+
},
13+
})

package.json

+24-23
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44
"version": "9.11.1",
55
"packageManager": "[email protected]",
66
"description": "Bump version, commit changes, tag, and push to Git",
7-
"author": {
8-
"name": "James Messinger",
9-
"url": "https://jamesmessinger.com"
10-
},
7+
"authors": [
8+
{
9+
"name": "Anthony Fu",
10+
"url": "https://antfu.me"
11+
},
12+
{
13+
"name": "James Messinger",
14+
"url": "https://jamesmessinger.com"
15+
}
16+
],
1117
"license": "MIT",
12-
"homepage": "https://github.com/antfu/bumpp",
18+
"homepage": "https://github.com/antfu-collective/bumpp",
1319
"repository": {
1420
"type": "git",
15-
"url": "https://github.com/antfu/bumpp.git"
21+
"url": "https://github.com/antfu-collective/bumpp.git"
1622
},
1723
"keywords": [
1824
"version",
@@ -29,35 +35,31 @@
2935
"exports": {
3036
".": {
3137
"types": "./dist/index.d.ts",
32-
"import": "./dist/index.js",
33-
"require": "./dist/index.cjs"
38+
"default": "./dist/index.mjs"
3439
}
3540
},
36-
"main": "dist/index.js",
37-
"module": "dist/index.js",
38-
"types": "dist/index.d.ts",
41+
"main": "dist/index.mjs",
42+
"module": "dist/index.mjs",
43+
"types": "dist/index.d.mts",
3944
"bin": {
40-
"bumpp": "bin/bumpp.js"
45+
"bumpp": "bin/bumpp.mjs"
4146
},
4247
"files": [
4348
"bin",
4449
"dist"
4550
],
4651
"engines": {
47-
"node": ">=10"
52+
"node": ">=18"
4853
},
4954
"scripts": {
50-
"clean": "rimraf .nyc_output coverage dist",
5155
"lint": "eslint .",
52-
"lint:fix": "eslint --fix .",
53-
"build": "tsup src/index.ts src/cli.ts --format esm,cjs --dts --clean",
54-
"watch": "npm run build -- --watch src",
56+
"build": "unbuild",
57+
"stub": "unbuild --stub",
5558
"start": "esno src/cli/run.ts",
5659
"test": "vitest",
57-
"upgrade": "npm-check -u && npm audit fix",
5860
"bumpp": "esno src/cli/run.ts",
59-
"prepublishOnly": "npm run clean && npm run build",
60-
"release": "npm run bumpp && npm publish",
61+
"prepublishOnly": "pnpm run build",
62+
"release": "pnpm run bumpp && pnpm publish",
6163
"typecheck": "tsc --noEmit"
6264
},
6365
"dependencies": {
@@ -69,7 +71,6 @@
6971
"package-manager-detector": "^0.2.8",
7072
"prompts": "^2.4.2",
7173
"semver": "^7.6.3",
72-
"tiny-conventional-commits-parser": "^0.0.1",
7374
"tinyexec": "^0.3.2",
7475
"tinyglobby": "^0.2.10"
7576
},
@@ -83,11 +84,11 @@
8384
"eslint": "^9.19.0",
8485
"esno": "^4.8.0",
8586
"log-symbols": "^7.0.0",
86-
"npm-check": "^6.0.1",
8787
"picocolors": "^1.1.1",
8888
"rimraf": "^6.0.1",
89-
"tsup": "^8.3.5",
89+
"tiny-conventional-commits-parser": "^0.0.1",
9090
"typescript": "^5.7.3",
91+
"unbuild": "^3.3.1",
9192
"vitest": "^3.0.4"
9293
}
9394
}

0 commit comments

Comments
 (0)