Skip to content

Releases: coder/guts

v1.6.1

16 Oct 19:22
3be15ad

Choose a tag to compare

What's Changed

  • feat: go docs to be formatted as JSDocs by @Emyrk in #61

Full Changelog: v1.6.0...v1.6.1

v1.6.0

16 Oct 16:31
3f5ec56

Choose a tag to compare

!! Breaking Change !!

  • !feat: handle base type any case by @Emyrk in #56

type <Name> any previously did not generate an output. It now does.
This is because any == interface{}, and this type generator intentionally does not generate interfaces. In Golang however, interface{} is equivalent to the any type in typescript. So this change includes empty interfaces in the output.

If your output has additional types that you do not expect, please file an issue. Or exclude the types programatically.

What's Changed

  • feat: ignore non-exported identifiers by @toqueteos in #38
  • feat: add GoParser.ExcludeCustom method by @toqueteos in #39
  • chore: prevent null in heritage extends expressions by @Emyrk in #41
  • feat: introduce MutationFunc type by @toqueteos in #43
  • feat: avoid generating repeated type constraints by @toqueteos in #42
  • feat: add InterfaceToType mutation to convert interfaces to type aliases by @stavros-k in #52
  • !feat: handle base type any case by @Emyrk in #56
  • fix: do not generate a type for interfaces by @Emyrk in #58
  • chore: support attaching arbitrary comments to types by @Emyrk in #57
  • feat: preserve comments from golang -> typescript by @Emyrk in #59

New Contributors

Full Changelog: v1.5.1...v1.6.0

v1.5.1

14 Jul 16:27
9010ce7

Choose a tag to compare

What's Changed

  • feat: enums using alias types by @Emyrk in #31
  • fix: handle consts with references to external types by @Emyrk in #35

Full Changelog: v1.5.0...v1.5.1

v1.5.0

15 May 16:18
7134537

Choose a tag to compare

What's Changed

  • feat: add support for omitzero tag by @elcih17 in #27
  • chore: rename SimplifyOmitEmpty to SimplifyOptional by @Emyrk in #28 (suggested by @elcih17)
  • feat: support non-legal identifiers in field property names by @Emyrk in #29

New Contributors

Full Changelog: v1.4.0...v1.5.0

v1.4.0

13 May 16:56
437443f

Choose a tag to compare

What's Changed

Full Changelog: v1.3.0...v1.4.0

v1.3.0

28 Apr 16:35
2cbbcee

Choose a tag to compare

!! Breaking Change !!

  • !feat: use first class typescript enums by @Emyrk in #20

Enum output changed from:

export type EnumString = "bar" | "baz" | "foo" | "qux";

to

export enum EnumString {
    EnumBar = "bar",
    EnumBaz = "baz",
    EnumFoo = "foo",
    EnumQux = "qux"
}

To get the previous behavior use the mutation config.EnumAsTypes.

        // use alias types for enums
	ts.ApplyMutations(
		config.EnumAsTypes,
	)

Full Changelog: v1.2.0...v1.3.0

v1.2.0

16 Apr 21:01
a8b3dee

Choose a tag to compare

!! Breaking Change !!

  • feat: golang map types unioned with possible 'null' by @Emyrk in #18
type Example map[string]string
type Example = Record<string,string> | null

To get the previous behavior, where the output is just Record<string,string>, use the mutation config.NotNullMaps. This will revert this change for the output.

This was added to be more accurate to the truth, that golang map types can return a null json value.

What's Changed

  • feat: Added basic tuple support 8032d06
type Numbers [3]int
type Numbers = [ number, number, number ];

Full Changelog: v1.1.0...v1.2.0

v1.1.0

13 Mar 00:24
e428755

Choose a tag to compare

Changelog

  • Update go to 1.23
  • Supports generics defined in aliases
type AliasGeneric[A any] = BasicGeneric[A]

v1.0.1

29 Jan 03:01
7fa0e8e

Choose a tag to compare

Changelog

  • cffad1b Added support for unnamed type constraints.
type UnionConstraint[T string | int64] struct {
	Value T
}
export interface UnionConstraint<T extends string | number> {
    readonly Value: T;
}

Initial Release

30 Dec 15:08
3805ba1

Choose a tag to compare

Stable initial release of guts. Intended to be used as a library.