inversify 5.0.1 → 5.0.5

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 (106) hide show
  1. package/.nyc_output/24cbca0e-b065-453e-9d1e-2a381e69663d.json +1 -0
  2. package/.nyc_output/processinfo/24cbca0e-b065-453e-9d1e-2a381e69663d.json +1 -0
  3. package/.nyc_output/processinfo/index.json +1 -0
  4. package/CHANGELOG.md +7 -2
  5. package/README.md +3 -3
  6. package/amd/annotation/decorator_utils.js +1 -0
  7. package/amd/annotation/inject.js +1 -0
  8. package/amd/annotation/injectable.js +1 -0
  9. package/amd/annotation/multi_inject.js +1 -0
  10. package/amd/annotation/named.js +1 -0
  11. package/amd/annotation/optional.js +1 -0
  12. package/amd/annotation/post_construct.js +1 -0
  13. package/amd/annotation/tagged.js +1 -0
  14. package/amd/annotation/target_name.js +1 -0
  15. package/amd/annotation/unmanaged.js +1 -0
  16. package/amd/bindings/binding.js +1 -0
  17. package/amd/bindings/binding_count.js +1 -0
  18. package/amd/constants/error_msgs.js +1 -0
  19. package/amd/constants/literal_types.js +1 -0
  20. package/amd/constants/metadata_keys.js +1 -0
  21. package/amd/container/container.js +5 -3
  22. package/amd/container/container_module.js +1 -0
  23. package/amd/container/container_snapshot.js +1 -0
  24. package/amd/container/lookup.js +1 -0
  25. package/amd/inversify.js +26 -25
  26. package/amd/planning/context.js +1 -0
  27. package/amd/planning/metadata.js +1 -0
  28. package/amd/planning/metadata_reader.js +1 -0
  29. package/amd/planning/plan.js +1 -0
  30. package/amd/planning/planner.js +1 -0
  31. package/amd/planning/queryable_string.js +1 -0
  32. package/amd/planning/reflection_utils.js +11 -3
  33. package/amd/planning/request.js +1 -0
  34. package/amd/planning/target.js +1 -0
  35. package/amd/resolution/instantiation.js +9 -1
  36. package/amd/resolution/resolver.js +1 -0
  37. package/amd/syntax/binding_in_syntax.js +1 -0
  38. package/amd/syntax/binding_in_when_on_syntax.js +1 -0
  39. package/amd/syntax/binding_on_syntax.js +1 -0
  40. package/amd/syntax/binding_to_syntax.js +1 -0
  41. package/amd/syntax/binding_when_on_syntax.js +1 -0
  42. package/amd/syntax/binding_when_syntax.js +1 -0
  43. package/amd/syntax/constraint_helpers.js +1 -0
  44. package/amd/utils/binding_utils.js +1 -0
  45. package/amd/utils/exceptions.js +1 -0
  46. package/amd/utils/id.js +1 -0
  47. package/amd/utils/serialization.js +1 -0
  48. package/dts/annotation/inject.d.ts +1 -1
  49. package/dts/container/container.d.ts +3 -3
  50. package/dts/container/lookup.d.ts +1 -1
  51. package/dts/interfaces/interfaces.d.ts +4 -6
  52. package/dts/syntax/binding_to_syntax.d.ts +1 -3
  53. package/dts/syntax/constraint_helpers.d.ts +2 -2
  54. package/dts/utils/binding_utils.d.ts +1 -1
  55. package/dts/utils/cat.d.ts +5 -0
  56. package/dts/utils/dog.d.ts +3 -0
  57. package/es/container/container.js +4 -3
  58. package/es/planning/reflection_utils.js +9 -2
  59. package/es/resolution/instantiation.js +8 -1
  60. package/lib/annotation/decorator_utils.js +1 -0
  61. package/lib/annotation/inject.js +1 -0
  62. package/lib/annotation/injectable.js +1 -0
  63. package/lib/annotation/multi_inject.js +1 -0
  64. package/lib/annotation/named.js +1 -0
  65. package/lib/annotation/optional.js +1 -0
  66. package/lib/annotation/post_construct.js +1 -0
  67. package/lib/annotation/tagged.js +1 -0
  68. package/lib/annotation/target_name.js +1 -0
  69. package/lib/annotation/unmanaged.js +1 -0
  70. package/lib/bindings/binding.js +1 -0
  71. package/lib/bindings/binding_count.js +1 -0
  72. package/lib/constants/error_msgs.js +1 -0
  73. package/lib/constants/literal_types.js +1 -0
  74. package/lib/constants/metadata_keys.js +1 -0
  75. package/lib/container/container.js +5 -3
  76. package/lib/container/container_module.js +1 -0
  77. package/lib/container/container_snapshot.js +1 -0
  78. package/lib/container/lookup.js +1 -0
  79. package/lib/inversify.js +26 -25
  80. package/lib/planning/context.js +1 -0
  81. package/lib/planning/metadata.js +1 -0
  82. package/lib/planning/metadata_reader.js +1 -0
  83. package/lib/planning/plan.js +1 -0
  84. package/lib/planning/planner.js +1 -0
  85. package/lib/planning/queryable_string.js +1 -0
  86. package/lib/planning/reflection_utils.js +11 -3
  87. package/lib/planning/request.js +1 -0
  88. package/lib/planning/target.js +1 -0
  89. package/lib/resolution/instantiation.js +9 -1
  90. package/lib/resolution/resolver.js +1 -0
  91. package/lib/syntax/binding_in_syntax.js +1 -0
  92. package/lib/syntax/binding_in_when_on_syntax.js +1 -0
  93. package/lib/syntax/binding_on_syntax.js +1 -0
  94. package/lib/syntax/binding_to_syntax.js +1 -0
  95. package/lib/syntax/binding_when_on_syntax.js +1 -0
  96. package/lib/syntax/binding_when_syntax.js +1 -0
  97. package/lib/syntax/constraint_helpers.js +1 -0
  98. package/lib/utils/binding_utils.js +1 -0
  99. package/lib/utils/exceptions.js +1 -0
  100. package/lib/utils/id.js +1 -0
  101. package/lib/utils/serialization.js +1 -0
  102. package/mocha.opts +3 -0
  103. package/package.json +36 -30
  104. package/appveyor.yml +0 -34
  105. package/dts/utils/guid.d.ts +0 -2
  106. package/dts/utils/template.d.ts +0 -1
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BindingWhenSyntax = void 0;
3
4
  var binding_on_syntax_1 = require("./binding_on_syntax");
4
5
  var constraint_helpers_1 = require("./constraint_helpers");
5
6
  var BindingWhenSyntax = (function () {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.typeConstraint = exports.namedConstraint = exports.taggedConstraint = exports.traverseAncerstors = void 0;
3
4
  var METADATA_KEY = require("../constants/metadata_keys");
4
5
  var metadata_1 = require("../planning/metadata");
5
6
  var traverseAncerstors = function (request, constraint) {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.multiBindToService = void 0;
3
4
  exports.multiBindToService = function (container) {
4
5
  return function (service) {
5
6
  return function () {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isStackOverflowExeption = void 0;
3
4
  var ERROR_MSGS = require("../constants/error_msgs");
4
5
  function isStackOverflowExeption(error) {
5
6
  return (error instanceof RangeError ||
package/lib/utils/id.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.id = void 0;
3
4
  var idCounter = 0;
4
5
  function id() {
5
6
  return idCounter++;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.circularDependencyToException = exports.listMetadataForTarget = exports.listRegisteredBindingsForServiceIdentifier = exports.getServiceIdentifierAsString = exports.getFunctionName = void 0;
3
4
  var ERROR_MSGS = require("../constants/error_msgs");
4
5
  function getServiceIdentifierAsString(serviceIdentifier) {
5
6
  if (typeof serviceIdentifier === "function") {
package/mocha.opts ADDED
@@ -0,0 +1,3 @@
1
+ --require reflect-metadata/Reflect
2
+ --watch-extensions ts
3
+ dist/test/**/*.test.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inversify",
3
- "version": "5.0.1",
3
+ "version": "5.0.5",
4
4
  "description": "A powerful and lightweight inversion of control container for JavaScript and Node.js apps powered by TypeScript.",
5
5
  "main": "lib/inversify.js",
6
6
  "jsnext:main": "es/inversify.js",
@@ -9,9 +9,12 @@
9
9
  "test": "gulp"
10
10
  },
11
11
  "scripts": {
12
- "test": "gulp",
12
+ "pretest": "tslint --project . && gulp",
13
+ "test": "nyc --require ts-node/register mocha test/**/*.test.ts --reporter spec --retries 3 --require 'node_modules/reflect-metadata/Reflect.js' --exit",
13
14
  "publish-please": "publish-please",
14
- "prepublish": "publish-please guard"
15
+ "prepublish": "publish-please guard",
16
+ "update": "updates --update --minor && npm install",
17
+ "postupdate": "git diff-files --quiet package-lock.json || npm test"
15
18
  },
16
19
  "repository": {
17
20
  "type": "git",
@@ -35,45 +38,48 @@
35
38
  "homepage": "http://inversify.io",
36
39
  "engines": {},
37
40
  "devDependencies": {
38
- "@types/chai": "4.1.4",
41
+ "@types/chai": "4.2.12",
39
42
  "@types/harmony-proxy": "1.0.29",
40
- "@types/mocha": "5.2.3",
41
- "@types/sinon": "5.0.5",
42
- "bluebird": "3.5.2",
43
- "browserify": "16.2.3",
44
- "chai": "4.1.2",
45
- "del": "3.0.0",
46
- "es6-symbol": "3.1.1",
47
- "gulp": "3.9.1",
48
- "gulp-istanbul": "1.1.3",
49
- "gulp-mocha": "6.0.0",
43
+ "@types/mocha": "5.2.7",
44
+ "@types/sinon": "7.5.2",
45
+ "bluebird": "3.7.2",
46
+ "browserify": "16.5.2",
47
+ "chai": "4.2.0",
48
+ "del": "5.1.0",
49
+ "es6-symbol": "3.1.3",
50
+ "gulp": "^4.0.2",
51
+ "gulp-istanbul": "^1.1.3",
52
+ "gulp-mocha": "7.0.2",
50
53
  "gulp-rename": "1.4.0",
51
- "gulp-sourcemaps": "2.6.3",
52
- "gulp-tslint": "8.1.3",
53
- "gulp-typescript": "4.0.2",
54
- "gulp-uglify": "3.0.1",
54
+ "gulp-sourcemaps": "2.6.5",
55
+ "gulp-tslint": "8.1.4",
56
+ "gulp-typescript": "5.0.1",
57
+ "gulp-uglify": "3.0.2",
55
58
  "harmonize": "2.0.0",
56
59
  "harmony-proxy": "1.0.1",
57
- "istanbul": "0.4.5",
58
- "karma": "3.0.0",
60
+ "istanbul": "^0.4.5",
61
+ "karma": "^5.2.0",
59
62
  "karma-chai": "0.1.0",
60
- "karma-chrome-launcher": "2.2.0",
63
+ "karma-chrome-launcher": "3.1.0",
61
64
  "karma-commonjs": "1.0.0",
62
65
  "karma-es6-shim": "1.0.0",
63
- "karma-firefox-launcher": "1.1.0",
66
+ "karma-firefox-launcher": "1.3.0",
64
67
  "karma-ie-launcher": "1.0.0",
65
- "karma-mocha": "1.3.0",
68
+ "karma-mocha": "^2.0.1",
66
69
  "karma-mocha-reporter": "2.2.5",
67
- "karma-phantomjs-launcher": "1.0.4",
70
+ "karma-phantomjs-launcher": "^1.0.4",
68
71
  "karma-sinon": "1.0.5",
69
- "mocha": "5.2.0",
72
+ "mocha": "6.2.3",
73
+ "nyc": "^15.1.0",
70
74
  "performance-now": "2.1.0",
71
- "publish-please": "4.1.0",
72
- "reflect-metadata": "0.1.12",
75
+ "publish-please": "^5.5.1",
76
+ "reflect-metadata": "0.1.13",
73
77
  "run-sequence": "2.2.1",
74
- "sinon": "6.0.1",
75
- "tslint": "5.9.1",
76
- "typescript": "^2.8.3",
78
+ "sinon": "7.5.0",
79
+ "ts-node": "^9.0.0",
80
+ "tslint": "5.20.1",
81
+ "typescript": "^3.9.7",
82
+ "updates": "^10.3.5",
77
83
  "vinyl-buffer": "1.0.1",
78
84
  "vinyl-source-stream": "2.0.0"
79
85
  }
package/appveyor.yml DELETED
@@ -1,34 +0,0 @@
1
- # AppVeyor file
2
- # http://www.appveyor.com/docs/appveyor-yml
3
-
4
- # Build version format
5
- version: "{build}"
6
-
7
- # Test against this version of Node.js
8
- environment:
9
- NODE_ENV: test
10
-
11
- matrix:
12
- - nodejs_version: "9.3.0"
13
-
14
- build: off
15
-
16
- branches:
17
- only:
18
- - master
19
-
20
- install:
21
- - ps: Install-Product node $env:nodejs_version
22
- - npm install -g npm
23
- - npm config set progress=false
24
- - npm install
25
-
26
- # Fix line endings on Windows
27
- init:
28
- - git config --global core.autocrlf true
29
-
30
- test_script:
31
- # Output useful info for debugging.
32
- - node --version && npm --version
33
- - ps: "npm --version # PowerShell" # Pass comment to PS for easier debugging
34
- - cmd: npm run test
@@ -1,2 +0,0 @@
1
- declare function guid(): string;
2
- export { guid };
@@ -1 +0,0 @@
1
- export declare function template(strings: TemplateStringsArray, ...keys: any[]): (...values: any[]) => string;