mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-11 21:57:14 +03:00
Same alpha-string trap pattern as the recent detectPageTheme fix, on a
different code path. resolveCanvasBackground walks parents looking for
an opaque background; on a page that doesn't set its own bg the loop
runs out and fell through to:
return getComputedStyle(document.body).backgroundColor
|| getComputedStyle(document.documentElement).backgroundColor
|| '#ffffff';
`getComputedStyle(body).backgroundColor` for a default-bg page returns
the literal string "rgba(0, 0, 0, 0)" — non-empty, truthy — so the `||`
chain short-circuits to transparent-black instead of falling through to
'#ffffff'. modern-screenshot then composites the capture onto a black
canvas; the WebGL shader overlay flashes solid black until the shader
finishes loading.
Fix: drop the buggy fallback. The while-loop already covered <body> and
<html>; if neither is opaque the only sensible answer is the browser's
default canvas color (white).
Test coverage:
- New tests/live-browser-regression.test.mjs pins the anti-pattern
with a static-source check (live-browser.js is an IIFE with no module
exports, so this is the cheapest reliable regression guard). Also
pins the equivalent guard for detectPageTheme's readOpaque helper
added in the prior commit.
- Wired the new test file into `bun run test`'s explicit list.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
84 lines
2.8 KiB
JSON
84 lines
2.8 KiB
JSON
{
|
|
"name": "impeccable",
|
|
"version": "2.1.8",
|
|
"author": "Paul Bakaus",
|
|
"description": "Design skills, commands, and anti-pattern detection for AI coding agents",
|
|
"keywords": [
|
|
"design",
|
|
"frontend",
|
|
"ux",
|
|
"skills",
|
|
"ai",
|
|
"anti-patterns",
|
|
"lint",
|
|
"accessibility",
|
|
"css",
|
|
"html",
|
|
"detection",
|
|
"ci-cd"
|
|
],
|
|
"license": "Apache-2.0",
|
|
"homepage": "https://impeccable.style",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/pbakaus/impeccable.git"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"type": "module",
|
|
"bin": {
|
|
"impeccable": "bin/cli.js"
|
|
},
|
|
"main": "./src/detect-antipatterns.mjs",
|
|
"exports": {
|
|
".": "./src/detect-antipatterns.mjs",
|
|
"./browser": "./src/detect-antipatterns-browser.js"
|
|
},
|
|
"files": [
|
|
"bin/",
|
|
"src/",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "bun run scripts/build.js",
|
|
"build:browser": "node scripts/build-browser-detector.js",
|
|
"build:extension": "node scripts/build-extension.js",
|
|
"clean": "rm -rf dist build",
|
|
"rebuild": "bun run clean && bun run build",
|
|
"dev": "bun run server/index.js",
|
|
"preview": "bun run build && wrangler pages dev",
|
|
"deploy": "bun run build && wrangler pages deploy build/",
|
|
"test": "bun test tests/build.test.js tests/detect-antipatterns.test.js tests/windows-path-fix.test.js && node --test tests/detect-antipatterns-fixtures.test.mjs && node --test tests/detect-antipatterns-browser.test.mjs && node --test tests/cleanup-deprecated.test.mjs && node --test tests/live-wrap.test.mjs && node --test tests/live-accept.test.mjs && node --test tests/live-inject.test.mjs && node --test tests/live-server.test.mjs && node --test tests/live-browser-regression.test.mjs && node --test tests/framework-fixtures.test.mjs",
|
|
"test:live-e2e": "node --test --test-timeout=600000 tests/live-e2e.test.mjs",
|
|
"prepack": "cp README.md README.repo.md && cp README.npm.md README.md",
|
|
"postpack": "cp README.repo.md README.md && rm README.repo.md",
|
|
"release:skill": "node scripts/release.mjs skill",
|
|
"release:cli": "node scripts/release.mjs cli",
|
|
"release:ext": "node scripts/release.mjs extension",
|
|
"screenshot": "bun run scripts/screenshot-antipatterns.js",
|
|
"og-image": "bun run scripts/generate-og-image.js"
|
|
},
|
|
"dependencies": {
|
|
"jsdom": "29.0.0",
|
|
"marked": "^16.4.2"
|
|
},
|
|
"optionalDependencies": {
|
|
"puppeteer": "^24.42.0"
|
|
},
|
|
"devDependencies": {
|
|
"@ai-sdk/anthropic": "^3.0.71",
|
|
"@ai-sdk/openai": "^3.0.53",
|
|
"@anthropic-ai/claude-agent-sdk": "^0.2.119",
|
|
"@anthropic-ai/sdk": "^0.91.1",
|
|
"@google/genai": "^1.50.1",
|
|
"ai": "^6.0.168",
|
|
"archiver": "^7.0.1",
|
|
"modern-screenshot": "^4.7.0",
|
|
"motion": "^12.38.0",
|
|
"playwright": "^1.59.1",
|
|
"wrangler": "^4.85.0",
|
|
"zod": "^4.3.6"
|
|
}
|
|
}
|