thomwolf/hf-star-history
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Deployment
This Space builds the frontend from the GitHub revision pinned in Dockerfile. application.patch adapts the frontend to public Hugging Face Spaces, including token-free sharing, independent request errors, and a responsive comparison UI. The final image serves only dist/ with nginx on port 3000 as UID 1000. Build caches and development dependencies stay in the builder stage, and request logging is disabled to avoid accumulating logs on the ephemeral disk.
To test the API regression cases, check out the pinned source, apply application.patch, install with pnpm@8.15.9 install --frozen-lockfile, then run:
APP_SOURCE_DIR=/path/to/patched/source node --test tests/api.test.cjsThe frontend can be built with pnpm build. The runtime serves Vue routes through index.html, while missing files under /assets/ return 404.
Public sharing and privacy
Charts use the public Hugging Face API without access tokens. Shared links and iframe embeds contain only Space IDs and the chart alignment. Legacy token query parameters and the previous local-storage credential are discarded on load. Markdown sharing produces a comparison link; use the PNG export for a static README image. Historical curves are sampled from current likers, not archived totals.
Frontend validation
From the patched source, run pnpm build and node node_modules/vue-tsc/bin/vue-tsc.js --noEmit --skipLibCheck (the old upstream dependency declarations require skipLibCheck). The API suite covers normalization, credential-free links, partial failures, and the dated-likes API.
tests/browser_smoke.py runs against a production preview on port 4173 by default. Set SPACE_TEST_URL to test another origin and BROWSER_EXECUTABLE to use an installed Chromium. Run with uv run --with playwright python tests/browser_smoke.py. It mocks API responses to exercise retries, rate limits, stale requests, sharing, PNG/CSV export, mobile layout, and embedded charts.
