Skip to content

Commit 62d842b

Browse files
authored
Bump inversify dependencies (#1909)
* chore: bump inversify dependencies * style: fix linter issues
1 parent 57d638a commit 62d842b

8 files changed

Lines changed: 47 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### Changed
1212

13+
## [7.10.0]
14+
15+
### Added
16+
- Added `InjectFromBaseOptionsLifecycle`.
17+
- Added `InjectFromHierarchyOptionsLifecycle`.
18+
19+
### Changed
20+
- Updated `injectFromBase` with `lifecycle` property.
21+
- Updated `injectFromHierarchy` with `lifecycle` property.
22+
1323
## [7.9.1]
1424

1525
### Changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"description": "A powerful and lightweight inversion of control container for JavaScript and Node.js apps powered by TypeScript.",
77
"dependencies": {
88
"@inversifyjs/common": "1.5.2",
9-
"@inversifyjs/container": "1.12.7",
10-
"@inversifyjs/core": "8.0.0"
9+
"@inversifyjs/container": "1.13.0",
10+
"@inversifyjs/core": "9.0.0"
1111
},
1212
"devEngines": {
1313
"packageManager": {
@@ -89,5 +89,5 @@
8989
"test:cjs": "nyc --reporter=lcov mocha lib/cjs/test/*.test.js lib/cjs/test/**/*.test.js --reporter spec"
9090
},
9191
"sideEffects": false,
92-
"version": "7.9.1"
92+
"version": "7.10.0"
9393
}

pnpm-lock.yaml

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,15 @@ export {
4141
GetAllOptions,
4242
GetOptions,
4343
GetOptionsTagConstraint,
44+
InjectFromBaseOptions,
45+
InjectFromBaseOptionsLifecycle,
46+
InjectFromHierarchyOptions,
47+
InjectFromHierarchyOptionsLifecycle,
4448
MetadataName,
4549
MetadataTag,
4650
MultiInjectOptions,
4751
OptionalGetOptions,
52+
// eslint-disable-next-line @typescript-eslint/no-deprecated
4853
Provider,
4954
ResolutionContext,
5055
bindingScopeValues,

src/test/annotation/post_construct.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ describe('@postConstruct', () => {
99
function setup() {
1010
class Katana {
1111
@postConstruct()
12-
public testMethod1() {
13-
/* ... */
14-
}
15-
1612
@postConstruct()
17-
public testMethod2() {
13+
public testMethod1() {
1814
/* ... */
1915
}
2016
}

src/test/bugs/issue_1297.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,24 @@ describe('Issue 1297', () => {
7676
const container: Container = new Container();
7777

7878
const onActivationHandlerSpy: sinon.SinonSpy<
79+
// eslint-disable-next-line @typescript-eslint/no-deprecated
7980
[ResolutionContext, Provider<Katana>],
81+
// eslint-disable-next-line @typescript-eslint/no-deprecated
8082
Provider<Katana>
8183
> = sinon.spy<
8284
(
8385
_: ResolutionContext,
86+
// eslint-disable-next-line @typescript-eslint/no-deprecated
8487
injectableObj: Provider<Katana>,
88+
// eslint-disable-next-line @typescript-eslint/no-deprecated
8589
) => Provider<Katana>
90+
// eslint-disable-next-line @typescript-eslint/no-deprecated
8691
>((_: ResolutionContext, injectableObj: Provider<Katana>) => injectableObj);
8792

8893
container
94+
// eslint-disable-next-line @typescript-eslint/no-deprecated
8995
.bind<Provider<Katana>>('Provider<Katana>')
96+
// eslint-disable-next-line @typescript-eslint/no-deprecated
9097
.toProvider(
9198
(_context: ResolutionContext) => async () =>
9299
Promise.resolve(new Katana()),

src/test/features/provider.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ describe('Provider', () => {
3939
const container: Container = new Container();
4040

4141
container.bind<Ninja>('Ninja').to(Ninja).inSingletonScope();
42+
// eslint-disable-next-line @typescript-eslint/no-deprecated
4243
container.bind<NinjaMasterProvider>('Provider<NinjaMaster>').toProvider(
4344
(context: ResolutionContext) => async () =>
4445
new Promise<NinjaMaster>(
@@ -109,8 +110,10 @@ describe('Provider', () => {
109110

110111
container.bind<Sword>('Sword').to(Katana);
111112

113+
// eslint-disable-next-line @typescript-eslint/no-deprecated
112114
type SwordProvider = Provider<Sword, [string, number]>;
113115

116+
// eslint-disable-next-line @typescript-eslint/no-deprecated
114117
container.bind<SwordProvider>('SwordProvider').toProvider(
115118
(context: ResolutionContext): SwordProvider =>
116119
async (material: string, damage: number) =>
@@ -162,6 +165,7 @@ describe('Provider', () => {
162165

163166
container.bind<Warrior>('Warrior').to(Ninja).inSingletonScope(); // Value is singleton!
164167

168+
// eslint-disable-next-line @typescript-eslint/no-deprecated
165169
container.bind<WarriorProvider>('WarriorProvider').toProvider(
166170
(context: ResolutionContext) => async (increaseLevel: number) =>
167171
new Promise<Warrior>((resolve: (value: Warrior) => void) => {

src/test/inversify.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ describe('InversifyJS', () => {
911911
container.bind<Ninja>('Ninja').to(NinjaWithProvider);
912912
container.bind<Katana>('Katana').to(Katana);
913913

914+
// eslint-disable-next-line @typescript-eslint/no-deprecated
914915
container.bind<KatanaProvider>('Provider<Katana>').toProvider(
915916
(context: ResolutionContext) => async () =>
916917
new Promise<Katana>((resolve: (value: Katana) => void) => {

0 commit comments

Comments
 (0)