Skip to content

Latest commit

 

History

History
211 lines (146 loc) · 8.39 KB

CHANGELOG.md

File metadata and controls

211 lines (146 loc) · 8.39 KB

4.2.0

  • Publish ES2015 code in the ESM bundle rather than compiling down to ES5. This should not be a breaking change since builds would need to be ES2015-compatible to understand import/export statements already, but publishing as a minor version to be safe.

4.1.1

  • Fix bug where connect threw errors when wrapping arrow function components.

4.1.0

  • Fix bug where useStoreDependency could return stale data, prevent expensive derefs from being called multiple times.

4.0.7

  • Revert connect to a class component to let React handle diffing the internal state

4.0.6

  • Attempt another equality fix for infinite re-render cases

4.0.5

  • Implement deeper equality check and test suite for array-based dependencies.

4.0.4

  • Fix dependency map values not being passed as second argument to deref when using connect.

4.0.3

  • Fix missing falsy check in new shallowCompare function

4.0.2

  • Fixed a regression in the 4.x release channel that would cause connected components with dependencies returning plain JS arrays (Immutable.js Lists were unaffected) to create an infinite update loop. (#88)

4.0.1

  • Publish useful TS and Flow types. Previously the TS types weren't very useful - all output was typed as any. Now, General Store can follow and infer types from your dependencies all the way through to their output, either as props or in hooks, and properly type their return values!
  • connect is now a thin wrapper around useStoreDependency and was rewritten as a functional component. This allowed us to reduce bundle size by nearly 50% while also increasing the runtime performance of connect. This also implicitly removes all usages of unsafe React lifecycles, ensuring forward compatibility and safety within concurrent mode.
  • connect now has forwardRef support, so passing a ref to a connected component properly passes the ref onto the inner component. Functional components can now be connected with forwardRef with more predictable behavior. This is potentially a breaking change.
  • The library's entry module is now an ESModule rather than a CommonJS module to enable better treeshaking. This is potentially a breaking change.

3.2.2

  • Fix significant performance bottleneck in shallowCompare (#84 / #86)

3.2.1

  • Fix shallowCompare function when one or both inputs is falsy.

3.2.0

  • Fix potential infinite loop with Immutable dependency values (#74)

3.1.0

  • Use UNSAFE_ prefix for componentWillMount, componentWillReceiveProps usages in connect HOC.

3.0.1

  • Externalize hoist-non-react-statics from CJS and ESM bundles.

3.0.0

  • Removes the following APIs
    • StoreDependencyMixin
    • connectWithState
  • Adds a useStoreDependency hook for use with react@^16.8.0.
  • prop-types added as a peer dependency as it has been removed from the main React package
  • Migrated from Flow to TypeScript

2.5.1

2.5.0

  • Stores created with GeneralStore.define() support defineName

2.4.1

  • Fixes the function as the latest version of the extension uses unsubscribe instead of disconnect.

2.4.0

2.3.2

  • fixes the name that developer tools show for wrapped components that don't have displayName attributes (eg Connected(undefined) is now Connected(BaseComponent))

2.3.1

  • connectWithState no longer exports invalid propTypes

2.3.0

  • connectWithState wraps a normal connect in a state container to fill the StoreDependencyMixin use case #55

2.2.3

  • connect adds a focus method that calls through to BaseComponent.focus

2.2.2

  • connect adds a static dependencies field to the connected component
  • connect adds a static WrappedComponent field mirroring react-redux

2.2.1

  • Fix a potential bug in connect/StoreDependencyMixin that could cause an exeption in componentWillUnmount

2.2.0

  • Component generated by connect inherits propTypes unrelated to the store dependencies from the BaseComponent

2.1.1

  • exports connectCallback from the index module

2.1.0

  • adds InspectStore.isStore
  • adds connectCallback for subscribing to dependencies outside of React
  • consolidate some invariant checks into shared functions

2.0.0

  • adds StoreFactory#defineName
  • adds Store#toString
  • adds GeneralStore.InspectStore for examining internal state of a store
  • removes Store#getActionTypes
  • removes Store#getDispatcher
  • removes Store#getDispatchToken
  • removes Store#getFactory
  • removes Store#getID

1.4.0

  • defineGetInitialState allows redefinition for your testing convenience

1.3.0

  • connect transfers static properties/methods from the BaseComponent to the ConnectedComponent

1.2.3

  • upgrade to flow-bin@0.28.0 and accompanying type fixes

1.2.2

  • FIX: resolves a bug in StoreDependencyMixin where state wasn't passed through in componentWillReceiveProps #46

1.2.1

  • FIX: throw if more than one StoreDependencyMixin is detected on a component #45

1.2.0

  • FIX: make sure connect is actually exported!

1.1.0

  • FIX: throw if no dispatcher is specified
  • BUILD: rearrange the dist/lib folders to match other HubSpot projects

1.0.0

  • FIX: #26 by making each dependency a dispatch handler
  • NEW: higher order component decorator for store dependencies
  • PERF: optimizes derefs according to the arity of the deref function
  • PERF: optimizes updates by only recalculating if the actionType affects them
  • REMOVE: internal "shouldComponentUpdate" type filters
  • REMOVE: support for multiple StoreDependencyMixins in the same component

0.5.1 (June 1st, 2016)

  • NEW: support flux standard actions #43

0.5.0 (April 28th, 2016)

  • NEW: compound fields can specify propTypes

0.4.0 (September 22nd, 2015)

  • NEW: GeneralStore.defineFactory() allows for more composable/testable stores
  • added StoreFactory
  • StoreDefinition -> StoreSingleton
  • StoreSingleton is based on StoreFactory
  • StoreFacade -> Store
  • dependency updates (flow 0.16)

0.3.2 (September 4th, 2015)

  • fix "define" function conflict with ES6 modules and GeneralStore.define

0.3.1 (August 28th, 2015)

  • disable the eslint "indent" rule because its breaking the build

0.3.0 (August 28th, 2015)

  • immutable-is: pull in a copy of Immutable.is() instead of trying to sideload immutable itself
  • transpile with babel
  • build with webpack

0.2.2 (April 7th, 2015)

  • Dont throw from DispatcherInstance.get() (still throws from StoreFacade.register())

0.2.1 (March 21st, 2015)

  • remove a duplicate argument name breaks babel

0.2.0 (March 6th, 2015)

  • BREAKING (for non-FB-disapatcher users): adds calls to dispatcher.waitFor() and dispatcher.isDispatching()
  • BREAKING: deref no longer receives a default object for state if the actual state is falsey
  • dedups setState for fields with dependencies on multiple stores
  • dedups setState across mixin instances
  • dedups setState for stores with common action responses

0.1.2 (February 23th, 2015)

  • StoreDependencyMixin: fix a bug when using multiple mixins on one component

0.1.1 (February 15th, 2015)

  • StoreDependencyMixin: update fields based on props in componentWillReceiveProps
  • StoreDependencyMixin: update fields based on state in componentWillUpdate and be sure to merge with nextState

0.1.0 (February 12th, 2015)

Breaking Changes

  • compound fields: the store property is now stores and requires an Array<StoreFacade>
  • compound fields: the deref property is required
  • compound fields: the deref function now receives an Array<StoreFacade> as its thrid argument instead of a single StoreFacade
  • invariant exceptions are thrown in the production build

Other Changes

  • more verbose errors with helpful links
  • strip verbose errors in the production build
  • allow succint registering of one response to multiple actions

0.0.3 (February 3rd, 2015)

  • first usable alpha