koatty_container
Advanced tools
Comparing version 1.6.0 to 1.6.2
@@ -25,3 +25,3 @@ /** | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-require-imports": "off", | ||
// "@typescript-eslint/no-require-imports": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
@@ -32,2 +32,3 @@ "@typescript-eslint/member-ordering": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
@@ -34,0 +35,0 @@ "@typescript-eslint/ban-types": ["error", |
@@ -5,2 +5,4 @@ # Changelog | ||
### [1.6.2](https://github.com/koatty/koatty_container/compare/v1.6.0...v1.6.2) (2021-11-20) | ||
### [1.6.0](https://github.com/koatty/koatty_container/compare/v1.5.2...v1.6.0) (2021-07-12) | ||
@@ -7,0 +9,0 @@ |
@@ -11,3 +11,3 @@ "use strict"; | ||
*/ | ||
const helper = tslib_1.__importStar(require("koatty_lib")); | ||
const helper = (0, tslib_1.__importStar)(require("koatty_lib")); | ||
const koatty_logger_1 = require("koatty_logger"); | ||
@@ -180,3 +180,3 @@ const Container_1 = require("./Container"); | ||
if (type && name) { | ||
const methods = Util_1.getMethodNames(target, true).filter((m) => !["constructor", "init", "__before", "__after"].includes(m)); | ||
const methods = (0, Util_1.getMethodNames)(target, true).filter((m) => !["constructor", "init", "__before", "__after"].includes(m)); | ||
methods.forEach((element) => { | ||
@@ -198,3 +198,3 @@ koatty_logger_1.DefaultLogger.Debug(`Register inject AOP ${target.name} method: ${element} => ${type}`); | ||
function hasDefaultAOP(target) { | ||
const allMethods = Util_1.getMethodNames(target).filter((m) => !["constructor", "init"].includes(m)); | ||
const allMethods = (0, Util_1.getMethodNames)(target).filter((m) => !["constructor", "init"].includes(m)); | ||
// class contains the default AOP method | ||
@@ -217,3 +217,3 @@ if (allMethods.includes("__before") || allMethods.includes("__after")) { | ||
// class methods | ||
const methods = Util_1.getMethodNames(target, true).filter((m) => !["constructor", "init", "__before", "__after"].includes(m)); | ||
const methods = (0, Util_1.getMethodNames)(target, true).filter((m) => !["constructor", "init", "__before", "__after"].includes(m)); | ||
koatty_logger_1.DefaultLogger.Warn(`The ${target.name} class has a default AOP method, @BeforeEach and @AfterEach maybe not take effect`); | ||
@@ -220,0 +220,0 @@ methods.forEach((element) => { |
@@ -13,3 +13,3 @@ "use strict"; | ||
require("reflect-metadata"); | ||
const helper = tslib_1.__importStar(require("koatty_lib")); | ||
const helper = (0, tslib_1.__importStar)(require("koatty_lib")); | ||
const Container_1 = require("./Container"); | ||
@@ -100,3 +100,3 @@ const koatty_logger_1 = require("koatty_logger"); | ||
var _a; | ||
const metaData = Util_1.RecursiveGetMetadata(IContainer_1.TAGGED_PROP, target); | ||
const metaData = (0, Util_1.RecursiveGetMetadata)(IContainer_1.TAGGED_PROP, target); | ||
// tslint:disable-next-line: forin | ||
@@ -103,0 +103,0 @@ for (const metaKey in metaData) { |
@@ -13,3 +13,3 @@ "use strict"; | ||
require("reflect-metadata"); | ||
const helper = tslib_1.__importStar(require("koatty_lib")); | ||
const helper = (0, tslib_1.__importStar)(require("koatty_lib")); | ||
const Autowired_1 = require("./Autowired"); | ||
@@ -108,7 +108,7 @@ const IContainer_1 = require("./IContainer"); | ||
// inject autowired | ||
Autowired_1.injectAutowired(target, target.prototype, this); | ||
(0, Autowired_1.injectAutowired)(target, target.prototype, this); | ||
// inject value | ||
Value_1.injectValue(target, target.prototype, this); | ||
(0, Value_1.injectValue)(target, target.prototype, this); | ||
// inject AOP | ||
AOP_1.injectAOP(target, target.prototype, this); | ||
(0, AOP_1.injectAOP)(target, target.prototype, this); | ||
if (options.scope === "Singleton") { | ||
@@ -115,0 +115,0 @@ // instantiation |
@@ -11,5 +11,5 @@ "use strict"; | ||
*/ | ||
tslib_1.__exportStar(require("./Container"), exports); | ||
tslib_1.__exportStar(require("./IContainer"), exports); | ||
tslib_1.__exportStar(require("./Util"), exports); | ||
(0, tslib_1.__exportStar)(require("./Container"), exports); | ||
(0, tslib_1.__exportStar)(require("./IContainer"), exports); | ||
(0, tslib_1.__exportStar)(require("./Util"), exports); | ||
var Autowired_1 = require("./Autowired"); | ||
@@ -16,0 +16,0 @@ Object.defineProperty(exports, "Autowired", { enumerable: true, get: function () { return Autowired_1.Autowired; } }); |
@@ -21,3 +21,3 @@ "use strict"; | ||
*/ | ||
const helper = tslib_1.__importStar(require("koatty_lib")); | ||
const helper = (0, tslib_1.__importStar)(require("koatty_lib")); | ||
const Container_1 = require("./Container"); | ||
@@ -24,0 +24,0 @@ // get property of an object |
@@ -65,3 +65,3 @@ "use strict"; | ||
} | ||
const metaData = Util_1.RecursiveGetMetadata(IContainer_1.TAGGED_ARGS, target); | ||
const metaData = (0, Util_1.RecursiveGetMetadata)(IContainer_1.TAGGED_ARGS, target); | ||
// tslint:disable-next-line: forin | ||
@@ -68,0 +68,0 @@ for (const metaKey in metaData) { |
@@ -9,2 +9,3 @@ /** | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', // 测试用例运行环境 | ||
@@ -17,3 +18,21 @@ testMatch: ['<rootDir>/test/**/*.(spec|test).[jt]s'], // 匹配测试用例的路径规则 | ||
collectCoverage: true, // 是否收集测试时的覆盖率信息 | ||
coverageReporters: ['html', 'lcov', 'json', 'text', 'clover', 'text-summary'], // 收集测试时的覆盖率信息 | ||
coverageReporters: [ | ||
'html', | ||
'lcov', | ||
'json', | ||
'text', | ||
'clover', | ||
'text-summary', | ||
], // 收集测试时的覆盖率信息 | ||
// 将 `ts-jest` 的配置注入到运行时的全局变量中 | ||
globals: { | ||
'ts-jest': { | ||
// 是否使用 babel 配置来转译 | ||
babelConfig: true, | ||
// 编译 Typescript 所依赖的配置 | ||
tsconfig: '<rootDir>/tsconfig.json', | ||
// 是否启用报告诊断,这里是不启用 | ||
diagnostics: false, | ||
}, | ||
} | ||
}; |
{ | ||
"name": "koatty_container", | ||
"version": "1.6.0", | ||
"version": "1.6.2", | ||
"description": "IOC Container for Koatty.", | ||
@@ -9,4 +9,5 @@ "scripts": { | ||
"prepublishOnly": "npm test && npm run build", | ||
"release": "standard-version", | ||
"test": "npm run eslint && npm run build && jest --passWithNoTests", | ||
"release": "npm run prepublishOnly && standard-version", | ||
"pub": "git push --follow-tags origin && npm publish", | ||
"test": "npm run eslint && jest --passWithNoTests", | ||
"test:cov": "jest --collectCoverage --detectOpenHandles", | ||
@@ -32,3 +33,3 @@ "version": "conventional-changelog -p angular -i CHANGELOG.md -s" | ||
}, | ||
"license": "MIT", | ||
"license": "BSD-3-Clause", | ||
"bugs": { | ||
@@ -45,17 +46,20 @@ "url": "https://github.com/koatty/koatty_container/issues" | ||
"devDependencies": { | ||
"@babel/core": "^7.x.x", | ||
"@babel/plugin-proposal-decorators": "^7.x.x", | ||
"@babel/preset-env": "^7.x.x", | ||
"@babel/preset-typescript": "^7.x.x", | ||
"@commitlint/cli": "^12.x.x", | ||
"@commitlint/config-conventional": "^12.x.x", | ||
"@types/cls-hooked": "^4.x.x", | ||
"@types/node": "^12.x.x", | ||
"@typescript-eslint/eslint-plugin": "^4.x.x", | ||
"@typescript-eslint/parser": "^4.x.x", | ||
"@commitlint/config-conventional": "^15.x.x", | ||
"@types/jest": "^27.x.x", | ||
"@types/koa": "^2.x.x", | ||
"@types/node": "^16.x.x", | ||
"@typescript-eslint/eslint-plugin": "^5.x.x", | ||
"@typescript-eslint/parser": "^5.x.x", | ||
"conventional-changelog-cli": "^2.x.x", | ||
"del-cli": "^3.x.x", | ||
"eslint": "^7.x.x", | ||
"eslint-plugin-jest": "^24.x.x", | ||
"husky": "^6.x.x", | ||
"del-cli": "^4.x.x", | ||
"eslint": "^8.x.x", | ||
"eslint-plugin-jest": "^25.x.x", | ||
"husky": "^7.x.x", | ||
"jest": "^27.x.x", | ||
"jest-html-reporters": "^2.x.x", | ||
"koatty_cacheable": "^1.x.x", | ||
"koatty_schedule": "^1.x.x", | ||
"standard-version": "^9.x.x", | ||
@@ -70,3 +74,3 @@ "ts-jest": "^27.x.x", | ||
"reflect-metadata": "^0.1.13", | ||
"tslib": "^2.3.0" | ||
"tslib": "^2.3.1" | ||
}, | ||
@@ -78,2 +82,2 @@ "husky": { | ||
} | ||
} | ||
} |
{ | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
"target": "es2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */, | ||
"target": "ES2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */, | ||
"module": "commonjs" /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, | ||
@@ -45,3 +45,4 @@ "lib": [ | ||
"types": [ | ||
"node" | ||
"node", | ||
"jest" | ||
] /* Type declaration files to be included in compilation. */, | ||
@@ -61,8 +62,8 @@ "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, | ||
"exclude": [ | ||
"node_modules" | ||
"node_modules", | ||
"dist" | ||
], | ||
"include": [ | ||
"src", | ||
"src/**/*.json" | ||
"src/**/*" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
1858306
32
0
1797
22
Updatedtslib@^2.3.1