bellboy v4.0.0 Release Notes

Release Date: 2020-10-24 // about 1 year ago
  • ๐Ÿ’ฅ BREAKING CHANGES

    jsonPath is now RegExp

    jsonPath in JSON processor and HTTP processor is now a RegExp and if not specified, a root array will be streamed.

    โœ… Internally when JSON is streamed, current path is joined together using . as separator and then tested against provided regular expression. As an example, if you have this JSON object:

    { "animals": { "dogs": ["pug", "bulldog", "poodle"] } }
    

    And want to stream dogs array, path you will need to use is /animals.dogs.(\d+)/.
    (\d+) is used here because each index of the array is a number.

    nextRequest doesn't have header anymore

    ๐Ÿšš In HTTP processor header parameter was removed for nextRequest function.


Previous changes from v3.0.0

    • DelimiterProcessor now has hasHeader, qualifier, delimiter, rowSeparator options.

    ๐Ÿ’ฅ BREAKING CHANGES

    • delimiter option renamed to rowSeparator.
    • DelimitedProcessor now emits an object instead of string:

    Before:

    "Hello, world!"
    

    After:

    {header: [],arr: ["Hello, world!"],obj: undefined,row: "Hello, world!"}