Skip to content

Releases: refractproject/minim

0.23.8

12 Jun 15:37
Compare
Choose a tag to compare

Enhancements

  • ArrayElement's contains method has been renamed to includes to be consistent with Array.includes. ArrayElement.contains has been deprecated, and remains for compatibility.

Bug Fixes

  • Prevent throwing an error when calling toValue() on an element with a key value pair which does not have a value.

0.23.7

27 Apr 15:23
Compare
Choose a tag to compare

Bug Fixes

  • Prevents the JSON serializer from serializing an empty object ({}) under meta and attributes under the case where none of the meta or attribute member's have a value. This prevents {} from being present under meta or attributes when setting a member with an undefined key.

0.23.6

11 Sep 13:17
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a JSON 0.6 serialisation bug where httpRequest and similar array-based
    elements with undefined content would be serialised with undefined content
    instead of an empty array as content.

0.23.4

11 Jun 10:28
Compare
Choose a tag to compare

Bug Fixes

  • Fixes serialisation of default values in enumerations in Refract JSON 0.6 serialisation.

0.23.2

11 Jun 10:29
76949b5
Compare
Choose a tag to compare

Enhancements

  • Added support for IE11 in the included web distribution of minim (dist/minim.js).

0.23.1

25 Feb 11:00
Compare
Choose a tag to compare

Bug Fixes

  • Restores documentation coverage for all elements, some was unintentionally removed in 0.23.0.

0.23.0

22 Feb 17:38
Compare
Choose a tag to compare

Breaking

  • Support for Node 4 has been removed. Minim now supports Node >= 6.
  • Minim no longer uses uptown and thus the extend API has been removed.

Enhancements

  • Calling .freeze() on a frozen element is now supported. Previously you may see an error thrown while freeze was trying to attach parents to any child elements.

0.22.0

06 Dec 23:16
54f08e9
Compare
Choose a tag to compare

Enhancements

  • ArrayElement now conforms to parts of the Fantasy
    Land
    3.5 specification.
    Functor, Semigroup, Monoid, Filterable, Chain, and Foldable are
    now supported.

0.21.1

28 Nov 00:54
beeddee
Compare
Choose a tag to compare

Bug Fixes

  • Empty parseResult and link arrays are serialised in JSON 06 Serialiser, a
    regression of 0.21.0 caused these to not be serialised.

0.21.0

15 Nov 21:39
Compare
Choose a tag to compare

Breaking

  • Minim no longer supports importing files directly from the minim package.
    Importing the JSON 0.6 serialiser via
    require('minim/lib/serialisers/json-0.6') is not supported, it is now
    recommended to import JSON06Serialiser and other APIs from minim directly.

    const { JSON06Serialiser } = require('minim');
  • flatMap in ArraySlice no longer removes empty items. Instead flatMap is
    aligned with
    Array.flatMap
    which first maps each element using a mapping function, then flattens the
    result into a new array.

    Existing flatMap behaviour is now available under the method compactMap.

Enhancements

  • Object Element can now be created with an array of member elements.

  • You can now create an element from an ArraySlice or ObjectSlice, for example,
    passing the result of a filter operation into a new element.

    const numbers = new ArrayElement([1, 2, 3, 4])
    new ArrayElement(numbers.filter((e) => e.toValue() % 2))
    
  • Adds compactMap functionality to Array and Object elements allowing you to
    returns an array containing the truthy results of calling the given
    transformation with each element of this sequence.

  • Added flatMap to ArrayElement.

Bug Fixes

  • The default content value of an element is undefined. Whereas before the
    default value was null.

  • Setting the content property on an Element now behaves the same as passing
    content in to the constructor. For example, the following two elements are
    identical:

    new ArrayElement([1])
    
    const element = new ArrayElement()
    element.content = [1]

    Passing [1] to an ArrayElement constructor would produce an array of
    number elements, whereas setting the content to [1] resulted in setting the
    content to be an array of non-elements which is invalid.

  • The serialisation of the variable attribute in the JSON 0.6 serialisation
    is updated to reflect API Elements 1.0. The variable attribute is now
    present on a member element instead of the key of a member element.

  • Empty arrays are no longer serialised in JSON 06 Serialiser.