Skip to content
This repository was archived by the owner on Jun 23, 2019. It is now read-only.

Conversation

@greenkeeper
Copy link
Contributor

@greenkeeper greenkeeper bot commented Nov 15, 2018

The devDependency minim was updated from 0.20.7 to 0.21.0.

This version is not covered by your current version range.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


Release Notes for 0.21.0

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.

Commits

The new version differs by 34 commits.

  • 73170ca chore: Release 0.21.0
  • f7600ec Merge pull request #200 from refractproject/kylef/construct-slice
  • cf339da feat: Support creating elements from slices
  • b1a28e2 Merge pull request #196 from refractproject/kylef/empty-content
  • fa0b204 fix(json-0.6): Don't serialise empty arrays unless specific types
  • 1435637 Merge pull request #198 from refractproject/kylef/mdn-flatMap
  • de4a74e feat: Added flatMap to array element and aligned ArraySlice behaviour
  • 6ba4d8f Merge pull request #175 from abacaphiliac/flatmap
  • dcbed82 Merge pull request #190 from refractproject/kylef/flatMap
  • d164d2c refactor: Rename flatMap to compactMap
  • 87d98c1 feat: Add compactMap to Array and Object element
  • 4792815 Merge pull request #197 from refractproject/kylef/variable
  • 8777631 fix(json-0.6): Fix variable property serialisation
  • ba81dde Merge pull request #194 from refractproject/pksunkara/enum
  • 47e09a2 Merge pull request #195 from refractproject/kylef/set-content

There are 34 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper bot 🌴

@kylef kylef merged commit 958de51 into master Nov 15, 2018
@kylef kylef deleted the greenkeeper/minim-0.21.0 branch November 15, 2018 21:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants