From e8dcce677db4223beac9b97286d1eabf1cf3bdd3 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Thu, 3 Sep 2020 23:03:36 -0700 Subject: [PATCH] feat(graphql): use peer dependencies for core and boot Signed-off-by: Raymond Feng --- extensions/graphql/package-lock.json | 78 ++++++++++------------ extensions/graphql/package.json | 9 ++- extensions/graphql/src/decorators/index.ts | 2 +- 3 files changed, 41 insertions(+), 48 deletions(-) diff --git a/extensions/graphql/package-lock.json b/extensions/graphql/package-lock.json index 9df1844c077b..9b5637a6f3d5 100644 --- a/extensions/graphql/package-lock.json +++ b/extensions/graphql/package-lock.json @@ -103,9 +103,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -119,9 +119,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -134,9 +134,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -157,9 +157,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -189,9 +189,9 @@ } }, "@types/express-serve-static-core": { - "version": "4.17.9", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.9.tgz", - "integrity": "sha512-DG0BYg6yO+ePW+XoDENYz8zhNGC3jDDEpComMYn7WJc4mY1Us8Rw9ax2YhJXxpyk2SF47PQAoQ0YyVT1a0bEkA==", + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.12.tgz", + "integrity": "sha512-EaEdY+Dty1jEU7U6J4CUWwxL+hyEGMkO5jan5gplfegUgCUsIUWqXxqw47uGjimeT4Qgkz/XUfwoau08+fgvKA==", "requires": { "@types/node": "*", "@types/qs": "*", @@ -199,9 +199,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -214,9 +214,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -238,24 +238,14 @@ } }, "@types/graphql-upload": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@types/graphql-upload/-/graphql-upload-8.0.3.tgz", - "integrity": "sha512-hmLg9pCU/GmxBscg8GCr1vmSoEmbItNNxdD5YH2TJkXm//8atjwuprB+xJBK714JG1dkxbbhp5RHX+Pz1KsCMA==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@types/graphql-upload/-/graphql-upload-8.0.4.tgz", + "integrity": "sha512-0TRyJD2o8vbkmJF8InppFcPVcXKk+Rvlg/xvpHBIndSJYpmDWfmtx/ZAtl4f3jR2vfarpTqYgj8MZuJssSoU7Q==", "requires": { "@types/express": "*", "@types/fs-capacitor": "*", "@types/koa": "*", - "graphql": "^14.5.3" - }, - "dependencies": { - "graphql": { - "version": "14.7.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", - "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", - "requires": { - "iterall": "^1.2.2" - } - } + "graphql": "^15.3.0" } }, "@types/http-assert": { @@ -289,9 +279,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -333,9 +323,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, @@ -372,9 +362,9 @@ }, "dependencies": { "@types/node": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.1.tgz", - "integrity": "sha512-HnYlg/BRF8uC1FyKRFZwRaCPTPYKa+6I8QiUZFLredaGOou481cgFS4wKRFyKvQtX8xudqkSdBczJHIYSQYKrQ==" + "version": "14.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", + "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==" } } }, diff --git a/extensions/graphql/package.json b/extensions/graphql/package.json index 27c6ac8b9c8b..8102e7df3f7f 100644 --- a/extensions/graphql/package.json +++ b/extensions/graphql/package.json @@ -21,10 +21,7 @@ "copyright.owner": "IBM Corp.", "license": "MIT", "dependencies": { - "@loopback/boot": "^2.5.1", - "@loopback/core": "^2.9.5", "@loopback/http-server": "^2.2.0", - "@loopback/metadata": "^2.2.6", "@types/graphql": "^14.5.0", "apollo-server-express": "^2.17.0", "debug": "^4.1.1", @@ -32,9 +29,15 @@ "graphql": "^15.3.0", "type-graphql": "^1.0.0-rc.3" }, + "peerDependencies": { + "@loopback/boot": "^2.5.1", + "@loopback/core": "^2.9.5" + }, "devDependencies": { "@loopback/build": "^6.2.2", "@loopback/eslint-config": "^9.0.2", + "@loopback/boot": "^2.5.1", + "@loopback/core": "^2.9.5", "@loopback/repository": "^2.11.2", "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", diff --git a/extensions/graphql/src/decorators/index.ts b/extensions/graphql/src/decorators/index.ts index ca522c7126f2..cd0762e4d546 100644 --- a/extensions/graphql/src/decorators/index.ts +++ b/extensions/graphql/src/decorators/index.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT // Force require('reflect-metadata'); -import '@loopback/metadata'; +import '@loopback/core'; import { Arg, Args,