Files
Pulse/frontend-modern/package.json
rcourtman cc767ad53e Stop tests from adding new source-text reads
About 9,400 frontend assertions and dozens of Go tests read product
source as text and check for strings. They break on harmless refactors,
pass on real bugs, and grow by one pin per change because a pin is the
cheapest edit that satisfies the proof-file rule. 492 date-named
coverage-chasing test files (*.branchcov0712b.test.ts) grew the same way.

source-text-test-audit.mjs counts each test file's source reads (?raw
imports, readFileSync and its helper wrappers, Go ReadFile of source
literals) against a checked-in baseline. A count may fall but not rise,
new test files start at zero, and no new date-named coverage file may
appear. --write-baseline only lowers entries, so raising one is a
visible hand edit. It runs in the lint chain, which CI runs for every
code change, Go included.

Negative controls: a new test importing App.tsx?raw fails, and a copy
named docsLinks.branchcov1103.test.ts fails on both checks.

Contract-Neutral: adds a lint script entry and an offline audit; no dependency, build, install or runtime change
2026-11-03 10:22:47 +00:00

102 lines
4.1 KiB
JSON

{
"name": "pulse-modern",
"version": "1.0.0",
"description": "Modern type-safe frontend for Pulse monitoring",
"type": "module",
"author": "rcourtman",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/rcourtman/Pulse.git"
},
"bugs": {
"url": "https://github.com/rcourtman/Pulse/issues"
},
"homepage": "https://github.com/rcourtman/Pulse",
"scripts": {
"dev": "npm --prefix .. run dev",
"dev:lab": "npm --prefix .. run dev:lab",
"dev:logs": "npm --prefix .. run dev:logs",
"dev:restart": "npm --prefix .. run dev:restart",
"dev:restart:lab": "npm --prefix .. run dev:restart:lab",
"dev:backend-restart": "npm --prefix .. run dev:backend-restart",
"dev:status": "npm --prefix .. run dev:status",
"dev:status:lab": "npm --prefix .. run dev:status:lab",
"dev:stop": "npm --prefix .. run dev:stop",
"dev:verify": "npm --prefix .. run dev:verify",
"dev:verify:lab": "npm --prefix .. run dev:verify:lab",
"dev:foreground": "npm --prefix .. run dev:foreground",
"dev:foreground:lab": "npm --prefix .. run dev:foreground:lab",
"dev:frontend-only": "vite",
"build": "node scripts/build-embed-assets.mjs",
"preview": "vite preview",
"generate-types": "cd ../scripts && go run generate-types.go",
"test": "vitest run",
"test:coverage": "vitest run --coverage --coverage.provider=v8 --coverage.include=src/**/*.ts --coverage.include=src/**/*.tsx --coverage.exclude=src/index.tsx",
"test:coverage:ai": "vitest run --coverage --coverage.provider=v8 --coverage.thresholds.100 --coverage.thresholds.perFile --coverage.include=src/components/AI/aiChatUtils.ts",
"type-check": "tsc --noEmit",
"lint": "npm run lint:eslint && npm run lint:theme && npm run lint:copy && npm run lint:canonical-platforms && npm run lint:form-labels && npm run lint:table-rows && npm run lint:external-domains && npm run lint:planning-docs && npm run lint:test-source-reads",
"lint:canonical-platforms": "node scripts/canonical-platform-audit.mjs",
"lint:eslint": "eslint \"src/**/*.{ts,tsx}\"",
"lint:copy": "node scripts/copy-style-audit.mjs",
"lint:form-labels": "node scripts/form-label-audit.mjs",
"lint:table-rows": "node scripts/table-row-a11y-audit.mjs",
"lint:external-domains": "node scripts/external-domain-audit.mjs",
"lint:planning-docs": "node scripts/planning-doc-status-audit.mjs",
"lint:theme": "node scripts/theme-audit.mjs",
"lint:test-source-reads": "node scripts/source-text-test-audit.mjs",
"lint:headers": "node scripts/header-audit.mjs",
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
"lint:cpd": "jscpd",
"format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
"check:bundlesize": "node scripts/check-bundle-size.mjs"
},
"dependencies": {
"@solidjs/router": "^1.0.0",
"dompurify": "^3.4.17",
"lucide-solid": "^0.577.0",
"marked": "^18.1.1",
"qrcode": "^1.5.4",
"solid-js": "^1.9.17"
},
"overrides": {
"esbuild": "0.28.1",
"form-data": "^4.0.6",
"seroval": "1.7.3",
"seroval-plugins": "^1.4.1",
"@babel/core": "^7.29.6",
"js-yaml": "^4.3.2",
"postcss-selector-parser": "^7.1.6",
"source-map-js": "^1.2.2",
"minimatch@^10.0.0": "11.0.1"
},
"devDependencies": {
"@eslint/js": "10.0.0",
"@solidjs/testing-library": "^0.8.5",
"@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "^4.3.3",
"@testing-library/jest-dom": "^6.5.0",
"@types/node": "^26.6.5",
"@types/qrcode": "^1.5.6",
"@typescript-eslint/eslint-plugin": "^8.72.0",
"@typescript-eslint/parser": "^8.72.0",
"@vitest/coverage-v8": "^4.1.12",
"eslint": "10.0.0",
"eslint-config-prettier": "^10.0.0",
"eslint-plugin-solid": "^0.18.1",
"globals": "^17.13.0",
"js-yaml": "^4.3.2",
"jscpd": "^5.4.2",
"jsdom": "^24.1.0",
"prettier": "3.9.10",
"tailwindcss": "^4.3.3",
"typescript": "^5.3.0",
"typescript-eslint": "^8.72.0",
"vite": "^6.4.5",
"vite-plugin-solid": "^2.11.14",
"vite-plugin-sri-gen": "^1.7.5",
"vitest": "^4.1.12"
}
}