From d8f72e4e9085aa132bfac3e930f3960042816f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 3 Sep 2020 09:49:03 +0200 Subject: [PATCH] feat: move framework packages to `peerDependencies` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE: Extensions no longer install framework packages as their own dependencies, they use the framework packages provided by the target application instead. If you are getting `npm install` errors after upgrade, then make sure your project lists all dependencies required by the extensions you are using. Signed-off-by: Miroslav Bajtoš --- extensions/apiconnect/package.json | 8 ++++++-- extensions/authentication-jwt/package.json | 11 ++++++++--- .../authentication-passport/package.json | 9 +++++++-- extensions/context-explorer/package.json | 8 ++++++-- extensions/cron/package.json | 5 ++++- extensions/health/package.json | 8 ++++++-- extensions/logging/package.json | 8 ++++++-- extensions/metrics/package.json | 8 ++++++-- extensions/pooling/package.json | 5 ++++- extensions/typeorm/package.json | 19 ++++++++++++------- 10 files changed, 65 insertions(+), 24 deletions(-) diff --git a/extensions/apiconnect/package.json b/extensions/apiconnect/package.json index 3a03d79729d2..cce44b5081db 100644 --- a/extensions/apiconnect/package.json +++ b/extensions/apiconnect/package.json @@ -38,14 +38,18 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "extensions/apiconnect" }, - "dependencies": { + "peerDependencies": { "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", + "@loopback/rest": "^6.2.0" + }, + "dependencies": { "tslib": "^2.0.1" }, "devDependencies": { "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", + "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", "@types/node": "^10.17.29" } diff --git a/extensions/authentication-jwt/package.json b/extensions/authentication-jwt/package.json index 6bb750cd59dd..95c27f8bf574 100644 --- a/extensions/authentication-jwt/package.json +++ b/extensions/authentication-jwt/package.json @@ -20,22 +20,27 @@ "publishConfig": { "access": "public" }, - "dependencies": { + "peerDependencies": { "@loopback/authentication": "^6.0.1", "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", + "@loopback/rest": "^6.2.0" + }, + "dependencies": { "@loopback/security": "^0.2.18", - "@loopback/service-proxy": "^2.3.8", "@types/bcryptjs": "2.4.2", "bcryptjs": "^2.4.3", "jsonwebtoken": "^8.5.1" }, "devDependencies": { + "@loopback/authentication": "^6.0.1", "@loopback/boot": "^2.5.1", "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", "@loopback/repository": "^2.11.2", + "@loopback/rest": "^6.2.0", "@loopback/rest-explorer": "^2.2.10", + "@loopback/service-proxy": "^2.3.8", "@loopback/testlab": "^2.0.2", "@types/lodash": "^4.14.161", "@types/node": "^10.17.29", diff --git a/extensions/authentication-passport/package.json b/extensions/authentication-passport/package.json index 40e38ece034e..e2941f22d14f 100644 --- a/extensions/authentication-passport/package.json +++ b/extensions/authentication-passport/package.json @@ -39,20 +39,25 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "extensions/authentication-passport" }, - "dependencies": { + "peerDependencies": { "@loopback/authentication": "^6.0.1", "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", + "@loopback/rest": "^6.2.0" + }, + "dependencies": { "@loopback/security": "^0.2.18", "passport": "^0.4.1", "tslib": "^2.0.1", "util-promisifyall": "^1.0.6" }, "devDependencies": { + "@loopback/authentication": "^6.0.1", "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", "@loopback/mock-oauth2-provider": "^0.1.7", "@loopback/openapi-spec-builder": "^2.1.13", + "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", "@types/jsonwebtoken": "^8.5.0", "@types/lodash": "^4.14.161", diff --git a/extensions/context-explorer/package.json b/extensions/context-explorer/package.json index 09282bb35ca8..cb41614c346b 100644 --- a/extensions/context-explorer/package.json +++ b/extensions/context-explorer/package.json @@ -20,15 +20,19 @@ "publishConfig": { "access": "public" }, - "dependencies": { + "peerDependencies": { "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", + "@loopback/rest": "^6.2.0" + }, + "dependencies": { "ts-graphviz": "^0.13.2", "viz.js": "^2.1.2" }, "devDependencies": { "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", + "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", "@types/node": "^10.17.29" }, diff --git a/extensions/cron/package.json b/extensions/cron/package.json index 93127dacc240..c6b39df68725 100644 --- a/extensions/cron/package.json +++ b/extensions/cron/package.json @@ -21,7 +21,6 @@ "access": "public" }, "dependencies": { - "@loopback/core": "^2.9.5", "@types/cron": "^1.7.2", "@types/debug": "^4.1.5", "cron": "^1.8.2", @@ -30,6 +29,7 @@ }, "devDependencies": { "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", "@loopback/testlab": "^3.2.4", "@types/node": "^10.17.29" @@ -49,5 +49,8 @@ "type": "git", "url": "https://github.com/strongloop/loopback-next.git", "directory": "extensions/cron" + }, + "peerDependencies": { + "@loopback/core": "^2.9.5" } } diff --git a/extensions/health/package.json b/extensions/health/package.json index f4ce23c2b756..27f1ef63fc42 100644 --- a/extensions/health/package.json +++ b/extensions/health/package.json @@ -21,15 +21,19 @@ "publishConfig": { "access": "public" }, + "peerDependencies": { + "@loopback/core": "^2.9.5", + "@loopback/rest": "^6.2.0" + }, "dependencies": { "@cloudnative/health": "^2.1.2", - "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", "tslib": "^2.0.1" }, "devDependencies": { "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", + "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", "@types/node": "^10.17.29" }, diff --git a/extensions/logging/package.json b/extensions/logging/package.json index e07f655dbb87..6299dd840c02 100644 --- a/extensions/logging/package.json +++ b/extensions/logging/package.json @@ -20,9 +20,11 @@ "publishConfig": { "access": "public" }, - "dependencies": { + "peerDependencies": { "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", + "@loopback/rest": "^6.2.0" + }, + "dependencies": { "fluent-logger": "^3.4.1", "morgan": "^1.10.0", "tslib": "^2.0.1", @@ -31,7 +33,9 @@ }, "devDependencies": { "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", + "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", "@types/morgan": "^1.9.1", "@types/node": "^10.17.29" diff --git a/extensions/metrics/package.json b/extensions/metrics/package.json index c1e37c2b9400..b9095b3f9d33 100644 --- a/extensions/metrics/package.json +++ b/extensions/metrics/package.json @@ -20,15 +20,19 @@ "publishConfig": { "access": "public" }, - "dependencies": { + "peerDependencies": { "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", + "@loopback/rest": "^6.2.0" + }, + "dependencies": { "prom-client": "^12.0.0", "tslib": "^2.0.1" }, "devDependencies": { "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", + "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", "@types/express": "^4.17.8", "@types/node": "^10.17.29", diff --git a/extensions/pooling/package.json b/extensions/pooling/package.json index f6ea34bf705d..c18ee2d9ff46 100644 --- a/extensions/pooling/package.json +++ b/extensions/pooling/package.json @@ -31,14 +31,17 @@ "src", "!*/__tests__" ], + "peerDependencies": { + "@loopback/core": "^2.9.5" + }, "dependencies": { - "@loopback/core": "^2.9.5", "@types/generic-pool": "^3.1.9", "generic-pool": "^3.7.1", "tslib": "^2.0.1" }, "devDependencies": { "@loopback/build": "^6.2.2", + "@loopback/core": "^2.9.5", "@loopback/testlab": "^3.2.4", "@types/node": "^10.17.29", "typescript": "~4.0.2" diff --git a/extensions/typeorm/package.json b/extensions/typeorm/package.json index 182da1eaa2b8..f5ccf4073e97 100644 --- a/extensions/typeorm/package.json +++ b/extensions/typeorm/package.json @@ -21,22 +21,27 @@ "publishConfig": { "access": "public" }, + "peerDependencies": { + "@loopback/boot": "^2.5.1", + "@loopback/core": "^2.9.5", + "@loopback/rest": "^6.2.0" + }, + "dependencies": { + "tslib": "^2.0.1", + "typeorm": "^0.2.25" + }, "devDependencies": { + "@loopback/boot": "^2.5.1", "@loopback/build": "^5.4.3", + "@loopback/core": "^2.9.5", "@loopback/eslint-config": "^9.0.2", "@loopback/repository": "^2.11.2", + "@loopback/rest": "^6.2.0", "@loopback/testlab": "^3.2.4", "@types/json-schema": "^7.0.6", "@types/node": "^10.17.29", "sqlite3": "^5.0.0" }, - "dependencies": { - "@loopback/boot": "^2.5.1", - "@loopback/core": "^2.9.5", - "@loopback/rest": "^6.2.0", - "tslib": "^2.0.1", - "typeorm": "^0.2.25" - }, "files": [ "README.md", "dist",