@inversifyjs/core 10.0.0-beta.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/lib/binding/models/BindingType.d.ts +1 -1
  2. package/lib/binding/models/BindingType.d.ts.map +1 -1
  3. package/lib/binding/models/BindingType.js +0 -1
  4. package/lib/binding/models/BindingType.js.map +1 -1
  5. package/package.json +12 -12
  6. package/AGENTS.md +0 -140
  7. package/CHANGELOG.md +0 -460
  8. package/lib/binding/actions/getBindingId.spec.d.ts +0 -2
  9. package/lib/binding/calculations/buildInstanceBinding.spec.d.ts +0 -2
  10. package/lib/binding/calculations/cloneBinding.spec.d.ts +0 -2
  11. package/lib/binding/calculations/cloneBindingCache.spec.d.ts +0 -2
  12. package/lib/binding/calculations/cloneConstantValueBinding.spec.d.ts +0 -2
  13. package/lib/binding/calculations/cloneDynamicValueBinding.spec.d.ts +0 -2
  14. package/lib/binding/calculations/cloneFactoryBinding.spec.d.ts +0 -2
  15. package/lib/binding/calculations/cloneInstanceBinding.spec.d.ts +0 -2
  16. package/lib/binding/calculations/cloneResolvedValueBinding.spec.d.ts +0 -2
  17. package/lib/binding/calculations/cloneServiceRedirectionBinding.spec.d.ts +0 -2
  18. package/lib/binding/calculations/isScopedBinding.spec.d.ts +0 -2
  19. package/lib/binding/calculations/stringifyBinding.spec.d.ts +0 -2
  20. package/lib/binding/models/BindingConstraintsImplementation.spec.d.ts +0 -2
  21. package/lib/binding/services/ActivationsService.spec.d.ts +0 -2
  22. package/lib/binding/services/BindingService.spec.d.ts +0 -2
  23. package/lib/binding/services/DeactivationsService.spec.d.ts +0 -2
  24. package/lib/common/calculations/chain.spec.d.ts +0 -2
  25. package/lib/common/calculations/getSelf.spec.d.ts +0 -2
  26. package/lib/common/models/OneToManyMapStar.spec.d.ts +0 -2
  27. package/lib/common/models/SingleImmutableLinkedList.spec.d.ts +0 -2
  28. package/lib/common/models/WeakList.int.spec.d.ts +0 -2
  29. package/lib/decorator/actions/decorate.spec.d.ts +0 -2
  30. package/lib/decorator/calculations/getDecoratorInfo.spec.d.ts +0 -2
  31. package/lib/decorator/calculations/stringifyDecoratorInfo.spec.d.ts +0 -2
  32. package/lib/error/calculations/isStackOverflowError.spec.d.ts +0 -2
  33. package/lib/issues/classMetadataKindIsARuntimeDiscriminator.int.spec.d.ts +0 -2
  34. package/lib/metadata/actions/decrementPendingClassMetadataCount.spec.d.ts +0 -2
  35. package/lib/metadata/actions/incrementPendingClassMetadataCount.spec.d.ts +0 -2
  36. package/lib/metadata/actions/setIsInjectableFlag.spec.d.ts +0 -2
  37. package/lib/metadata/actions/updateClassMetadataWithTypescriptParameterTypes.spec.d.ts +0 -2
  38. package/lib/metadata/actions/updateMaybeClassMetadataConstructorArgument.spec.d.ts +0 -2
  39. package/lib/metadata/actions/updateMaybeClassMetadataPostConstructor.spec.d.ts +0 -2
  40. package/lib/metadata/actions/updateMaybeClassMetadataPreDestroy.spec.d.ts +0 -2
  41. package/lib/metadata/actions/updateMaybeClassMetadataProperty.spec.d.ts +0 -2
  42. package/lib/metadata/actions/updateMetadataName.spec.d.ts +0 -2
  43. package/lib/metadata/actions/updateMetadataOptional.spec.d.ts +0 -2
  44. package/lib/metadata/actions/updateMetadataTag.spec.d.ts +0 -2
  45. package/lib/metadata/calculations/assertMetadataFromTypescriptIfManaged.spec.d.ts +0 -2
  46. package/lib/metadata/calculations/buildClassElementMetadataFromMaybeClassElementMetadata.spec.d.ts +0 -2
  47. package/lib/metadata/calculations/buildClassElementMetadataFromTypescriptParameterType.spec.d.ts +0 -2
  48. package/lib/metadata/calculations/buildDefaultManagedMetadata.spec.d.ts +0 -2
  49. package/lib/metadata/calculations/buildDefaultMaybeClassElementMetadata.spec.d.ts +0 -2
  50. package/lib/metadata/calculations/buildDefaultUnmanagedMetadata.spec.d.ts +0 -2
  51. package/lib/metadata/calculations/buildManagedMetadataFromMaybeClassElementMetadata.spec.d.ts +0 -2
  52. package/lib/metadata/calculations/buildManagedMetadataFromMaybeManagedMetadata.spec.d.ts +0 -2
  53. package/lib/metadata/calculations/buildMaybeClassElementMetadataFromMaybeClassElementMetadata.spec.d.ts +0 -2
  54. package/lib/metadata/calculations/buildUnmanagedMetadataFromMaybeClassElementMetadata.spec.d.ts +0 -2
  55. package/lib/metadata/calculations/buildUnmanagedMetadataFromMaybeManagedMetadata.spec.d.ts +0 -2
  56. package/lib/metadata/calculations/getClassMetadata.spec.d.ts +0 -2
  57. package/lib/metadata/calculations/getDefaultClassMetadata.spec.d.ts +0 -2
  58. package/lib/metadata/calculations/getDefaultPendingClassMetadataCount.spec.d.ts +0 -2
  59. package/lib/metadata/calculations/getExtendedConstructorArguments.spec.d.ts +0 -2
  60. package/lib/metadata/calculations/getExtendedLifecycle.spec.d.ts +0 -2
  61. package/lib/metadata/calculations/getExtendedProperties.spec.d.ts +0 -2
  62. package/lib/metadata/calculations/handleInjectionError.spec.d.ts +0 -2
  63. package/lib/metadata/calculations/isPendingClassMetadata.spec.d.ts +0 -2
  64. package/lib/metadata/calculations/isUserlandEmittedType.spec.d.ts +0 -2
  65. package/lib/metadata/calculations/throwAtInvalidClassMetadata.spec.d.ts +0 -2
  66. package/lib/metadata/calculations/validateConstructorMetadataArray.spec.d.ts +0 -2
  67. package/lib/metadata/decorators/inject.int.spec.d.ts +0 -2
  68. package/lib/metadata/decorators/inject.spec.d.ts +0 -2
  69. package/lib/metadata/decorators/injectBase.spec.d.ts +0 -2
  70. package/lib/metadata/decorators/injectFrom.int.spec.d.ts +0 -2
  71. package/lib/metadata/decorators/injectFrom.spec.d.ts +0 -2
  72. package/lib/metadata/decorators/injectFromBase.spec.d.ts +0 -2
  73. package/lib/metadata/decorators/injectFromHierarchy.int.spec.d.ts +0 -2
  74. package/lib/metadata/decorators/injectFromHierarchy.spec.d.ts +0 -2
  75. package/lib/metadata/decorators/injectable.spec.d.ts +0 -2
  76. package/lib/metadata/decorators/multiInject.int.spec.d.ts +0 -2
  77. package/lib/metadata/decorators/multiInject.spec.d.ts +0 -2
  78. package/lib/metadata/decorators/named.int.spec.d.ts +0 -2
  79. package/lib/metadata/decorators/named.spec.d.ts +0 -2
  80. package/lib/metadata/decorators/optional.int.spec.d.ts +0 -2
  81. package/lib/metadata/decorators/optional.spec.d.ts +0 -2
  82. package/lib/metadata/decorators/postConstruct.int.spec.d.ts +0 -2
  83. package/lib/metadata/decorators/postConstruct.spec.d.ts +0 -2
  84. package/lib/metadata/decorators/preDestroy.int.spec.d.ts +0 -2
  85. package/lib/metadata/decorators/preDestroy.spec.d.ts +0 -2
  86. package/lib/metadata/decorators/tagged.int.spec.d.ts +0 -2
  87. package/lib/metadata/decorators/tagged.spec.d.ts +0 -2
  88. package/lib/metadata/decorators/unmanaged.int.spec.d.ts +0 -2
  89. package/lib/metadata/decorators/unmanaged.spec.d.ts +0 -2
  90. package/lib/planning/actions/addRootServiceNodeBindingIfContextFree.spec.d.ts +0 -2
  91. package/lib/planning/actions/addServiceNodeBindingIfContextFree.spec.d.ts +0 -2
  92. package/lib/planning/actions/cacheNonRootPlanServiceNode.spec.d.ts +0 -2
  93. package/lib/planning/actions/curryBuildPlanServiceNode.spec.d.ts +0 -2
  94. package/lib/planning/actions/curryBuildPlanServiceNodeFromClassElementMetadata.spec.d.ts +0 -2
  95. package/lib/planning/actions/curryBuildPlanServiceNodeFromResolvedValueElementMetadata.spec.d.ts +0 -2
  96. package/lib/planning/actions/curryBuildServiceNodeBindings.spec.d.ts +0 -2
  97. package/lib/planning/actions/curryLazyBuildPlanServiceNodeFromClassElementMetadata.spec.d.ts +0 -2
  98. package/lib/planning/actions/curryLazyBuildPlanServiceNodeFromResolvedValueElementMetadata.spec.d.ts +0 -2
  99. package/lib/planning/actions/currySubplan.spec.d.ts +0 -2
  100. package/lib/planning/actions/plan.int.spec.d.ts +0 -2
  101. package/lib/planning/actions/plan.spec.d.ts +0 -2
  102. package/lib/planning/actions/removeRootServiceNodeBindingIfContextFree.spec.d.ts +0 -2
  103. package/lib/planning/actions/removeServiceNodeBindingIfContextFree.spec.d.ts +0 -2
  104. package/lib/planning/calculations/buildFilteredServiceBindings.spec.d.ts +0 -2
  105. package/lib/planning/calculations/buildGetPlanOptionsFromPlanParams.spec.d.ts +0 -2
  106. package/lib/planning/calculations/buildPlanBindingConstraintsList.spec.d.ts +0 -2
  107. package/lib/planning/calculations/checkPlanServiceRedirectionBindingNodeSingleInjectionBindings.spec.d.ts +0 -2
  108. package/lib/planning/calculations/checkServiceNodeSingleInjectionBindings.spec.d.ts +0 -2
  109. package/lib/planning/calculations/getServiceFromMaybeLazyServiceIdentifier.spec.d.ts +0 -2
  110. package/lib/planning/calculations/handlePlanError.spec.d.ts +0 -2
  111. package/lib/planning/calculations/handleResolveError.spec.d.ts +0 -2
  112. package/lib/planning/calculations/isInstanceBindingNode.spec.d.ts +0 -2
  113. package/lib/planning/calculations/isPlanServiceRedirectionBindingNode.spec.d.ts +0 -2
  114. package/lib/planning/calculations/throwErrorWhenUnexpectedBindingsAmountFound.spec.d.ts +0 -2
  115. package/lib/planning/calculations/tryBuildGetPlanOptionsFromManagedClassElementMetadata.spec.d.ts +0 -2
  116. package/lib/planning/calculations/tryBuildGetPlanOptionsFromResolvedValueElementMetadata.spec.d.ts +0 -2
  117. package/lib/planning/models/LazyPlanServiceNode.spec.d.ts +0 -2
  118. package/lib/planning/services/PlanResultCacheService.spec.d.ts +0 -2
  119. package/lib/resolution/actions/cacheResolvedValue.spec.d.ts +0 -2
  120. package/lib/resolution/actions/resolve.int.spec.d.ts +0 -2
  121. package/lib/resolution/actions/resolve.spec.d.ts +0 -2
  122. package/lib/resolution/actions/resolveBindingActivations.spec.d.ts +0 -2
  123. package/lib/resolution/actions/resolveBindingDeactivations.spec.d.ts +0 -2
  124. package/lib/resolution/actions/resolveBindingPreDestroy.spec.d.ts +0 -2
  125. package/lib/resolution/actions/resolveBindingServiceActivations.spec.d.ts +0 -2
  126. package/lib/resolution/actions/resolveBindingServiceDeactivations.spec.d.ts +0 -2
  127. package/lib/resolution/actions/resolveBindingsDeactivations.spec.d.ts +0 -2
  128. package/lib/resolution/actions/resolveInstanceBindingConstructorParams.spec.d.ts +0 -2
  129. package/lib/resolution/actions/resolveInstanceBindingNode.spec.d.ts +0 -2
  130. package/lib/resolution/actions/resolveInstanceBindingNodeAsyncFromConstructorParams.spec.d.ts +0 -2
  131. package/lib/resolution/actions/resolveInstanceBindingNodeFromConstructorParams.spec.d.ts +0 -2
  132. package/lib/resolution/actions/resolveModuleDeactivations.spec.d.ts +0 -2
  133. package/lib/resolution/actions/resolvePostConstruct.spec.d.ts +0 -2
  134. package/lib/resolution/actions/resolveResolvedValueBindingNode.spec.d.ts +0 -2
  135. package/lib/resolution/actions/resolveResolvedValueBindingParams.spec.d.ts +0 -2
  136. package/lib/resolution/actions/resolveScoped.spec.d.ts +0 -2
  137. package/lib/resolution/actions/resolveServiceDeactivations.spec.d.ts +0 -2
  138. package/lib/resolution/actions/resolveServiceRedirectionBindingNode.spec.d.ts +0 -2
  139. package/lib/resolution/actions/resolveSingletonScopedBinding.spec.d.ts +0 -2
  140. package/lib/resolution/actions/setInstanceProperties.spec.d.ts +0 -2
  141. package/lib/resolution/calculations/getInstanceNodeBinding.spec.d.ts +0 -2
  142. package/lib/resolution/calculations/getResolvedValueNodeBinding.spec.d.ts +0 -2
  143. package/lib/resolution/calculations/resolveConstantValueBindingCallback.spec.d.ts +0 -2
  144. package/lib/resolution/calculations/resolveDynamicValueBindingCallback.spec.d.ts +0 -2
  145. package/lib/resolution/calculations/resolveFactoryBindingCallback.spec.d.ts +0 -2
  146. package/lib/symbol/calculations/getDescription.spec.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- export type BindingType = 'ConstantValue' | 'DynamicValue' | 'Factory' | 'Instance' | 'Provider' | 'ResolvedValue' | 'ServiceRedirection';
1
+ export type BindingType = 'ConstantValue' | 'DynamicValue' | 'Factory' | 'Instance' | 'ResolvedValue' | 'ServiceRedirection';
2
2
  export declare const bindingTypeValues: {
3
3
  [TKey in BindingType]: TKey;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BindingType.d.ts","sourceRoot":"","sources":["../../../src/binding/models/BindingType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACnB,eAAe,GACf,cAAc,GACd,SAAS,GACT,UAAU,GACV,UAAU,GACV,eAAe,GACf,oBAAoB,CAAC;AAEzB,eAAO,MAAM,iBAAiB,EAAE;KAAG,IAAI,IAAI,WAAW,GAAG,IAAI;CAQ5D,CAAC"}
1
+ {"version":3,"file":"BindingType.d.ts","sourceRoot":"","sources":["../../../src/binding/models/BindingType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACnB,eAAe,GACf,cAAc,GACd,SAAS,GACT,UAAU,GACV,eAAe,GACf,oBAAoB,CAAC;AAEzB,eAAO,MAAM,iBAAiB,EAAE;KAAG,IAAI,IAAI,WAAW,GAAG,IAAI;CAO5D,CAAC"}
@@ -3,7 +3,6 @@ export const bindingTypeValues = {
3
3
  DynamicValue: 'DynamicValue',
4
4
  Factory: 'Factory',
5
5
  Instance: 'Instance',
6
- Provider: 'Provider',
7
6
  ResolvedValue: 'ResolvedValue',
8
7
  ServiceRedirection: 'ServiceRedirection',
9
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BindingType.js","sourceRoot":"","sources":["../../../src/binding/models/BindingType.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAChE,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,eAAe;IAC9B,kBAAkB,EAAE,oBAAoB;CACzC,CAAC"}
1
+ {"version":3,"file":"BindingType.js","sourceRoot":"","sources":["../../../src/binding/models/BindingType.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAChE,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,eAAe;IAC9B,kBAAkB,EAAE,oBAAoB;CACzC,CAAC"}
package/package.json CHANGED
@@ -5,24 +5,24 @@
5
5
  },
6
6
  "description": "InversifyJs core package",
7
7
  "dependencies": {
8
- "@inversifyjs/common": "2.0.0-beta.0",
9
- "@inversifyjs/prototype-utils": "0.2.0-beta.0",
10
- "@inversifyjs/reflect-metadata-utils": "1.5.0-beta.0"
8
+ "@inversifyjs/common": "2.0.1",
9
+ "@inversifyjs/prototype-utils": "0.2.1",
10
+ "@inversifyjs/reflect-metadata-utils": "1.5.0"
11
11
  },
12
12
  "devDependencies": {
13
- "@stryker-mutator/core": "9.5.1",
14
- "@stryker-mutator/vitest-runner": "9.5.1",
15
- "@stryker-mutator/typescript-checker": "9.5.1",
16
- "@types/node": "24.10.13",
17
- "@vitest/coverage-v8": "4.0.18",
18
- "eslint": "9.39.3",
13
+ "@stryker-mutator/core": "9.6.0",
14
+ "@stryker-mutator/vitest-runner": "9.6.0",
15
+ "@stryker-mutator/typescript-checker": "9.6.0",
16
+ "@types/node": "24.12.0",
17
+ "@vitest/coverage-v8": "4.1.0",
18
+ "eslint": "10.0.3",
19
19
  "prettier": "3.8.1",
20
20
  "reflect-metadata": "0.2.2",
21
21
  "rimraf": "6.1.3",
22
22
  "tslib": "2.8.1",
23
23
  "typescript": "5.9.3",
24
- "vitest": "4.0.18",
25
- "@inversifyjs/eslint-plugin-require-extensions": "0.2.0-beta.0"
24
+ "vitest": "4.1.0",
25
+ "@inversifyjs/eslint-plugin-require-extensions": "0.2.0"
26
26
  },
27
27
  "homepage": "https://inversify.io",
28
28
  "keywords": [
@@ -52,7 +52,7 @@
52
52
  "type": "git",
53
53
  "url": "git+https://github.com/inversify/monorepo.git"
54
54
  },
55
- "version": "10.0.0-beta.0",
55
+ "version": "10.0.1",
56
56
  "scripts": {
57
57
  "build": "tsc",
58
58
  "build:clean": "rimraf lib",
package/AGENTS.md DELETED
@@ -1,140 +0,0 @@
1
- # AGENTS.md - @inversifyjs/core
2
-
3
- ## Package Overview
4
-
5
- The `@inversifyjs/core` package is the foundational layer of the InversifyJS dependency injection system. It contains the core planning algorithms, resolution logic, and fundamental architecture patterns that power the entire container ecosystem.
6
-
7
- ## Key Responsibilities
8
-
9
- - **Planning Phase**: Builds execution plans for dependency resolution
10
- - **Resolution Logic**: Core algorithms for creating and injecting dependencies
11
- - **Metadata Management**: Handles reflection metadata and binding information
12
- - **Error Handling**: Provides detailed error reporting with context
13
- - **Symbol Management**: Manages service identifiers and injection tokens
14
-
15
- ## Architecture Patterns
16
-
17
- ### Planning Phase
18
- The core implements a two-phase resolution strategy:
19
-
20
- 1. **Plan Creation**: Analyzes dependency graph and creates execution plan
21
- 2. **Plan Execution**: Executes the plan to create actual instances
22
-
23
- This separation enables:
24
- - **Caching**: Plans can be cached for performance
25
- - **Validation**: Dependencies can be validated before execution
26
- - **Debugging**: Clear separation of concerns for troubleshooting
27
-
28
- ### Resolution Phase
29
- The resolution system follows these patterns:
30
-
31
- - **Request/Context Pattern**: Each resolution maintains context state
32
- - **Factory Pattern**: Different activation strategies for different binding types
33
- - **Chain of Responsibility**: Multiple resolvers handle different scenarios
34
-
35
- ### Error Reporting
36
- Core provides comprehensive error reporting:
37
- - **Service Identifier Context**: Errors include which service failed
38
- - **Binding Information**: Details about how services are bound
39
- - **Resolution Stack**: Shows the dependency chain that led to errors
40
-
41
- ## Working with Core
42
-
43
- ### Key Characteristics
44
- - **Performance Critical**: Operations happen frequently at runtime
45
- - **Type Safety**: Heavy use of TypeScript generics and constraints
46
- - **Immutable Patterns**: Core data structures are immutable where possible
47
- - **Comprehensive Testing**: Requires extensive unit and integration tests
48
-
49
- ### Testing Strategy
50
-
51
- #### Unit Testing Requirements
52
- Follow the [four-layer testing structure](../../../../docs/testing/unit-testing.md):
53
-
54
- 1. **Class Scope**: Test each planner, resolver, and metadata handler
55
- 2. **Method Scope**: Test each public method thoroughly
56
- 3. **Input Scope**: Test various dependency configurations
57
- 4. **Flow Scope**: Test different resolution paths and error conditions
58
-
59
- #### Critical Test Areas
60
- - **Planning Algorithm**: Test plan generation for complex dependency graphs
61
- - **Resolution Logic**: Test actual object creation and injection
62
- - **Error Scenarios**: Test circular dependencies, missing bindings, etc.
63
- - **Performance**: Test plan caching and resolution performance
64
- - **Metadata Handling**: Test reflection metadata processing
65
-
66
- ### Development Guidelines
67
-
68
- #### Performance Considerations
69
- - **Hot Path Optimization**: Resolution happens frequently - optimize for speed
70
- - **Memory Management**: Minimize allocations in planning and resolution
71
- - **Plan Caching**: Ensure plans are properly cached and invalidated
72
- - **Object Pooling**: Consider pooling for frequently created objects
73
-
74
- #### Type Safety Patterns
75
- - **Generic Constraints**: Use TypeScript constraints to enforce correct usage
76
- - **Branded Types**: Use branded types for service identifiers
77
- - **Mapped Types**: Leverage mapped types for complex binding scenarios
78
- - **Conditional Types**: Use conditional types for resolution logic
79
-
80
- #### Error Handling Best Practices
81
- - **Contextual Errors**: Include service identifiers and binding info
82
- - **User-Friendly Messages**: Provide clear guidance on how to fix issues
83
- - **Error Recovery**: Where possible, provide suggestions for resolution
84
- - **Stack Preservation**: Maintain error stacks for debugging
85
-
86
- ### Build and Test Commands
87
-
88
- ```bash
89
- # Build the package
90
- pnpm run build
91
-
92
- # Run all tests
93
- pnpm run test
94
-
95
- # Run only unit tests
96
- pnpm run test:unit
97
-
98
- # Run only integration tests
99
- pnpm run test:integration
100
-
101
- # Generate coverage report
102
- pnpm run test:coverage
103
- ```
104
-
105
- ### Common Development Tasks
106
-
107
- #### Adding New Planning Logic
108
- 1. **Design the Algorithm**: Consider performance and correctness
109
- 2. **Implement the Planner**: Add to the planning module
110
- 3. **Add Comprehensive Tests**: Test all edge cases and performance
111
- 4. **Update Integration Tests**: Ensure it works with the full container
112
- 5. **Benchmark Performance**: Verify no performance regressions
113
-
114
- #### Extending Resolution Strategies
115
- 1. **Define the Strategy Interface**: Add to resolution types
116
- 2. **Implement the Resolver**: Add resolution logic
117
- 3. **Update the Factory**: Integrate with the resolution factory
118
- 4. **Test Thoroughly**: Unit tests, integration tests, error scenarios
119
- 5. **Document Usage**: Update documentation and examples
120
-
121
- #### Optimizing Performance
122
- 1. **Profile Current Performance**: Use container benchmarks
123
- 2. **Identify Bottlenecks**: Focus on hot paths in planning/resolution
124
- 3. **Implement Optimizations**: Make targeted improvements
125
- 4. **Verify Improvements**: Re-run benchmarks to confirm gains
126
- 5. **Test Correctness**: Ensure optimizations don't break functionality
127
-
128
- ### Important Notes
129
-
130
- #### Breaking Changes
131
- - Core changes affect the entire container ecosystem
132
- - Coordinate with all consuming packages before making changes
133
- - Provide migration guides for major API changes
134
- - Test with real-world applications
135
-
136
- #### Debugging Guidelines
137
- - Use the planning system to understand resolution flow
138
- - Check binding metadata and constraints
139
- - Verify service identifier resolution
140
- - Use comprehensive error messages for troubleshooting
package/CHANGELOG.md DELETED
@@ -1,460 +0,0 @@
1
- # @inversifyjs/core
2
-
3
- ## 10.0.0-beta.0
4
-
5
- ### Major Changes
6
-
7
- - Remove `Provider`
8
- - Remove `ProviderBinding`
9
-
10
- ### Minor Changes
11
-
12
- - Updated core package to be ESM only
13
-
14
- ### Patch Changes
15
-
16
- - Updated dependencies
17
- - @inversifyjs/common@2.0.0-beta.0
18
- - @inversifyjs/reflect-metadata-utils@1.5.0-beta.0
19
- - @inversifyjs/prototype-utils@0.2.0-beta.0
20
-
21
- ## 9.2.0
22
-
23
- ### Minor Changes
24
-
25
- - Added`BindingManager.unbindAllSync()`
26
-
27
- ## 9.1.2
28
-
29
- ### Patch Changes
30
-
31
- - Updated circular dependency detection to handle V8 issues on nearly exhausted call stack scenarios
32
-
33
- ## 9.1.1
34
-
35
- ### Patch Changes
36
-
37
- - Updated dependencies
38
- - @inversifyjs/prototype-utils@0.1.3
39
-
40
- ## 9.1.0
41
-
42
- ### Minor Changes
43
-
44
- - Updated `Factory` to allow async functions.
45
- - Updated `FactoryBinding.factory` to allow async factory builders.
46
-
47
- ## 9.0.1
48
-
49
- ### Patch Changes
50
-
51
- - Updated dependencies
52
- - @inversifyjs/reflect-metadata-utils@1.4.1
53
-
54
- ## 9.0.0
55
-
56
- ### Major Changes
57
-
58
- - 6d890ac: Updated `ClassMetadata.lifecycle` to allow multiple preDestroy and postConstruct methods
59
-
60
- ### Patch Changes
61
-
62
- - 0f0fcdc: Deprecated `Provider` type. Use `Factory` instead. Providers will be removed in v8. Providers exist for historical reasons from v5 when async dependencies weren't supported. Factories are more flexible and can handle both sync and async operations.
63
- - Updated dependencies
64
- - @inversifyjs/reflect-metadata-utils@1.4.0
65
-
66
- ## 8.0.0
67
-
68
- ### Major Changes
69
-
70
- - 67db8bd: Updated `BindingService` with autobind options
71
- - 07abb74: Renamed `BasePlanParamsAutobindOptions` to `AutobindOptions`
72
-
73
- ## 7.2.0
74
-
75
- ### Minor Changes
76
-
77
- - 8a6722f: Updated `decorate` to allow method param decoration
78
-
79
- ## 7.1.1
80
-
81
- ### Patch Changes
82
-
83
- - 1cc1a4d: Fix `injectFromHierarchy` to ignore Object in prototype traversal, preventing missing metadata errors when extending undecorated Object.
84
-
85
- ## 7.1.0
86
-
87
- ### Minor Changes
88
-
89
- - 2f6e6e4: Added `injectFromHierachy`
90
-
91
- ## 7.0.1
92
-
93
- ### Patch Changes
94
-
95
- - 9db671c: Updated `resolve` to handle circular dependencies
96
- - 95b2570: Updated `addServiceNodeBindingIfContextFree` to handle stack overflow errors
97
-
98
- ## 7.0.0
99
-
100
- ### Major Changes
101
-
102
- - 2392b15: Removed `PlanResultCacheService.invalidateService` in favor of `invalidateServiceBinding`
103
- - e30a884: Updated `PlanParamsOperations` with context
104
-
105
- ### Minor Changes
106
-
107
- - e30a884: Added `NonCachedServiceNodeContext`
108
-
109
- ## 6.0.1
110
-
111
- ### Patch Changes
112
-
113
- - 1bdf12a: Updated `BindingService`, `ActivationsService` and `DeactivationsService` to receive a `getParent` param. This way restoring a parent container no longer leads to invalid parent references
114
-
115
- ## 6.0.0
116
-
117
- ### Major Changes
118
-
119
- - 93f51e5: Updated `PlanServiceNode` with no `parent`
120
- - 93f51e5: Updated `BaseBindingNode` with no `parent`
121
- - 8fedb21: Updated `BasePlanParams` without methods in favor of an `operations` property
122
-
123
- ### Minor Changes
124
-
125
- - d30137c: Updated `BasePlanParams` with `setPlan`
126
- - 64fd9ba: Updated `PlanResultCacheService` with `invalidateService`
127
- - d30137c: update plan to reuse `PlanServiceNode` objects
128
- - d30137c: updated `BasePlanParams` with `getPlan`
129
-
130
- ### Patch Changes
131
-
132
- - d5c40a1: Updated `GetPlanOptions` with `chained` property
133
- - 816f789: Updated `PlanServiceNode.bindings` to no longer be readonly
134
- - d5c40a1: Updated `PlanResultCacheService` to avoid collisions with chained service related plans
135
- - Updated dependencies
136
- - @inversifyjs/reflect-metadata-utils@1.3.0
137
-
138
- ## 5.4.0
139
-
140
- ### Minor Changes
141
-
142
- - 7de8779: Updated metadata models with `chained` property
143
- - 2e3c027: Updated `BindingService` with `getChained`
144
- - 197d937: Updated `multiInject` with optional `MultiInjectOptions`
145
-
146
- ## 5.3.3
147
-
148
- ### Patch Changes
149
-
150
- - Updated dependencies
151
- - @inversifyjs/common@1.5.2
152
- - @inversifyjs/prototype-utils@0.1.2
153
-
154
- ## 5.3.2
155
-
156
- ### Patch Changes
157
-
158
- - Updated dependencies
159
- - @inversifyjs/common@1.5.1
160
- - @inversifyjs/reflect-metadata-utils@1.2.0
161
- - @inversifyjs/prototype-utils@0.1.1
162
-
163
- ## 5.3.1
164
-
165
- ### Patch Changes
166
-
167
- - 38d1a6d: Fixed BindingService clone method.
168
-
169
- ## 5.3.0
170
-
171
- ### Minor Changes
172
-
173
- - 50ef5eb: Updated `BindingService` with `getBoundServices`
174
-
175
- ### Patch Changes
176
-
177
- - 5d8c35d: Fixed child container memory leak in most cases
178
-
179
- Provided that there is a [job](https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#job) in the event loop after constructing a child container, its cache service will eventually be garbage collected along with the child container itself, rather than persisting until the parent container's garbage collection.
180
-
181
- - edbefaa: Updated `BindingService.clone` to properly clone bindings.
182
-
183
- ## 5.2.0
184
-
185
- ### Minor Changes
186
-
187
- - 56dc0cd: Added `getBindingId`
188
-
189
- ### Patch Changes
190
-
191
- - 1bb859a: Updated `resolve` to set class metadata scope bindings when autobind options are set
192
-
193
- ## 5.1.0
194
-
195
- ### Minor Changes
196
-
197
- - 77150f5: Updated `BindingService` with `removeById`
198
- - 77150f5: Updated `BindingService` with `getById`
199
- - 78e1b49: Added `resolveBindingsDeactivations`
200
-
201
- ## 5.0.0
202
-
203
- ### Major Changes
204
-
205
- - 6de1cee: updated `BasePlanParams.servicesBranch` to be an array
206
-
207
- ### Patch Changes
208
-
209
- - 7ef055a: Updated `plan` to no longer provide false positive circular dependencies
210
-
211
- ## 4.0.1
212
-
213
- ### Patch Changes
214
-
215
- - a77354a: Update `cacheResolvedValue` to set promise like cache values until promise is fullfilled
216
-
217
- ## 4.0.0
218
-
219
- ### Major Changes
220
-
221
- - 4fb30e9: Renamed `BindingMetadata` to `BindingConstraints`
222
-
223
- ## 3.5.0
224
-
225
- ### Minor Changes
226
-
227
- - e11ad62: Added `ResolvedValueMetadata`
228
- - e11ad62: Updated `PlanServiceNodeParent` to include `ResolvedValueBindingNode`
229
- - e11ad62: Added `ResolvedValueBinding`
230
- - e11ad62: Added `ResolvedValueBindingNode`
231
-
232
- ## 3.4.0
233
-
234
- ### Minor Changes
235
-
236
- - b1a18b6: Added `PlanResultCacheService`
237
-
238
- ## 3.3.0
239
-
240
- ### Minor Changes
241
-
242
- - 9c713eb: Updated `GetOptions` with autobind
243
-
244
- ## 3.2.0
245
-
246
- ### Minor Changes
247
-
248
- - 7743276: Updated plan related error messages with binding metadata details
249
-
250
- ### Patch Changes
251
-
252
- - 7572767: Updated `OneToManyMapStar.clone` to properly clone map array values
253
- - 9621865: Updated `injectBase` default values to be true
254
- - 559efd8: Updated `BindToFluentSyntaxImplementation.toDynamicValue` with right default scope
255
-
256
- ## 3.1.0
257
-
258
- ### Minor Changes
259
-
260
- - 1c93440: Updated `unmanaged` to support method decoration
261
- - 1c93440: Updated `inject` to support method decoration
262
- - 1c93440: Updated `optional` to support method decoration
263
- - 1c93440: Updated `named` to support method decoration
264
- - 1c93440: Updated `tagged` to support method decoration
265
- - 1c93440: Updated `multiInject` to support method decoration
266
-
267
- ### Patch Changes
268
-
269
- - c80459d: Updated `OneToManyMapStar` to fix an issue involving a deletion use case
270
-
271
- ## 3.0.2
272
-
273
- ### Patch Changes
274
-
275
- - c346802: Updated `DeactivationService` to allow duplicated deactivations
276
- - c346802: Updated `ActivationService` to allow duplicated activations
277
-
278
- ## 3.0.1
279
-
280
- ### Patch Changes
281
-
282
- - 0dadb6a: Updated `MaybeClassElementMetadataKind` values to avoid collisions
283
- - 7e751e2: Updated resolve flow to keep default values on optional property injection
284
- - 5c9ebca: Updated decorator metadata access to avoid conflicts with base type metadata
285
- - Updated dependencies
286
- - @inversifyjs/reflect-metadata-utils@1.1.0
287
-
288
- ## 3.0.0
289
-
290
- ### Major Changes
291
-
292
- - 7f97e76: Removed `MetadataTargetName`
293
- - 7f97e76: Updated `ManagedClassElementMetadata` with no `targetName`
294
- - 7f97e76: Updated `MaybeManagedClassElementMetadata` with no `targetName`
295
- - 7f97e76: Removed `targetName`
296
-
297
- ### Minor Changes
298
-
299
- - 50fa92a: Updated `BindingService` with `getNonParentBindings`
300
- - 6c381a8: Updated `BindingToSyntax` with more flexible factory and provider constraints
301
- - bbddebc: Updated `Provider` with right args.
302
-
303
- ## 2.2.0
304
-
305
- ### Minor Changes
306
-
307
- - f487c1b: Updated `BindingService` with `getNonParentBoundServices`
308
- - 5fac244: Updated `injectFromBase` options to be optional.
309
-
310
- ### Patch Changes
311
-
312
- - e708d1e: Updated `injectable` to filter out non userland emitted metadata
313
- - 2d74b3f: Updated BindingActivation with missing `ResolutionContext` param
314
- - 9d5ac91: Updated `injectable` to throw on duplicated call
315
-
316
- ## 2.1.0
317
-
318
- ### Minor Changes
319
-
320
- - 142b763: Added `targetName` decorator
321
-
322
- ### Patch Changes
323
-
324
- - 27ddc35: Removed unexpected `LegacyQueryableString`
325
- - 9257c9a: Updated `BindToFluentSyntaxImplementation.to` to set binding scope if found in class metadata
326
-
327
- ## 2.0.0
328
-
329
- ### Major Changes
330
-
331
- - 9036007: Removed `LegacyTarget`.
332
- - a3e2dd0: Removed `LegacyMetadata`.
333
- - a3e2dd0: Removed `getClassMetadataFromMetadataReader`.
334
- - 11b499a: Renamed `BindingService.remove` to `removeAllByServiceId`.
335
- - a3e2dd0: Updated `getClassMetadata` to no longer rely on legacy reflected metadata
336
- - 9036007: Remove `getTargets`.
337
- - a3e2dd0: Removed `LegacyMetadataReader`.
338
-
339
- ### Minor Changes
340
-
341
- - 5b4ee18: Added `resolveModuleDeactivations`.
342
- - 2dbd2d6: Updated `BindingMetadata` with `serviceIdentifier` and `getAncestor`.
343
- - 0ce84d0: Added `Binding`.
344
- - 2bcbcad: Added `optional`.
345
- - 2bcbcad: Added `multiInject`.
346
- - b7fab72: Updated `ManagedClassElementMetadata` with `isFromTypescriptParamType`.
347
- - d6efacc: Added `decorate`.
348
- - d7cc2b4: Added `resolve`.
349
- - 2bcbcad: Added `named`.
350
- - b5fad23: Added `resolveServiceDeactivations`.
351
- - 0ce84d0: Added `ActivationService`.
352
- - 28c3452: Added `plan`.
353
- - 2bcbcad: Added `postConstruct`.
354
- - 2bcbcad: Added `unmanaged`.
355
- - 501c5f1: Added `DeactivationsService`.
356
- - 2bcbcad: Added `tagged`.
357
- - 2bcbcad: Added `injectFromBase`.
358
- - 6ddbf41: Updated `ClassMetadata` with `scope`.
359
- - 0ce84d0: Added `BindingService`.
360
- - 2bcbcad: Added `inject`.
361
- - 2bcbcad: Added `preDestroy`.
362
- - 2bcbcad: Added `injectable`.
363
-
364
- ### Patch Changes
365
-
366
- - 6b52b45: Updated rollup config to provide right source map file paths.
367
- - 14ce6cd: Updated `getClassMetadata` with missing constructor arguments lenght validation
368
- - a73aa34: Updated `ActivationService.get` to provide missing parent activations
369
- - Updated dependencies
370
- - @inversifyjs/prototype-utils@0.1.0
371
- - @inversifyjs/common@1.5.0
372
- - @inversifyjs/reflect-metadata-utils@1.0.0
373
-
374
- ## 1.3.5
375
-
376
- ### Patch Changes
377
-
378
- - 2cbb782: Updated ESM build to provide proper types regardless of the ts resolution module strategy in the userland.
379
- - Updated dependencies
380
- - @inversifyjs/reflect-metadata-utils@0.2.4
381
- - @inversifyjs/common@1.4.0
382
-
383
- ## 1.3.4
384
-
385
- ### Patch Changes
386
-
387
- - 535ad85: Updated ESM build to be compatible with both bundler and NodeJS module resolution algorithms
388
- - Updated dependencies
389
- - @inversifyjs/reflect-metadata-utils@0.2.3
390
- - @inversifyjs/common@1.3.3
391
-
392
- ## 1.3.3
393
-
394
- ### Patch Changes
395
-
396
- - 0e347ab: Updated get metadata flow to provide better error messages when missing metadata.
397
-
398
- ## 1.3.2
399
-
400
- ### Patch Changes
401
-
402
- - 2b629d6: Removed wrong os constraint.
403
- - Updated dependencies
404
- - @inversifyjs/reflect-metadata-utils@0.2.2
405
- - @inversifyjs/common@1.3.2
406
-
407
- ## 1.3.1
408
-
409
- ### Patch Changes
410
-
411
- - 46b2569: Removed wrong dev engines constraint.
412
- - Updated dependencies
413
- - @inversifyjs/reflect-metadata-utils@0.2.1
414
- - @inversifyjs/common@1.3.1
415
-
416
- ## 1.3.0
417
-
418
- ### Minor Changes
419
-
420
- - 3b6344c: Added `LegacyTargetImpl`.
421
- - 3b6344c: Added `getClassElementMetadataFromLegacyMetadata`.
422
-
423
- ## 1.2.0
424
-
425
- ### Minor Changes
426
-
427
- - fca62ce: Added `LegacyTarget` model.
428
- - fca62ce: Added `getTargets`.
429
- - c588a5a: Added `getClassMetadataFromMetadataReader`.
430
-
431
- ### Patch Changes
432
-
433
- - 6469c67: Updated `getClassMetadata` to correctly fetch name and target names
434
-
435
- ## 1.1.2
436
-
437
- ### Patch Changes
438
-
439
- - Updated dependencies
440
- - @inversifyjs/common@1.3.0
441
-
442
- ## 1.1.1
443
-
444
- ### Patch Changes
445
-
446
- - Updated dependencies
447
- - @inversifyjs/common@1.2.1
448
-
449
- ## 1.1.0
450
-
451
- ### Minor Changes
452
-
453
- - e594986: Added `ClassMetadata`.
454
- - e594986: Added `getClassMetadata`.
455
-
456
- ### Patch Changes
457
-
458
- - Updated dependencies
459
- - @inversifyjs/reflect-metadata-utils@0.2.0
460
- - @inversifyjs/common@1.2.0
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=getBindingId.spec.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=buildInstanceBinding.spec.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cloneBinding.spec.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cloneBindingCache.spec.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cloneConstantValueBinding.spec.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cloneDynamicValueBinding.spec.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cloneFactoryBinding.spec.d.ts.map