Skip to content

Releases: andrejewski/tagmeme

Tagmeme used Harden

14 Oct 23:53
Compare
Choose a tag to compare

This release was all about making sure Tagmeme is robust to Object.prototype nonsense and empty strings. See PR #19 for more details.

Enter safeUnion and Union.matcher

03 Oct 06:38
Compare
Choose a tag to compare

See #17 for the inspiration for safeUnion and see #18 for an explanation for both safeUnion and Union.matcher. The README has also gotten an update with a documentation table of contents, an about section, and way more code examples.

Data-oriented

29 Sep 17:20
Compare
Choose a tag to compare

See issue #14 for the ramblings, see #15 for the changes.

The new feature is the Union.matches method:

const Msg = union(['Foo'])
Msg.matches(Msg.Foo(), Msg.Foo) // true

Also, the struct for message types is locked down and can now be relied upon:

interface UnionType {
  type: string,
  data: any
}

Publish ES5

28 May 03:42
Compare
Choose a tag to compare

Tagmeme is now published as a ES5 package so build tools work better.

See PR #11 for details.

Hard Break: Practically

08 Jan 01:01
Compare
Choose a tag to compare

Good thing this is 0.x, because this is a huge rewrite. Now only namedUnion and namedMatch are available, now called union and match. See #8 for details.

import {union} from 'tagmeme'

const Result = union(['Ok', 'Err'])

const good = Result.match(Result.Ok(8), {
  Ok: () => "Yes",
  Err: () => "No"
})

Invariable Errors

11 Nov 17:31
Compare
Choose a tag to compare

This release:

  • Introduces invariant for better stack traces to show you more closely where your error is within Tagmeme.
  • Fixes some incorrect error messages, and now prints the named of missing tags if you don't have a catch-all.

Experiment: namedUnion

29 Sep 00:44
Compare
Choose a tag to compare

This release adds tag.namedUnion, a little helper to cut down on some potential repetition in defined large tag unions. This release also includes more and better errors.

Clear errors

07 Sep 02:14
Compare
Choose a tag to compare

This patch fixes a misleading error message and also adds more testing around which error is thrown for particular cases.

Proving Travis

06 Aug 18:29
Compare
Choose a tag to compare

This patch release makes sure I setup Travis publishing correctly.