Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 9, 2023
1 parent 929b3ec commit aa93f21
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Forked from [`version-bump-prompt`](https://github.com/JS-DevTools/version-bump-
- Confirmation before bumping.
- Enable `--commit` `--tag` `--push` by default. (opt-out by `--no-push`, etc.)
- `-r` or `--recursive` to bump all packages in the monorepo.
- Conventional Commits by default.
- Conventional Commits by default.
- Supports config file `bumpp.config.ts`:

```ts
Expand Down
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const antfu = require('@antfu/eslint-config').default

module.exports = antfu({
rules: {
'no-console': 'off',
'no-restricted-syntax': 'off',
},
})
2 changes: 0 additions & 2 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { parseArgs } from './parse-args'

/**
* The main entry point of the CLI
*
* @param args - The command-line arguments (e.g. ["major", "--preid=alpha", "-ctpa"])
*/
export async function main(): Promise<void> {
try {
Expand Down
6 changes: 4 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ export const bumpConfigDefaults: VersionBumpOptions = {
files: [],
}

export async function loadBumpConfig(overrides?: Partial<VersionBumpOptions>,
cwd = process.cwd()) {
export async function loadBumpConfig(
overrides?: Partial<VersionBumpOptions>,
cwd = process.cwd(),
) {
const { config } = await loadConfig<VersionBumpOptions>({
name: 'bump',
defaults: bumpConfigDefaults,
Expand Down
3 changes: 2 additions & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export async function gitTag(operation: Operation): Promise<Operation> {
'--annotate',

// Use the same commit message for the tag
'--message', formatVersionString(commit!.message, newVersion),
'--message',
formatVersionString(commit!.message, newVersion),
]

// Create the Tag name
Expand Down
6 changes: 6 additions & 0 deletions src/types/version-bump-options.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { SemVer } from 'semver'
import type { VersionBumpProgress } from './version-bump-progress'

/**
Expand Down Expand Up @@ -122,6 +123,11 @@ export interface VersionBumpOptions {
* @default false
*/
recursive?: boolean

/**
* Custom function to provide the version number
*/
customVersion?: (currentVersion: string, semver: typeof SemVer) => Promise<string | number>
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/types/version-bump-progress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable antfu/no-const-enum */
import type { VersionBumpResults } from './version-bump-results'

/**
Expand Down
16 changes: 8 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"target": "es2017",
"module": "esnext",
"moduleResolution": "node",
"sourceMap": true,
"declaration": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"newLine": "LF",
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictBindCallApply": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitThis": true,
"declaration": true,
"newLine": "LF",
"sourceMap": true,
"stripInternal": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": [
Expand Down

0 comments on commit aa93f21

Please sign in to comment.