Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-associations

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-associations - npm Package Versions

2

0.6.2

Diff

Changelog

Source

Version 0.6.2 - Diff

  • Introducing collectionOptions - Can be an options hash or a function which returns an options hash. These options will be utilized while instantiating a new collection of type collectionType
  • Allow leaf nodes of the object graph to be simple Backbone.Model(s) as well.
  • Set parents property eagerly, so that it is available in the children initialize at the time of graph creation.
  • Bug fix : Remove references from parents during re-assignment and model destroy operations (Issue #111 & #114)
  • Bug fix : Check for existence (rather than value) for idAttribute (Issue #112)
  • Bug fix : Check for null/undefined v/s legitimate false value scenarios (Issue #137)
  • Bug fix : Checks for maps returning null values (Issue #133)
dhruvaray
published 0.6.1 •

Changelog

Source

Version 0.6.1 - Diff

  • Bug fix : Add underscore as explicit dependency for BB-Associations in the node.js environment.
  • Compatible with Backbone.js v1.1.2.
dhruvaray
published 0.6.0 •

Changelog

Source

Version 0.6.0 - Diff

  • Use v0.6.1 when using Backbone-Associations in node.js environments
  • Significantly improve event bubbling performance. Only bubble events if objects are listening to those event paths.
  • BREAKING CHANGE : nested-change events are not fired by default. To switch them on set Backbone.Associations.EVENTS_NC = true at any point in your application flow.
  • collectionType can be a function as well. This makes the API of relatedModel and collectionType uniform.
  • Added support for specifying global scopes. When relatedModel and collectionType are specified as strings, the global scopes will also be searched for locating the model definition.
  • Additional attribute - scope - can now be specified while defining a relation. Use to it define the scope of relatedModel and collectionType string.
  • Additional attribute - serialize - can now be specified while defining a relation. Use this attribute to set an array of attributes (singleton or subset) which will be serialized to the server end-point.
  • Compatible with Backbone.js v1.1.1.
dhruvaray
published 0.5.5 •

Changelog

Source

Version 0.5.5 - Diff

  • Improve event bubbling performance for large object graphs.
  • Introduces flags to switch off/on events. Set Backbone.Associations.EVENTS_WILDCARD = false to stop throwing wild-char events. Set Backbone.Associations.EVENTS_NC = false to stop throwing nested-change events. Set Backbone.Associations.EVENTS_BUBBLE = false to conditionally stop events from bubbling up. May be useful when constructing complex object (sub) graphs. After construction the value can be set to true. Note that all of these flags can be toggled at any time during the application flow.
  • Introduces isTransient flag to avoid serializing the particular attribute in toJSON().
  • Introduces remoteKey for serializing relations to a different key name. Useful in ROR nested-attributes like scenarios.
dhruvaray
published 0.5.4 •

Changelog

Source

Version 0.5.4 - Diff

  • Supports Backbone v1.1.0
  • Allows for polymorphic models in 1:M relations
  • IE 8 compatibility fix - Issue #77
  • Fix for idAttribute - Issue #80
dhruvaray
published 0.5.3 •

Changelog

Source

Version 0.5.3 - Diff

  • Enhancement (Issue #68) : Allow users to change path separator globally. This will allow attributes with a period('.') in their name.
  • Bug Fix #67 : Preserve object references.
  • Bug Fix #66 : Browserify compatibility.
dhruvaray
published 0.5.2 •

Changelog

Source

Version 0.5.2 - Diff

  • Bug fix : Nested collections re-use references.
  • Bug fix : Propagate user defined options for nested-change events.
  • Bug fix : In a cycle scenario, a call to toJSON inside an event handler would not create the right JSON.
  • Increase error handling so that users will not trip up when they mis-type or enter wrong values during relation defintions.
  • The map function is now called with a specific AssociatedModel instance (as context). It takes in an additional paramter - which specifies the type of the relatedModel or Collection type. Could be useful in scnearios when you want to generalize the map function across relation types. See this recipe.
  • For cycle scenarios, the toJSON method serializes with {id:value} when it detects a cycle. This is a good default. Users can over-ride if necessary. See this recipe.
dhruvaray
published 0.5.1 •

Changelog

Source

Version 0.5.1 - Diff

  • relatedModel can now also be a function. Could be used to model polymorphic associations like in this gist.
  • relatedModel can be passed a special value called Backbone.self to handle self references.
  • Introducing explicit cleanup on Backbone.Model to prevent memory leaks when users set Backbone.Model to undefined explicitly.
  • Fixed the handling of {reset:true} option on Backbone.Collection.
  • Fixed a scenario where repeated fetch on the same Backbone.Model or Backbone.Collection caused event bubbling to stop.
dhruvaray
published 0.5.0 •

Changelog

Source

Version 0.5.0 - Diff

  • Introducing "nested-change" event to allow parents (and higher) to listen to any changes in the hierarchy.
  • Introducing * operator in paths involving collections. Has semantics of any item in the collection.
  • change, add, remove, reset, destroy and sort events are compatible with * operator.
  • Implicit reverse relations.
  • Provision for mapping data before assigning to AssociatedModel attribute.
  • Whether to create or update a nested AssociatedModel (or Backbone Collection) is now dependent on value of the existing idAttribute on the AssociatedModel or Collection.
  • New website with improved help and tutorials.
dhruvaray
published 0.4.2 •

Changelog

Source

Version 0.4.2 - Diff

  • Support for backbone 1.0.0.
2
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc