Add extended promotional component filter#335
Conversation
|
Follow-up on the Bun Test failure: the route failures were caused by the test preload creating derived tables through the shared Kysely singleton and then destroying that singleton before the route tests ran. I pushed 99835b3 to keep the shared DB connection alive during preload. Format Check and Type Check are green on the new commit; Bun Test is rerunning now since it needs to rebuild/download the database cache. |
|
Follow-up after the CI cleanup: pushed eeb83b4 and the PR is now clean. Current GitHub checks:
The Bun Test workflow now uses a deterministic fixture SQLite DB for PR tests instead of rebuilding the production JLC database in CI; that production setup expands to about 28GB and was not cacheable after failed runs. The fixture covers the existing route/search assertions, and cf-proxy test dependencies are installed before the root test run. |
|
Closing this out as part of wrapping up my bounty/OSS cleanup. Thanks for the time and review. |
Adds
is_extended_promotionalsupport for issue #92./claim #92
Demo
Changes
is_extended_promotionalfrom the existing JLC source flags:preferred = 1andbasic = 0./components/listand/api/searchresponses, including fallback search results.is_extended_promotional=truefiltering in the origin routes and Cloudflare D1 proxy search/list paths.24.08to25.01so the Bun Test workflow can run on cache misses.Validation
./node_modules/.bin/biome check lib/util/extended-promotional.ts routes/components/list.tsx routes/api/search.tsx tests/lib/extended-promotional.test.ts scripts/setup-7z.ts cf-proxy/src/search.ts cf-proxy/src/components.ts cf-proxy/src/render.ts cf-proxy/src/index.ts cf-proxy/test/render.test.tsnpx --yes -p typescript@5.6.3 tsc --noEmitcd cf-proxy && ./node_modules/.bin/tsc --noEmit && ./node_modules/.bin/vitest run test/render.test.tsnpx --yes -p tsx@4.19.2 tsx -e "import { isExtendedPromotional } from './lib/util/extended-promotional.ts'; if (!isExtendedPromotional({preferred:1,basic:0})) throw new Error('expected extended'); if (isExtendedPromotional({preferred:1,basic:1})) throw new Error('expected basic preferred false'); console.log('extended promotional helper ok')"7z2501-linux-x64.tar.xz,7z2501-linux-arm64.tar.xz, and7z2501-mac.tar.xzreturn HTTP 200.Note:
bun/bunxare not available in this local shell, so I used the available npm-installed tooling for focused verification.