From 46f3eb95b770855d2d572555db178b6e09c76f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 19 Nov 2020 10:47:31 +0100 Subject: [PATCH 1/3] build: check order of deps keys in package.json files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new step to `bin/check-package-metadata.js` to ensure that all public packages list deps in the following order: 1. `peerDependencies` 2. `dependencies 3. `devDependencies` Signed-off-by: Miroslav Bajtoš --- bin/check-package-metadata.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bin/check-package-metadata.js b/bin/check-package-metadata.js index 6d5f9df3365c..43a426b3422d 100644 --- a/bin/check-package-metadata.js +++ b/bin/check-package-metadata.js @@ -161,6 +161,8 @@ async function checkPkgsPackageJson(packages, rootPkg) { if (!isRepositoryDirectoryExist) { errors.push(`${p.name} directory doesn't exist in the monorepo`); } + + checkDepsOrder(p, pkg, errors); } return errors; @@ -202,6 +204,30 @@ async function checkPackagesMetadata() { } } +function checkDepsOrder(lernaPkg, pkgJson, errors) { + const actualOrder = Object.keys(pkgJson).filter(k => + ['dependencies', 'devDependencies', 'peerDependencies'].includes(k), + ); + + const expectedOrder = [ + 'peerDependencies', + 'dependencies', + 'devDependencies', + ].filter(k => actualOrder.includes(k)); + + const actualStr = actualOrder.join(' '); + const expectedStr = expectedOrder.join(' '); + + if (actualStr !== expectedStr) { + const pkgPath = path.relative(lernaPkg.rootPath, lernaPkg.location); + errors.push( + `${pkgPath}/package.json has incorrect order of keys.\n` + + ` Actual: ${actualStr}\n` + + ` Expected: ${expectedStr}`, + ); + } +} + module.exports = checkPackagesMetadata; runMain(module, checkPackagesMetadata); From b2a77d3cb13b7dac419f7a124568973c4ed3019d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 20 Nov 2020 10:09:05 +0100 Subject: [PATCH 2/3] build: add a script to fix order of deps keys in package.json files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new step to `bin/fix-monorepo.js` to ensure that all public packages list deps in the following order, starting after `publishConfig` or `license` field: 1. `peerDependencies` 2. `dependencies 3. `devDependencies` Signed-off-by: Miroslav Bajtoš --- bin/fix-monorepo.js | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/bin/fix-monorepo.js b/bin/fix-monorepo.js index d19ba81941ea..da4e27187671 100644 --- a/bin/fix-monorepo.js +++ b/bin/fix-monorepo.js @@ -10,14 +10,19 @@ */ 'use strict'; +const path = require('path'); + const syncDevDeps = require('./sync-dev-deps'); const updateMonorepo = require('./update-monorepo-file'); const { + isJsonEqual, + loadLernaRepo, runMain, updatePackageDeps, updatePackageJson, updateTsProjectRefs, + writeJsonSync, } = require('../packages/monorepo'); async function fixMonorepo() { @@ -31,6 +36,57 @@ async function fixMonorepo() { await updateMonorepo(); // Ensure TypeScript project references are up to date await updateTsProjectRefs(); + // Ensure consistent order of keys in package.json + await updateOrderOfPackageJsonFields(); } runMain(module, fixMonorepo); + +async function updateOrderOfPackageJsonFields() { + const {packages} = await loadLernaRepo(); + for (const pkg of packages.filter(p => !p.private)) { + const manifest = pkg.toJSON(); + + // Keys to update in the desired order, + // filtered to those present in `package.json` only. + const depKeys = [ + 'peerDependencies', + 'dependencies', + 'devDependencies', + ].filter(k => k in manifest); + + // Get all top-level keys like "name", "version", "dependencies" + let keys = Object.keys(manifest); + // Remove "*dependencies" + keys = keys.filter(k => !depKeys.includes(k)); + + // Find the position of "publishConfig" (if present) or "license" + let ix = keys.indexOf('publishConfig'); + if (ix === -1) { + ix = keys.indexOf('license'); + if (ix === -1) { + const relPath = path.relative(pkg.rootPath, pkg.manifestLocation); + throw new Error( + `Fatal error: ${relPath} is missing required "license" field.`, + ); + } + } + + // Insert back "*dependencies" after "publishConfig" or "license" + keys.splice( + ix + 1, // index at which to start changing the array. + 0, // number of elements to remove + ...depKeys, // elements to insert + ); + + // Build a new manifest with the keys in the correct order + const updated = {}; + for (const k of keys) { + updated[k] = manifest[k]; + } + + if (!isJsonEqual(updated, manifest)) { + writeJsonSync(pkg.manifestLocation, updated); + } + } +} From 938bb47dbd04f2b029385669b7bd80a095014098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 20 Nov 2020 10:18:16 +0100 Subject: [PATCH 3/3] chore: fix order of deps-related fields on `package.json` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensure deps are specified in the following order, starting after `publishConfig` or `license` field: 1. `peerDependencies` 2. `dependencies 3. `devDependencies` Signed-off-by: Miroslav Bajtoš --- bodyparsers/rest-msgpack/package.json | 8 +- docs/package.json | 14 ++-- .../access-control-migration/package.json | 54 ++++++------- examples/binding-resolution/package.json | 12 +-- examples/context/package.json | 24 +++--- examples/file-transfer/package.json | 36 ++++----- examples/graphql/package.json | 40 +++++----- examples/greeter-extension/package.json | 18 ++--- examples/greeting-app/package.json | 24 +++--- examples/hello-world/package.json | 26 +++---- examples/lb3-application/package.json | 56 +++++++------- examples/log-extension/package.json | 34 ++++----- examples/metrics-prometheus/package.json | 30 ++++---- examples/multi-tenancy/package.json | 14 ++-- examples/rest-crud/package.json | 42 +++++----- examples/soap-calculator/package.json | 42 +++++----- examples/socketio/package.json | 6 +- examples/todo-jwt/package.json | 52 ++++++------- examples/todo-list/package.json | 44 +++++------ examples/todo/package.json | 46 +++++------ examples/validation-app/package.json | 38 +++++----- examples/webpack/package.json | 32 ++++---- extensions/apiconnect/package.json | 30 ++++---- .../authentication-passport/package.json | 32 ++++---- extensions/cron/package.json | 6 +- extensions/graphql/package.json | 34 ++++----- extensions/pooling/package.json | 8 +- extensions/socketio/package.json | 42 +++++----- packages/cli/package.json | 76 +++++++++---------- packages/eslint-config/package.json | 6 +- packages/express/package.json | 14 ++-- packages/filter/package.json | 8 +- packages/monorepo/package.json | 6 +- packages/openapi-spec-builder/package.json | 14 ++-- packages/openapi-v3/package.json | 30 ++++---- packages/repository-json-schema/package.json | 10 +-- packages/repository-tests/package.json | 12 +-- packages/repository/package.json | 16 ++-- packages/service-proxy/package.json | 8 +- 39 files changed, 522 insertions(+), 522 deletions(-) diff --git a/bodyparsers/rest-msgpack/package.json b/bodyparsers/rest-msgpack/package.json index 29c40d22c072..61586f3f3722 100644 --- a/bodyparsers/rest-msgpack/package.json +++ b/bodyparsers/rest-msgpack/package.json @@ -27,6 +27,10 @@ "src", "!*/__tests__" ], + "copyright.owner": "IBM Corp.", + "publishConfig": { + "access": "public" + }, "peerDependencies": { "@loopback/core": "^2.13.0", "@loopback/rest": "^9.1.0" @@ -45,9 +49,5 @@ "@types/node": "^10.17.35", "@types/type-is": "^1.6.3", "typescript": "~4.1.2" - }, - "copyright.owner": "IBM Corp.", - "publishConfig": { - "access": "public" } } diff --git a/docs/package.json b/docs/package.json index 3e04b45799d7..e3609ff924c3 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,6 +9,13 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "fs-extra": "^9.0.1", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7" + }, "engines": { "node": "^10.16 || 12 || 14" }, @@ -26,16 +33,9 @@ "version": "node ./bin/copy-readmes.js && node ./bin/copy-changelogs.js && cd .. && npm run tsdocs", "clean": "lb-clean loopback-docs*.tgz package apidocs site/readmes site/changelogs site/apidocs" }, - "devDependencies": { - "@loopback/build": "^6.2.7" - }, "repository": { "type": "git", "url": "https://github.com/strongloop/loopback-next.git", "directory": "docs" - }, - "dependencies": { - "fs-extra": "^9.0.1", - "tslib": "^2.0.3" } } diff --git a/examples/access-control-migration/package.json b/examples/access-control-migration/package.json index b2ce6e008d30..e38975f640fc 100644 --- a/examples/access-control-migration/package.json +++ b/examples/access-control-migration/package.json @@ -13,6 +13,33 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/authentication": "^7.0.4", + "@loopback/authorization": "^0.7.4", + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "@loopback/rest-explorer": "^3.0.4", + "@loopback/security": "^0.3.4", + "@loopback/service-proxy": "^3.0.4", + "@types/bcryptjs": "2.4.2", + "bcryptjs": "^2.4.3", + "casbin": "^5.2.1", + "jsonwebtoken": "^8.5.1", + "loopback-connector-rest": "^4.0.1" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/http-caching-proxy": "^2.1.18", + "@loopback/testlab": "^3.2.9", + "@types/lodash": "^4.14.165", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "lodash": "^4.17.20", + "typescript": "~4.1.2" + }, "scripts": { "build": "lb-tsc", "build:watch": "lb-tsc --watch", @@ -41,33 +68,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/access-control-migration" }, - "dependencies": { - "@loopback/authentication": "^7.0.4", - "@loopback/authorization": "^0.7.4", - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "@loopback/rest-explorer": "^3.0.4", - "@loopback/security": "^0.3.4", - "@loopback/service-proxy": "^3.0.4", - "@types/bcryptjs": "2.4.2", - "bcryptjs": "^2.4.3", - "casbin": "^5.2.1", - "jsonwebtoken": "^8.5.1", - "loopback-connector-rest": "^4.0.1" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/http-caching-proxy": "^2.1.18", - "@loopback/testlab": "^3.2.9", - "@types/lodash": "^4.14.165", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "lodash": "^4.17.20", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/binding-resolution/package.json b/examples/binding-resolution/package.json index 29448c82c23a..5ba0b9eba68c 100644 --- a/examples/binding-resolution/package.json +++ b/examples/binding-resolution/package.json @@ -36,12 +36,6 @@ "publishConfig": { "access": "public" }, - "files": [ - "README.md", - "dist", - "src", - "!*/__tests__" - ], "dependencies": { "@loopback/boot": "^3.1.1", "@loopback/core": "^2.13.0", @@ -59,5 +53,11 @@ "source-map-support": "^0.5.19", "typescript": "~4.1.2" }, + "files": [ + "README.md", + "dist", + "src", + "!*/__tests__" + ], "copyright.owner": "IBM Corp." } diff --git a/examples/context/package.json b/examples/context/package.json index 7421a1d8f5a3..d65b7a8df117 100644 --- a/examples/context/package.json +++ b/examples/context/package.json @@ -13,6 +13,18 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/context": "^3.13.1", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "typescript": "~4.1.2" + }, "scripts": { "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build": "lb-tsc", @@ -39,18 +51,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/context" }, - "dependencies": { - "@loopback/context": "^3.13.1", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/file-transfer/package.json b/examples/file-transfer/package.json index 5fe3a3b8217a..c4c435faf6e6 100644 --- a/examples/file-transfer/package.json +++ b/examples/file-transfer/package.json @@ -13,6 +13,24 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/rest": "^9.1.0", + "@loopback/rest-explorer": "^3.0.4", + "multer": "^1.4.2", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/express-serve-static-core": "^4.17.13", + "@types/multer": "^1.4.4", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "typescript": "~4.1.2" + }, "scripts": { "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build": "lb-tsc", @@ -38,24 +56,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/file-transfer" }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/rest": "^9.1.0", - "@loopback/rest-explorer": "^3.0.4", - "multer": "^1.4.2", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/express-serve-static-core": "^4.17.13", - "@types/multer": "^1.4.4", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/graphql/package.json b/examples/graphql/package.json index 5285ef4bc9ce..3b674a3374ae 100644 --- a/examples/graphql/package.json +++ b/examples/graphql/package.json @@ -14,6 +14,26 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/graphql": "^0.2.2", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "class-transformer": "^0.3.1", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/multer": "^1.4.3", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "rimraf": "^3.0.2", + "source-map-support": "^0.5.19", + "typescript": "~4.1.2" + }, "scripts": { "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build": "lb-tsc", @@ -47,25 +67,5 @@ "src", "!*/__tests__" ], - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/graphql": "^0.2.2", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "class-transformer": "^0.3.1", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/multer": "^1.4.3", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "rimraf": "^3.0.2", - "source-map-support": "^0.5.19", - "typescript": "~4.1.2" - }, "copyright.owner": "IBM Corp." } diff --git a/examples/greeter-extension/package.json b/examples/greeter-extension/package.json index 661dd719e7e5..c411db8117c8 100644 --- a/examples/greeter-extension/package.json +++ b/examples/greeter-extension/package.json @@ -42,10 +42,12 @@ "publishConfig": { "access": "public" }, - "bugs": { - "url": "https://github.com/strongloop/loopback-next/issues" + "dependencies": { + "@loopback/core": "^2.13.0", + "chalk": "^4.1.0", + "debug": "^4.3.1", + "tslib": "^2.0.3" }, - "homepage": "https://github.com/strongloop/loopback-next/tree/master/examples/greeter-extension", "devDependencies": { "@loopback/build": "^6.2.7", "@loopback/eslint-config": "^10.0.3", @@ -55,10 +57,8 @@ "eslint": "^7.14.0", "typescript": "~4.1.2" }, - "dependencies": { - "@loopback/core": "^2.13.0", - "chalk": "^4.1.0", - "debug": "^4.3.1", - "tslib": "^2.0.3" - } + "bugs": { + "url": "https://github.com/strongloop/loopback-next/issues" + }, + "homepage": "https://github.com/strongloop/loopback-next/tree/master/examples/greeter-extension" } diff --git a/examples/greeting-app/package.json b/examples/greeting-app/package.json index b84c67c8ef16..eaccc2075f32 100644 --- a/examples/greeting-app/package.json +++ b/examples/greeting-app/package.json @@ -43,10 +43,15 @@ "publishConfig": { "access": "public" }, - "bugs": { - "url": "https://github.com/strongloop/loopback-next/issues" + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/example-greeter-extension": "^2.1.14", + "@loopback/rest": "^9.1.0", + "chalk": "^4.1.0", + "debug": "^4.3.1", + "tslib": "^2.0.3" }, - "homepage": "https://github.com/strongloop/loopback-next/tree/master/examples/greeter-extension", "devDependencies": { "@loopback/build": "^6.2.7", "@loopback/eslint-config": "^10.0.3", @@ -56,13 +61,8 @@ "eslint": "^7.14.0", "typescript": "~4.1.2" }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/example-greeter-extension": "^2.1.14", - "@loopback/rest": "^9.1.0", - "chalk": "^4.1.0", - "debug": "^4.3.1", - "tslib": "^2.0.3" - } + "bugs": { + "url": "https://github.com/strongloop/loopback-next/issues" + }, + "homepage": "https://github.com/strongloop/loopback-next/tree/master/examples/greeter-extension" } diff --git a/examples/hello-world/package.json b/examples/hello-world/package.json index 82f0e85eed7b..448989005ab3 100644 --- a/examples/hello-world/package.json +++ b/examples/hello-world/package.json @@ -13,6 +13,19 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/core": "^2.13.0", + "@loopback/rest": "^9.1.0", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "typescript": "~4.1.2" + }, "scripts": { "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build": "lb-tsc", @@ -39,19 +52,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/hello-world" }, - "dependencies": { - "@loopback/core": "^2.13.0", - "@loopback/rest": "^9.1.0", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/lb3-application/package.json b/examples/lb3-application/package.json index 1db641a30e42..f67d8dcfc291 100644 --- a/examples/lb3-application/package.json +++ b/examples/lb3-application/package.json @@ -13,34 +13,6 @@ "publishConfig": { "access": "public" }, - "scripts": { - "build": "lb-tsc", - "build:watch": "lb-tsc --watch", - "clean": "lb-clean *example-lb3-application*.tgz dist *.tsbuildinfo package", - "lint": "npm run prettier:check && npm run eslint", - "lint:fix": "npm run eslint:fix && npm run prettier:fix", - "prettier:cli": "lb-prettier \"**/*.ts\"", - "prettier:check": "npm run prettier:cli -- -l", - "prettier:fix": "npm run prettier:cli -- --write", - "eslint": "lb-eslint --report-unused-disable-directives .", - "eslint:fix": "npm run eslint -- --fix", - "pretest": "npm run rebuild", - "test": "lb-mocha \"dist/__tests__/**/*.js\" \"lb3app/test/*.js\"", - "test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest", - "verify": "npm pack && tar xf loopback-lb3-application*.tgz && tree package && npm run clean", - "premigrate": "npm run build ", - "migrate": "node ./dist/migrate", - "preopenapi-spec": "npm run build", - "openapi-spec": "node ./dist/openapi-spec", - "rebuild": "npm run clean && npm run build", - "prestart": "npm run rebuild", - "start": "node ." - }, - "repository": { - "type": "git", - "url": "https://github.com/strongloop/loopback-next.git", - "directory": "examples/lb3-application" - }, "dependencies": { "@loopback/boot": "^3.1.1", "@loopback/booter-lb3app": "^2.2.14", @@ -69,6 +41,34 @@ "should": "^13.2.3", "typescript": "~4.1.2" }, + "scripts": { + "build": "lb-tsc", + "build:watch": "lb-tsc --watch", + "clean": "lb-clean *example-lb3-application*.tgz dist *.tsbuildinfo package", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", + "prettier:cli": "lb-prettier \"**/*.ts\"", + "prettier:check": "npm run prettier:cli -- -l", + "prettier:fix": "npm run prettier:cli -- --write", + "eslint": "lb-eslint --report-unused-disable-directives .", + "eslint:fix": "npm run eslint -- --fix", + "pretest": "npm run rebuild", + "test": "lb-mocha \"dist/__tests__/**/*.js\" \"lb3app/test/*.js\"", + "test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest", + "verify": "npm pack && tar xf loopback-lb3-application*.tgz && tree package && npm run clean", + "premigrate": "npm run build ", + "migrate": "node ./dist/migrate", + "preopenapi-spec": "npm run build", + "openapi-spec": "node ./dist/openapi-spec", + "rebuild": "npm run clean && npm run build", + "prestart": "npm run rebuild", + "start": "node ." + }, + "repository": { + "type": "git", + "url": "https://github.com/strongloop/loopback-next.git", + "directory": "examples/lb3-application" + }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/log-extension/package.json b/examples/log-extension/package.json index 9cda6d9c2440..babaae1ece9a 100644 --- a/examples/log-extension/package.json +++ b/examples/log-extension/package.json @@ -13,6 +13,22 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/core": "^2.13.0", + "@loopback/rest": "^9.1.0", + "chalk": "^4.1.0", + "debug": "^4.3.1", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/debug": "^4.1.5", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "typescript": "~4.1.2" + }, "scripts": { "build": "lb-tsc", "build:watch": "lb-tsc --watch", @@ -43,21 +59,5 @@ "bugs": { "url": "https://github.com/strongloop/loopback-next/issues" }, - "homepage": "https://github.com/strongloop/loopback-next/tree/master/examples/log-extension", - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/debug": "^4.1.5", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "typescript": "~4.1.2" - }, - "dependencies": { - "@loopback/core": "^2.13.0", - "@loopback/rest": "^9.1.0", - "chalk": "^4.1.0", - "debug": "^4.3.1", - "tslib": "^2.0.3" - } + "homepage": "https://github.com/strongloop/loopback-next/tree/master/examples/log-extension" } diff --git a/examples/metrics-prometheus/package.json b/examples/metrics-prometheus/package.json index 3a884e58c933..afb8ea42bf93 100644 --- a/examples/metrics-prometheus/package.json +++ b/examples/metrics-prometheus/package.json @@ -13,6 +13,21 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/metrics": "^0.5.1", + "@loopback/rest": "^9.1.0", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "typescript": "~4.1.2" + }, "scripts": { "acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"", "build": "lb-tsc", @@ -40,21 +55,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/metrics-prometheus" }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/metrics": "^0.5.1", - "@loopback/rest": "^9.1.0", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/multi-tenancy/package.json b/examples/multi-tenancy/package.json index 6c77b0ab2d6c..41fe1bc4f94e 100644 --- a/examples/multi-tenancy/package.json +++ b/examples/multi-tenancy/package.json @@ -47,12 +47,6 @@ "publishConfig": { "access": "public" }, - "files": [ - "README.md", - "dist", - "src", - "!*/__tests__" - ], "dependencies": { "@loopback/boot": "^3.1.1", "@loopback/core": "^2.13.0", @@ -72,5 +66,11 @@ "eslint": "^7.14.0", "source-map-support": "^0.5.19", "typescript": "~4.1.2" - } + }, + "files": [ + "README.md", + "dist", + "src", + "!*/__tests__" + ] } diff --git a/examples/rest-crud/package.json b/examples/rest-crud/package.json index 8d4c942bdcc7..e133167ac9d5 100644 --- a/examples/rest-crud/package.json +++ b/examples/rest-crud/package.json @@ -13,6 +13,27 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "@loopback/rest-crud": "^0.8.18", + "@loopback/rest-explorer": "^3.0.4", + "loopback-connector-rest": "^4.0.1", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/http-caching-proxy": "^2.1.18", + "@loopback/testlab": "^3.2.9", + "@types/lodash": "^4.14.165", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "lodash": "^4.17.20", + "typescript": "~4.1.2" + }, "scripts": { "build": "lb-tsc", "build:watch": "lb-tsc --watch", @@ -41,27 +62,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/rest-crud" }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "@loopback/rest-crud": "^0.8.18", - "@loopback/rest-explorer": "^3.0.4", - "loopback-connector-rest": "^4.0.1", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/http-caching-proxy": "^2.1.18", - "@loopback/testlab": "^3.2.9", - "@types/lodash": "^4.14.165", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "lodash": "^4.17.20", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/soap-calculator/package.json b/examples/soap-calculator/package.json index e2fb07c03d58..1c77a12c43a1 100644 --- a/examples/soap-calculator/package.json +++ b/examples/soap-calculator/package.json @@ -20,6 +20,27 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "@loopback/rest-explorer": "^3.0.4", + "@loopback/service-proxy": "^3.0.4", + "loopback-connector-soap": "^6.0.0", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/mocha": "^8.0.4", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "mocha": "^8.2.1", + "source-map-support": "^0.5.19", + "typescript": "~4.1.2" + }, "scripts": { "build": "lb-tsc", "build:watch": "lb-tsc --watch", @@ -43,26 +64,5 @@ "type": "git", "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/soap-calculator" - }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "@loopback/rest-explorer": "^3.0.4", - "@loopback/service-proxy": "^3.0.4", - "loopback-connector-soap": "^6.0.0", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/mocha": "^8.0.4", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "mocha": "^8.2.1", - "source-map-support": "^0.5.19", - "typescript": "~4.1.2" } } diff --git a/examples/socketio/package.json b/examples/socketio/package.json index b9ff95d1e040..039ae1f859d1 100644 --- a/examples/socketio/package.json +++ b/examples/socketio/package.json @@ -46,6 +46,9 @@ "src", "!*/__tests__" ], + "publishConfig": { + "access": "public" + }, "dependencies": { "@loopback/boot": "^3.1.1", "@loopback/core": "^2.13.0", @@ -68,8 +71,5 @@ "source-map-support": "^0.5.19", "typescript": "~4.1.2" }, - "publishConfig": { - "access": "public" - }, "copyright.owner": "IBM Corp." } diff --git a/examples/todo-jwt/package.json b/examples/todo-jwt/package.json index 6d2370d8d2b8..a63b4a0bf5b4 100644 --- a/examples/todo-jwt/package.json +++ b/examples/todo-jwt/package.json @@ -13,6 +13,32 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/authentication": "^7.0.4", + "@loopback/authentication-jwt": "^0.7.4", + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "@loopback/rest-explorer": "^3.0.4", + "@loopback/security": "^0.3.4", + "@loopback/service-proxy": "^3.0.4", + "@types/bcryptjs": "^2.4.2", + "bcryptjs": "^2.4.3", + "loopback-connector-rest": "^4.0.1", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/http-caching-proxy": "^2.1.18", + "@loopback/testlab": "^3.2.9", + "@types/lodash": "^4.14.165", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "lodash": "^4.17.20", + "typescript": "~4.1.2" + }, "repository": { "type": "git", "url": "https://github.com/strongloop/loopback-next.git", @@ -41,32 +67,6 @@ "prestart": "npm run rebuild", "start": "node ." }, - "dependencies": { - "@loopback/authentication": "^7.0.4", - "@loopback/authentication-jwt": "^0.7.4", - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "@loopback/rest-explorer": "^3.0.4", - "@loopback/security": "^0.3.4", - "@loopback/service-proxy": "^3.0.4", - "@types/bcryptjs": "^2.4.2", - "bcryptjs": "^2.4.3", - "loopback-connector-rest": "^4.0.1", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/http-caching-proxy": "^2.1.18", - "@loopback/testlab": "^3.2.9", - "@types/lodash": "^4.14.165", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "lodash": "^4.17.20", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/todo-list/package.json b/examples/todo-list/package.json index 62a3200db5d8..41e29d329e2f 100644 --- a/examples/todo-list/package.json +++ b/examples/todo-list/package.json @@ -13,6 +13,28 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "@loopback/rest-explorer": "^3.0.4", + "@loopback/service-proxy": "^3.0.4", + "loopback-connector-rest": "^4.0.1", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/http-caching-proxy": "^2.1.18", + "@loopback/repository": "^3.2.1", + "@loopback/testlab": "^3.2.9", + "@types/lodash": "^4.14.165", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "lodash": "^4.17.20", + "typescript": "~4.1.2" + }, "scripts": { "build": "lb-tsc", "build:watch": "lb-tsc --watch", @@ -41,28 +63,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/todo-list" }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "@loopback/rest-explorer": "^3.0.4", - "@loopback/service-proxy": "^3.0.4", - "loopback-connector-rest": "^4.0.1", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/http-caching-proxy": "^2.1.18", - "@loopback/repository": "^3.2.1", - "@loopback/testlab": "^3.2.9", - "@types/lodash": "^4.14.165", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "lodash": "^4.17.20", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/todo/package.json b/examples/todo/package.json index 6eaa5144285d..14f594083972 100644 --- a/examples/todo/package.json +++ b/examples/todo/package.json @@ -13,6 +13,29 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "@loopback/rest-explorer": "^3.0.4", + "@loopback/service-proxy": "^3.0.4", + "loopback-connector-rest": "^4.0.1", + "morgan": "^1.10.0", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/http-caching-proxy": "^2.1.18", + "@loopback/testlab": "^3.2.9", + "@types/lodash": "^4.14.165", + "@types/morgan": "^1.9.2", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "lodash": "^4.17.20", + "typescript": "~4.1.2" + }, "scripts": { "build": "lb-tsc", "build:watch": "lb-tsc --watch", @@ -41,29 +64,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/todo" }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "@loopback/rest-explorer": "^3.0.4", - "@loopback/service-proxy": "^3.0.4", - "loopback-connector-rest": "^4.0.1", - "morgan": "^1.10.0", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/http-caching-proxy": "^2.1.18", - "@loopback/testlab": "^3.2.9", - "@types/lodash": "^4.14.165", - "@types/morgan": "^1.9.2", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "lodash": "^4.17.20", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/validation-app/package.json b/examples/validation-app/package.json index ff7b8962652c..c2c5082f916a 100644 --- a/examples/validation-app/package.json +++ b/examples/validation-app/package.json @@ -13,6 +13,25 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0", + "@loopback/repository": "^3.2.1", + "@loopback/rest": "^9.1.0", + "@loopback/rest-explorer": "^3.0.4", + "@loopback/service-proxy": "^3.0.4", + "strong-error-handler": "^4.0.0", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/node": "^10.17.35", + "eslint": "^7.14.0", + "source-map-support": "^0.5.19", + "typescript": "~4.1.2" + }, "scripts": { "build": "lb-tsc", "build:watch": "lb-tsc --watch", @@ -43,25 +62,6 @@ "url": "https://github.com/strongloop/loopback-next.git", "directory": "examples/validation-app" }, - "dependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0", - "@loopback/repository": "^3.2.1", - "@loopback/rest": "^9.1.0", - "@loopback/rest-explorer": "^3.0.4", - "@loopback/service-proxy": "^3.0.4", - "strong-error-handler": "^4.0.0", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/node": "^10.17.35", - "eslint": "^7.14.0", - "source-map-support": "^0.5.19", - "typescript": "~4.1.2" - }, "keywords": [ "loopback", "LoopBack", diff --git a/examples/webpack/package.json b/examples/webpack/package.json index ac358feedcef..1744bbdd027a 100644 --- a/examples/webpack/package.json +++ b/examples/webpack/package.json @@ -14,22 +14,6 @@ "publishConfig": { "access": "public" }, - "scripts": { - "build": "lb-tsc", - "build:webpack-node": "webpack --config-name node", - "build:webpack-web": "webpack --config-name web", - "prepack": "npm run build:webpack-web", - "clean": "lb-clean loopback-example-webpack*.tgz dist *.tsbuildinfo package", - "verify": "npm pack && tar xf loopback-example-webpack*.tgz && tree package && npm run clean", - "pretest": "npm run rebuild", - "test": "lb-mocha \"dist/__tests__/**/*.js\"", - "rebuild": "npm run clean && npm run build" - }, - "repository": { - "type": "git", - "url": "https://github.com/strongloop/loopback-next.git", - "directory": "examples/webpack" - }, "dependencies": { "@loopback/core": "^2.13.0", "tslib": "^2.0.3" @@ -50,6 +34,22 @@ "webpack-cli": "^4.2.0", "zombie": "^6.1.4" }, + "scripts": { + "build": "lb-tsc", + "build:webpack-node": "webpack --config-name node", + "build:webpack-web": "webpack --config-name web", + "prepack": "npm run build:webpack-web", + "clean": "lb-clean loopback-example-webpack*.tgz dist *.tsbuildinfo package", + "verify": "npm pack && tar xf loopback-example-webpack*.tgz && tree package && npm run clean", + "pretest": "npm run rebuild", + "test": "lb-mocha \"dist/__tests__/**/*.js\"", + "rebuild": "npm run clean && npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/strongloop/loopback-next.git", + "directory": "examples/webpack" + }, "keywords": [ "loopback", "LoopBack", diff --git a/extensions/apiconnect/package.json b/extensions/apiconnect/package.json index 1280b000eb54..e9b462f77934 100644 --- a/extensions/apiconnect/package.json +++ b/extensions/apiconnect/package.json @@ -23,21 +23,6 @@ "publishConfig": { "access": "public" }, - "keywords": [ - "LoopBack", - "IBM API Connect" - ], - "files": [ - "README.md", - "dist", - "src", - "!*/__tests__" - ], - "repository": { - "type": "git", - "url": "https://github.com/strongloop/loopback-next.git", - "directory": "extensions/apiconnect" - }, "peerDependencies": { "@loopback/core": "^2.13.0", "@loopback/rest": "^9.1.0" @@ -52,5 +37,20 @@ "@loopback/rest": "^9.1.0", "@loopback/testlab": "^3.2.9", "@types/node": "^10.17.35" + }, + "keywords": [ + "LoopBack", + "IBM API Connect" + ], + "files": [ + "README.md", + "dist", + "src", + "!*/__tests__" + ], + "repository": { + "type": "git", + "url": "https://github.com/strongloop/loopback-next.git", + "directory": "extensions/apiconnect" } } diff --git a/extensions/authentication-passport/package.json b/extensions/authentication-passport/package.json index 1173c5085bd7..d0f2adf61326 100644 --- a/extensions/authentication-passport/package.json +++ b/extensions/authentication-passport/package.json @@ -23,22 +23,6 @@ "publishConfig": { "access": "public" }, - "keywords": [ - "Passport", - "Authentication", - "TypeScript" - ], - "files": [ - "README.md", - "dist", - "src", - "!*/__tests__" - ], - "repository": { - "type": "git", - "url": "https://github.com/strongloop/loopback-next.git", - "directory": "extensions/authentication-passport" - }, "peerDependencies": { "@loopback/authentication": "^7.0.4", "@loopback/core": "^2.13.0", @@ -76,5 +60,21 @@ "passport-oauth2": "^1.5.0", "qs": "^6.9.4", "supertest": "^6.0.1" + }, + "keywords": [ + "Passport", + "Authentication", + "TypeScript" + ], + "files": [ + "README.md", + "dist", + "src", + "!*/__tests__" + ], + "repository": { + "type": "git", + "url": "https://github.com/strongloop/loopback-next.git", + "directory": "extensions/authentication-passport" } } diff --git a/extensions/cron/package.json b/extensions/cron/package.json index c066aa86ec44..2a86454995b5 100644 --- a/extensions/cron/package.json +++ b/extensions/cron/package.json @@ -20,6 +20,9 @@ "publishConfig": { "access": "public" }, + "peerDependencies": { + "@loopback/core": "^2.13.0" + }, "dependencies": { "@types/cron": "^1.7.2", "@types/debug": "^4.1.5", @@ -49,8 +52,5 @@ "type": "git", "url": "https://github.com/strongloop/loopback-next.git", "directory": "extensions/cron" - }, - "peerDependencies": { - "@loopback/core": "^2.13.0" } } diff --git a/extensions/graphql/package.json b/extensions/graphql/package.json index 1531678823b3..b27bf5644b38 100644 --- a/extensions/graphql/package.json +++ b/extensions/graphql/package.json @@ -20,6 +20,23 @@ "author": "IBM Corp.", "copyright.owner": "IBM Corp.", "license": "MIT", + "keywords": [ + "LoopBack", + "GraphQL" + ], + "files": [ + "README.md", + "dist", + "src", + "!*/__tests__" + ], + "publishConfig": { + "access": "public" + }, + "peerDependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0" + }, "dependencies": { "@loopback/http-server": "^2.3.2", "apollo-server-express": "^2.19.0", @@ -28,10 +45,6 @@ "graphql": "^15.4.0", "type-graphql": "^1.1.1" }, - "peerDependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0" - }, "devDependencies": { "@loopback/boot": "^3.1.1", "@loopback/build": "^6.2.7", @@ -44,19 +57,6 @@ "@types/node": "^10.17.35", "class-transformer": "^0.3.1" }, - "keywords": [ - "LoopBack", - "GraphQL" - ], - "files": [ - "README.md", - "dist", - "src", - "!*/__tests__" - ], - "publishConfig": { - "access": "public" - }, "repository": { "type": "git", "url": "https://github.com/strongloop/loopback-next.git", diff --git a/extensions/pooling/package.json b/extensions/pooling/package.json index 1a557f8173ca..e5b2ae5e745f 100644 --- a/extensions/pooling/package.json +++ b/extensions/pooling/package.json @@ -31,6 +31,10 @@ "src", "!*/__tests__" ], + "copyright.owner": "IBM Corp.", + "publishConfig": { + "access": "public" + }, "peerDependencies": { "@loopback/core": "^2.13.0" }, @@ -45,9 +49,5 @@ "@loopback/testlab": "^3.2.9", "@types/node": "^10.17.35", "typescript": "~4.1.2" - }, - "copyright.owner": "IBM Corp.", - "publishConfig": { - "access": "public" } } diff --git a/extensions/socketio/package.json b/extensions/socketio/package.json index 8f96fa5e11c6..77d0220647b5 100644 --- a/extensions/socketio/package.json +++ b/extensions/socketio/package.json @@ -19,6 +19,27 @@ "author": "IBM Corp.", "copyright.owner": "IBM Corp.", "license": "MIT", + "keywords": [ + "LoopBack", + "Socket.IO", + "WebSocket", + "extension", + "socket", + "socketio" + ], + "files": [ + "README.md", + "dist", + "src", + "!*/__tests__" + ], + "publishConfig": { + "access": "public" + }, + "peerDependencies": { + "@loopback/boot": "^3.1.1", + "@loopback/core": "^2.13.0" + }, "dependencies": { "@loopback/http-server": "^2.3.2", "@types/cors": "^2.8.8", @@ -28,10 +49,6 @@ "lodash": "^4.17.20", "socket.io": "^2.3.0" }, - "peerDependencies": { - "@loopback/boot": "^3.1.1", - "@loopback/core": "^2.13.0" - }, "devDependencies": { "@loopback/boot": "^3.1.1", "@loopback/build": "^6.2.7", @@ -44,23 +61,6 @@ "p-event": "^4.1.0", "socket.io-client": "^2.3.1" }, - "keywords": [ - "LoopBack", - "Socket.IO", - "WebSocket", - "extension", - "socket", - "socketio" - ], - "files": [ - "README.md", - "dist", - "src", - "!*/__tests__" - ], - "publishConfig": { - "access": "public" - }, "repository": { "type": "git", "url": "https://github.com/strongloop/loopback-next.git", diff --git a/packages/cli/package.json b/packages/cli/package.json index 2441a19747a7..cf29de46ed16 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -9,44 +9,6 @@ "publishConfig": { "access": "public" }, - "engines": { - "node": "^10.16 || 12 || 14" - }, - "files": [ - "bin", - "lib", - "generators", - "intl", - ".yo-rc.json" - ], - "bin": { - "lb4": "bin/cli-main.js" - }, - "main": "generators/app/index.js", - "keywords": [ - "LoopBack", - "CLI", - "yeoman-generator" - ], - "devDependencies": { - "@loopback/build": "^6.2.7", - "@loopback/eslint-config": "^10.0.3", - "@loopback/testlab": "^3.2.9", - "@types/ejs": "^3.0.5", - "@types/fs-extra": "^9.0.4", - "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.35", - "loopback": "^3.27.0", - "loopback-datasource-juggler": "^4.26.0", - "mem-fs": "^1.2.0", - "mem-fs-editor": "^7.1.0", - "mock-stdin": "^1.0.0", - "rimraf": "^3.0.2", - "sinon": "^9.2.1", - "strong-globalize-cli": "7.1.0", - "yeoman-assert": "^3.1.1", - "yeoman-test": "~2.7.0" - }, "dependencies": { "@lerna/project": "^3.21.0", "@openapi-contrib/openapi-schema-to-json-schema": "^3.0.4", @@ -89,6 +51,44 @@ "yeoman-environment": "^2.10.3", "yeoman-generator": "^4.12.0" }, + "devDependencies": { + "@loopback/build": "^6.2.7", + "@loopback/eslint-config": "^10.0.3", + "@loopback/testlab": "^3.2.9", + "@types/ejs": "^3.0.5", + "@types/fs-extra": "^9.0.4", + "@types/minimatch": "^3.0.3", + "@types/node": "^10.17.35", + "loopback": "^3.27.0", + "loopback-datasource-juggler": "^4.26.0", + "mem-fs": "^1.2.0", + "mem-fs-editor": "^7.1.0", + "mock-stdin": "^1.0.0", + "rimraf": "^3.0.2", + "sinon": "^9.2.1", + "strong-globalize-cli": "7.1.0", + "yeoman-assert": "^3.1.1", + "yeoman-test": "~2.7.0" + }, + "engines": { + "node": "^10.16 || 12 || 14" + }, + "files": [ + "bin", + "lib", + "generators", + "intl", + ".yo-rc.json" + ], + "bin": { + "lb4": "bin/cli-main.js" + }, + "main": "generators/app/index.js", + "keywords": [ + "LoopBack", + "CLI", + "yeoman-generator" + ], "scripts": { "test": "lb-mocha --lang en_US.UTF-8 \"test/**/*.js\"", "smoke-test": "lb-mocha --allow-console-logs \"smoke-test/**/*.smoke.js\"", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 1f862abb0410..d58d0819999f 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -12,6 +12,9 @@ "publishConfig": { "access": "public" }, + "peerDependencies": { + "eslint": "^7.14.0" + }, "dependencies": { "@typescript-eslint/eslint-plugin": "^4.8.1", "@typescript-eslint/parser": "^4.8.1", @@ -19,9 +22,6 @@ "eslint-plugin-eslint-plugin": "^2.3.0", "eslint-plugin-mocha": "^8.0.0" }, - "peerDependencies": { - "eslint": "^7.14.0" - }, "repository": { "type": "git", "url": "https://github.com/strongloop/loopback-next.git", diff --git a/packages/express/package.json b/packages/express/package.json index 984548f51c26..2c0abfe81137 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -30,12 +30,6 @@ "publishConfig": { "access": "public" }, - "files": [ - "README.md", - "dist", - "src", - "!*/__tests__" - ], "peerDependencies": { "@loopback/core": "^2.13.0" }, @@ -64,5 +58,11 @@ "http-errors": "^1.8.0", "source-map-support": "^0.5.19", "typescript": "~4.1.2" - } + }, + "files": [ + "README.md", + "dist", + "src", + "!*/__tests__" + ] } diff --git a/packages/filter/package.json b/packages/filter/package.json index 2ec9c66929f7..5d2ade9c5e76 100644 --- a/packages/filter/package.json +++ b/packages/filter/package.json @@ -27,6 +27,10 @@ "src", "!*/__tests__" ], + "copyright.owner": "IBM Corp.", + "publishConfig": { + "access": "public" + }, "dependencies": { "tslib": "^2.0.3" }, @@ -35,9 +39,5 @@ "@loopback/testlab": "^3.2.9", "@types/node": "^10.17.35", "typescript": "~4.1.2" - }, - "copyright.owner": "IBM Corp.", - "publishConfig": { - "access": "public" } } diff --git a/packages/monorepo/package.json b/packages/monorepo/package.json index 3c603e96a93f..4494f951d6fb 100644 --- a/packages/monorepo/package.json +++ b/packages/monorepo/package.json @@ -17,6 +17,9 @@ "publishConfig": { "access": "public" }, + "peerDependencies": { + "lerna": "^3.22.1" + }, "dependencies": { "@lerna/filter-packages": "^3.18.0", "@lerna/package-graph": "^3.18.5", @@ -25,9 +28,6 @@ "debug": "^4.3.1", "fs-extra": "^9.0.1" }, - "peerDependencies": { - "lerna": "^3.22.1" - }, "bin": { "lb-run-lerna": "./lib/run-lerna.js", "lb-check-package-locks": "./lib/check-package-locks.js", diff --git a/packages/openapi-spec-builder/package.json b/packages/openapi-spec-builder/package.json index 230792ed297b..4fa1404be6ff 100644 --- a/packages/openapi-spec-builder/package.json +++ b/packages/openapi-spec-builder/package.json @@ -20,13 +20,6 @@ "publishConfig": { "access": "public" }, - "keywords": [ - "Swagger", - "OpenAPI Spec", - "TypeScript", - "Builder", - "Testing" - ], "dependencies": { "openapi3-ts": "^2.0.0", "tslib": "^2.0.3" @@ -37,6 +30,13 @@ "@loopback/testlab": "^3.2.9", "@types/node": "^10.17.35" }, + "keywords": [ + "Swagger", + "OpenAPI Spec", + "TypeScript", + "Builder", + "Testing" + ], "files": [ "README.md", "dist", diff --git a/packages/openapi-v3/package.json b/packages/openapi-v3/package.json index 04ecf440ef78..e4d78e3ab831 100644 --- a/packages/openapi-v3/package.json +++ b/packages/openapi-v3/package.json @@ -7,6 +7,21 @@ "engines": { "node": "^10.16 || 12 || 14" }, + "scripts": { + "build": "lb-tsc", + "clean": "lb-clean loopback-openapi-v3*.tgz dist *.tsbuildinfo package", + "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", + "pretest": "npm run build", + "test": "lb-mocha \"dist/__tests__/**/*.js\"", + "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", + "verify": "npm pack && tar xf loopback-openapi-v3*.tgz && tree package && npm run clean" + }, + "author": "IBM Corp.", + "copyright.owner": "IBM Corp.", + "license": "MIT", + "publishConfig": { + "access": "public" + }, "peerDependencies": { "@loopback/core": "^2.13.0" }, @@ -32,21 +47,6 @@ "@types/lodash": "^4.14.165", "@types/node": "^10.17.35" }, - "scripts": { - "build": "lb-tsc", - "clean": "lb-clean loopback-openapi-v3*.tgz dist *.tsbuildinfo package", - "integration": "lb-mocha \"dist/__tests__/integration/**/*.js\"", - "pretest": "npm run build", - "test": "lb-mocha \"dist/__tests__/**/*.js\"", - "unit": "lb-mocha \"dist/__tests__/unit/**/*.js\"", - "verify": "npm pack && tar xf loopback-openapi-v3*.tgz && tree package && npm run clean" - }, - "author": "IBM Corp.", - "copyright.owner": "IBM Corp.", - "license": "MIT", - "publishConfig": { - "access": "public" - }, "keywords": [ "Swagger", "OpenAPI Spec", diff --git a/packages/repository-json-schema/package.json b/packages/repository-json-schema/package.json index af4efa9db67e..58df2a0b9767 100644 --- a/packages/repository-json-schema/package.json +++ b/packages/repository-json-schema/package.json @@ -20,11 +20,6 @@ "publishConfig": { "access": "public" }, - "keywords": [ - "LoopBack", - "TypeScript", - "JSON Schema" - ], "peerDependencies": { "@loopback/core": "^2.13.0", "@loopback/repository": "^3.2.1" @@ -44,6 +39,11 @@ "@types/node": "^10.17.35", "ajv": "^6.12.6" }, + "keywords": [ + "LoopBack", + "TypeScript", + "JSON Schema" + ], "files": [ "README.md", "dist", diff --git a/packages/repository-tests/package.json b/packages/repository-tests/package.json index 2c4bb0c86fd2..bd8396a18cac 100644 --- a/packages/repository-tests/package.json +++ b/packages/repository-tests/package.json @@ -24,6 +24,12 @@ "@loopback/core": "^2.13.0", "@loopback/repository": "^3.2.1" }, + "dependencies": { + "@loopback/testlab": "^3.2.9", + "@types/debug": "^4.1.5", + "debug": "^4.3.1", + "tslib": "^2.0.3" + }, "devDependencies": { "@loopback/build": "^6.2.7", "@loopback/core": "^2.13.0", @@ -33,12 +39,6 @@ "@types/node": "^10.17.35", "lodash": "^4.17.20" }, - "dependencies": { - "@loopback/testlab": "^3.2.9", - "@types/debug": "^4.1.5", - "debug": "^4.3.1", - "tslib": "^2.0.3" - }, "files": [ "README.md", "dist", diff --git a/packages/repository/package.json b/packages/repository/package.json index 7b24c494d548..962db921da8a 100644 --- a/packages/repository/package.json +++ b/packages/repository/package.json @@ -24,6 +24,14 @@ "peerDependencies": { "@loopback/core": "^2.13.0" }, + "dependencies": { + "@loopback/filter": "^1.2.1", + "@types/debug": "^4.1.5", + "debug": "^4.3.1", + "lodash": "^4.17.20", + "loopback-datasource-juggler": "^4.26.0", + "tslib": "^2.0.3" + }, "devDependencies": { "@loopback/build": "^6.2.7", "@loopback/core": "^2.13.0", @@ -35,14 +43,6 @@ "@types/node": "^10.17.35", "bson": "4.2.0" }, - "dependencies": { - "@loopback/filter": "^1.2.1", - "@types/debug": "^4.1.5", - "debug": "^4.3.1", - "lodash": "^4.17.20", - "loopback-datasource-juggler": "^4.26.0", - "tslib": "^2.0.3" - }, "files": [ "README.md", "dist", diff --git a/packages/service-proxy/package.json b/packages/service-proxy/package.json index a58ea1387ccc..dde6c9cef172 100644 --- a/packages/service-proxy/package.json +++ b/packages/service-proxy/package.json @@ -26,6 +26,10 @@ "peerDependencies": { "@loopback/core": "^2.13.0" }, + "dependencies": { + "loopback-datasource-juggler": "^4.26.0", + "tslib": "^2.0.3" + }, "devDependencies": { "@loopback/build": "^6.2.7", "@loopback/core": "^2.13.0", @@ -33,10 +37,6 @@ "@loopback/testlab": "^3.2.9", "@types/node": "^10.17.35" }, - "dependencies": { - "loopback-datasource-juggler": "^4.26.0", - "tslib": "^2.0.3" - }, "files": [ "README.md", "dist",