diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json index fb263fd711ee7..c86cf45f36d55 100644 --- a/node_modules/read-package-json/package.json +++ b/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "4.1.1", + "version": "4.1.2", "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "description": "The thing npm uses to read package.json files with semantics and defaults and validation", "repository": { diff --git a/node_modules/read-package-json/read-json.js b/node_modules/read-package-json/read-json.js index 468a33e397774..cb2b495521570 100644 --- a/node_modules/read-package-json/read-json.js +++ b/node_modules/read-package-json/read-json.js @@ -522,6 +522,10 @@ function final (file, data, log, strict, cb) { function fillTypes (file, data, cb) { var index = data.main ? data.main : 'index.js' + if (typeof index !== 'string') { + return cb(new TypeError('The "main" attribute must be of type string.')) + } + // TODO exports is much more complicated than this in verbose format // We need to support for instance diff --git a/package-lock.json b/package-lock.json index 3f9fb7c81e6c8..0e31732a80f3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -144,7 +144,7 @@ "proc-log": "^2.0.0", "qrcode-terminal": "^0.12.0", "read": "~1.0.7", - "read-package-json": "^4.1.1", + "read-package-json": "^4.1.2", "read-package-json-fast": "^2.0.3", "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2", @@ -6434,9 +6434,9 @@ "integrity": "sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw==" }, "node_modules/read-package-json": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz", - "integrity": "sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.2.tgz", + "integrity": "sha512-Dqer4pqzamDE2O4M55xp1qZMuLPqi4ldk2ya648FOMHRjwMzFhuxVrG04wd0c38IsvkVdr3vgHI6z+QTPdAjrQ==", "inBundle": true, "dependencies": { "glob": "^7.1.1", @@ -15746,9 +15746,9 @@ "integrity": "sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw==" }, "read-package-json": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz", - "integrity": "sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.2.tgz", + "integrity": "sha512-Dqer4pqzamDE2O4M55xp1qZMuLPqi4ldk2ya648FOMHRjwMzFhuxVrG04wd0c38IsvkVdr3vgHI6z+QTPdAjrQ==", "requires": { "glob": "^7.1.1", "json-parse-even-better-errors": "^2.3.0", diff --git a/package.json b/package.json index d353ff311a8d9..1fbb2201e7f0f 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "proc-log": "^2.0.0", "qrcode-terminal": "^0.12.0", "read": "~1.0.7", - "read-package-json": "^4.1.1", + "read-package-json": "^4.1.2", "read-package-json-fast": "^2.0.3", "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2",