Skip to content

Commit 5b2380f

Browse files
committed
feat: cjs path
1 parent 4fc73d7 commit 5b2380f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

bin/bumpp.js

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

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
"exports": {
3030
".": {
3131
"types": "./dist/index.d.ts",
32-
"import": "./dist/index.mjs",
33-
"require": "./dist/index.js"
32+
"import": "./dist/index.js",
33+
"require": "./dist/index.cjs"
3434
}
3535
},
3636
"main": "dist/index.js",
37-
"module": "dist/index.mjs",
37+
"module": "dist/index.js",
3838
"types": "dist/index.d.ts",
3939
"bin": {
4040
"bumpp": "bin/bumpp.js"
@@ -50,7 +50,7 @@
5050
"clean": "rimraf .nyc_output coverage dist",
5151
"lint": "eslint .",
5252
"lint:fix": "eslint --fix .",
53-
"build": "tsup src/index.ts src/cli/index.ts --format esm,cjs --dts --clean",
53+
"build": "tsup src/index.ts src/cli.ts --format esm,cjs --dts --clean",
5454
"watch": "npm run build -- --watch src",
5555
"start": "esno src/cli/run.ts",
5656
"test": "vitest",

src/cli.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './cli/index'

0 commit comments

Comments
 (0)