inversify 7.10.0 → 7.10.2

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 (79) hide show
  1. package/CHANGELOG.md +143 -63
  2. package/LICENSE +1 -1
  3. package/README.md +1 -17
  4. package/lib/cjs/index.d.ts +1 -1
  5. package/lib/cjs/index.d.ts.map +1 -1
  6. package/lib/cjs/index.js.map +1 -1
  7. package/lib/cjs/test/annotation/inject.int.spec.d.ts +2 -0
  8. package/lib/cjs/test/annotation/inject.int.spec.d.ts.map +1 -0
  9. package/lib/cjs/test/annotation/injectable.int.spec.d.ts +2 -0
  10. package/lib/cjs/test/annotation/injectable.int.spec.d.ts.map +1 -0
  11. package/lib/cjs/test/annotation/multi_inject.int.spec.d.ts +2 -0
  12. package/lib/cjs/test/annotation/multi_inject.int.spec.d.ts.map +1 -0
  13. package/lib/cjs/test/annotation/named.int.spec.d.ts +2 -0
  14. package/lib/cjs/test/annotation/named.int.spec.d.ts.map +1 -0
  15. package/lib/cjs/test/annotation/optional.int.spec.d.ts +2 -0
  16. package/lib/cjs/test/annotation/optional.int.spec.d.ts.map +1 -0
  17. package/lib/cjs/test/annotation/post_construct.int.spec.d.ts +2 -0
  18. package/lib/cjs/test/annotation/post_construct.int.spec.d.ts.map +1 -0
  19. package/lib/cjs/test/bugs/bugs.int.spec.d.ts +2 -0
  20. package/lib/cjs/test/bugs/bugs.int.spec.d.ts.map +1 -0
  21. package/lib/cjs/test/bugs/issue_1190.test.d.ts +2 -0
  22. package/lib/cjs/test/bugs/issue_1190.test.d.ts.map +1 -0
  23. package/lib/cjs/test/bugs/issue_1190.test.js +62 -0
  24. package/lib/cjs/test/bugs/issue_1190.test.js.map +1 -0
  25. package/lib/cjs/test/bugs/issue_1297.test.d.ts +2 -0
  26. package/lib/cjs/test/bugs/issue_1297.test.d.ts.map +1 -0
  27. package/lib/cjs/test/bugs/issue_1297.test.js +66 -0
  28. package/lib/cjs/test/bugs/issue_1297.test.js.map +1 -0
  29. package/lib/cjs/test/bugs/issue_1416.test.d.ts +2 -0
  30. package/lib/cjs/test/bugs/issue_1416.test.d.ts.map +1 -0
  31. package/lib/cjs/test/bugs/issue_1416.test.js +50 -0
  32. package/lib/cjs/test/bugs/issue_1416.test.js.map +1 -0
  33. package/lib/cjs/test/bugs/issue_1515.test.d.ts +2 -0
  34. package/lib/cjs/test/bugs/issue_1515.test.d.ts.map +1 -0
  35. package/lib/cjs/test/bugs/issue_1515.test.js +71 -0
  36. package/lib/cjs/test/bugs/issue_1515.test.js.map +1 -0
  37. package/lib/cjs/test/bugs/issue_1518.test.d.ts +2 -0
  38. package/lib/cjs/test/bugs/issue_1518.test.d.ts.map +1 -0
  39. package/lib/cjs/test/bugs/issue_1518.test.js +15 -0
  40. package/lib/cjs/test/bugs/issue_1518.test.js.map +1 -0
  41. package/lib/cjs/test/bugs/issue_1564.int.spec.d.ts +2 -0
  42. package/lib/cjs/test/bugs/issue_1564.int.spec.d.ts.map +1 -0
  43. package/lib/cjs/test/bugs/issue_543.int.spec.d.ts +2 -0
  44. package/lib/cjs/test/bugs/issue_543.int.spec.d.ts.map +1 -0
  45. package/lib/cjs/test/bugs/issue_549.int.spec.d.ts +2 -0
  46. package/lib/cjs/test/bugs/issue_549.int.spec.d.ts.map +1 -0
  47. package/lib/cjs/test/bugs/issue_706.test.d.ts +2 -0
  48. package/lib/cjs/test/bugs/issue_706.test.d.ts.map +1 -0
  49. package/lib/cjs/test/bugs/issue_706.test.js +31 -0
  50. package/lib/cjs/test/bugs/issue_706.test.js.map +1 -0
  51. package/lib/cjs/test/bugs/issue_928.test.d.ts +2 -0
  52. package/lib/cjs/test/bugs/issue_928.test.d.ts.map +1 -0
  53. package/lib/cjs/test/bugs/issue_928.test.js +68 -0
  54. package/lib/cjs/test/bugs/issue_928.test.js.map +1 -0
  55. package/lib/cjs/test/container/container.int.spec.d.ts +2 -0
  56. package/lib/cjs/test/container/container.int.spec.d.ts.map +1 -0
  57. package/lib/cjs/test/container/container_module.int.spec.d.ts +2 -0
  58. package/lib/cjs/test/container/container_module.int.spec.d.ts.map +1 -0
  59. package/lib/cjs/test/features/named_default.int.spec.d.ts +2 -0
  60. package/lib/cjs/test/features/named_default.int.spec.d.ts.map +1 -0
  61. package/lib/cjs/test/features/property_injection.int.spec.d.ts +2 -0
  62. package/lib/cjs/test/features/property_injection.int.spec.d.ts.map +1 -0
  63. package/lib/cjs/test/features/provider.int.spec.d.ts +2 -0
  64. package/lib/cjs/test/features/provider.int.spec.d.ts.map +1 -0
  65. package/lib/cjs/test/features/request_scope.int.spec.d.ts +2 -0
  66. package/lib/cjs/test/features/request_scope.int.spec.d.ts.map +1 -0
  67. package/lib/cjs/test/features/transitive_bindings.int.spec.d.ts +2 -0
  68. package/lib/cjs/test/features/transitive_bindings.int.spec.d.ts.map +1 -0
  69. package/lib/cjs/test/inversify.int.spec.d.ts +2 -0
  70. package/lib/cjs/test/inversify.int.spec.d.ts.map +1 -0
  71. package/lib/cjs/test/node/error_messages.int.spec.d.ts +2 -0
  72. package/lib/cjs/test/node/error_messages.int.spec.d.ts.map +1 -0
  73. package/lib/cjs/test/node/exceptions.int.spec.d.ts +2 -0
  74. package/lib/cjs/test/node/exceptions.int.spec.d.ts.map +1 -0
  75. package/lib/cjs/test/node/proxies.int.spec.d.ts +2 -0
  76. package/lib/cjs/test/node/proxies.int.spec.d.ts.map +1 -0
  77. package/lib/esm/index.d.ts +1 -1
  78. package/lib/esm/index.d.ts.map +1 -1
  79. package/package.json +27 -47
package/CHANGELOG.md CHANGED
@@ -1,61 +1,76 @@
1
- # Changelog
2
- All notable changes to this project from 5.0.0 forward will be documented in this file.
1
+ # inversify
3
2
 
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3
+ ## 7.10.2
6
4
 
7
- ## [Unreleased]
5
+ ### Patch Changes
8
6
 
9
- ### Added
7
+ - Updated dependencies
8
+ - @inversifyjs/container@1.13.2
9
+ - @inversifyjs/core@9.0.1
10
10
 
11
- ### Changed
11
+ ## 7.10.1
12
+
13
+ ### Patch Changes
12
14
 
13
- ## [7.10.0]
15
+ - Added `MapToResolvedValueInjectOptions` type
16
+
17
+ - Updated dependencies
18
+ - @inversifyjs/container@1.13.1
19
+
20
+ ## 7.10.0
14
21
 
15
22
  ### Added
23
+
16
24
  - Added `InjectFromBaseOptionsLifecycle`.
17
25
  - Added `InjectFromHierarchyOptionsLifecycle`.
18
26
 
19
27
  ### Changed
28
+
20
29
  - Updated `injectFromBase` with `lifecycle` property.
21
30
  - Updated `injectFromHierarchy` with `lifecycle` property.
22
31
 
23
- ## [7.9.1]
32
+ ## 7.9.1
24
33
 
25
34
  ### Changed
35
+
26
36
  - Updated `Container` to trigger autobind options on autobound parent container related binding requests.
27
37
 
28
- ## [7.9.0]
38
+ ## 7.9.0
29
39
 
30
40
  ### Changed
31
41
 
32
42
  - Updated `decorate` to allow method parameter decoration.
33
43
 
34
- ## [7.8.1]
44
+ ## 7.8.1
35
45
 
36
46
  ### Changed
47
+
37
48
  - Fixed `injectFromHierarchy` avoiding crash when traversing `Object` metadata.
38
49
 
39
- ## [7.8.0]
50
+ ## 7.8.0
40
51
 
41
52
  ### Added
53
+
42
54
  - Added `injectFromHierarchy`.
43
55
 
44
- ## [7.7.1]
56
+ ## 7.7.1
45
57
 
46
58
  ### Changed
59
+
47
60
  - Fixed a bug involving circular dependencies when resolving services in some edge cases.
48
61
  - Fixed a bug involving circular dependencies when bindings are bound in some edge cases.
49
62
 
50
- ## [7.7.1-beta.0]
63
+ ## 7.7.1-beta.0
51
64
 
52
65
  ### Changed
66
+
53
67
  - Fixed a bug causing `Container.bind` and `Container.unbind` to avoid throwing planning errors.
54
68
  - Fixed a bug causing wrong cached plans involving bindings with ancestor related constraints.
55
69
 
56
- ## [7.7.0]
70
+ ## 7.7.0
57
71
 
58
72
  ### Added
73
+
59
74
  - Added `Bind` type.
60
75
  - Added `IsBound` type.
61
76
  - Added `OnActivation` type.
@@ -66,133 +81,154 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
81
  - Added `UnbindSync` type.
67
82
 
68
83
  ### Changed
84
+
69
85
  - Updated `BindOnFluentSyntaxImplementation.onDeactivation` to throw an error on non singleton scoped bindings.
70
86
  - Updated `ServiceResolutionManager` to provide right `getChained` operation after computed properties are reset.
71
87
  - Updated `Container` to properly manage bindings bindings on child containers after a parent container restores a snapshot.
72
88
 
73
- ## [7.6.1]
89
+ ## 7.6.1
74
90
 
75
91
  ### Changed
92
+
76
93
  - Updated `getAll` and `getAllAsync` options with missing `chained` property.
77
94
 
78
- ## [7.6.0]
95
+ ## 7.6.0
79
96
 
80
97
  ### Added
98
+
81
99
  - Added `MultiInjectOptions`.
82
100
 
83
101
  ### Changed
102
+
84
103
  - Updated `multiInject` decorator with optional `MultiInjectOptions`.
85
104
  - Updated `getAll` and `getAllAsync` options with optional`chained` property.
86
105
 
87
- ## [7.5.4]
106
+ ## 7.5.4
88
107
 
89
108
  ### Changed
109
+
90
110
  - Updated `ServiceIdentifier` to rely on `Function` again. This solves an issue affecting classes with protected constructors.
91
111
 
92
- ## [7.5.3]
112
+ ## 7.5.3
93
113
 
94
114
  ### Changed
115
+
95
116
  - Updated `ServiceIdentifier` removing `Function` in favor of a new `AbstractNewable` type. ServiceIdentifier now uses AbstractNewable instead of Function to better represent abstract classes. This provides better type safety and semantics.
96
117
 
97
- ## [7.5.2]
118
+ ## 7.5.2
98
119
 
99
120
  ### Changed
121
+
100
122
  - Fixed `Container.snapshot` so snapshot bindings are not updated after a snapshot is taken.
101
123
  - Fixed a memory leak affecting child containers.
102
124
 
103
- ## [7.5.1]
125
+ ## 7.5.1
104
126
 
105
127
  ### Changed
128
+
106
129
  - Updated `Container.get` like methods to properly set bindings when autobind mode is set:
107
130
  - `@injectable` scopes properly handled.
108
131
  - Autobind mode no longer creates duplicated bindings.
109
132
 
110
- ## [7.5.0]
133
+ ## 7.5.0
111
134
 
112
135
  ### Changed
136
+
113
137
  - Updated `Container` with `unloadSync`.
114
138
  - Updated `Container` with `loadSync`.
115
139
 
116
- ## [7.4.0]
140
+ ## 7.4.0
117
141
 
118
142
  ### Changed
143
+
119
144
  - Updated `ContainerModuleLoadOptions` with `rebind`.
120
145
  - Updated `ContainerModuleLoadOptions` with `rebindSync`.
121
146
  - Updated `BindToFluentSyntax.toResolvedValue` with additional type constraints.
122
147
 
123
- ## [7.3.0]
148
+ ## 7.3.0
124
149
 
125
150
  ### Changed
151
+
126
152
  - Updated `Container` with `rebindSync`.
127
153
  - Updated `Container` with `unbindSync`.
128
154
  - Updated `Container` with `rebind`.
129
155
  - Updated `ContainerModuleLoadOptions` with `unbindSync`.
130
156
  - Updated `ContainerModuleLoadOptions.unbind` to accept `BindingIdentifier`.
131
157
 
132
- ## [7.2.0]
158
+ ## 7.2.0
133
159
 
134
160
  ### Added
161
+
135
162
  - Added `BindingIdentifier`.
136
163
 
137
164
  ### Changed
165
+
138
166
  - Updated `BindInFluentSyntax` with `getIdentifier`.
139
167
  - Updated `Container.unbind` to handle `BindingIdentifier`.
140
168
  - Updated `BindOnFluentSyntax` with `getIdentifier`.
141
169
  - Updated `BindWhenFluentSyntax` with `getIdentifier`.
142
170
 
143
- ## [7.1.0]
171
+ ## 7.1.0
144
172
 
145
173
  ### Added
174
+
146
175
  - Added `BindingActivation`.
147
176
  - Added `BindingDeactivation`.
148
177
 
149
- ## [7.0.2]
178
+ ## 7.0.2
150
179
 
151
180
  ### Changed
181
+
152
182
  - Updated `container.get` like methods to no longer initialize twice singleton scoped bindings.
153
183
 
154
- ## [7.0.1]
184
+ ## 7.0.1
155
185
 
156
186
  ### Changed
187
+
157
188
  - Updated `Container.get` like methods to no longer initialize twice singleton scoped bindings.
158
189
 
159
- ## [7.0.0]
190
+ ## 7.0.0
160
191
 
161
192
  Parity version with `7.0.0-alpha.5`
162
193
 
163
- ## [7.0.0-alpha.5]
194
+ ## 7.0.0-alpha.5
164
195
 
165
196
  ### Changed
197
+
166
198
  - Renamed `BindingMetadata` to `BindingConstraints`.
167
199
  - Improved performance on `Container.get` like methods.
168
200
 
169
- ## [7.0.0-alpha.4]
201
+ ## 7.0.0-alpha.4
170
202
 
171
203
  Parity version with `7.0.0-alpha.3`.
172
204
 
173
- ## [6.2.2]
205
+ ## 6.2.2
174
206
 
175
207
  - Solved issue with npm registry.
176
208
 
177
- ## [7.0.0-alpha.3]
209
+ ## 7.0.0-alpha.3
178
210
 
179
211
  ### Changed
212
+
180
213
  - Updated `BindToFluentSyntax` with `.toResolvedValue`.
181
214
 
182
- ## [7.0.0-alpha.2]
215
+ ## 7.0.0-alpha.2
183
216
 
184
217
  ### Changed
218
+
185
219
  - Updated `Container` with a plan cache. `Container.get`, `Container.getAll`, `Container.getAllAsync` and `Container.getAsync` performance has been improved.
186
220
 
187
- ## [7.0.0-alpha.1]
221
+ ## 7.0.0-alpha.1
188
222
 
189
223
  ### Changed
224
+
190
225
  - Updated `GetOptions` with `autobind`.
191
226
  - Updated `ContainerOptions` with `autobind`.
192
227
 
193
- ## [7.0.0-alpha.0]
228
+ ## 7.0.0-alpha.0
194
229
 
195
230
  ### Added
231
+
196
232
  - Added `BindInFluentSyntax`.
197
233
  - Added `BindInWhenOnFluentSyntax`.
198
234
  - Added `BindOnFluentSyntax`.
@@ -217,6 +253,7 @@ Parity version with `7.0.0-alpha.3`.
217
253
  - Added `injectFromBase` decorator.
218
254
 
219
255
  ### Changed
256
+
220
257
  - Updated `injectable` with optional `scope`.
221
258
  - [Breaking] Updated `ContainerModule` constructor to receive a callback with `ContainerModuleLoadOptions` instead of `interfaces.ContainerModuleCallBack`.
222
259
  - [Breaking] Updated `ContainerModule`.load to return `Promise<void>`.
@@ -234,11 +271,12 @@ Parity version with `7.0.0-alpha.3`.
234
271
  - [Breaking] Updated `Container` with no `unbindAllAsync` in favor of an async `Container.unbindAll`.
235
272
  - [Breaking] Updated `Container` with no `unloadAsync` in favor of an async `Container.unload`.
236
273
 
237
-
238
274
  ### Fixed
275
+
239
276
  - Updated `decorate` to no longer require a unexpected prototypes to decorate property nor methods.
240
277
 
241
278
  ### Removed
279
+
242
280
  - [Breaking] Removed deprecated `LazyServiceIdentifer`. Use `LazyServiceIdentifier` instead.
243
281
  - [Breaking] Removed `BindingScopeEnum`. Use `bindingScopeValues` instead.
244
282
  - [Breaking] Removed `BindingTypeEnum`.
@@ -256,18 +294,20 @@ Parity version with `7.0.0-alpha.3`.
256
294
  - [Breaking] Removed `getServiceIdentifierAsString`.
257
295
  - [Breaking] Removed `multiBindToService`.
258
296
 
259
-
260
- ## [6.2.1]
297
+ ## 6.2.1
261
298
 
262
299
  ### Fixed
300
+
263
301
  - Added missing `LazyServiceIdentifer`.
264
302
 
265
- ## [6.2.0]
303
+ ## 6.2.0
266
304
 
267
305
  ### Added
306
+
268
307
  - Added `interfaces.GetAllOptions`.
269
308
 
270
309
  ### Changed
310
+
271
311
  - Updated `container.getAll` with `options` optional param.
272
312
  - Updated `container.getAllAsync` with `options` optional param.
273
313
  - Updated `interfaces.NextArgs` with optional `isOptional` param.
@@ -284,11 +324,12 @@ Parity version with `7.0.0-alpha.3`.
284
324
  - Updated `container` with `tryGetAllNamed`.
285
325
  - Updated `container` with `tryGetAllNamedAsync`.
286
326
 
287
- ## [6.2.0-beta.1]
327
+ ## 6.2.0-beta.1
288
328
 
289
329
  ### Added
290
330
 
291
331
  ### Changed
332
+
292
333
  - Updated `interfaces.NextArgs` with optional `isOptional` param.
293
334
  - Updated `container` with `tryGet`.
294
335
  - Updated `container` with `tryGetAsync`.
@@ -305,126 +346,151 @@ Parity version with `7.0.0-alpha.3`.
305
346
 
306
347
  ### Fixed
307
348
 
308
- ## [6.2.0-beta.0]
349
+ ## 6.2.0-beta.0
309
350
 
310
351
  ### Added
352
+
311
353
  - Added `interfaces.GetAllOptions`.
312
354
 
313
355
  ### Changed
356
+
314
357
  - Updated `container.getAll` with `options` optional param.
315
358
  - Updated `container.getAllAsync` with `options` optional param.
316
359
 
317
360
  ### Fixed
318
361
 
319
- ## [6.1.6]
362
+ ## 6.1.6
320
363
 
321
364
  ### Fixed
365
+
322
366
  - Fixed unexpected property access while running planning checks on injected base types.
323
367
  - Updated ESM sourcemaps to refelct the right source code files.
324
368
 
325
- ## [6.1.5]
369
+ ## 6.1.5
326
370
 
327
371
  ### Changed
372
+
328
373
  - Updated library to import `reflect-metadata`. Importing `reflect-metadata` before bootstraping a module in the userland is no longer required.
329
374
 
330
375
  ### Fixed
376
+
331
377
  - Updated ESM build to provide proper types regardless of the ts resolution module strategy in the userland.
332
378
  - Fixed container to properly resolve async `.toService` bindings.
333
379
  - Fixed `.toService` binding to properly disable caching any values.
334
380
 
335
- ## [6.1.5-beta.2]
381
+ ## 6.1.5-beta.2
336
382
 
337
383
  ### Fixed
384
+
338
385
  - Updated ESM bundled types to solve circularly referenced types.
339
386
 
340
- ## [6.1.5-beta.1]
387
+ ## 6.1.5-beta.1
341
388
 
342
389
  ### Fixed
390
+
343
391
  - Updated ESM build to provide proper types regardless of the ts resolution module strategy in the userland.
344
392
 
345
- ## [6.1.5-beta.0]
393
+ ## 6.1.5-beta.0
346
394
 
347
395
  ### Changed
396
+
348
397
  - Updated library to import `reflect-metadata`. Importing `reflect-metadata` before bootstraping a module in the userland is no longer required.
349
398
 
350
399
  ### Fixed
400
+
351
401
  - Fixed container to properly resolve async `.toService` bindings.
352
402
  - Fixed `.toService` binding to properly disable caching any values.
353
403
 
354
- ## [6.1.4]
404
+ ## 6.1.4
355
405
 
356
406
  ### Changed
407
+
357
408
  - Updated planner with better error description when a binding can not be properly resolved.
358
409
 
359
410
  ### Fixed
411
+
360
412
  - Updated container to allow deactivating singleton undefined values.
361
413
  - Updated ESM build to be compatible with both bundler and NodeJS module resolution algorithms.
362
414
 
363
- ## [6.1.4-beta.1]
415
+ ## 6.1.4-beta.1
364
416
 
365
417
  ### Fixed
418
+
366
419
  - Updated ESM build to be compatible with both bundler and NodeJS module resolution algorithms.
367
420
 
368
- ## [6.1.4-beta.0]
421
+ ## 6.1.4-beta.0
369
422
 
370
423
  ### Changed
424
+
371
425
  - Updated planner with better error description when a binding can not be properly resolved.
372
426
 
373
- ## [6.1.3]
427
+ ## 6.1.3
374
428
 
375
429
  ### Fixed
430
+
376
431
  - Updated ESM build with missing types.
377
432
 
378
- ## [6.1.2]
433
+ ## 6.1.2
379
434
 
380
435
  ### Changed
436
+
381
437
  - Updated `package.json` to include the `exports` field for better bundler support.
382
438
 
383
439
  ### Fixed
440
+
384
441
  - Updated fetch metadata flows with better error descriptions.
385
442
 
386
- ## [6.1.2-beta.1]
443
+ ## 6.1.2-beta.1
387
444
 
388
445
  ### Changed
446
+
389
447
  - Updated `package.json` to include the `exports` field for better bundler support.
390
448
 
391
- ## [6.1.2-beta.0]
449
+ ## 6.1.2-beta.0
392
450
 
393
451
  ### Fixed
452
+
394
453
  - Updated fetch metadata flows with better error descriptions.
395
454
 
396
- ## [6.1.1]
455
+ ## 6.1.1
397
456
 
398
457
  ### Fixed
458
+
399
459
  - Bumped `@inversifyjs/common` and `@inversifyjs/core` fixing wrong dev engines constraints.
400
460
 
401
- ## [6.1.0]
461
+ ## 6.1.0
402
462
 
403
463
  ### Changed
464
+
404
465
  - Updated `ServiceIdentifier` to rely on `Function` instead of `Abstract<T>`.
405
466
 
406
467
  ### Fixed
468
+
407
469
  - Fixed `Target.getNameTag` with the right type: `number | string | symbol`.
408
470
  - Fixed `interfaces.ModuleActivationStore.addDeactivation` to enforce `serviceIdentifier` and `onDeactivation` are consistent.
409
471
  - Fixed `interfaces.ModuleActivationStore.addActivation` to enforce `serviceIdentifier` and `onDeactivation` are consistent.
410
472
 
411
- ## [6.0.3]
473
+ ## 6.0.3
412
474
 
413
475
  ### Fixed
476
+
414
477
  property injection tagged as @optional no longer overrides default values with `undefined`.
415
478
  Updated `targetName` to be a valid `typescript@5` decorator.
416
479
 
417
- ## [6.0.2]
480
+ ## 6.0.2
418
481
 
419
482
  ### Added
483
+
420
484
  Brought tests up to 100% Code Coverage
421
485
 
422
486
  ### Changed
487
+
423
488
  LazyIdentfier Tests
424
489
  Removed browser test pipeline, browserify, karma (#1542)
425
490
  Update all dependencies except typescript (#1531)
426
491
 
427
492
  ### Fixed
493
+
428
494
  Less than 100% code coverage
429
495
  Use default class property for @optional injected properties (#1467)
430
496
  Remove circular import (#1516)
@@ -432,8 +498,10 @@ Fix strict type checking on @unmanaged decorator (#1499)
432
498
  Fix typo (LazyServiceIdentifer -> LazyServiceIdentifier) (#1483)
433
499
  Fix typo (circular dependency error message) (#1485)
434
500
 
435
- ## [6.0.1] - 2021-10-14
501
+ ## 6.0.1 - 2021-10-14
502
+
436
503
  ### Added
504
+
437
505
  - add API method for check dependency only in current container
438
506
  - createTaggedDecorator #1343
439
507
  - Async bindings #1132
@@ -444,39 +512,51 @@ Fix typo (circular dependency error message) (#1485)
444
512
  - Added @preDestroy decorator #1132
445
513
 
446
514
  ### Changed
515
+
447
516
  - @postConstruct can target an asyncronous function #1132
448
517
  - Singleton scoped services cache resolved values once the result promise is fulfilled #1320
449
518
 
450
519
  ### Fixed
520
+
451
521
  - only inject decorator can be applied to setters #1342
452
522
  - Container.resolve should resolve in that container #1338
453
523
 
454
- ## [5.1.1] - 2021-04-25
524
+ ## 5.1.1 - 2021-04-25
525
+
455
526
  -Fix pre-publish for build artifacts
456
527
 
457
- ## [5.1.0] - 2021-04-25
528
+ ## 5.1.0 - 2021-04-25
529
+
458
530
  ### Added
531
+
459
532
  - Upgrade information for v4.x to v5.x
460
533
 
461
534
  ### Changed
535
+
462
536
  - Update BindingToSyntax with `.toAutoNamedFactory()`.
463
537
 
464
538
  ### Fixed
539
+
465
540
  - Fix `Target.isTagged()` to exclude `optional` from tag injections #1190.
466
541
  - Update `toConstructor`, `toFactory`, `toFunction`, `toAutoFactory`, `toProvider` and `toConstantValue` to have singleton scope #1297.
467
542
  - Fix injection on optional properties when targeting ES6 #928
468
543
 
469
- ## [5.0.1] - 2018-10-17
544
+ ## 5.0.1 - 2018-10-17
545
+
470
546
  ### Added
547
+
471
548
  - Updating constructor injection wiki document with concrete injection example #922
472
549
 
473
550
  ### Changed
551
+
474
552
  - Change GUID to incremented counter for better performance #882
475
553
 
476
554
  ### Fixed
555
+
477
556
  - fix broken compilation by adding `.toString()` so symbols serialization #893
478
557
  - Fix problem with applying options on Container.resolve (fix #914) #915
479
558
  - Fixed documentation issues
480
559
 
481
- ## [4.14.0] - 2018-10-16
560
+ ## 4.14.0 - 2018-10-16
561
+
482
562
  Deprecated - Replaced by 5.0.1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2017 Remo H. Jansen
3
+ Copyright (c) 2015-2025 Remo H. Jansen
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -6,12 +6,10 @@
6
6
  <br>
7
7
  <br>
8
8
  <a href="https://github.com/inversify/InversifyJS" target="__blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/inversify/InversifyJS?style=social"></a>
9
- <!--<a href="https://twitter.com/inversifyjs" target="__blank"><img alt="Twitter" src="https://img.shields.io/twitter/follow/InversifyJS.svg?maxAge=86400&style=social"></a>-->
10
9
  <a href="https://discord.gg/jXcMagAPnm" target="__blank"><img alt="Discord Server" src="https://img.shields.io/discord/816766547879657532?style=social&logo=discord"></a>
11
10
  </p>
12
11
 
13
- # InversifyJS
14
- A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
12
+ ![Inversify social](./assets/inversify-social.png)
15
13
 
16
14
  ## 📕 Documentation
17
15
  Documentation is available at https://inversify.io
@@ -57,17 +55,3 @@ InversifyJS has been developed with 4 main goals:
57
55
  ## Acknowledgements
58
56
 
59
57
  Thanks a lot to all the [contributors](https://github.com/inversify/InversifyJS/graphs/contributors), all the developers out there using InversifyJS and all those that help us to spread the word by sharing content about InversifyJS online. Without your feedback and support this project would not be possible.
60
-
61
- ## License
62
-
63
- License under the MIT License (MIT)
64
-
65
- Copyright © 2015-2017 [Remo H. Jansen](http://www.remojansen.com)
66
-
67
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
68
-
69
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
70
-
71
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
72
-
73
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,5 +1,5 @@
1
1
  import 'reflect-metadata';
2
2
  export { Newable, LazyServiceIdentifier, ServiceIdentifier, } from '@inversifyjs/common';
3
- export { Bind, BindInFluentSyntax, BindingIdentifier, BindInWhenOnFluentSyntax, BindOnFluentSyntax, BindToFluentSyntax, BindWhenFluentSyntax, BindWhenOnFluentSyntax, BoundServiceSyntax, Container, ContainerModule, ContainerModuleLoadOptions, ContainerOptions, IsBound, IsBoundOptions, OnActivation, OnDeactivation, Rebind, RebindSync, ResolvedValueInjectOptions, ResolvedValueMetadataInjectOptions, ResolvedValueMetadataInjectTagOptions, Unbind, UnbindSync, } from '@inversifyjs/container';
3
+ export { Bind, BindInFluentSyntax, BindingIdentifier, BindInWhenOnFluentSyntax, BindOnFluentSyntax, BindToFluentSyntax, BindWhenFluentSyntax, BindWhenOnFluentSyntax, BoundServiceSyntax, Container, ContainerModule, ContainerModuleLoadOptions, ContainerOptions, IsBound, IsBoundOptions, MapToResolvedValueInjectOptions, OnActivation, OnDeactivation, Rebind, RebindSync, ResolvedValueInjectOptions, ResolvedValueMetadataInjectOptions, ResolvedValueMetadataInjectTagOptions, Unbind, UnbindSync, } from '@inversifyjs/container';
4
4
  export { BindingActivation, BindingConstraints, BindingDeactivation, BindingScope, DynamicValueBuilder, Factory, GetAllOptions, GetOptions, GetOptionsTagConstraint, InjectFromBaseOptions, InjectFromBaseOptionsLifecycle, InjectFromHierarchyOptions, InjectFromHierarchyOptionsLifecycle, MetadataName, MetadataTag, MultiInjectOptions, OptionalGetOptions, Provider, ResolutionContext, bindingScopeValues, bindingTypeValues, decorate, inject, injectFromBase, injectFromHierarchy, injectable, multiInject, named, optional, unmanaged, tagged, postConstruct, preDestroy, } from '@inversifyjs/core';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,IAAI,EACJ,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,OAAO,EACP,cAAc,EACd,YAAY,EACZ,cAAc,EACd,MAAM,EACN,UAAU,EACV,0BAA0B,EAC1B,kCAAkC,EAClC,qCAAqC,EACrC,MAAM,EACN,UAAU,GACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,OAAO,EACP,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAElB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,aAAa,EACb,UAAU,GACX,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,IAAI,EACJ,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,OAAO,EACP,cAAc,EACd,+BAA+B,EAC/B,YAAY,EACZ,cAAc,EACd,MAAM,EACN,UAAU,EACV,0BAA0B,EAC1B,kCAAkC,EAClC,qCAAqC,EACrC,MAAM,EACN,UAAU,GACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,OAAO,EACP,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAElB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,aAAa,EACb,UAAU,GACX,MAAM,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAE1B,8CAI6B;AAF3B,+GAAA,qBAAqB,OAAA;AAGvB,oDAyBgC;AAf9B,sGAAA,SAAS,OAAA;AACT,4GAAA,eAAe,OAAA;AAejB,0CAmC2B;AAdzB,0GAAA,kBAAkB,OAAA;AAClB,yGAAA,iBAAiB,OAAA;AACjB,gGAAA,QAAQ,OAAA;AACR,8FAAA,MAAM,OAAA;AACN,sGAAA,cAAc,OAAA;AACd,2GAAA,mBAAmB,OAAA;AACnB,kGAAA,UAAU,OAAA;AACV,mGAAA,WAAW,OAAA;AACX,6FAAA,KAAK,OAAA;AACL,gGAAA,QAAQ,OAAA;AACR,iGAAA,SAAS,OAAA;AACT,8FAAA,MAAM,OAAA;AACN,qGAAA,aAAa,OAAA;AACb,kGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAE1B,8CAI6B;AAF3B,+GAAA,qBAAqB,OAAA;AAGvB,oDA0BgC;AAhB9B,sGAAA,SAAS,OAAA;AACT,4GAAA,eAAe,OAAA;AAgBjB,0CAmC2B;AAdzB,0GAAA,kBAAkB,OAAA;AAClB,yGAAA,iBAAiB,OAAA;AACjB,gGAAA,QAAQ,OAAA;AACR,8FAAA,MAAM,OAAA;AACN,sGAAA,cAAc,OAAA;AACd,2GAAA,mBAAmB,OAAA;AACnB,kGAAA,UAAU,OAAA;AACV,mGAAA,WAAW,OAAA;AACX,6FAAA,KAAK,OAAA;AACL,gGAAA,QAAQ,OAAA;AACR,iGAAA,SAAS,OAAA;AACT,8FAAA,MAAM,OAAA;AACN,qGAAA,aAAa,OAAA;AACb,kGAAA,UAAU,OAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=inject.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/inject.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=injectable.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectable.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/injectable.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=multi_inject.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi_inject.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/multi_inject.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=named.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/named.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=optional.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optional.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/optional.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=post_construct.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post_construct.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/post_construct.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=bugs.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bugs.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/bugs/bugs.int.spec.ts"],"names":[],"mappings":""}