Skip to content

Latest commit

 

History

History
209 lines (167 loc) · 10.2 KB

CHANGELOG.md

File metadata and controls

209 lines (167 loc) · 10.2 KB

2.0.0

Breaking Changes

  • Renamed Serializer.serializeValue to Serializer.serializeData and added new Serializer.serializeObject method. - #149 (@andrey-abramow)

1.2.3

Bug Fixes

  • Apply custom serialization attributes before doing full serialization - #148 (@envek)

1.2.2

Bug Fixes

  • Add support for adding custom attributes when serializing arrays - #143 (@shuhei)
  • Force constructor to unwrap as an object - #134 (@tuvistavie)

1.2.1

Bug Fixes

  • Call beforeResponse interceptor only once - #139 (@shuhei)

1.2.0

Bug Fixes

Features

  • Added unsnappedChanges() function to snapshots mixin to check whether or not there have been any changes since the last snapshot was taken. - #125 (@StevenClontz)
  • Added skipRequestProcessing override configuration option to $http, $post, $put, $patch to bypass request processing (root wrapping, serialization) and request interceptor chains - #123 (@mayhewluke)

1.1.0

Bug Fixes

Features

  • Added idAttribute configuration option to allow customizing the unique id field on resources. - #114 (@inlineblock)
  • Added get instance method to refresh resources from the server. - #115 (@wwilkins)

1.0.1

Bug Fixes

  • response.originalData was not being saved off before the root unwrapping so it didn't match the original response data as intended. @Ditchou

1.0.0

Deprecations

  • requestTransformers, responseInterceptors, afterResponseInterceptors have been replaced with a single interceptors chain.
  • beforeRequest - Use interceptBeforeRequestWrapping
  • beforeResponse - Use interceptResponse
  • afterResponse - Use interceptAfterResponse

Bug Fixes

Features

  • Added configure function to allow changing configuration options after the resource has been initially configured.
  • Separated out RailsResource into separate service to allow subclassing without using the factories.
  • Added mixin capability, see README for details
  • Added snapshot and rollback extension, see README for details.
  • Added underscoreParams configuration option to allow turning off parameter underscore renaming.
  • Added fullResponse configuration option to allow returning the full $http response for promise resolution.
  • Added optional query params to class and instance $delete methods

Breaking Changes

  • railsResourceFactoryProvider settings have been moved to RailsResourceProvider
  • wrapData config option has been renamed rootWrapping
  • All resource settings are now stored under the config property on the resource and should be modified using the configure function.
  • The following resource settings have been renamed:
    • enableRootWrapping was renamed rootWrapping
    • rootName was renamed name
    • rootPluralName was renamed pluralName
  • Query parameters were not underscored previously. We are now underscoring parameters by default. The configuration option underscoreParams can be set to false to disable the renaming.
  • Replaced railsRootWrappingTransformer and railsRootWrappingInterceptor with railsRootWrapper that has wrap & unwrap methods. This eliminates the need for using promises during resource construction to handle unwrapping data passed into the constructor.
  • Resource constructor no longer executes response interceptors. If you need to customize the constructor you should look at using subclassing instead.
  • processResponse, transformData, callInterceptors have all been removed as part of rewriting the request / response handling.

1.0.0-pre.4

Deprecations

  • requestTransformers, responseInterceptors, afterResponseInterceptors have been replaced with a single interceptors chain.
  • beforeRequest - Use interceptBeforeRequestWrapping
  • beforeResponse - Use interceptResponse
  • afterResponse - Use interceptAfterResponse

Features

  • Added fullResponse configuration option to allow returning the full $http response for promise resolution.
  • Added optional query params to class and instance $delete methods

Breaking Changes

  • Replaced railsRootWrappingTransformer and railsRootWrappingInterceptor with railsRootWrapper that has wrap & unwrap methods. This eliminates the need for using promises during resource construction to handle unwrapping data passed into the constructor.
  • Resource constructor no longer executes response interceptors. If you need to customize the constructor you should look at using subclassing instead.
  • processResponse, transformData, callInterceptors have all been removed as part of rewriting the request / response handling.

1.0.0-pre.3

Features

  • Added mixin capability, see README for details
  • Added snapshot and rollback extension, see README for details.
  • Added underscoreParams configuration option to allow turning off parameter underscore renaming.

Breaking Changes

  • Query parameters were not underscored previously. We are now underscoring parameters by default. The configuration option underscoreParams can be set to false to disable the renaming.

1.0.0-pre.2

Bug Fixes

  • Support submitting array data (#85)

1.0.0-pre.1

Bug Fixes

Features

  • Added configure function to allow changing configuration options after the resource has been initially configured.
  • Separated out RailsResource into separate service to allow subclassing without using the factories.

Breaking Changes

  • railsResourceFactoryProvider settings have been moved to RailsResourceProvider
  • wrapData config option has been renamed rootWrapping
  • All resource settings are now stored under the config property on the resource and should be modified using the configure function.
  • The following resource settings have been renamed:
    • enableRootWrapping was renamed rootWrapping
    • rootName was renamed name
    • rootPluralName was renamed pluralName
  • Query parameters were not underscored previously. We are now underscoring parameters by default. The configuration option underscoreParams can be set to false to disable the renaming.
  • Replaced railsRootWrappingTransformer and railsRootWrappingInterceptor with railsRootWrapper that has wrap & unwrap methods. This eliminates the need for using promises during resource construction to handle unwrapping data passed into the constructor.
  • Resource constructor no longer executes response interceptors. If you need to customize the constructor you should look at using subclassing instead.
  • processResponse, transformData, callInterceptors have all been removed as part of rewriting the request / response handling.

0.2.5

Bug Fixes

  • Support submitting array data (#85)

0.2.4

Bug Fixes

  • Fix mapped name behavior when using serializer default exclusion (#81)

0.2.3

Bug Fixes

  • Issue #67 incorrect date deserialization led to errors constructing a new resource with a property that was type Date

0.2.2

Bug Fixes

Features

  • Added updateMethod configuration option to railsResourceFactory to specify what HTTP method should be used to perform the update action
  • Exposed default configuration options for both railsResourceFactory and railsSerializer as provider configuration options.

0.2.1

Bug Fixes

Features

  • Added context property to before response interceptors to have access to the calling resource instance in the case of create/update/delete.
  • Added after response interceptors to be able to define custom callbacks that execute on all resources after method completion.

0.2.0

Breaking Changes

  • Removed default transformers and interceptors
    • railsFieldRenamingTransformer and railsFieldRenamingInterceptor have been removed completely and replaced by the serializers
    • railsRootWrappingTransformer/Interceptor are no longer configured by the transformers/interceptors configuration option and is instead configured by the wrapData option.
  • Interceptors added using beforeRequest are run before any deserialization so the fields names have not been camelized.

Bug Fixes

Features

  • Added serializers to replace old field renaming logic and to give users a lot more flexibility in customizing the (de)serialization process
  • Added rootWrapping configuration option to be able to turn off root wrapping instead
  • Added path option to $url methods to make it easier to construct a nested url.

0.1.7

Bug Fixes

Features

  • New save instance method added to resources

0.1.6

Bug Fixes

Features

  • Added beforeRequest and beforeResponse methods that wrap a given function as a transformer/interceptor to more easily add customizations

0.1.5

Bug Fixes

Features

  • Added setUrl method to allow reconfiguring a resource's url after creation
  • Added $url instance method to more easily reference the instance's URL
  • Added instance and class methods for generic HTTP operations of $get, $post, $put, $delete