inversify 7.9.1 → 7.10.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 (79) hide show
  1. package/CHANGELOG.md +142 -60
  2. package/LICENSE +1 -1
  3. package/README.md +5 -15
  4. package/lib/cjs/index.d.ts +2 -2
  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 +2 -2
  78. package/lib/esm/index.d.ts.map +1 -1
  79. package/package.json +27 -47
package/CHANGELOG.md CHANGED
@@ -1,51 +1,68 @@
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.1
6
4
 
7
- ## [Unreleased]
5
+ ### Patch Changes
6
+
7
+ - Added `MapToResolvedValueInjectOptions` type
8
+
9
+ - Updated dependencies
10
+ - @inversifyjs/container@1.13.1
11
+
12
+ ## 7.10.0
8
13
 
9
14
  ### Added
10
15
 
16
+ - Added `InjectFromBaseOptionsLifecycle`.
17
+ - Added `InjectFromHierarchyOptionsLifecycle`.
18
+
11
19
  ### Changed
12
20
 
13
- ## [7.9.1]
21
+ - Updated `injectFromBase` with `lifecycle` property.
22
+ - Updated `injectFromHierarchy` with `lifecycle` property.
23
+
24
+ ## 7.9.1
14
25
 
15
26
  ### Changed
27
+
16
28
  - Updated `Container` to trigger autobind options on autobound parent container related binding requests.
17
29
 
18
- ## [7.9.0]
30
+ ## 7.9.0
19
31
 
20
32
  ### Changed
21
33
 
22
34
  - Updated `decorate` to allow method parameter decoration.
23
35
 
24
- ## [7.8.1]
36
+ ## 7.8.1
25
37
 
26
38
  ### Changed
39
+
27
40
  - Fixed `injectFromHierarchy` avoiding crash when traversing `Object` metadata.
28
41
 
29
- ## [7.8.0]
42
+ ## 7.8.0
30
43
 
31
44
  ### Added
45
+
32
46
  - Added `injectFromHierarchy`.
33
47
 
34
- ## [7.7.1]
48
+ ## 7.7.1
35
49
 
36
50
  ### Changed
51
+
37
52
  - Fixed a bug involving circular dependencies when resolving services in some edge cases.
38
53
  - Fixed a bug involving circular dependencies when bindings are bound in some edge cases.
39
54
 
40
- ## [7.7.1-beta.0]
55
+ ## 7.7.1-beta.0
41
56
 
42
57
  ### Changed
58
+
43
59
  - Fixed a bug causing `Container.bind` and `Container.unbind` to avoid throwing planning errors.
44
60
  - Fixed a bug causing wrong cached plans involving bindings with ancestor related constraints.
45
61
 
46
- ## [7.7.0]
62
+ ## 7.7.0
47
63
 
48
64
  ### Added
65
+
49
66
  - Added `Bind` type.
50
67
  - Added `IsBound` type.
51
68
  - Added `OnActivation` type.
@@ -56,133 +73,154 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
56
73
  - Added `UnbindSync` type.
57
74
 
58
75
  ### Changed
76
+
59
77
  - Updated `BindOnFluentSyntaxImplementation.onDeactivation` to throw an error on non singleton scoped bindings.
60
78
  - Updated `ServiceResolutionManager` to provide right `getChained` operation after computed properties are reset.
61
79
  - Updated `Container` to properly manage bindings bindings on child containers after a parent container restores a snapshot.
62
80
 
63
- ## [7.6.1]
81
+ ## 7.6.1
64
82
 
65
83
  ### Changed
84
+
66
85
  - Updated `getAll` and `getAllAsync` options with missing `chained` property.
67
86
 
68
- ## [7.6.0]
87
+ ## 7.6.0
69
88
 
70
89
  ### Added
90
+
71
91
  - Added `MultiInjectOptions`.
72
92
 
73
93
  ### Changed
94
+
74
95
  - Updated `multiInject` decorator with optional `MultiInjectOptions`.
75
96
  - Updated `getAll` and `getAllAsync` options with optional`chained` property.
76
97
 
77
- ## [7.5.4]
98
+ ## 7.5.4
78
99
 
79
100
  ### Changed
101
+
80
102
  - Updated `ServiceIdentifier` to rely on `Function` again. This solves an issue affecting classes with protected constructors.
81
103
 
82
- ## [7.5.3]
104
+ ## 7.5.3
83
105
 
84
106
  ### Changed
107
+
85
108
  - 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.
86
109
 
87
- ## [7.5.2]
110
+ ## 7.5.2
88
111
 
89
112
  ### Changed
113
+
90
114
  - Fixed `Container.snapshot` so snapshot bindings are not updated after a snapshot is taken.
91
115
  - Fixed a memory leak affecting child containers.
92
116
 
93
- ## [7.5.1]
117
+ ## 7.5.1
94
118
 
95
119
  ### Changed
120
+
96
121
  - Updated `Container.get` like methods to properly set bindings when autobind mode is set:
97
122
  - `@injectable` scopes properly handled.
98
123
  - Autobind mode no longer creates duplicated bindings.
99
124
 
100
- ## [7.5.0]
125
+ ## 7.5.0
101
126
 
102
127
  ### Changed
128
+
103
129
  - Updated `Container` with `unloadSync`.
104
130
  - Updated `Container` with `loadSync`.
105
131
 
106
- ## [7.4.0]
132
+ ## 7.4.0
107
133
 
108
134
  ### Changed
135
+
109
136
  - Updated `ContainerModuleLoadOptions` with `rebind`.
110
137
  - Updated `ContainerModuleLoadOptions` with `rebindSync`.
111
138
  - Updated `BindToFluentSyntax.toResolvedValue` with additional type constraints.
112
139
 
113
- ## [7.3.0]
140
+ ## 7.3.0
114
141
 
115
142
  ### Changed
143
+
116
144
  - Updated `Container` with `rebindSync`.
117
145
  - Updated `Container` with `unbindSync`.
118
146
  - Updated `Container` with `rebind`.
119
147
  - Updated `ContainerModuleLoadOptions` with `unbindSync`.
120
148
  - Updated `ContainerModuleLoadOptions.unbind` to accept `BindingIdentifier`.
121
149
 
122
- ## [7.2.0]
150
+ ## 7.2.0
123
151
 
124
152
  ### Added
153
+
125
154
  - Added `BindingIdentifier`.
126
155
 
127
156
  ### Changed
157
+
128
158
  - Updated `BindInFluentSyntax` with `getIdentifier`.
129
159
  - Updated `Container.unbind` to handle `BindingIdentifier`.
130
160
  - Updated `BindOnFluentSyntax` with `getIdentifier`.
131
161
  - Updated `BindWhenFluentSyntax` with `getIdentifier`.
132
162
 
133
- ## [7.1.0]
163
+ ## 7.1.0
134
164
 
135
165
  ### Added
166
+
136
167
  - Added `BindingActivation`.
137
168
  - Added `BindingDeactivation`.
138
169
 
139
- ## [7.0.2]
170
+ ## 7.0.2
140
171
 
141
172
  ### Changed
173
+
142
174
  - Updated `container.get` like methods to no longer initialize twice singleton scoped bindings.
143
175
 
144
- ## [7.0.1]
176
+ ## 7.0.1
145
177
 
146
178
  ### Changed
179
+
147
180
  - Updated `Container.get` like methods to no longer initialize twice singleton scoped bindings.
148
181
 
149
- ## [7.0.0]
182
+ ## 7.0.0
150
183
 
151
184
  Parity version with `7.0.0-alpha.5`
152
185
 
153
- ## [7.0.0-alpha.5]
186
+ ## 7.0.0-alpha.5
154
187
 
155
188
  ### Changed
189
+
156
190
  - Renamed `BindingMetadata` to `BindingConstraints`.
157
191
  - Improved performance on `Container.get` like methods.
158
192
 
159
- ## [7.0.0-alpha.4]
193
+ ## 7.0.0-alpha.4
160
194
 
161
195
  Parity version with `7.0.0-alpha.3`.
162
196
 
163
- ## [6.2.2]
197
+ ## 6.2.2
164
198
 
165
199
  - Solved issue with npm registry.
166
200
 
167
- ## [7.0.0-alpha.3]
201
+ ## 7.0.0-alpha.3
168
202
 
169
203
  ### Changed
204
+
170
205
  - Updated `BindToFluentSyntax` with `.toResolvedValue`.
171
206
 
172
- ## [7.0.0-alpha.2]
207
+ ## 7.0.0-alpha.2
173
208
 
174
209
  ### Changed
210
+
175
211
  - Updated `Container` with a plan cache. `Container.get`, `Container.getAll`, `Container.getAllAsync` and `Container.getAsync` performance has been improved.
176
212
 
177
- ## [7.0.0-alpha.1]
213
+ ## 7.0.0-alpha.1
178
214
 
179
215
  ### Changed
216
+
180
217
  - Updated `GetOptions` with `autobind`.
181
218
  - Updated `ContainerOptions` with `autobind`.
182
219
 
183
- ## [7.0.0-alpha.0]
220
+ ## 7.0.0-alpha.0
184
221
 
185
222
  ### Added
223
+
186
224
  - Added `BindInFluentSyntax`.
187
225
  - Added `BindInWhenOnFluentSyntax`.
188
226
  - Added `BindOnFluentSyntax`.
@@ -207,6 +245,7 @@ Parity version with `7.0.0-alpha.3`.
207
245
  - Added `injectFromBase` decorator.
208
246
 
209
247
  ### Changed
248
+
210
249
  - Updated `injectable` with optional `scope`.
211
250
  - [Breaking] Updated `ContainerModule` constructor to receive a callback with `ContainerModuleLoadOptions` instead of `interfaces.ContainerModuleCallBack`.
212
251
  - [Breaking] Updated `ContainerModule`.load to return `Promise<void>`.
@@ -224,11 +263,12 @@ Parity version with `7.0.0-alpha.3`.
224
263
  - [Breaking] Updated `Container` with no `unbindAllAsync` in favor of an async `Container.unbindAll`.
225
264
  - [Breaking] Updated `Container` with no `unloadAsync` in favor of an async `Container.unload`.
226
265
 
227
-
228
266
  ### Fixed
267
+
229
268
  - Updated `decorate` to no longer require a unexpected prototypes to decorate property nor methods.
230
269
 
231
270
  ### Removed
271
+
232
272
  - [Breaking] Removed deprecated `LazyServiceIdentifer`. Use `LazyServiceIdentifier` instead.
233
273
  - [Breaking] Removed `BindingScopeEnum`. Use `bindingScopeValues` instead.
234
274
  - [Breaking] Removed `BindingTypeEnum`.
@@ -246,18 +286,20 @@ Parity version with `7.0.0-alpha.3`.
246
286
  - [Breaking] Removed `getServiceIdentifierAsString`.
247
287
  - [Breaking] Removed `multiBindToService`.
248
288
 
249
-
250
- ## [6.2.1]
289
+ ## 6.2.1
251
290
 
252
291
  ### Fixed
292
+
253
293
  - Added missing `LazyServiceIdentifer`.
254
294
 
255
- ## [6.2.0]
295
+ ## 6.2.0
256
296
 
257
297
  ### Added
298
+
258
299
  - Added `interfaces.GetAllOptions`.
259
300
 
260
301
  ### Changed
302
+
261
303
  - Updated `container.getAll` with `options` optional param.
262
304
  - Updated `container.getAllAsync` with `options` optional param.
263
305
  - Updated `interfaces.NextArgs` with optional `isOptional` param.
@@ -274,11 +316,12 @@ Parity version with `7.0.0-alpha.3`.
274
316
  - Updated `container` with `tryGetAllNamed`.
275
317
  - Updated `container` with `tryGetAllNamedAsync`.
276
318
 
277
- ## [6.2.0-beta.1]
319
+ ## 6.2.0-beta.1
278
320
 
279
321
  ### Added
280
322
 
281
323
  ### Changed
324
+
282
325
  - Updated `interfaces.NextArgs` with optional `isOptional` param.
283
326
  - Updated `container` with `tryGet`.
284
327
  - Updated `container` with `tryGetAsync`.
@@ -295,126 +338,151 @@ Parity version with `7.0.0-alpha.3`.
295
338
 
296
339
  ### Fixed
297
340
 
298
- ## [6.2.0-beta.0]
341
+ ## 6.2.0-beta.0
299
342
 
300
343
  ### Added
344
+
301
345
  - Added `interfaces.GetAllOptions`.
302
346
 
303
347
  ### Changed
348
+
304
349
  - Updated `container.getAll` with `options` optional param.
305
350
  - Updated `container.getAllAsync` with `options` optional param.
306
351
 
307
352
  ### Fixed
308
353
 
309
- ## [6.1.6]
354
+ ## 6.1.6
310
355
 
311
356
  ### Fixed
357
+
312
358
  - Fixed unexpected property access while running planning checks on injected base types.
313
359
  - Updated ESM sourcemaps to refelct the right source code files.
314
360
 
315
- ## [6.1.5]
361
+ ## 6.1.5
316
362
 
317
363
  ### Changed
364
+
318
365
  - Updated library to import `reflect-metadata`. Importing `reflect-metadata` before bootstraping a module in the userland is no longer required.
319
366
 
320
367
  ### Fixed
368
+
321
369
  - Updated ESM build to provide proper types regardless of the ts resolution module strategy in the userland.
322
370
  - Fixed container to properly resolve async `.toService` bindings.
323
371
  - Fixed `.toService` binding to properly disable caching any values.
324
372
 
325
- ## [6.1.5-beta.2]
373
+ ## 6.1.5-beta.2
326
374
 
327
375
  ### Fixed
376
+
328
377
  - Updated ESM bundled types to solve circularly referenced types.
329
378
 
330
- ## [6.1.5-beta.1]
379
+ ## 6.1.5-beta.1
331
380
 
332
381
  ### Fixed
382
+
333
383
  - Updated ESM build to provide proper types regardless of the ts resolution module strategy in the userland.
334
384
 
335
- ## [6.1.5-beta.0]
385
+ ## 6.1.5-beta.0
336
386
 
337
387
  ### Changed
388
+
338
389
  - Updated library to import `reflect-metadata`. Importing `reflect-metadata` before bootstraping a module in the userland is no longer required.
339
390
 
340
391
  ### Fixed
392
+
341
393
  - Fixed container to properly resolve async `.toService` bindings.
342
394
  - Fixed `.toService` binding to properly disable caching any values.
343
395
 
344
- ## [6.1.4]
396
+ ## 6.1.4
345
397
 
346
398
  ### Changed
399
+
347
400
  - Updated planner with better error description when a binding can not be properly resolved.
348
401
 
349
402
  ### Fixed
403
+
350
404
  - Updated container to allow deactivating singleton undefined values.
351
405
  - Updated ESM build to be compatible with both bundler and NodeJS module resolution algorithms.
352
406
 
353
- ## [6.1.4-beta.1]
407
+ ## 6.1.4-beta.1
354
408
 
355
409
  ### Fixed
410
+
356
411
  - Updated ESM build to be compatible with both bundler and NodeJS module resolution algorithms.
357
412
 
358
- ## [6.1.4-beta.0]
413
+ ## 6.1.4-beta.0
359
414
 
360
415
  ### Changed
416
+
361
417
  - Updated planner with better error description when a binding can not be properly resolved.
362
418
 
363
- ## [6.1.3]
419
+ ## 6.1.3
364
420
 
365
421
  ### Fixed
422
+
366
423
  - Updated ESM build with missing types.
367
424
 
368
- ## [6.1.2]
425
+ ## 6.1.2
369
426
 
370
427
  ### Changed
428
+
371
429
  - Updated `package.json` to include the `exports` field for better bundler support.
372
430
 
373
431
  ### Fixed
432
+
374
433
  - Updated fetch metadata flows with better error descriptions.
375
434
 
376
- ## [6.1.2-beta.1]
435
+ ## 6.1.2-beta.1
377
436
 
378
437
  ### Changed
438
+
379
439
  - Updated `package.json` to include the `exports` field for better bundler support.
380
440
 
381
- ## [6.1.2-beta.0]
441
+ ## 6.1.2-beta.0
382
442
 
383
443
  ### Fixed
444
+
384
445
  - Updated fetch metadata flows with better error descriptions.
385
446
 
386
- ## [6.1.1]
447
+ ## 6.1.1
387
448
 
388
449
  ### Fixed
450
+
389
451
  - Bumped `@inversifyjs/common` and `@inversifyjs/core` fixing wrong dev engines constraints.
390
452
 
391
- ## [6.1.0]
453
+ ## 6.1.0
392
454
 
393
455
  ### Changed
456
+
394
457
  - Updated `ServiceIdentifier` to rely on `Function` instead of `Abstract<T>`.
395
458
 
396
459
  ### Fixed
460
+
397
461
  - Fixed `Target.getNameTag` with the right type: `number | string | symbol`.
398
462
  - Fixed `interfaces.ModuleActivationStore.addDeactivation` to enforce `serviceIdentifier` and `onDeactivation` are consistent.
399
463
  - Fixed `interfaces.ModuleActivationStore.addActivation` to enforce `serviceIdentifier` and `onDeactivation` are consistent.
400
464
 
401
- ## [6.0.3]
465
+ ## 6.0.3
402
466
 
403
467
  ### Fixed
468
+
404
469
  property injection tagged as @optional no longer overrides default values with `undefined`.
405
470
  Updated `targetName` to be a valid `typescript@5` decorator.
406
471
 
407
- ## [6.0.2]
472
+ ## 6.0.2
408
473
 
409
474
  ### Added
475
+
410
476
  Brought tests up to 100% Code Coverage
411
477
 
412
478
  ### Changed
479
+
413
480
  LazyIdentfier Tests
414
481
  Removed browser test pipeline, browserify, karma (#1542)
415
482
  Update all dependencies except typescript (#1531)
416
483
 
417
484
  ### Fixed
485
+
418
486
  Less than 100% code coverage
419
487
  Use default class property for @optional injected properties (#1467)
420
488
  Remove circular import (#1516)
@@ -422,8 +490,10 @@ Fix strict type checking on @unmanaged decorator (#1499)
422
490
  Fix typo (LazyServiceIdentifer -> LazyServiceIdentifier) (#1483)
423
491
  Fix typo (circular dependency error message) (#1485)
424
492
 
425
- ## [6.0.1] - 2021-10-14
493
+ ## 6.0.1 - 2021-10-14
494
+
426
495
  ### Added
496
+
427
497
  - add API method for check dependency only in current container
428
498
  - createTaggedDecorator #1343
429
499
  - Async bindings #1132
@@ -434,39 +504,51 @@ Fix typo (circular dependency error message) (#1485)
434
504
  - Added @preDestroy decorator #1132
435
505
 
436
506
  ### Changed
507
+
437
508
  - @postConstruct can target an asyncronous function #1132
438
509
  - Singleton scoped services cache resolved values once the result promise is fulfilled #1320
439
510
 
440
511
  ### Fixed
512
+
441
513
  - only inject decorator can be applied to setters #1342
442
514
  - Container.resolve should resolve in that container #1338
443
515
 
444
- ## [5.1.1] - 2021-04-25
516
+ ## 5.1.1 - 2021-04-25
517
+
445
518
  -Fix pre-publish for build artifacts
446
519
 
447
- ## [5.1.0] - 2021-04-25
520
+ ## 5.1.0 - 2021-04-25
521
+
448
522
  ### Added
523
+
449
524
  - Upgrade information for v4.x to v5.x
450
525
 
451
526
  ### Changed
527
+
452
528
  - Update BindingToSyntax with `.toAutoNamedFactory()`.
453
529
 
454
530
  ### Fixed
531
+
455
532
  - Fix `Target.isTagged()` to exclude `optional` from tag injections #1190.
456
533
  - Update `toConstructor`, `toFactory`, `toFunction`, `toAutoFactory`, `toProvider` and `toConstantValue` to have singleton scope #1297.
457
534
  - Fix injection on optional properties when targeting ES6 #928
458
535
 
459
- ## [5.0.1] - 2018-10-17
536
+ ## 5.0.1 - 2018-10-17
537
+
460
538
  ### Added
539
+
461
540
  - Updating constructor injection wiki document with concrete injection example #922
462
541
 
463
542
  ### Changed
543
+
464
544
  - Change GUID to incremented counter for better performance #882
465
545
 
466
546
  ### Fixed
547
+
467
548
  - fix broken compilation by adding `.toString()` so symbols serialization #893
468
549
  - Fix problem with applying options on Container.resolve (fix #914) #915
469
550
  - Fixed documentation issues
470
551
 
471
- ## [4.14.0] - 2018-10-16
552
+ ## 4.14.0 - 2018-10-16
553
+
472
554
  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
@@ -1,3 +1,8 @@
1
+ > [!NOTE]
2
+ > InversifyJS will be moving to the [monorepo](https://github.com/inversify/monorepo). Please, consider creating issues and pull requests there.
3
+ >
4
+ > Next releases will be published in the monorepo, so consider starring it to be notified.
5
+
1
6
  <p align="center">
2
7
  <a href="https://www.npmjs.com/package/inversify" target="__blank"><img src="https://img.shields.io/npm/v/inversify?color=0476bc&label=" alt="NPM version"></a>
3
8
  <a href="https://www.npmjs.com/package/inversify" target="__blank"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/inversify?color=3890aa&label="></a>
@@ -6,7 +11,6 @@
6
11
  <br>
7
12
  <br>
8
13
  <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
14
  <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
15
  </p>
12
16
 
@@ -57,17 +61,3 @@ InversifyJS has been developed with 4 main goals:
57
61
  ## Acknowledgements
58
62
 
59
63
  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';
4
- export { BindingActivation, BindingConstraints, BindingDeactivation, BindingScope, DynamicValueBuilder, Factory, GetAllOptions, GetOptions, GetOptionsTagConstraint, MetadataName, MetadataTag, MultiInjectOptions, OptionalGetOptions, Provider, ResolutionContext, bindingScopeValues, bindingTypeValues, decorate, inject, injectFromBase, injectFromHierarchy, injectable, multiInject, named, optional, unmanaged, tagged, postConstruct, preDestroy, } from '@inversifyjs/core';
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
+ 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,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,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,0CA8B2B;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":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=issue_1190.test.d.ts.map