From 62c636318a1f1f72013857e0293fc6676a64fd33 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Fri, 1 Sep 2023 10:21:44 -0600 Subject: [PATCH 1/2] feat: apply exlude-scripts to wireit --- sfdevrc.schema.json | 5 +++++ utils/sf-config.js | 2 ++ utils/standardize-pjson.js | 1 + 3 files changed, 8 insertions(+) diff --git a/sfdevrc.schema.json b/sfdevrc.schema.json index bc764784..47e60d12 100644 --- a/sfdevrc.schema.json +++ b/sfdevrc.schema.json @@ -87,6 +87,11 @@ "default": "**/*.test.ts" } } + }, + "ignore-node-engine": { + "description": "Ignore the preferred node version for engines.node in package.json", + "type": "boolean", + "default": false } } } diff --git a/utils/sf-config.js b/utils/sf-config.js index 769dbfea..7ed22745 100644 --- a/utils/sf-config.js +++ b/utils/sf-config.js @@ -145,12 +145,14 @@ const resolveConfig = (path) => { excludeScripts = [ ...excludeScripts, ...Object.keys(config.scripts).filter((scriptName) => !config['only-scripts'].includes(scriptName)), + ...Object.keys(config.wireit).filter((scriptName) => !config['only-scripts'].includes(scriptName)), ]; } // Remove excluded items excludeScripts.forEach((scriptName) => { delete config.scripts[scriptName]; + delete config.wireit[scriptName]; }); resolvedConfigs[path] = config; diff --git a/utils/standardize-pjson.js b/utils/standardize-pjson.js index 6e21c898..2e1b8e97 100644 --- a/utils/standardize-pjson.js +++ b/utils/standardize-pjson.js @@ -52,6 +52,7 @@ module.exports = (packageRoot = require('./package-path')) => { const engineVersion = '>=16.0.0'; // Don't control for non dev-config projects, or projects that don't specify an engine already. if ( + !config['ignore-node-engine'] && tsconfig.match(/"extends"\s*:\s*".*@salesforce\/dev-config/) && pjson.contents.engines && pjson.contents.engines.node && From e9413594e5cc37cb4cd6d4465ead1d62e517221b Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Fri, 1 Sep 2023 10:29:34 -0600 Subject: [PATCH 2/2] fix: remove ignore-node-engine option --- sfdevrc.schema.json | 5 ----- utils/standardize-pjson.js | 1 - 2 files changed, 6 deletions(-) diff --git a/sfdevrc.schema.json b/sfdevrc.schema.json index 47e60d12..bc764784 100644 --- a/sfdevrc.schema.json +++ b/sfdevrc.schema.json @@ -87,11 +87,6 @@ "default": "**/*.test.ts" } } - }, - "ignore-node-engine": { - "description": "Ignore the preferred node version for engines.node in package.json", - "type": "boolean", - "default": false } } } diff --git a/utils/standardize-pjson.js b/utils/standardize-pjson.js index 2e1b8e97..6e21c898 100644 --- a/utils/standardize-pjson.js +++ b/utils/standardize-pjson.js @@ -52,7 +52,6 @@ module.exports = (packageRoot = require('./package-path')) => { const engineVersion = '>=16.0.0'; // Don't control for non dev-config projects, or projects that don't specify an engine already. if ( - !config['ignore-node-engine'] && tsconfig.match(/"extends"\s*:\s*".*@salesforce\/dev-config/) && pjson.contents.engines && pjson.contents.engines.node &&