Skip to content

Releases: danielgtaylor/shorthand

v2.2.0

30 Jan 17:28
v2.2.0
5a46bfa
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.1.1...v2.2.0

v2.1.1

16 Mar 06:20
v2.1.1
94d3e96
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.1.0...v2.1.1

v2.1.0

12 Jan 16:20
v2.1.0
b15ce8a
Compare
Choose a tag to compare

What's Changed

  • feat: bump mexpr to 1.8.0, where clause for maps and fixes by @danielgtaylor in #10

Full Changelog: v2.0.2...v2.1.0

v2.0.2

12 Dec 03:10
v2.0.2
fb93a35
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.1...v2.0.2

v2.0.1

01 Dec 17:03
v2.0.1
ead0386
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.0.1

v2.0.0

22 Nov 19:05
v2.0.0
ce8b53e
Compare
Choose a tag to compare

This is a major rewrite and backward-incompatible change for shorthand v2. See the README for details.

Breaking changes:

The difficult choice to remove some features was made, primarily because after a couple years of use the features were considered confusing by users or saw little to no adoption/usage.

  • Removal of backreferences feature (confusing)
  • Removal of simple scalar arrays shorthand (confusing)
  • Removal of string coercion via ~ (confusing, use quotes instead)
  • Rename shorthand.Get -> shorthand.Marshal (consistency)

New features:

  • Over 20x faster than shorthand v1 🚀
  • Non-map root objects (scalars, arrays, etc)
  • JSON is valid shorthand
  • Binary format support, e.g. CBOR
  • Full-fledged object patching support (inserting, unsetting, swapping, etc)
  • Simple query syntax built-in
  • Great test coverage
  • Fuzz testing
# Comparing new (V2) vs. old (V1)
BenchmarkShorthandV2-12     309817    3825 ns/op    1888 B/op    54 allocs/op
BenchmarkShorthandV1-12      14670   83901 ns/op   36436 B/op   745 allocs/op

What's Changed

Full Changelog: v1.1.0...v2.0.0

v2.0.0-beta2

31 Oct 16:06
v2.0.0-beta2
88f30bd
Compare
Choose a tag to compare
v2.0.0-beta2 Pre-release
Pre-release

What's Changed

Full Changelog: v2.0.0-beta...v2.0.0-beta2

v2.0.0-beta

30 Oct 04:32
v2.0.0-beta
72f98bd
Compare
Choose a tag to compare
v2.0.0-beta Pre-release
Pre-release

This is a major rewrite and backward-incompatible change for shorthand v2. See the README for details.

Breaking changes:

The difficult choice to remove some features was made, primarily because after a couple years of use the features were considered confusing by users or saw little to no adoption/usage.

  • Removal of backreferences feature (confusing)
  • Removal of simple scalar arrays shorthand (confusing)
  • Removal of string coercion via ~ (confusing, use quotes instead)
  • Rename shorthand.Get -> shorthand.Marshal (consistency)

New features:

  • Over 20x faster than shorthand v1 🚀
  • Non-map root objects (scalars, arrays, etc)
  • JSON is valid shorthand
  • Binary format support, e.g. CBOR
  • Full-fledged object patching support (inserting, unsetting, swapping, etc)
  • Simple query syntax built-in
  • Great test coverage
  • Fuzz testing
# Comparing new (V2) vs. old (V1)
BenchmarkShorthandV2-12     309817    3825 ns/op    1888 B/op    54 allocs/op
BenchmarkShorthandV1-12      14670   83901 ns/op   36436 B/op   745 allocs/op

What's Changed

Full Changelog: v1.1.0...v2.0.0-beta

Shorthand v1.1.0

16 Mar 18:07
v1.1.0
49e4bc1
Compare
Choose a tag to compare

Re-release of v1.0.1 to fix accidentally mis-tagged version being permanently cached on sum.golang.org.

Shorthand v1.0.1

12 Mar 20:46
v1.0.1
49e4bc1
Compare
Choose a tag to compare

What's Changed

  • fix: GetInput args now modify stdin rather than overwriting by @danielgtaylor in #3

If the previous buggy behavior is desired, you can unset the stdin input value first, for example given the stdin input:

{
  "foo": [1, 2, 3]
}

Then the shorthand passed on the commandline: foo: null, foo[]: 4, foo[]: 5 the result would be:

{
  "foo": [4, 5]
}

Full Changelog: v1.0.0...v1.0.1