Releases: ginkgobioworks/curious-js
Releases · ginkgobioworks/curious-js
Add JSON Serialization
Non-breaking changes
- Exposed the
CuriousObject
class to consumers asCuriousObjects.defaultType
- Added object method
toJSON
toCuriousObject
, which allowsJSON.stringify
to correctly
serialize them - Added static method
fromJSON
toCuriousObject
, which allows easier parsing from strings into
CuriousObject instances
New camel-casing features
Non-breaking changes
- Added a
camelCase
flag to theCuriousClient
constructor, which makes the objects constructed from the Curious query have camel-cased properties and relationships, rather than snake-cased ones: i.e.foo_bar
becomesfooBar
. This is a convenience for style and legibility, since most javascript applications use camel-cased property names as well: now, instead of having to think which kind of object you have when referencing a property, you can just treat all objects alike.
Fully working `iron-ajax` wrapper
Bug fixes
Previous attempts to make a wrapper for iron-request
elements were ill-fated: iron-request
elements can only represent a single request. To hold multiple requests, iron-ajax
elements must be used, which generate requests as many times as necessary.
wrappers.ironRequest
has been replaces withwrappers.ironAjax
Minor bug fixes
Bug fixes
- Work around bug in
<iron-request>
docs that does not describe proper serialization ofPOST
request body.
Minor bug fixes
Bug fixes
- Fixed incorrectly named property in
ironRequest
wrapper.
Wrapper improvements
Non-breaking changes
CuriousClient.wrappers.ironReuquest
takes in a Polymeriron-request
element object and
returns an appropriatePOST
request-making function- all of the wrapper functions now take an optional
options
argument to merge
in object sent to the request client, for providing additional,
client-specific options.
Expanded and updated wrapper functions
Breaking Changes
CuriousClient.axios_post
has been renamed toCuriousClient.wrappers.axios
Other changes
- Added
CuriousClient.wrappers.angular
- Wrappers now default to global variables if a module object is not provided.
Initial release of Curious 2
A complete rewriting of the javascript client from version 1:
- create
CuriousQuery
class for structured queries - all classes, methods, and properties are meaningfully-named:
CuriousQ
is now namedCuriousClient
- move to promises-based API rather than callback-based API
- removal of
curious-xhr
in favor of using an existing library, likeaxios
or another http request framework - full suite of unit tests
- conforms to
camelCase
coding convention - JSDoc for all symbols