Skip to content

1.0.0

Latest

Choose a tag to compare

@mattt mattt released this 09 Oct 18:48
Immutable release. Only release title and notes can be modified.
c30143a

Important

Breaking changes. 1.0.0 settles the public API, so a few types and names change:

  • swift-huggingface now requires swift-xet 1.0 (#85). If your package also depends on swift-xet, change its requirement to from: "1.0.0".
  • HTTPClientError is now a struct with a code (#89). Switch on error.code (.requestError, .responseError, .decodingError, .unexpectedError) instead of the error, and read statusCode, detail, and response from its properties.
  • Provider and Capability are now structs (#90), so new providers and capabilities can come in 1.x without breaking anyone's code. Exhaustive switch statements need a default case, and Provider.custom(name:baseURL:) is now a static method, so check provider.identifier instead of matching case .custom(let name, _).
  • Bucket.Region is now a struct (#88). Use .us and .eu as before, or Bucket.Region(rawValue:) for other regions.
  • bucketInfo(_:) is now getBucket(_:), and getBucketPathsInfo(_:paths:) is now getBucketFiles(_:paths:), to match the rest of the API (#93).
  • Some helpers that were public by accident are now internal (#86): the data URL helpers on Data, DateDecodingStrategy.iso8601WithFractionalSeconds, FileLock, FileLockError, FilePermissions, and MultipartBuilderError.

Buckets can now download files, with progress reporting (#56).
Thanks to @pcuenca for building bucket support and for helping shape this release.

What's Changed

  • Require swift-xet 1.0 by @mattt in #85
  • Correct the platform requirements in the README by @mattt in #87
  • Make internal helpers internal by @mattt in #86
  • Make Provider and Capability structs by @mattt in #90
  • Make HTTPClientError a struct with a code by @mattt in #89
  • Make Bucket.Region a struct by @mattt in #88
  • Update the Hub API endpoint coverage in the README by @mattt in #91
  • Add a lint job to CI by @mattt in #92
  • Rename bucket methods to match the rest of the API by @mattt in #93
  • Bucket downloading by @pcuenca in #56
  • Bump version to 1.0.0 by @mattt in #94

Full Changelog: 0.13.0...1.0.0