From d18ee772d2963d978dfc42838224141cbd88943e Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 24 Dec 2025 12:37:06 +0800 Subject: [PATCH] test: fix unstable snap-test --- .../packages/hello/tsdown.config.ts | 2 +- .../cli/snap-tests/command-lib-monorepo/snap.txt | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/cli/snap-tests/command-lib-monorepo/packages/hello/tsdown.config.ts b/packages/cli/snap-tests/command-lib-monorepo/packages/hello/tsdown.config.ts index f7b53f65c4..9b6cdbff9f 100644 --- a/packages/cli/snap-tests/command-lib-monorepo/packages/hello/tsdown.config.ts +++ b/packages/cli/snap-tests/command-lib-monorepo/packages/hello/tsdown.config.ts @@ -1,4 +1,4 @@ export default { entry: 'src/index.ts', - format: ['esm', 'cjs'], + format: ['cjs'], }; diff --git a/packages/cli/snap-tests/command-lib-monorepo/snap.txt b/packages/cli/snap-tests/command-lib-monorepo/snap.txt index ec0c7515a5..0c76f5fd35 100644 --- a/packages/cli/snap-tests/command-lib-monorepo/snap.txt +++ b/packages/cli/snap-tests/command-lib-monorepo/snap.txt @@ -4,10 +4,8 @@ ℹ Using tsdown config: /packages/hello/tsdown.config.ts ℹ entry: src/index.ts ℹ Build start -ℹ [ESM] dist/index.mjs kB │ gzip: kB -ℹ [ESM] 1 files, total: kB -ℹ [CJS] dist/index.cjs kB │ gzip: kB -ℹ [CJS] 1 files, total: kB +ℹ dist/index.cjs kB │ gzip: kB +ℹ 1 files, total: kB ✔ Build complete in ms @@ -27,7 +25,6 @@ Task Details: > ls packages/hello/dist # should have the library index.cjs -index.mjs > vite run hello#build # should hit cache ~/packages/hello$ vite lib (✓ cache hit, replaying) @@ -35,10 +32,8 @@ index.mjs ℹ Using tsdown config: /packages/hello/tsdown.config.ts ℹ entry: src/index.ts ℹ Build start -ℹ [ESM] dist/index.mjs kB │ gzip: kB -ℹ [ESM] 1 files, total: kB -ℹ [CJS] dist/index.cjs kB │ gzip: kB -ℹ [CJS] 1 files, total: kB +ℹ dist/index.cjs kB │ gzip: kB +ℹ 1 files, total: kB ✔ Build complete in ms