From d54aca12ad681b767a49a25b5c91946d836b809d Mon Sep 17 00:00:00 2001 From: Deepak Kasu Date: Wed, 14 May 2025 14:23:42 -0700 Subject: [PATCH 1/2] APIGOV-29723 Update null check while loading extensions --- src/parser/extension.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parser/extension.js b/src/parser/extension.js index 31fa98d..54c1ad4 100644 --- a/src/parser/extension.js +++ b/src/parser/extension.js @@ -168,7 +168,9 @@ export default class Extension { desc: pkg.json.description }); } else if (typeof pkg.json.exports !== 'object') { - console.log(pkg.json.exports); + if (pkg.json.exports) { + console.log(pkg.json.exports); + } throw E.INVALID_EXTENSION('Invalid extension: Expected exports to be an object', { name: 'pkg.json.exports', scope: 'Extension.constructor', value: pkg.json.exports }); } else { From a08d3901b421aa9ba12dd0e551ac13350712eb34 Mon Sep 17 00:00:00 2001 From: Deepak Kasu Date: Thu, 15 May 2025 09:04:21 -0700 Subject: [PATCH 2/2] APIGOV-29723 remove console log --- src/parser/extension.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/parser/extension.js b/src/parser/extension.js index 54c1ad4..a0b7109 100644 --- a/src/parser/extension.js +++ b/src/parser/extension.js @@ -168,10 +168,6 @@ export default class Extension { desc: pkg.json.description }); } else if (typeof pkg.json.exports !== 'object') { - if (pkg.json.exports) { - console.log(pkg.json.exports); - } - throw E.INVALID_EXTENSION('Invalid extension: Expected exports to be an object', { name: 'pkg.json.exports', scope: 'Extension.constructor', value: pkg.json.exports }); } else { for (let [ name, params ] of Object.entries(pkg.json.exports)) {