Releases: inversify/InversifyJS
3.1.0
- Added support for
container.rebind
3.0.0
Breaking changes
- The
Kernel
class is now namedContainer
. - The
Kernel
methodgetServiceIdentifierAsString
is not a method ofContainer
you can import it from imversify directly. - The 2.x
PlanAndResolveArgs
interface is nowNextArgs
. - The
PlanAndResolveArgs
signature has been changed. - The resolution logic in 2.0 and 3.0 is slightly different in order to support new features (e.g.
@optional
) and defaults contextual injections. Some contextual constraints may be affected as a result of this change.
New features
- Added support for
isBound
andunbind
in container modules. - Added AMD bundle to the NPM package
- New container method:
getAllNamed
- New container method:
getAllTagged
- New container method:
merge
- New container method:
createChild
- New container method:
isBoundNamed
- New container method:
isBoundTagged
- Added support for
whenTargetIsDefault
- Added support for
@optional
dependencies - Added support for global container options
new Container({ /* options */ })
- Allow to use symbols or numbers as values with
@named
and@tagged
- New Provider features
Non-functional improvements
- Performance has been improved
- Major internal refactor
- Enabled
--strictNullChecks
&--noUnusedLocals
Bug Fixes
- Container.getAll does not return named bindings #405
3.0.0-rc.4
3.0.0-rc.3 went wrong.
3.0.0-rc.3
- Fixes
TypeError: Cannot assign to read only property 'x' of #
errors. - Adds support for
isBound
andunbind
in container modules. - Updated all dependencies.
3.0.0-rc.2
Fixes #442
3.0.0-rc.1
New features
- New container method: getAllNamed
- New container method: getAllTagged
- New container method: Merge
- New container method: createChild
- New container method: isBoundNamed
- New container method: isBoundTagged
- Added support for named defaults
- Added support for optional dependencies
- Added support for global container options
- Allow to use symbols or numbers as names and tags
Non-functional improvements
- Major internal refactor
- Significant Performance improvements
- Enabled
--strictNullChecks
&--noUnusedLocals
- AMD support
Bug fixes
- Container.getAll does not return named bindings
Breaking changes
- The
Provider
signature has been changed. - The
Kernel
class is now namedContainer
. - The
Kernel
methodgetServiceIdentifierAsString
is not a method ofContainer
. - The 2.x
PlanAndResolveArgs
interface is nowNextArgs
. - The
PlanAndResolveArgs
signature has been changed. - The resolution logic in 2.0 and 3.0 is slightly different in order to support new features like
optional dependencies and defaults contextual injections.
Commits
@remojansen Update factory_injection.md 115b6de
@greenkeeperio-bot update gulp-sourcemaps to version 2.0.0 (#387) … 43b9c71
@greenkeeperio-bot [email protected] … 261da22
@remojansen Implements #279 + huge refactoring (#392) … e4d0c59
@remojansen Update environment.md b5f06d5
@remojansen remojansen Implements #393 & #394 (#396) … a359c3b
@remojansen Implements #395 (#398) … c1958b8
@remojansen Rename Kernel as Container (#399) 2806aa9
@goenning [docs] Map is now required (#400) … f429ddc
@kennyjacob Update basic_js_example.md (#401) … bd2ab1b
@kennyjacob Update CONTRIBUTING.md (#402) … d552f03
@tiagomestre TiagoMestre Update ecosystem.md (#406) 209cea3
@remojansen Implements #410 (#416) … 48e8267
@remojansen Update upgrade.md 573a951
@remojansen #408 #419 #405 (#420) … 757340d
@remojansen Update README.md ed10252
@remojansen Implements #421 & refactor enum -> literal types (#424) … 44f5f06
@sanex3339 Allow to use symbols or numbers as names and tags (#427) … a268e4c
@remojansen Working on #193 (#429) … 9f5f1ac
@remojansen Implements #418 (#431) … 9075f67
@remojansen 3.0.0-beta.3 41cb6b4
@remojansen Implements #411 961acc4
@remojansen Implements #417 (#434) … 3b43e41
3.0.0-beta.3
- Enabled non nullable types
- New Provider features
- Allow to use symbols or numbers as names and tags
- isBoundNamed, isBoundTagged
3.0.0-beta.2
3.0.0-beta.1
Breaking changes
Kernel
is nowContainer
getServiceIdentifierAsString
is not a method ofContainer
anymore.PlanAndResolveArgs
is nowNextArgs
in middleware.- Contextual constraints
New features
Non-functional improvements
Notes
All changes can be explored here.
This is a beta release, we are going to do multiple beta releases before releasing 3.0.
My goal is to include:
- Non-nullable types
- Async/await providers (awaiting TypeScript 2.1)
I'm also considering a second refactor in which all the functions in planning and resolution process will become pure. For example, at the moment some functions either return or throw an error. Instead of that, it could be better to always return Either<Error, interfaces.Target[]>
. By doing this, the planner and resolver will become pure (at the moment they are stateless but not pure).
The Container (old Kernel) is the only stateful entity and will be the place in which we throw exceptions. We can also explore not throwing and returning Either<Error, T>
when resolving. This is something that I need to think about and might never happen...