Skip to content

Conversation

@notaphplover
Copy link

Migrate the dependency injection framework from Inversify v6 to v7. This is a breaking change in the Inversify API that requires updates throughout the codebase.

Key changes:

  • Update inversify dependency from 6.1.4 to 7.11.0
  • Replace interfaces.Bind with ContainerModuleLoadOptions in all container modules
  • Change bind parameter to options in ContainerModule callbacks
  • Update method calls from bind() to options.bind()
  • Replace whenTargetNamed() with whenNamed()
  • Import ContainerModuleLoadOptions instead of interfaces from inversify
  • Add injectFromBase decorator to all injectable classes that extend from base classes
  • Update factory types to use Factory<T, [Args]> and ResolutionContext instead of interfaces.Context
  • Replace interfaces.ServiceIdentifier<T> with ServiceIdentifier<T>
  • Update context.container.getNamed() to context.get() with options object in factory bindings

All container modules, custom code helpers, custom nodes, generators, node transformers, and storage classes have been updated to be compatible with the new Inversify v7 API.

Migrate the dependency injection framework from Inversify v6 to v7.
This is a breaking change in the Inversify API that requires updates
throughout the codebase.

Key changes:

- Update inversify dependency from 6.1.4 to 7.11.0
- Replace `interfaces.Bind` with `ContainerModuleLoadOptions` in all
  container modules
- Change `bind` parameter to `options` in ContainerModule callbacks
- Update method calls from `bind()` to `options.bind()`
- Replace `whenTargetNamed()` with `whenNamed()`
- Import `ContainerModuleLoadOptions` instead of `interfaces` from inversify
- Add `injectFromBase` decorator to all injectable classes that extend
  from base classes
- Update factory types to use `Factory<T, [Args]>` and `ResolutionContext`
  instead of `interfaces.Context`
- Replace `interfaces.ServiceIdentifier<T>` with `ServiceIdentifier<T>`
- Update `context.container.getNamed()` to `context.get()` with options
  object in factory bindings

All container modules, custom code helpers, custom nodes, generators,
node transformers, and storage classes have been updated to be
compatible with the new Inversify v7 API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant