diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acebd20..e6fa78a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + pull-requests: write + contents: read + on: push: branches: @@ -23,31 +27,16 @@ jobs: os: [ubuntu-latest] steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: pnpm/action-setup@v2.2.4 + - uses: actions/checkout@v4 + - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: 18.x - - - name: Get pnpm store directory - id: pnpm-cache - run: | - echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} - key: ${{ runner.os }}-pnpm-store-main-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store-main- + node-version: '20' + cache: pnpm - - name: ๐Ÿ“ฆ Install deps (with cache) - run: pnpm install --child-concurrency 3 + - name: ๐Ÿ“ฆ Install dependencies + run: pnpm install --frozen-lockfile - name: ๐Ÿ‘€ Lint run: pnpm lint @@ -55,10 +44,10 @@ jobs: - name: ๐Ÿš€ Build run: pnpm build - - name: ๐Ÿงช Test - run: pnpm test - env: - VITE_TEST_DB_URL: ${{ secrets.VITE_TEST_DB_URL }} + # - name: ๐Ÿงช Test + # run: pnpm test + # env: + # VITE_TEST_DB_URL: ${{ secrets.VITE_TEST_DB_URL }} - name: ๐Ÿงช Test with coverage run: pnpm coverage @@ -67,4 +56,4 @@ jobs: - name: ๐Ÿ“ Upload coverage if: always() - uses: davelosert/vitest-coverage-report-action@v1 + uses: davelosert/vitest-coverage-report-action@v2 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 861ed68..45b17d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,17 +5,21 @@ on: tags: - 'v*' +permissions: + pull-requests: write + contents: write + jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - run: npx changelogithub env: diff --git a/package.json b/package.json index a5c3211..af90287 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "devDependencies": { "@antfu/eslint-config": "^2.6.3", "@vitejs/plugin-vue": "^5.0.3", - "@vitest/coverage-c8": "^0.33.0", + "@vitest/coverage-v8": "^1.2.1", "@vue/test-utils": "^2.4.3", "@vueuse/core": "^10.7.2", "bumpp": "^9.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 71a05cf..cd24453 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,9 +11,9 @@ devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.3 version: 5.0.3(vite@5.0.12)(vue@3.4.15) - '@vitest/coverage-c8': - specifier: ^0.33.0 - version: 0.33.0(vitest@1.2.1) + '@vitest/coverage-v8': + specifier: ^1.2.1 + version: 1.2.1(vitest@1.2.1) '@vue/test-utils': specifier: ^2.4.3 version: 2.4.3(vue@3.4.15) @@ -1031,18 +1031,27 @@ packages: vue: 3.4.15(typescript@5.3.3) dev: true - /@vitest/coverage-c8@0.33.0(vitest@1.2.1): - resolution: {integrity: sha512-DaF1zJz4dcOZS4k/neiQJokmOWqsGXwhthfmUdPGorXIQHjdPvV6JQSYhQDI41MyI8c+IieQUdIDs5XAMHtDDw==} - deprecated: v8 coverage is moved to @vitest/coverage-v8 package + /@vitest/coverage-v8@1.2.1(vitest@1.2.1): + resolution: {integrity: sha512-fJEhKaDwGMZtJUX7BRcGxooGwg1Hl0qt53mVup/ZJeznhvL5EodteVnb/mcByhEcvVWbK83ZF31c7nPEDi4LOQ==} peerDependencies: - vitest: '>=0.30.0 <1' + vitest: ^1.0.0 dependencies: '@ampproject/remapping': 2.2.1 - c8: 7.14.0 + '@bcoe/v8-coverage': 0.2.3 + debug: 4.3.4 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.6 magic-string: 0.30.5 + magicast: 0.3.3 picocolors: 1.0.0 std-env: 3.7.0 + test-exclude: 6.0.0 + v8-to-istanbul: 9.2.0 vitest: 1.2.1(jsdom@24.0.0) + transitivePeerDependencies: + - supports-color dev: true /@vitest/expect@1.2.1: @@ -1432,25 +1441,6 @@ packages: rc9: 2.1.1 dev: true - /c8@7.14.0: - resolution: {integrity: sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==} - engines: {node: '>=10.12.0'} - hasBin: true - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@istanbuljs/schema': 0.1.3 - find-up: 5.0.0 - foreground-child: 2.0.0 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-report: 3.0.1 - istanbul-reports: 3.1.6 - rimraf: 3.0.2 - test-exclude: 6.0.0 - v8-to-istanbul: 9.2.0 - yargs: 16.2.0 - yargs-parser: 20.2.9 - dev: true - /cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -1555,14 +1545,6 @@ packages: escape-string-regexp: 1.0.5 dev: true - /cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - /cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -2402,14 +2384,6 @@ packages: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true - /foreground-child@2.0.0: - resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} - engines: {node: '>=8.0.0'} - dependencies: - cross-spawn: 7.0.3 - signal-exit: 3.0.7 - dev: true - /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -2766,6 +2740,17 @@ packages: supports-color: 7.2.0 dev: true + /istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + dependencies: + debug: 4.3.4 + istanbul-lib-coverage: 3.2.2 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + dev: true + /istanbul-reports@3.1.6: resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} engines: {node: '>=8'} @@ -2992,6 +2977,14 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /magicast@0.3.3: + resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==} + dependencies: + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 + source-map-js: 1.0.2 + dev: true + /make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -3625,10 +3618,6 @@ packages: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true - /signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: true - /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -4315,29 +4304,11 @@ packages: engines: {node: '>= 14'} dev: true - /yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - dev: true - /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} dev: true - /yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true - /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'}