Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apply exlude-scripts to wireit #213

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sfdevrc.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
2 changes: 2 additions & 0 deletions utils/sf-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions utils/standardize-pjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down