@tsed/core 7.79.4 → 7.80.0

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 (92) hide show
  1. package/lib/cjs/utils/imports/importPackage.js +1 -24
  2. package/lib/cjs/utils/imports/importPackage.js.map +1 -1
  3. package/lib/types-esm/decorators/configurable.d.ts +1 -0
  4. package/lib/types-esm/decorators/deprecated.d.ts +32 -0
  5. package/lib/types-esm/decorators/enumerable.d.ts +1 -0
  6. package/lib/types-esm/decorators/notConfigurable.d.ts +1 -0
  7. package/lib/types-esm/decorators/notEnumerable.d.ts +1 -0
  8. package/lib/types-esm/decorators/readOnly.d.ts +1 -0
  9. package/lib/types-esm/decorators/storeFn.d.ts +9 -0
  10. package/lib/types-esm/decorators/storeMerge.d.ts +1 -0
  11. package/lib/types-esm/decorators/storeSet.d.ts +1 -0
  12. package/lib/types-esm/decorators/writable.d.ts +1 -0
  13. package/lib/types-esm/domain/AnyToPromise.d.ts +42 -0
  14. package/lib/types-esm/domain/DecoratorTypes.d.ts +10 -0
  15. package/lib/types-esm/domain/Env.d.ts +13 -0
  16. package/lib/types-esm/domain/Hooks.d.ts +47 -0
  17. package/lib/types-esm/domain/Metadata.d.ts +442 -0
  18. package/lib/types-esm/domain/Store.d.ts +69 -0
  19. package/lib/types-esm/domain/Type.d.ts +11 -0
  20. package/lib/types-esm/errors/UnsupportedDecoratorType.d.ts +5 -0
  21. package/lib/types-esm/index.d.ts +86 -0
  22. package/lib/types-esm/interfaces/AnyDecorator.d.ts +1 -0
  23. package/lib/types-esm/interfaces/DecoratorParameters.d.ts +3 -0
  24. package/lib/types-esm/interfaces/MetadataTypes.d.ts +5 -0
  25. package/lib/types-esm/interfaces/Relation.d.ts +1 -0
  26. package/lib/types-esm/interfaces/ValueOf.d.ts +1 -0
  27. package/lib/types-esm/utils/catchError.d.ts +2 -0
  28. package/lib/types-esm/utils/decorators/decorateMethodsOf.d.ts +1 -0
  29. package/lib/types-esm/utils/decorators/decoratorArgs.d.ts +2 -0
  30. package/lib/types-esm/utils/decorators/decoratorTypeOf.d.ts +2 -0
  31. package/lib/types-esm/utils/decorators/inheritedDescriptorOf.d.ts +1 -0
  32. package/lib/types-esm/utils/decorators/useDecorators.d.ts +2 -0
  33. package/lib/types-esm/utils/decorators/useMethodDecorators.d.ts +3 -0
  34. package/lib/types-esm/utils/getRandomId.d.ts +1 -0
  35. package/lib/types-esm/utils/http/getHostInfoFromPort.d.ts +7 -0
  36. package/lib/types-esm/utils/imports/importPackage.d.ts +1 -0
  37. package/lib/types-esm/utils/objects/ancestorOf.d.ts +2 -0
  38. package/lib/types-esm/utils/objects/ancestorsOf.d.ts +6 -0
  39. package/lib/types-esm/utils/objects/classOf.d.ts +13 -0
  40. package/lib/types-esm/utils/objects/cleanObject.d.ts +6 -0
  41. package/lib/types-esm/utils/objects/constructorOf.d.ts +11 -0
  42. package/lib/types-esm/utils/objects/createInstance.d.ts +1 -0
  43. package/lib/types-esm/utils/objects/deepClone.d.ts +6 -0
  44. package/lib/types-esm/utils/objects/deepMerge.d.ts +9 -0
  45. package/lib/types-esm/utils/objects/descriptorOf.d.ts +8 -0
  46. package/lib/types-esm/utils/objects/getClassOrSymbol.d.ts +1 -0
  47. package/lib/types-esm/utils/objects/getConstructorArgNames.d.ts +1 -0
  48. package/lib/types-esm/utils/objects/getEnumerableKeys.d.ts +5 -0
  49. package/lib/types-esm/utils/objects/getValue.d.ts +32 -0
  50. package/lib/types-esm/utils/objects/hasJsonMethod.d.ts +1 -0
  51. package/lib/types-esm/utils/objects/isArray.d.ts +13 -0
  52. package/lib/types-esm/utils/objects/isArrowFn.d.ts +1 -0
  53. package/lib/types-esm/utils/objects/isBoolean.d.ts +7 -0
  54. package/lib/types-esm/utils/objects/isBuffer.d.ts +8 -0
  55. package/lib/types-esm/utils/objects/isClass.d.ts +1 -0
  56. package/lib/types-esm/utils/objects/isCollection.d.ts +6 -0
  57. package/lib/types-esm/utils/objects/isDate.d.ts +6 -0
  58. package/lib/types-esm/utils/objects/isEmpty.d.ts +6 -0
  59. package/lib/types-esm/utils/objects/isEnumerable.d.ts +6 -0
  60. package/lib/types-esm/utils/objects/isFunction.d.ts +1 -0
  61. package/lib/types-esm/utils/objects/isInheritedFrom.d.ts +1 -0
  62. package/lib/types-esm/utils/objects/isMomentObject.d.ts +1 -0
  63. package/lib/types-esm/utils/objects/isMongooseObject.d.ts +2 -0
  64. package/lib/types-esm/utils/objects/isNil.d.ts +1 -0
  65. package/lib/types-esm/utils/objects/isNumber.d.ts +7 -0
  66. package/lib/types-esm/utils/objects/isObject.d.ts +1 -0
  67. package/lib/types-esm/utils/objects/isObservable.d.ts +1 -0
  68. package/lib/types-esm/utils/objects/isPlainObject.d.ts +7 -0
  69. package/lib/types-esm/utils/objects/isPrimitive.d.ts +14 -0
  70. package/lib/types-esm/utils/objects/isPromise.d.ts +7 -0
  71. package/lib/types-esm/utils/objects/isProtectedKey.d.ts +5 -0
  72. package/lib/types-esm/utils/objects/isRegExp.d.ts +1 -0
  73. package/lib/types-esm/utils/objects/isSerializable.d.ts +1 -0
  74. package/lib/types-esm/utils/objects/isStream.d.ts +1 -0
  75. package/lib/types-esm/utils/objects/isString.d.ts +6 -0
  76. package/lib/types-esm/utils/objects/isSymbol.d.ts +6 -0
  77. package/lib/types-esm/utils/objects/methodsOf.d.ts +9 -0
  78. package/lib/types-esm/utils/objects/nameOf.d.ts +14 -0
  79. package/lib/types-esm/utils/objects/objectKeys.d.ts +1 -0
  80. package/lib/types-esm/utils/objects/primitiveOf.d.ts +1 -0
  81. package/lib/types-esm/utils/objects/prototypeOf.d.ts +6 -0
  82. package/lib/types-esm/utils/objects/setValue.d.ts +1 -0
  83. package/lib/types-esm/utils/objects/toMap.d.ts +3 -0
  84. package/lib/types-esm/utils/objects/toStringConstructor.d.ts +1 -0
  85. package/lib/types-esm/utils/proxyDelegation.d.ts +33 -0
  86. package/lib/types-esm/utils/uniq.d.ts +5 -0
  87. package/package.json +18 -12
  88. package/vitest.config.mts +21 -0
  89. package/jest.config.js +0 -14
  90. package/lib/cjs/package.json +0 -3
  91. package/lib/esm/package.json +0 -3
  92. package/tsconfig.esm.json +0 -29
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @param list
3
+ */
4
+ export declare function uniq<T = any>(list: T[]): T[];
5
+ export declare function uniqBy<T = any>(list: T[], key?: string): T[];
package/package.json CHANGED
@@ -1,37 +1,43 @@
1
1
  {
2
2
  "name": "@tsed/core",
3
- "version": "7.79.4",
4
3
  "description": "Core module for Ts.ED Framework",
4
+ "type": "commonjs",
5
+ "version": "7.80.0",
5
6
  "source": "./src/index.ts",
6
7
  "main": "./lib/cjs/index.js",
7
8
  "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "browser": "./lib/browser/core.umd.min.js",
10
11
  "exports": {
11
- "types": "./lib/types/index.d.ts",
12
- "browser": "./lib/browser/core.umd.min.js",
13
- "import": "./lib/esm/index.js",
14
- "require": "./lib/cjs/index.js",
15
- "default": "./lib/esm/index.js"
12
+ ".": {
13
+ "types": "./lib/types/index.d.ts",
14
+ "browser": "./lib/browser/core.umd.min.js",
15
+ "import": "./lib/esm/index.js",
16
+ "default": "./lib/cjs/index.js"
17
+ }
16
18
  },
17
19
  "scripts": {
18
20
  "build": "yarn barrels && yarn build:ts && yarn run build:browser",
19
21
  "barrels": "barrels",
20
22
  "build:browser": "webpack",
21
- "test": "jest --max-workers=2 && jest-coverage-thresholds-bumper",
22
- "build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json && monorepo build-hybrid"
23
+ "build:ts": "tsc --build tsconfig.json",
24
+ "test": "vitest run",
25
+ "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
23
26
  },
24
27
  "dependencies": {
25
28
  "reflect-metadata": "^0.2.1",
26
29
  "tslib": "2.6.1"
27
30
  },
28
31
  "devDependencies": {
29
- "@tsed/barrels": "7.79.4",
30
- "@tsed/monorepo-utils": "2.3.2",
31
- "@tsed/typescript": "7.79.4",
32
+ "@tsed/barrels": "7.80.0",
33
+ "@tsed/monorepo-utils": "^2.3.2",
34
+ "@tsed/typescript": "7.80.0",
35
+ "@tsed/vitest": "7.80.0",
36
+ "@vitest/coverage-v8": "^2.0.5",
32
37
  "eslint": "^8.57.0",
33
- "jest": "^29.7.0",
34
38
  "typescript": "4.9.5",
39
+ "vite": "^5.4.1",
40
+ "vitest": "2.0.4",
35
41
  "webpack": "^5.75.0"
36
42
  },
37
43
  "peerDependencies": {},
@@ -0,0 +1,21 @@
1
+ // @ts-ignore
2
+ import {presets} from "@tsed/vitest/presets";
3
+ import {defineConfig} from "vitest/config";
4
+
5
+ export default defineConfig(
6
+ {
7
+ ...presets,
8
+ test: {
9
+ ...presets.test,
10
+ coverage: {
11
+ ...presets.test.coverage,
12
+ thresholds: {
13
+ statements: 0,
14
+ branches: 0,
15
+ functions: 0,
16
+ lines: 0
17
+ }
18
+ }
19
+ }
20
+ }
21
+ );
package/jest.config.js DELETED
@@ -1,14 +0,0 @@
1
- // For a detailed explanation regarding each configuration property, visit:
2
- // https://jestjs.io/docs/en/configuration.html
3
-
4
- module.exports = {
5
- ...require("@tsed/jest-config"),
6
- coverageThreshold: {
7
- global: {
8
- statements: 97.52,
9
- branches: 92.45,
10
- functions: 95.41,
11
- lines: 97.52
12
- }
13
- }
14
- };
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
package/tsconfig.esm.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "extends": "@tsed/typescript/tsconfig.node.json",
3
- "compilerOptions": {
4
- "baseUrl": ".",
5
- "module": "ES2020",
6
- "rootDir": "src",
7
- "outDir": "./lib/esm",
8
- "declaration": true,
9
- "declarationDir": "./lib/types",
10
- "composite": true,
11
- "noEmit": false
12
- },
13
- "include": ["src", "src/**/*.json"],
14
- "exclude": [
15
- "node_modules",
16
- "test",
17
- "lib",
18
- "benchmark",
19
- "coverage",
20
- "spec",
21
- "**/*.benchmark.ts",
22
- "**/*.spec.ts",
23
- "keys",
24
- "jest.config.js",
25
- "**/__mock__/**",
26
- "webpack.config.js"
27
- ],
28
- "references": []
29
- }