mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-08-29 04:32:06 -04:00
Adds fast-check (3 property tests × 100 runs each = 300 random inputs)
covering PriorityList ordering:
1. values() returns all pushed items
2. values() sorts by descending priority (higher first)
3. Equal-priority items maintain insertion order (FIFO)
The sort test immediately caught a latent bug at
server/server/internal/utils/prioritylist.ts:34:
if (a.priority == a.priority) { // ALWAYS TRUE — compares to self
return a.addedIndex - b.addedIndex;
}
return b.priority - a.priority;
Bug: values() always fell through to insertion-only order, ignoring
priority. The provider chain in metadata/index.ts relied on priority
for fallthrough ordering, so providers were tried in the wrong order.
Fix: 'a.priority == b.priority' (typo, one char).
Combined with the bug fix, the test gives 100× coverage of random
orderings vs. a hand-written test with 3 cases.
After: 7 tests pass + 1 skipped (was 4 + 0).
145 lines
3.9 KiB
JSON
145 lines
3.9 KiB
JSON
{
|
|
"name": "drop",
|
|
"version": "0.4.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"license": "AGPL-3.0-or-later",
|
|
"engines": {
|
|
"node": ">=22.16.0"
|
|
},
|
|
"scripts": {
|
|
"build": "nuxt build",
|
|
"dev": "nuxt dev",
|
|
"generate": "nuxt generate",
|
|
"preview": "nuxt preview",
|
|
"postinstall": "nuxt prepare && prisma generate && buf generate",
|
|
"typecheck": "nuxt typecheck",
|
|
"format:check": "prettier --check .",
|
|
"lint": "pnpm run format:check && pnpm run lint:eslint",
|
|
"lint:eslint": "eslint .",
|
|
"lint:prettier": "prettier . --check",
|
|
"lint:fix": "eslint . --fix && prettier --write --list-different .",
|
|
"test:e2e": "playwright test",
|
|
"test": "vitest run",
|
|
"test:changed": "vitest run --changed",
|
|
"test:watch": "vitest",
|
|
"coverage": "vitest run --coverage",
|
|
"prepare": "husky",
|
|
"lint-staged": "lint-staged",
|
|
"dev:setup": "bash scripts/dev-setup.sh"
|
|
},
|
|
"dependencies": {
|
|
"@bufbuild/protobuf": "^2.11.0",
|
|
"@discordapp/twemoji": "^16.0.1",
|
|
"@headlessui/vue": "^1.7.23",
|
|
"@heroicons/vue": "^2.1.5",
|
|
"@lobomfz/prismark": "0.0.3",
|
|
"@nuxt/fonts": "^0.11.0",
|
|
"@nuxt/image": "^1.10.0",
|
|
"@nuxt/kit": "^3.20.1",
|
|
"@nuxtjs/i18n": "^9.5.5",
|
|
"@prisma/adapter-pg": "7.7.0",
|
|
"@prisma/client": "7.7.0",
|
|
"@simplewebauthn/browser": "^13.2.2",
|
|
"@simplewebauthn/server": "^13.2.2",
|
|
"@tailwindcss/vite": "^4.0.6",
|
|
"@vueuse/nuxt": "13.6.0",
|
|
"argon2": "^0.43.0",
|
|
"arktype": "^2.1.10",
|
|
"bcryptjs": "^3.0.2",
|
|
"cbor2": "^2.0.1",
|
|
"cheerio": "^1.0.0",
|
|
"cookie-es": "^2.0.0",
|
|
"deepmerge": "^4.3.1",
|
|
"dotenv": "^17.2.3",
|
|
"fast-fuzzy": "^1.12.0",
|
|
"file-type-mime": "^0.4.3",
|
|
"jdenticon": "^3.3.0",
|
|
"jose": "^6.1.3",
|
|
"jsonwebtoken": "^9.0.3",
|
|
"kjua": "^0.10.0",
|
|
"luxon": "^3.6.1",
|
|
"micromark": "^4.0.1",
|
|
"normalize-url": "^8.0.2",
|
|
"nuxt": "^3.21.6",
|
|
"nuxt-security": "2.2.0",
|
|
"otp-io": "^1.2.7",
|
|
"parse-cosekey": "^1.0.2",
|
|
"pino": "^9.14.0",
|
|
"pino-pretty": "^13.1.1",
|
|
"prisma": "7.7.0",
|
|
"sanitize-filename": "^1.6.3",
|
|
"semver": "^7.7.1",
|
|
"shescape": "^2.1.10",
|
|
"stream-mime-type": "^2.0.0",
|
|
"turndown": "^7.2.0",
|
|
"unstorage": "^1.15.0",
|
|
"vue": "latest",
|
|
"vue-router": "latest",
|
|
"vue3-carousel": "^0.16.0",
|
|
"vue3-carousel-nuxt": "^1.1.5",
|
|
"vuedraggable": "^4.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"@bufbuild/buf": "^1.65.0",
|
|
"@bufbuild/protoc-gen-es": "^2.11.0",
|
|
"@golar/vue": "^0.0.13",
|
|
"@intlify/eslint-plugin-vue-i18n": "^4.0.1",
|
|
"@nuxt/eslint": "^1.3.0",
|
|
"@nuxt/test-utils": "^4.0.3",
|
|
"@playwright/test": "^1.61.1",
|
|
"@tailwindcss/forms": "^0.5.9",
|
|
"@tailwindcss/typography": "^0.5.15",
|
|
"@types/jsonwebtoken": "^9.0.10",
|
|
"@types/luxon": "^3.6.2",
|
|
"@types/node": "^22.13.16",
|
|
"@types/semver": "^7.7.0",
|
|
"@types/turndown": "^5.0.5",
|
|
"@typescript-eslint/utils": "^8.50.0",
|
|
"@vitest/coverage-v8": "^4.1.10",
|
|
"@vue/test-utils": "^2.4.11",
|
|
"autoprefixer": "^10.4.20",
|
|
"eslint": "^9.24.0",
|
|
"eslint-config-prettier": "^10.1.1",
|
|
"fast-check": "^4.9.0",
|
|
"golar": "^0.0.13",
|
|
"h3": "^1.15.5",
|
|
"happy-dom": "^20.11.1",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^17.2.0",
|
|
"msw": "^2.15.0",
|
|
"nitropack": "^2.13.4",
|
|
"ofetch": "^1.4.1",
|
|
"prettier": "^3.5.3",
|
|
"prettier-plugin-sort-json": "^4.1.1",
|
|
"sass": "^1.79.4",
|
|
"tailwindcss": "^4.0.0",
|
|
"typescript": "^5.8.3",
|
|
"vitest": "^4.1.10",
|
|
"vue-tsc": "^3.0.1"
|
|
},
|
|
"lint-staged": {
|
|
"*.{ts,vue}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
],
|
|
"*.{json,css,scss}": [
|
|
"prettier --write"
|
|
],
|
|
"*.{yaml,yml,md}": [
|
|
"prettier --write"
|
|
],
|
|
"*.{mjs,cjs}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
],
|
|
"*.rs": [
|
|
"cargo fmt --"
|
|
]
|
|
},
|
|
"overrides": {
|
|
"vue3-carousel-nuxt": {
|
|
"vue3-carousel": "^0.16.0"
|
|
}
|
|
}
|
|
}
|