From 16a55407473fcbe70162d7ef1c11bf80102e81fc Mon Sep 17 00:00:00 2001 From: chufan Date: Wed, 17 Jul 2024 09:37:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(@142vip/release-version):=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81bumpx=E5=A4=9A=E7=A7=8D=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/release-version/bump.config.ts | 5 ----- packages/release-version/bumpx.config.ts | 5 +++++ packages/release-version/src/core/config.ts | 8 ++++++-- 3 files changed, 11 insertions(+), 7 deletions(-) delete mode 100644 packages/release-version/bump.config.ts create mode 100644 packages/release-version/bumpx.config.ts diff --git a/packages/release-version/bump.config.ts b/packages/release-version/bump.config.ts deleted file mode 100644 index 2743752..0000000 --- a/packages/release-version/bump.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { defineConfig } from './src' - -export default defineConfig({ - all: true, -}) diff --git a/packages/release-version/bumpx.config.ts b/packages/release-version/bumpx.config.ts new file mode 100644 index 0000000..cddfecb --- /dev/null +++ b/packages/release-version/bumpx.config.ts @@ -0,0 +1,5 @@ +import { defineBumpXConfig } from './src' + +export default defineBumpXConfig({ + all: true, +}) diff --git a/packages/release-version/src/core/config.ts b/packages/release-version/src/core/config.ts index 25ad9b8..9b5f2bb 100644 --- a/packages/release-version/src/core/config.ts +++ b/packages/release-version/src/core/config.ts @@ -20,7 +20,7 @@ export async function loadBumpConfig( overrides?: Partial, cwd = process.cwd(), ) { - const name = 'bump' + const name = 'bumpx' const configFile = findConfigFile(name, cwd) const { config } = await loadConfig({ name, @@ -65,6 +65,10 @@ function findConfigFile(name: string, cwd: string) { } } -export function defineConfig(config: Partial) { +/** + * 自定义配置入口 + * @param config + */ +export function defineBumpXConfig(config: Partial) { return config }