Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .changeset/lazy-empty-case.md

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/SmooAI.File.S3/SmooAI.File.S3.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@
<PackageId>SmooAI.File.S3</PackageId>
<RootNamespace>SmooAI.File.S3</RootNamespace>
<AssemblyName>SmooAI.File.S3</AssemblyName>
<Version>2.2.18</Version>
<Version>2.2.19</Version>
<Description>S3 helpers for SmooAI.File — createPresignedUploadUrl, createFromS3, uploadToS3, saveToS3.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/SmooAI.File/SmooAI.File.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@
<PackageId>SmooAI.File</PackageId>
<RootNamespace>SmooAI.File</RootNamespace>
<AssemblyName>SmooAI.File</AssemblyName>
<Version>2.2.18</Version>
<Version>2.2.19</Version>
<Description>File utilities with magic-byte MIME detection (via Mime-Detective) and typed validation errors. Use SmooAI.File.S3 for S3 upload/download helpers.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion go/file/version.go
Original file line numberDiff line numberDiff line change
@@ -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"
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line numberDiff line numberDiff line change
@@ -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" }]
Expand Down
2 changes: 1 addition & 1 deletion python/src/smooai_file/__init__.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
Expand Down
2 changes: 1 addition & 1 deletion rust/file/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/file/Cargo.toml
Original file line numberDiff line numberDiff line change
@@ -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"
Expand Down
Loading