v0.20.0
Polish minor: cleanup ergonomics, model docblocks, multi-language
translations, deprecation warnings on closure metric handlers, and a
substantial frontend test suite.
Added
- CleanupCommand options.
--limit=Nto stop after N removals,--skip-uploadsand--skip-batchesto run only one half of the sweep. Useful for staged cleanup on large stores. - Batch cleanup in the cleanup command. The default sweep now also walks expired batches via
BatchTracker::expiredBatchIds(). The DB driver enumerateschunky_batchesrows pastexpires_at; the FS driver walks the per-batch directories. - FK migration. New
add_chunked_uploads_batch_id_foreign_keymigration adds achunked_uploads.batch_id → chunky_batches.batch_idforeign key withnullOnDelete(). Skipped on SQLite (which can't add FKs after table creation). - Eloquent
@propertyannotations onChunkedUploadandChunkyBatch. PHPStan baseline cut from 45 entries to 6. Custom code that depends on Larastan's property inference now type-checks without help. pint.jsonenforcesdeclare_strict_typesand alphabetised imports across the codebase.sideEffects: falseon every npm package — bundlers can tree-shake unused exports cleanly.- Localised HTTP messages for
de,es,fr,hualongside the existingen. Publish withphp artisan vendor:publish --tag=chunky-lang. - Closure metric handler deprecation.
Metrics::dispatch()triggersE_USER_DEPRECATEDwhen a closure handler is invoked, pointing operators at the class-string alternative (whichconfig:cachecan serialise). Slated for removal in v1.0. - Composer cache in CI. The Pint, PHPStan, and audit jobs use
actions/cache@v4to reuse thevendordirectory between runs — about 90 seconds saved per PR. - BatchUploader test suite. 12 new tests covering basic uploads, sticky-replay race fix, queue behaviour, memory leak fix, fileError UploadError shape, and endpoint validation. Frontend test count: 16 → 29.
- CompletionWatcher regression test for the v0.17.2
extendTimeoutOnProgressMs + timeoutMs=0fix.
Changed
Metricsclosure handlers are deprecated. They keep working for back-compat but trigger anE_USER_DEPRECATEDnotice. Migrate to class-string handlers (resolved through the container) before v1.0.EventCallbackremoved from the public export of@netipar/chunky-core. It was an internal type that crept onto the surface during the v0.17 hardening; consumers should use the per-uploaderEventMaptypes when they need typed event listeners.- Test helper
mockFetchSequencereturnstypeof fetchinstead of a raw vitestMock, so callers can assign it toglobalThis.fetchwithout per-test casts.
npm packages
- All packages bumped to
0.20.0(frontend additions —sideEffects: false, EventCallback unexport, test suite expansion).