Skip to content

Commit

Permalink
fix(core): ensure include and excluded return from plugin worker (#23032
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Coly010 authored Apr 26, 2024
1 parent a78e75c commit 3122f2a
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 3122f2a

Please sign in to comment.