Releases: SmooAI/file
v2.2.12
v2.2.11
Patch Changes
- dd2ab81: Migrate build tooling from tsup to tsdown — faster, oxc-based, drop-in replacement. Output extensions shift from
.js/.mjs/.d.tsto.cjs/.mjs/.d.cts/.d.mts(tsdown defaults); theexportsmap is updated to match, so subpath imports continue to resolve transparently. Also bumps@smooai/utilsto ^1.3.4 to pick up the tsdown-awarecreate-entry-pointsCLI. No public API change.
v2.2.10
Patch Changes
-
7ab63cc: SMOODEV-967: Lazy streaming support in Rust, Go, and .NET.
The Python port shipped lazy streaming in SMOODEV-952; this change brings the same semantics to the other three ports. Constructing a file from a large stream no longer requires buffering the whole payload in memory.
-
Rust: New
File::from_stream_lazy(reader, hint)that takes anyAsyncRead + Send + Unpin + 'staticand pulls only the first 64 KB (LAZY_HEAD_BYTES) for magic-byte detection. The tail stays in the reader and is consumed byread(),iter_bytes(), orupload_to_s3(). Uploads spool through a temp file so the AWS SDK gets a seekable body without RAM-buffering the payload. -
Go: New
NewFromStreamLazy(reader, hints...)and a publicIterBytes(ctx) (<-chan []byte, <-chan error)method.UploadToS3WithContextstreams lazy files through a temp-file spool. -
.NET:
CreateFromStreamAsync(stream, ..., lazy: true)(and aCreateFromStreamLazyAsyncshorthand). NewOpenReadStream()returns aHeadAndTailStreamview that yields the detection head followed by the lazy tail.S3SmooFile.UploadToS3AsyncusesTransferUtility(multipart streaming) for lazy files.100 MB streaming tests in all three languages assert RSS/heap delta stays under 50 MB.
-
v2.2.9
Patch Changes
-
b9293e6: SMOODEV-951: Bring Python, Rust, Go, and .NET to parity with TS's
createFromWebFile(overdue v2.1.0 follow-up). Each port adds an idiomatic factory for ingesting a form/multipart upload from a web framework:- Python:
File.from_form_upload(upload)— accepts any object exposingfilename+content_type+read()(StarletteUploadFile, FastAPIUploadFile, aiohttpFileField) - Rust:
File::from_form_upload(bytes, filename, content_type)— framework-agnostic; callers pull these fields from axum/actix Multipart fields - Go:
NewFromMultipartFile(*multipart.FileHeader)— stdlibnet/httpmultipart type - .NET:
SmooFile.CreateFromFormFileAsync(Stream, fileName, contentType)— callers passIFormFile.OpenReadStream(), FileName, ContentTypeto avoid forcing the ASP.NET dep on every consumer
- Python:
-
e529eef: SMOODEV-952: Python — true lazy streaming for
File.from_stream. The README pitch is "2 GB upload doesn't blow your Lambda memory," and now Python actually keeps that promise.File.from_stream(stream, lazy=True)(default) buffers only the first 64 KB up-front for magic-byte detection; the remaining tail stays in the source generator and is drained chunk-by-chunk byread(), the newiter_bytes()async generator, orupload_to_s3()(which routes the tail through aSpooledTemporaryFileandboto3.upload_fileobj's multipart streaming so peak memory stays bounded). Passlazy=Falseto opt back into the legacy fully-buffered behavior.100 MB synthetic-stream test caps peak process RSS delta at 50 MB during consumption — used to blow past 100 MB.
Follow-up tickets needed for Rust, Go, and .NET ports.
-
3499ab2: SMOODEV-955: Add
toFormData/ToFormData/to_form_datato Python, Rust, Go, and .NET ports. Brings them to parity with the TS API for relay/proxy scenarios where the file needs to be re-uploaded as a multipart form field. Each port returns a payload native to its idiomatic HTTP client (httpxfiles=dict in Python,reqwest::multipart::Formin Rust,*FormDatastruct with multipart body+content-type in Go,MultipartFormDataContentin .NET).
v2.2.6
Patch Changes
- 9df7f93: SMOODEV-956: Fix Python README —
python/README.mdlistedpython-magicas the magic-byte MIME detector, but the package actually shipspuremagic(perpyproject.toml+_detection.py, and noted in the 2.0.0 changelog). Update the "Built With" entry so Python users don't pip-install the wrong library.
v2.2.5
Patch Changes
- 241d7c0: SMOODEV-928: Bump
@smooai/loggerto^4.1.4,@smooai/utilsto^1.3.3, and@smooai/fetchto^3.3.5(major jump from prior^2.1.0range, but the TS API is unchanged from fetch 2.x to 3.x — the 3.0 major was for adding Python/Rust/Go ports). Picks up the ESM__filenameTDZ fix from logger 4.1.4 transitively. Also drops deprecatedbaseUrl: "./"from tsconfig (TS 5.9+/6.x reject it with TS5101).
v2.2.4
Patch Changes
- 08c8f83: SMOODEV-667: Fix release pipeline so PyPI + crates.io + NuGet actually publish.
pnpm buildproduces a Python wheel at the pre-sync version (the Cargo/pyproject bumps happen later, insideci:publish), so the publish step was trying to re-upload the stale wheel and getting rejected. Cleandist/beforeuv run poe publishso only the freshly-built version ships. Drop--lockedfrom the cargo publish step because sync-versions only updatesCargo.toml(notCargo.lock), which would trip--lockedas soon as crates.io is reached. Net effect:SmooAI.File+SmooAI.File.S3NuGet packages publish for the first time; PyPI advances from the stalled 2.0.0.
v2.2.3
Patch Changes
- 73f2d34: SMOODEV-666: Multi-target the SmooAI.File and SmooAI.File.S3 NuGet packages to
net8.0;net9.0;net10.0so consumers on every current .NET LTS + STS release get a nativelib/folder match. Mime-Detective 25.8.1 and AWSSDK.S3 4.0.22 resolve cleanly on all three TFMs — no per-TFM conditionals needed. Also bumped the repo'sdotnet/global.jsonrollForward fromlatestFeaturetolatestMajorso the SDK 10 runner can satisfy the 8.0.0 floor.
v2.2.2
Patch Changes
- 532173e: SMOODEV-664: Rewrite READMEs to value-frame the package — lead with "file operations that don't lie": magic-byte MIME detection vs spoofed extensions, size + content validation, presigned S3 uploads. Drop the "powerful file handling library" stock lead and reorder "Key Features" so validation comes first. Republishes @smooai/file on npm plus SmooAI.File and SmooAI.File.S3 on NuGet with the new READMEs.