Skip to content

v2.1.0

Latest

Choose a tag to compare

@coreyward coreyward released this 17 Feb 19:00
afe60f4

Highlights

  • Migrated most helpers to TypeScript
  • Improved compatibility with Sanity v5 (defineType, defineField, defineArrayMember)
  • Added URL validation utilities (validateUrlValue, requiredUrlValidator, optionalUrlValidator)
  • Added startCase and isCamelCase utilities
  • Removed the lodash dependency
  • Improved package tree-shaking and modernized distribution/output setup for both ESM and CommonJS consumers
  • Upgraded the toolchain (tsup, Vitest, ESLint flat config, pnpm)

Fixes

  • decodeAssetId now has safer parsing and clearer error behavior for invalid IDs
  • Validation logic for image and URL helpers was tightened for edge cases and type safety
  • blockPreview and block validator internals were refactored and typed for more predictable behavior
  • blockPreview now returns an empty string for empty/undefined input (previously null)

Dependency and Maintenance Updates

  • Security/dependency updates across the range, including minimatch, json5, semver, @babel/traverse, and follow-
    redirects.
  • Removed obsolete build scripts and refreshed lint/test/build workflows.

Full Changelog: v1.13.0...v2.1.0