New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jpex

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jpex - npm Package Versions

1345

4.0.0

Diff

Changelog

Source

4.0.0

  • global dependencies such as Window and Document are now automatically resolved (unless you register your own dependency of the same name)
  • you can now control dependency resolution with config flags nodeModules and globals
  • you can also specify whether dependencies should be optional-by-default with an optional flag
  • dependencies are no longer determined by reading the factory function. Either use TS inference, or explicitly pass an array of deps
  • changed format of .factory .service and .resolve
  • you can now pass an opts parameter when registering a factory i.e. .factory<A>(fn, { lifecycle: 'none' })
  • you can now pass an opts parameter when resolving i.e. .resolve<A>({ optional: true })
  • resolveWith now has a nicer syntax for ts inference: .resolveWith<Foo, Dep1, Dep2>([ 'val1', 'val2' ]). The original syntax i.e. .resolveWith({ dep1: 'val1' }) is still valid.
  • removed the built-in dependency $options. You can no longer do .resolve({ foo: 'someValue' })
  • removed the built-in dependency $resolve
  • precedence option lets you determine if a factory should overwrite an existing factory or not
  • Support for IE11 has been dropped by default. If you want a fully ES5-compatible version, you can import jpex/dist/es5.js
  • You can now alias 2 types i.e. jpex.alias<From, To>()
Breaking Changes
  • if you attempt to resolve a global like Window without registering it first, rather than throw an error, you will now get the global variable
  • You can no longer do jpex.factory('foo', (depA, depB) => { ... }) as we no longer parse the function and extract the dependencies.
  • rather than calling .factory<A>(fn).lifecycle.application() you must now do .factory<A>(fn, { lifecycle: 'application' })
  • clearCache now takes an arity of names, i.e. clearCache('a', 'b', 'c') whereas previous it took an array
  • you can no longer mix ts and js modes i.e. you cannot do .factory<A>([ 'b' ], fn)
  • Lifecycle is now a type rather than an enum
  • wrapping a name in __ will no longer make it optional, you must explicitly pass the optional flag
  • $options and $resolve functionality have been removed
  • If you want to support IE11 you will need to import jpex/dist/es5.js or create an alias for it
jackmellis
published 3.5.1 •

Changelog

Source

3.5.1

  • building with webpack was giving warnings about require being used which meant it couldn't make optimizations
jackmellis
published 3.5.0 •

Changelog

Source

3.5.0

  • add some deprecation warnings for pre-4.0.0 changes
jackmellis
published 3.4.0 •

Changelog

Source

3.4.0

  • clearCache now supports type inference
  • you can now pass publicPath: true and it will use the name property of your app's package.json as the public path
  • built in deps $options $namedParameters and $resolve now have corresponding type exports Options NamedParameters and Resolve
jackmellis
published 3.3.3 •

Changelog

Source

3.3.3

  • array dependencies were being incorrectly flattened
jackmellis
published 3.3.2 •

jackmellis
published 3.3.1 •

Changelog

Source

3.3.1

  • publicPath relative imports was checking the incorrect path property
jackmellis
published 3.3.0 •

Changelog

Source

3.3.0

  • add jpex.extend option: inherit (defaults to true). Determines if the extended container should inherit factories
jackmellis
published 3.2.3 •

Changelog

Source

3.2.3

  • publicPath should be operate on relative . imports
jackmellis
published 3.2.2 •

Changelog

Source

3.2.2

  • publicPath option was not working correctly for complex relative imports
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