From 55b1ff02f88a8d2f6e15a6bb64de956d0bd6a1bc Mon Sep 17 00:00:00 2001 From: Surmon Date: Thu, 15 Aug 2024 02:16:41 +0800 Subject: [PATCH] chore: test scripts --- .github/workflows/coverage.yml | 2 +- package.json | 9 +++++---- pnpm-lock.yaml | 12 ++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4b2a80f..636e46e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -23,7 +23,7 @@ jobs: run: pnpm install - name: Test - run: pnpm run coverage + run: pnpm run test:coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 diff --git a/package.json b/package.json index b47d88d..bce8a77 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,9 @@ "build": "vite build", "lint": "eslint src", "format": "prettier --write --parser typescript \"src/**/*.ts\"", - "test": "vitest", - "coverage": "vitest run --coverage", + "test": "vitest run", + "test:watch": "vitest watch", + "test:coverage": "vitest run --coverage", "ci": "npm run lint && npm run test && npm run build", "release": ". ./scripts/release.sh" }, @@ -55,7 +56,7 @@ "@types/eslint": "^9.x", "@types/react": "^18.x", "@types/react-dom": "^18.x", - "@vitejs/plugin-react": "^4.3.1", + "@vitejs/plugin-react": "^4.x", "@vitest/coverage-v8": "^2.0.5", "eslint": "^9.x", "eslint-config-prettier": "^9.x", @@ -68,7 +69,7 @@ "typescript": "^5.5.4", "typescript-eslint": "^8.x", "vite": "^5.4.0", - "vite-plugin-dts": "^4.0.2", + "vite-plugin-dts": "^4.0.3", "vitest": "^2.x" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1aabb4a..19bb4e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,7 +28,7 @@ importers: specifier: ^18.x version: 18.3.0 '@vitejs/plugin-react': - specifier: ^4.3.1 + specifier: ^4.x version: 4.3.1(vite@5.4.0(@types/node@22.2.0)) '@vitest/coverage-v8': specifier: ^2.0.5 @@ -67,8 +67,8 @@ importers: specifier: ^5.4.0 version: 5.4.0(@types/node@22.2.0) vite-plugin-dts: - specifier: ^4.0.2 - version: 4.0.2(@types/node@22.2.0)(rollup@4.20.0)(typescript@5.5.4)(vite@5.4.0(@types/node@22.2.0)) + specifier: ^4.0.3 + version: 4.0.3(@types/node@22.2.0)(rollup@4.20.0)(typescript@5.5.4)(vite@5.4.0(@types/node@22.2.0)) vitest: specifier: ^2.x version: 2.0.5(@types/node@22.2.0)(jsdom@24.1.1) @@ -1765,8 +1765,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-dts@4.0.2: - resolution: {integrity: sha512-Ni3EPG8yeLc5ivEzT4szreJ0rXpEQgvdYq3PaZ7OMoHc8uET4/HRUfzVPejJaUAojbxsKgaZbp6Zgm41sxb86Q==} + vite-plugin-dts@4.0.3: + resolution: {integrity: sha512-+xnTsaONwU2kV6zhRjtbRJSGN41uFR/whqmcb4k4fftLFDJElxthp0PP5Fq8gMeM9ytWMt1yk5gGgekLREWYQQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -3631,7 +3631,7 @@ snapshots: - supports-color - terser - vite-plugin-dts@4.0.2(@types/node@22.2.0)(rollup@4.20.0)(typescript@5.5.4)(vite@5.4.0(@types/node@22.2.0)): + vite-plugin-dts@4.0.3(@types/node@22.2.0)(rollup@4.20.0)(typescript@5.5.4)(vite@5.4.0(@types/node@22.2.0)): dependencies: '@microsoft/api-extractor': 7.47.4(@types/node@22.2.0) '@rollup/pluginutils': 5.1.0(rollup@4.20.0)