From 54746ebda69bbeac8038ae1494ae03443a176a45 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 00:47:10 +0000 Subject: [PATCH 1/2] chore(deps): update actions/setup-node action to v6 --- .github/workflows/ci.yml | 2 +- .github/workflows/format.yml | 2 +- .github/workflows/release-continuous.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ca58354..c12ac567 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - uses: pnpm/action-setup@v4.1.0 name: Install pnpm - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} cache: pnpm diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index c9916a2e..5793bc82 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -16,7 +16,7 @@ jobs: - uses: pnpm/action-setup@v4.1.0 name: Install pnpm - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: lts/* cache: pnpm diff --git a/.github/workflows/release-continuous.yml b/.github/workflows/release-continuous.yml index 2c8b81a9..18cefd5f 100644 --- a/.github/workflows/release-continuous.yml +++ b/.github/workflows/release-continuous.yml @@ -12,7 +12,7 @@ jobs: - uses: pnpm/action-setup@v4.1.0 name: Install pnpm - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: lts/* cache: pnpm From 12f784829e5097df9d9ede4221d42ea2d9e79e28 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 00:47:25 +0000 Subject: [PATCH 2/2] chore(ci): [bot] format code --- docs/README.md | 17 +++++++++-------- src/esbuild/swc.ts | 5 ++++- src/options.ts | 4 ++-- vitest.config.mts | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/README.md b/docs/README.md index e9816cec..e095f33f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -615,6 +615,7 @@ When you use legacy TypeScript decorator by enabling `emitDecoratorMetadata` in decorators. In this case, you can give extra swc configuration in the `tsup.config.ts` file. For example, if you have to define `useDefineForClassFields`, you can do that as follows: + ```ts import { defineConfig } from 'tsup' @@ -626,10 +627,10 @@ export default defineConfig({ swc: { jsc: { transform: { - useDefineForClassFields: true - } - } - } + useDefineForClassFields: true, + }, + }, + }, }) ``` @@ -648,9 +649,9 @@ Note: some SWC options cannot be configured: "keepClassNames": true, "target": "es2022" } - ``` +``` -You can also define a custom `.swcrc` configuration file. Just set `swcrc` to `true` +You can also define a custom `.swcrc` configuration file. Just set `swcrc` to `true` in `tsup.config.ts` to allow SWC plugin to discover automatically your custom swc config file. ```ts @@ -662,8 +663,8 @@ export default defineConfig({ sourcemap: true, clean: true, swc: { - swcrc: true - } + swcrc: true, + }, }) ``` diff --git a/src/esbuild/swc.ts b/src/esbuild/swc.ts index 755009d3..ee12c1dc 100644 --- a/src/esbuild/swc.ts +++ b/src/esbuild/swc.ts @@ -9,7 +9,10 @@ import type { Logger } from '../log' export type SwcPluginConfig = { logger: Logger } & Options -export const swcPlugin = ({ logger, ...swcOptions }: SwcPluginConfig): Plugin => { +export const swcPlugin = ({ + logger, + ...swcOptions +}: SwcPluginConfig): Plugin => { return { name: 'swc', diff --git a/src/options.ts b/src/options.ts index 6bbee23b..7f68bd8c 100644 --- a/src/options.ts +++ b/src/options.ts @@ -257,8 +257,8 @@ export type Options = { * @default true */ removeNodeProtocol?: boolean - - swc?: SwcPluginConfig; + + swc?: SwcPluginConfig } export interface NormalizedExperimentalDtsConfig { diff --git a/vitest.config.mts b/vitest.config.mts index 8f6d3ac6..7e032eda 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -4,6 +4,6 @@ export default defineConfig({ test: { testTimeout: 50000, globalSetup: 'vitest-global.ts', - include: ["test/*.test.ts", "src/**/*.test.ts"] + include: ['test/*.test.ts', 'src/**/*.test.ts'], }, })