From dde5a1afe83f28f7e8285a8cea348a4fb1f4abc3 Mon Sep 17 00:00:00 2001 From: phroi <90913182+phroi@users.noreply.github.com> Date: Thu, 28 May 2026 20:48:03 +0000 Subject: [PATCH] chore(test): centralize DEP0040 suppression --- .npmrc | 1 + package.json | 6 +++--- packages/core/package.json | 4 ++-- packages/dao/package.json | 4 ++-- packages/node-utils/package.json | 4 ++-- packages/order/package.json | 4 ++-- packages/sdk/package.json | 4 ++-- packages/utils/package.json | 4 ++-- 8 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..e5d2b0d --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +node-options=--disable-warning=DEP0040 diff --git a/package.json b/package.json index c7f8ca3..856f20d 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,9 @@ "check:ccc-overrides": "node scripts/check-ccc-overrides.mjs", "check:fresh": "rm -f pnpm-lock.yaml && pnpm check", "madge": "madge --circular --extensions ts,tsx --ts-config ./tsconfig.json --exclude '^forks/' packages apps", - "test": "NODE_OPTIONS='--disable-warning=DEP0040' vitest", - "test:ci": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run && node --test scripts/*.test.mjs && pnpm test:ccc", - "test:ccc": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run --root forks/ccc/repo --project @ckb-ccc/core && NODE_OPTIONS='--disable-warning=DEP0040' vitest run --root forks/ccc/repo/packages/udt -t 'infoFrom|isUdt'", + "test": "vitest", + "test:ci": "vitest run && node --test scripts/*.test.mjs && pnpm test:ccc", + "test:ccc": "vitest run --root forks/ccc/repo --project @ckb-ccc/core && vitest run --root forks/ccc/repo/packages/udt -t 'infoFrom|isUdt'", "lint": "pnpm -r --filter '!./forks/**' lint", "clean": "rm -fr dist packages/*/dist apps/*/dist", "clean:deep": "pnpm clean && rm -fr node_modules packages/*/node_modules apps/*/node_modules forks/ccc/repo/packages/*/tsconfig.tsbuildinfo", diff --git a/packages/core/package.json b/packages/core/package.json index 1997775..0287718 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -29,8 +29,8 @@ } }, "scripts": { - "test": "NODE_OPTIONS='--disable-warning=DEP0040' vitest", - "test:ci": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run", + "test": "vitest", + "test:ci": "vitest run", "build": "tsc", "lint": "eslint ./src", "clean": "rm -fr dist", diff --git a/packages/dao/package.json b/packages/dao/package.json index 7e784d4..9131d71 100644 --- a/packages/dao/package.json +++ b/packages/dao/package.json @@ -29,8 +29,8 @@ } }, "scripts": { - "test": "NODE_OPTIONS='--disable-warning=DEP0040' vitest", - "test:ci": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run", + "test": "vitest", + "test:ci": "vitest run", "build": "tsc", "lint": "eslint ./src", "clean": "rm -fr dist", diff --git a/packages/node-utils/package.json b/packages/node-utils/package.json index 30fa3c3..a2c18b5 100644 --- a/packages/node-utils/package.json +++ b/packages/node-utils/package.json @@ -30,8 +30,8 @@ } }, "scripts": { - "test": "NODE_OPTIONS='--disable-warning=DEP0040' vitest", - "test:ci": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run", + "test": "vitest", + "test:ci": "vitest run", "build": "tsc", "lint": "eslint ./src", "clean": "rm -fr dist", diff --git a/packages/order/package.json b/packages/order/package.json index d210103..355f61f 100644 --- a/packages/order/package.json +++ b/packages/order/package.json @@ -29,8 +29,8 @@ } }, "scripts": { - "test": "NODE_OPTIONS='--disable-warning=DEP0040' vitest", - "test:ci": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run", + "test": "vitest", + "test:ci": "vitest run", "build": "tsc", "lint": "eslint ./src", "clean": "rm -fr dist", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index f65a28f..af04cfa 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -29,8 +29,8 @@ } }, "scripts": { - "test": "NODE_OPTIONS='--disable-warning=DEP0040' vitest", - "test:ci": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run", + "test": "vitest", + "test:ci": "vitest run", "build": "tsc", "lint": "eslint ./src", "clean": "rm -fr dist", diff --git a/packages/utils/package.json b/packages/utils/package.json index 9c82fa8..880448f 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -29,8 +29,8 @@ } }, "scripts": { - "test": "NODE_OPTIONS='--disable-warning=DEP0040' vitest", - "test:ci": "NODE_OPTIONS='--disable-warning=DEP0040' vitest run", + "test": "vitest", + "test:ci": "vitest run", "build": "tsc", "lint": "eslint ./src", "clean": "rm -fr dist",