Inversify v7 migration#1368
Open
notaphplover wants to merge 1 commit intojavascript-obfuscator:masterfrom
Open
Inversify v7 migration#1368notaphplover wants to merge 1 commit intojavascript-obfuscator:masterfrom
notaphplover wants to merge 1 commit intojavascript-obfuscator:masterfrom
Conversation
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.
Member
|
Thank you for your effort. I'll think about what to do with this PR, because though great work has been done, the Pro version on Obfuscator.io, which is a fork of the OSS version, also must be in sync with the OSS version in terms of used library versions. But the Pro version is heavily ahead of the OSS version, so i need to apply the migration to Inversify@7 to all new VM-related classes there as well. So i'll keep the PR open, and most likely merge it somewhere in February. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
interfaces.BindwithContainerModuleLoadOptionsin all container modulesbindparameter tooptionsin ContainerModule callbacksbind()tooptions.bind()whenTargetNamed()withwhenNamed()ContainerModuleLoadOptionsinstead ofinterfacesfrom inversifyinjectFromBasedecorator to all injectable classes that extend from base classesFactory<T, [Args]>andResolutionContextinstead ofinterfaces.Contextinterfaces.ServiceIdentifier<T>withServiceIdentifier<T>context.container.getNamed()tocontext.get()with options object in factory bindingsAll 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.