chore(packages): restrict published files to build output#127
Conversation
Add a "files" allowlist to all four @a0/* packages so npm-published tarballs ship only what consumers need, instead of the current default that bundles src/, tests/, and dev tooling configs. - @a0/evals, @a0/evals-core, @a0/evals-graders: dist only - @a0/evals-reporter: dist + src/templates (report.html.j2 and report.css are loaded from src/templates at runtime and are not copied into dist by tsc, so they must ship) Verified by packing all four, installing them into a fresh copy of apps/auth0-evals outside the workspace, then building, running the a0-eval CLI, and rendering an HTML report from the installed packages.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughFour package manifests now define explicit npm publication whitelists. Three include only ChangesPackage publishing
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)packages/evals-core/package.jsonTraceback (most recent call last): packages/evals-graders/package.jsonTraceback (most recent call last): packages/evals-reporter/package.jsonTraceback (most recent call last):
🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Add a
filesallowlist to all four@a0/*packages so npm-published tarballs ship only what consumers need. Today no package has afilesfield or.npmignore, sonpm packbundlessrc/,tests/, and dev tooling configs (tsconfig.json,eslint.config.mjs,vitest.config.ts, andevals-core'sscripts/) alongsidedist/.@a0/evalsdist(+README.md, added by npm automatically)@a0/evals-coredist@a0/evals-gradersdist@a0/evals-reporterdist+src/templatesWhy
evals-reporteris differentIts nunjucks templates (
report.html.j2,report.css) live insrc/templates/, are not copied intodist/bytsc, and are loaded at runtime viareport.ts'sdist/../src/templatesfallback. A plainfiles: ["dist"]would install and import fine but throw the moment a report is rendered — sosrc/templatesstays in its allowlist.evals-corehas a similar shape (two prompt.mdfiles) but they're inlined intodistat build time bygenerate-prompts.mjs, sodistalone is safe there.Verification
Packed all four, installed them into a fresh copy of
apps/auth0-evalsoutside the workspace (no symlinks), then:npm install— all four resolve locallynpm run build— compiles against the installed packagesa0-eval --help/a0-eval run --help— CLI bin + import graph loada0-eval report— rendered a full 28 KB HTML report, proving the reporter's templates resolve from the installed tarballNo source/behavior changes —
filesfields only. Pre-existingdocker.test.tsfailures in this environment (Docker unavailable) are unrelated and reproduce on cleanmain.Summary by CodeRabbit