Skip to content

Commit

Permalink
fix(NA): getPluginsDistFromRepo to return only dist plugins on build (#…
Browse files Browse the repository at this point in the history
…171457)

This PR fixes a problem where the `getPluginsDistFromRepo` would return
every available plugin and not only the dist ones.
  • Loading branch information
mistic authored Nov 20, 2023
1 parent ab209ee commit 92b6b82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dev/build/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,6 @@ export class Config {
}

getDistPluginsFromRepo() {
return getPackages(this.repoRoot).filter(this.pluginFilter);
return getPackages(this.repoRoot).filter((p) => !p.isDevOnly() && this.pluginFilter(p));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
* Side Public License, v 1.
*/

import { PluginPackage } from '@kbn/repo-packages';
import { findUsedDependencies } from './find_used_dependencies';
import { read, write, Task } from '../../lib';

export const CreatePackageJson: Task = {
description: 'Creating build-ready version of package.json',

async run(config, log, build) {
const plugins = config.getDistPluginsFromRepo();
const plugins = config.getDistPluginsFromRepo() as PluginPackage[];
const distPkgIds = new Set(config.getDistPackagesFromRepo().map((p) => p.id));
const pkg = config.getKibanaPkg();

Expand Down

0 comments on commit 92b6b82

Please sign in to comment.