Skip to content

Commit

Permalink
Add performance-lab as default plugin in since command
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Arntz <[email protected]>
  • Loading branch information
thelovekesh and felixarntz authored Apr 9, 2024
1 parent 7074d27 commit 5bd6550
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/plugin/commands/since.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports.options = [
{
argname: '-p, --plugin <plugin>',
description: 'Plugin name',
defaults: 'performance-lab',
},
{
argname: '-r, --release <release>',
Expand All @@ -43,7 +44,7 @@ exports.handler = async ( opt ) => {
return;
}

if ( opt.plugin && ! plugins.includes( opt.plugin ) ) {
if ( opt.plugin !== 'performance-lab' && ! plugins.includes( opt.plugin ) ) {

Check failure on line 47 in bin/plugin/commands/since.js

View workflow job for this annotation

GitHub Actions / JS Lint

Replace `·opt.plugin·!==·'performance-lab'·&&·!·plugins.includes(·opt.plugin·)·` with `⏎↹↹opt.plugin·!==·'performance-lab'·&&⏎↹↹!·plugins.includes(·opt.plugin·)⏎↹`
log(
formats.error(
`The plugin "${ opt.plugin }" is not found in the plugins.json file.`
Expand All @@ -56,7 +57,7 @@ exports.handler = async ( opt ) => {
const pluginRoot = path.resolve( __dirname, '../../../' );
const ignore = [ '**/node_modules', '**/vendor', '**/bin', '**/build' ];

if ( opt.plugin ) {
if ( opt.plugin !== 'performance-lab' ) {
const pluginPath = path.resolve( pluginRoot, 'plugins', opt.plugin );

patterns.push( `${ pluginPath }/**/*.php` );
Expand Down

0 comments on commit 5bd6550

Please sign in to comment.