Skip to content

Commit

Permalink
fix(core): ensure include and excluded return from plugin worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Apr 26, 2024
1 parent 49af691 commit 72e12be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/nx/src/project-graph/plugins/isolation/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export interface PluginWorkerLoadResult {
payload:
| {
name: string;
include?: string[];
exclude?: string[];
createNodesPattern: string;
hasCreateDependencies: boolean;
hasProcessProjectGraph: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ function createWorkerHandler(
return consumeMessage(message, {
'load-result': (result) => {
if (result.success) {
const { name, createNodesPattern } = result;
const { name, createNodesPattern, include, exclude } = result;
pluginName = name;
pluginNames.set(worker, pluginName);
onload({
name,
include,
exclude,
createNodes: createNodesPattern
? [
createNodesPattern,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ process.on('message', async (message: Serializable) => {
type: 'load-result',
payload: {
name: plugin.name,
include: plugin.include,
exclude: plugin.exclude,
createNodesPattern: plugin.createNodes?.[0],
hasCreateDependencies:
'createDependencies' in plugin && !!plugin.createDependencies,
Expand Down

0 comments on commit 72e12be

Please sign in to comment.