diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml deleted file mode 100644 index 3ee60bb..0000000 --- a/.github/workflows/sonar.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: SonarQube - -# Tests with coverage plus SonarQube Cloud analysis. Runs on PRs and on main -# (main gives SonarQube the baseline for new-code checks). Skipped when the -# SONAR_TOKEN secret is not available, e.g. on PRs from forks. -on: - push: - branches: [main] - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: sonar-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - sonar: - if: ${{ !github.event.pull_request.draft }} - runs-on: ubuntu-latest - timeout-minutes: 10 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - steps: - - uses: actions/checkout@v7 - if: env.SONAR_TOKEN != '' - with: - fetch-depth: 0 - - uses: actions/setup-node@v7 - if: env.SONAR_TOKEN != '' - with: - node-version: 26 - cache: npm - - run: npm ci --ignore-scripts --prefer-offline --no-audit --no-fund - if: env.SONAR_TOKEN != '' - - run: npm run test:coverage - if: env.SONAR_TOKEN != '' - - uses: SonarSource/sonarqube-scan-action@70bad232163b09d998ea0707ee80c0ec80798c16 # v8.5.1 - if: env.SONAR_TOKEN != '' diff --git a/package-lock.json b/package-lock.json index 12a6747..247cadb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "devDependencies": { "@cloudflare/workers-types": "^5.20261125.1", "@types/node": "^26.6.10", - "@vitest/coverage-v8": "^5.1.1", "esbuild": "^0.28.2", "typescript": "^7.0.2", "vitest": "^5.1.1", @@ -21,66 +20,6 @@ "node": ">=26" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.29.15", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.15.tgz", - "integrity": "sha512-C2FuapQ2Kh1OnVHAoLi5rD3GBJ8COb9Q609T6HEpLqaBAo560PDP5OxBE5dCI/h951MBO/+bCUYU5SZ+8ZlV+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.29.15", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.15.tgz", - "integrity": "sha512-RpKWyisHoP81twtSCgmE02iU0RnPcq1DN5bBEbpUePrjA9Q3wXhufnCJrrayPpoZieqFh3zyZQqwtSK0gGccRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.29.15" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/types": { - "version": "7.29.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.15.tgz", - "integrity": "sha512-/XKpKDakL//LZ66bq1XsZOswuqeI5MZqPLDu18o3XdkU1fNJ7bdPtzgnc4ZNS+bBGHV0FJG8jjb8SwcC3nNVQQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.29.15", - "@babel/helper-validator-identifier": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", - "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/@cloudflare/kv-asset-handler": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.1.tgz", @@ -2092,58 +2031,6 @@ "node": ">=16.20.0" } }, - "node_modules/@vitest/coverage-v8": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-5.1.1.tgz", - "integrity": "sha512-xL4NkbVx/UqqDHaXSOyvB8qsSoLQ+dVNGR9H2Bh/4ggQtmaPFNPUC9gZQwKZePLOQ6WDcgwXVnPulFW9eCHt0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^1.0.2", - "@vitest/istanbul-lib-coverage": "^2.1.0", - "@vitest/istanbul-lib-report": "^2.1.0", - "ast-v8-to-istanbul": "^1.0.7", - "magicast": "^0.5.5", - "obug": "^3.0.0", - "std-env": "^4.3.0", - "tinyrainbow": "^3.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@vitest/browser": "5.1.1", - "vitest": "5.1.1" - }, - "peerDependenciesMeta": { - "@vitest/browser": { - "optional": true - } - } - }, - "node_modules/@vitest/istanbul-lib-coverage": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-2.1.1.tgz", - "integrity": "sha512-pF9nMHHuyQzyEXdkWX3d4wElEKjymfL5TEoofegJn/jK2WjmTLOcJKfJ7/YwYGYdbZf8Ebrt4VDUoBPiTuO9zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=22" - } - }, - "node_modules/@vitest/istanbul-lib-report": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-2.1.1.tgz", - "integrity": "sha512-Qba+8OpQQAbWrmq3u1olh6jqE/vyW4OYJe6TLrrTBpXhjJhbY7Os69wyVvMQmNA64KJhGd5nQ/c7l4io8tPCHQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/istanbul-lib-coverage": "2.1.1" - }, - "engines": { - "node": ">=22" - } - }, "node_modules/@vitest/mocker": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.1.tgz", @@ -2229,29 +2116,6 @@ "node": ">=12" } }, - "node_modules/ast-v8-to-istanbul": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.8.tgz", - "integrity": "sha512-lPdpagk13ANXV+HClJEpCZM7kUsl5XcvgqKzZhaj6Ve1ZFICcY2sGhAN1n1vT0tML6EclT7bfVgTxqL57Gkpow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.31", - "estree-walker": "^3.0.3", - "js-tokens": "^10.0.0" - } - }, - "node_modules/ast-v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2734,13 +2598,6 @@ "ms": "^2.0.0" } }, - "node_modules/js-tokens": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.2.tgz", - "integrity": "sha512-DXL98F5NsFBwDz7kcb4UUlrg9ePDgBCPjK4inUYi5gahxsTrKNW8Oh6F3WAuh7hntbP41EL/DkUYccRsDfLQLQ==", - "dev": true, - "license": "MIT" - }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -3046,18 +2903,6 @@ "@jridgewell/sourcemap-codec": "^1.6.0" } }, - "node_modules/magicast": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz", - "integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7", - "source-map-js": "^1.2.1" - } - }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -3370,6 +3215,7 @@ "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", "dev": true, "license": "BSD-3-Clause", + "peer": true, "engines": { "node": ">=6.0.0" } @@ -3431,16 +3277,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyrainbow": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz", - "integrity": "sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", diff --git a/package.json b/package.json index af4e1b8..37dada8 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,11 @@ "build": "esbuild src/index.ts --bundle --format=esm --minify --target=es2022 --external:./ui.js --outfile=dist/index.js && esbuild src/ui.ts --bundle --format=esm --minify --target=es2022 --outfile=dist/ui.js", "build:node": "esbuild src/node/server.ts --bundle --platform=node --format=esm --target=node26 --outfile=dist/node/server.js", "test": "vitest run", - "test:coverage": "vitest run --coverage", "check": "tsc -p . && vitest run && npm run build && npm run build:node" }, "devDependencies": { "@cloudflare/workers-types": "^5.20261125.1", "@types/node": "^26.6.10", - "@vitest/coverage-v8": "^5.1.1", "esbuild": "^0.28.2", "typescript": "^7.0.2", "vitest": "^5.1.1", diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index e8168ee..0000000 --- a/sonar-project.properties +++ /dev/null @@ -1,8 +0,0 @@ -sonar.organization=shiftbloom-studio -sonar.projectKey=shiftbloom-studio_drop -sonar.projectName=drop - -sonar.sources=src -sonar.tests=test -sonar.exclusions=**/*.d.ts -sonar.javascript.lcov.reportPaths=coverage/lcov.info diff --git a/vitest.config.ts b/vitest.config.ts index 22cbf9c..9bd9f36 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,3 +1,3 @@ import { defineConfig } from "vitest/config"; -export default defineConfig({ test: { environment: "node", include: ["test/**/*.test.ts"], coverage: { provider: "v8", include: ["src/**/*.ts"], reporter: ["text-summary", "lcov"] } } }); +export default defineConfig({ test: { environment: "node", include: ["test/**/*.test.ts"] } });