Skip to content

Commit

Permalink
build: 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wszgrcy committed Oct 4, 2023
1 parent 27430d7 commit 433b380
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 21 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "wszgrcy",
"license": "MIT",
"peerDependencies": {
"typescript": "5.1.6"
"typescript": "5.2.2"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
Expand All @@ -27,13 +27,13 @@
"prettier": "^2.3.2",
"pretty-quick": "^3.1.3",
"rimraf": "^5.0.1",
"rollup": "^3.28.1",
"rollup": "^3.29.4",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "5.1.6"
"typescript": "5.2.2"
},
"dependencies": {
"cross-env": "^7.0.3"
}
}
}
4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "static-injector",
"version": "2.2.0",
"version": "2.2.1",
"description": "Angular的静态注入器独立使用版本",
"keywords": [
"angular",
Expand Down Expand Up @@ -29,7 +29,7 @@
"author": "wszgrcy",
"license": "MIT",
"peerDependencies": {
"typescript": "~5.1.6"
"typescript": ">=5.0.0"
},
"devDependencies": {},
"sideEffects": false
Expand Down
9 changes: 9 additions & 0 deletions test/fixture/hello-without-provide-object.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Injectable, Injector } from 'static-injector';
@Injectable()
export class MyClass {
hello() {
return 'hello';
}
}
let injector = Injector.create({ providers: [MyClass] });
export const instance = injector.get(MyClass);
4 changes: 4 additions & 0 deletions test/import/hello.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { instance } from '../fixture/hello';
import { instance as instance2 } from '../fixture/hello-without-provide-object';
describe('hello', () => {
it('hello', () => {
expect(instance.hello()).toBe('hello');
});
it('hello-without-provide-object', () => {
expect(instance2.hello()).toBe('hello');
});
});

0 comments on commit 433b380

Please sign in to comment.