Skip to content

Latest commit

 

History

History
109 lines (60 loc) · 4.35 KB

CHANGELOG.md

File metadata and controls

109 lines (60 loc) · 4.35 KB

Changelog

v0.5.13

  • Add support for #[serde(rename_all_fields)] (#35).

v0.5.12

  • Export Blob newtype wrapper around Vec<u8> which has the Typescript type Blob.
  • Replace unmaintained proc-macro-error dependency with proc-macro-error2 (#34).

v0.5.11

  • Add TypeDef impl for Ipv4Addr and Ipv6Addr (#31).

v0.5.10

  • Add TypeDef impl for char (#30).

v0.5.9

  • Add TypeDef impl for std::net::IpAddr (#29).

v0.5.8

  • Add basic formatting (indentation and spacing) to emitted TypeScript code to make it more readable (#25).

v0.5.7

  • Fix an issue where doc-comments were emitted on both the type definition and the object for structs, as well as an issue where doc-comments meant for a type definition could be emitted on the namespace instead (#20).

v0.5.6

  • Add support for #[serde(flatten)] on enum variant fields.

v0.5.5

  • Fix TypeDef impls for HashMap and HashSet to allow any hasher generic parameter (#16).

v0.5.4

  • Add TypeDef impls for more string types (PathBuf, Path, CString, CStr, OsString, OsStr).

v0.5.3

  • Fix issue where unsupported serde attributes would panic the derive macro (#10).

v0.5.2

  • Fix that TypeDef impls on references (&'static T, Box<T>, Cow<'static, T>, and PhantomData<T>) didn't work with unsized values.

v0.5.1

  • Fix panic in #[derive(TypeDef)] when a struct or enum variant used an empty field list like {} or ()

v0.5.0

  • (breaking) Change TypeDef impl for serde_json::Value to be more precise. Previously, this was typed as unknown. Now, its type accepts only valid JSON values (null | boolean | number | string | JSONValue[] | { [key: string]: JSONValue; }). This new type is more narrow, so this is a breaking change.
  • (breaking) Add index_signature field to TypeObject for describing object index signatures.
  • Change CI to enable all features

v0.4.1

  • Add TypeDef impl for Result<T, E>
  • Add write_definition_file_from_type_infos for generating definitions from a runtime list of type information

v0.4.0

  • Add TypeDef impls for serde_json types under crate feature json_value
  • Make DefinitionFileOptions::root_namespace optional (breaking change), see docs for warning about using None
  • Add TypeInfo::write_ref_expr for generating code that references types generated by write_definition_file, see docs for usage

v0.3.1

  • Add #[type_def(type_of = "T")] attribute to better support using foreign types, see docs for usage

v0.3.0

  • Breaking changes to TypeInfo to properly support generics

    Support for defining type information for generic Rust types was added in v0.2.2, but the implementation was incorrect. Generic Rust types would have non-generic TypeScript definitions emitted for each specific instance of the type used, all under the same name. Now, exactly one generic type definition is emitted. In order to implement this properly, the TypeInfo type has changed slightly to support generic types. If you've been using the TypeDef derive macro, the changes should not affect you. If you need to implement TypeDef for generic types manually, please refer to the documentation of the DefinedTypeInfo struct for important implementation requirements.

v0.2.3

  • Add changelog
  • Document serde attribute support
  • Support #[serde(default = "default_fn")]

v0.2.2

  • Support generic types in derive macro

v0.2.1

  • Support #[serde(skip)] on fields and variants in derive macro
  • Support #[serde(rename)] on types, fields, and variants in derive macro

v0.2.0

  • Some changes to TypeInfo structure
  • Internal performance improvements

v0.1.1

  • Support multi-line custom header for generated file

v0.1.0

Initial release