From 063c7ee1de4887c7a83e89431721d47879a786d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 10 Aug 2025 14:03:57 +0000 Subject: [PATCH 1/2] fix(deps): update dependency tinyexec to v1 --- package.json | 2 +- pnpm-lock.yaml | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index b42b8c75..68e5ea8d 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "rollup": "^4.34.8", "source-map": "0.8.0-beta.0", "sucrase": "^3.35.0", - "tinyexec": "^0.3.2", + "tinyexec": "^1.0.1", "tinyglobby": "^0.2.11", "tree-kill": "^1.2.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73a76744..056114a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: ^3.35.0 version: 3.35.0 tinyexec: - specifier: ^0.3.2 - version: 0.3.2 + specifier: ^1.0.1 + version: 1.0.1 tinyglobby: specifier: ^0.2.11 version: 0.2.11 @@ -830,11 +830,6 @@ packages: peerDependencies: acorn: '>=8.9.0' - acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} @@ -1457,6 +1452,7 @@ packages: source-map@0.8.0-beta.0: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} + deprecated: The work that was done in this beta branch won't be included in future versions sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -1571,6 +1567,9 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyexec@1.0.1: + resolution: {integrity: sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==} + tinyglobby@0.2.11: resolution: {integrity: sha512-32TmKeeKUahv0Go8WmQgiEp9Y21NuxjwjqiRC1nrUB51YacfSwuB44xgXD+HdIppmMRgjQNPdrHyA6vIybYZ+g==} engines: {node: '>=12.0.0'} @@ -2272,11 +2271,9 @@ snapshots: loupe: 3.1.3 tinyrainbow: 2.0.0 - acorn-typescript@1.4.13(acorn@8.12.1): + acorn-typescript@1.4.13(acorn@8.14.0): dependencies: - acorn: 8.12.1 - - acorn@8.12.1: {} + acorn: 8.14.0 acorn@8.14.0: {} @@ -2959,8 +2956,8 @@ snapshots: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 '@types/estree': 1.0.6 - acorn: 8.12.1 - acorn-typescript: 1.4.13(acorn@8.12.1) + acorn: 8.14.0 + acorn-typescript: 1.4.13(acorn@8.14.0) aria-query: 5.3.2 axobject-query: 4.1.0 clsx: 2.1.1 @@ -2999,6 +2996,8 @@ snapshots: tinyexec@0.3.2: {} + tinyexec@1.0.1: {} + tinyglobby@0.2.11: dependencies: fdir: 6.4.3(picomatch@4.0.2) From a28960a98ae8dcd37bcd7ba09048c236279e3c2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 10 Aug 2025 14:04:18 +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'], }, })