Skip to content

Releases: jpex-js/jpex

v4.3.3

10 May 19:38
Compare
Choose a tag to compare

4.3.3 (2021-05-10)

Bug Fixes

  • accept case sensitive globals (fd80c04)

v4.3.2

10 Apr 13:30
Compare
Choose a tag to compare

4.3.2 (2021-04-10)

Bug Fixes

  • resolve with on multiple dependencies (3995e8b)

v4.3.1

05 Mar 18:35
Compare
Choose a tag to compare

4.3.1 (2021-03-05)

Bug Fixes

  • resolveWith now invalidates the cache (580e875), closes #93
  • transform optional chaining statements (ad3095f)
  • unable to build declaration files (9b2f5bb)
  • unable to build declaration files (5661ad7)

v4.3.0

12 Dec 08:44
Compare
Choose a tag to compare

4.3.0 (2020-12-12)

Bug Fixes

Features

  • resolve class services by interface (8b9e605)

v4.2.0

11 Dec 20:17
Compare
Choose a tag to compare

4.2.0 (2020-12-11)

Features

v4.1.0

09 Oct 10:37
Compare
Choose a tag to compare

4.1.0 (2020-10-09)

Features

  • nodemodule and global types (757c8dd), closes #90

v4.0.0

25 Sep 14:51
Compare
Choose a tag to compare

4.0.0 (2020-09-25)

Bug Fixes

  • class services with constructors failed to build (103890a), closes #87

Code Refactoring

  • removed $options functionality (e357aaa), closes #80
  • stop parsing functions to extract dependencies (14db702), closes #77

Features

BREAKING CHANGES

  • an es5-specific build is included in the dist
  • any $options code will no longer work
  • will now need to explicitly delcare dependencies or use TS inference

2.1.0

08 Apr 18:02
Compare
Choose a tag to compare
  • if an option in the properties config is null, jpex will no longer throw an error
  • Passing $options into a Jpex as a Service service now works
  • Jpex.register.service().bindToInstance() allows you to bind dependencies to a service instance
  • Jpex.$encase method allows you to wrap a function with a number of dependencies

2.0.0

25 Mar 18:37
Compare
Choose a tag to compare

2.0.0

Features

  • Can now pass in a config option when extending a class. Any properties of the config option will be used as default values for that class and its descendants.
  • The default lifecycle for factories registered against a class can now be configured using the defaultLifecycle option.
  • Methods option has been added (which replaces the prototype option from v1).
  • Properties option has been added, allowing you to predefine getters, setters, and watchers on any instance properties.
  • the bindToInstance option can now accept a nested property name, i.e. bindToInstance : 'foo.bah'
  • Node-specific code has been isolated so the core jpex module can be included in any webpack/browserify build. (see depcrecation of jpex-web below)
  • Added a pre-compiled build of Jpex at jpex/dist/jpex.js and jpex/dist/jpex.min.js
  • Default factories ($timeout, $promise, etc.) have been separated from the core module. They now must be installed separately from the jpex-defaults, jpex-node, and jpex-web packages.
  • The $resolve method is now available as a static method on every class, so dependencies can be resolved with Class.$resolve(name). This allows for Jpex to be used as a container rather than forcing the class instantiation pattern.
  • $resolve can be called with an array of dependencies to resolve instead of just one.
  • Cached factories (i.e. with a class or application lifecycle) can be cleared with Class.$clearCache().
  • Added decorators that allow a factory to be altered before being resolved. Can be registered like normal factories i.e. Class.register.decorator(name, fn)
  • A complete plugin API has been created that allows plugins to hook into a number of lifecycle events.

Breaking Changes

  • The prototype option has been replaced with methods
  • The jpex-web version of Jpex has been deprecated. Instead, Jpex can be required'd with webpack/browserify, or a web-safe js file can be found at jpex/dist/jpex.js/
  • Internal variables have been renamed. e.g. Class._factories is now Class.$$factories.
  • Default factories ($timeout, $promise, etc.) have been separated from the core module. They now must be installed separately from the jpex-defaults, jpex-node, and jpex-web packages.
  • After deprecating its use in v1.3.0, the singleton option has been removed from factory registration. Class.register.factory(name, fn, true/false) should now be written as Class.register.factory(name, fn).lifecycle.application()
  • Following depcrecation in v1.4.0, the static methods Typeof and Copy have been removed.
  • Factory registration methods have been renamed to camelCase: Jpex.Register.Factory becomes Jpex.register.factory, for example.
  • Interfaces have been completely removed from the module. This was an experimental feature that in the end was more overhead than it was worth.
  • A number of spurious factory types have been removed: enum, errorType, file, folder, interface, nodeModule - although the nodeModule factory type is still available via the jpex-node package as Class.register.node_module.
  • Ancestoral dependencies have been removed so depending on ["^someParentFactory"] will no longer work. The equivalent can now be achieved with decorators.

1.4.1

11 Feb 12:02
Compare
Choose a tag to compare

Bugs

  • $copy.extend no longer combines arrays, but instead replaces the previous array value.
  • $timeout $immediate $interval $tick bug fixed when attaching to a class instance.
  • Added a clear() method to the timer factories that clear the respective timeouts.