diff --git a/.changeset/lazy-empty-case.md b/.changeset/lazy-empty-case.md deleted file mode 100644 index 06b1537..0000000 --- a/.changeset/lazy-empty-case.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@smooai/file': patch ---- - -Add the zero-byte case to the lazy-streaming contract, and give Go a way to say "size not measured". - -`spec/lazy-stream-contract.json` pinned 1 KiB, 64 KiB and 1 MiB sources but not the 0-byte boundary, where "shorter than the detection head" degenerates. Empty S3 objects and zero-length uploads are real — this repo already ships `empty.txt` as a fixture. - -Adding it immediately failed the Go loader, for a real reason: `Size() int64` cannot express "unknown". Go has no optional integer, so `Size() == 0` was doing double duty for an empty file and for a lazy stream whose tail nobody had counted — the other four ports say the latter with `nil` / `None` / `undefined`. New `(*File).SizeKnown() bool` separates them. Additive and non-breaking: the field's zero value means "known", so every eager constructor stays correct untouched. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eab740..f1188a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # @smooai/file +## 2.2.19 + +### Patch Changes + +- edc71da: Add the zero-byte case to the lazy-streaming contract, and give Go a way to say "size not measured". + + `spec/lazy-stream-contract.json` pinned 1 KiB, 64 KiB and 1 MiB sources but not the 0-byte boundary, where "shorter than the detection head" degenerates. Empty S3 objects and zero-length uploads are real — this repo already ships `empty.txt` as a fixture. + + Adding it immediately failed the Go loader, for a real reason: `Size() int64` cannot express "unknown". Go has no optional integer, so `Size() == 0` was doing double duty for an empty file and for a lazy stream whose tail nobody had counted — the other four ports say the latter with `nil` / `None` / `undefined`. New `(*File).SizeKnown() bool` separates them. Additive and non-breaking: the field's zero value means "known", so every eager constructor stays correct untouched. + ## 2.2.18 ### Patch Changes diff --git a/dotnet/src/SmooAI.File.S3/SmooAI.File.S3.csproj b/dotnet/src/SmooAI.File.S3/SmooAI.File.S3.csproj index f892189..b52f34d 100644 --- a/dotnet/src/SmooAI.File.S3/SmooAI.File.S3.csproj +++ b/dotnet/src/SmooAI.File.S3/SmooAI.File.S3.csproj @@ -10,7 +10,7 @@ SmooAI.File.S3 SmooAI.File.S3 SmooAI.File.S3 - 2.2.18 + 2.2.19 S3 helpers for SmooAI.File — createPresignedUploadUrl, createFromS3, uploadToS3, saveToS3. README.md diff --git a/dotnet/src/SmooAI.File/SmooAI.File.csproj b/dotnet/src/SmooAI.File/SmooAI.File.csproj index a31025e..9726e39 100644 --- a/dotnet/src/SmooAI.File/SmooAI.File.csproj +++ b/dotnet/src/SmooAI.File/SmooAI.File.csproj @@ -10,7 +10,7 @@ SmooAI.File SmooAI.File SmooAI.File - 2.2.18 + 2.2.19 File utilities with magic-byte MIME detection (via Mime-Detective) and typed validation errors. Use SmooAI.File.S3 for S3 upload/download helpers. README.md diff --git a/go/file/version.go b/go/file/version.go index 91582a3..4c7178b 100644 --- a/go/file/version.go +++ b/go/file/version.go @@ -1,4 +1,4 @@ package file // Version is the current version of the smooai-file Go package. -const Version = "2.2.18" +const Version = "2.2.19" diff --git a/package.json b/package.json index 15d4021..b75b0a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@smooai/file", - "version": "2.2.18", + "version": "2.2.19", "description": "File operations that don't lie — magic-byte MIME detection catches spoofed extensions, size + content validation is built in, and presigned S3 uploads are one call away. Stream-first so large uploads don't blow your memory.", "homepage": "https://github.com/SmooAI/file#readme", "bugs": { diff --git a/python/pyproject.toml b/python/pyproject.toml index 06ec643..00d3a7f 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "smooai-file" -version = "2.2.18" +version = "2.2.19" description = "A unified file handling library for working with files from local filesystem, S3, URLs, and streams." readme = "README.md" authors = [{ name = "SmooAI", email = "brent@smooai.com" }] diff --git a/python/src/smooai_file/__init__.py b/python/src/smooai_file/__init__.py index 5dd00b5..1ec4b13 100644 --- a/python/src/smooai_file/__init__.py +++ b/python/src/smooai_file/__init__.py @@ -4,7 +4,7 @@ S3, URLs, and streams. """ -__version__ = "2.2.18" +__version__ = "2.2.19" from ._content_disposition import parse_content_disposition from ._detection import detect_from_bytes, detect_from_extension, extension_from_mime diff --git a/rust/file/Cargo.lock b/rust/file/Cargo.lock index 97333b1..1bb8d59 100644 --- a/rust/file/Cargo.lock +++ b/rust/file/Cargo.lock @@ -2279,7 +2279,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smooai-file" -version = "2.2.18" +version = "2.2.19" dependencies = [ "aws-config", "aws-sdk-s3", diff --git a/rust/file/Cargo.toml b/rust/file/Cargo.toml index 98a3d2e..86bd2d3 100644 --- a/rust/file/Cargo.toml +++ b/rust/file/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "smooai-file" -version = "2.2.18" +version = "2.2.19" edition = "2021" description = "A unified file handling library for working with files from local filesystem, S3, URLs, and streams." license = "MIT"