fix: load .node.ee.js enterprise nodes — restore Evaluation Trigger to the database#939
Merged
Merged
Conversation
…o the database (#937) The loader's node-name regex only matched .node.js/.node.ts, so EvaluationTrigger.node.ee.js produced a garbage node name, and the export-resolution fallback took the module's first export — the numeric constant DEFAULT_STARTING_ROW, not the node class — so parsing failed and nodes-base.evaluationTrigger was silently dropped from every rebuild. Agents could not discover it and validate_workflow falsely rejected valid evaluation workflows with "Unknown node type". - Accept an optional .ee segment in the node-name regex - Resolve the node class only from function-typed exports (shared resolveNodeClass helper for both manifest formats) - Add nodes-base.evaluation and nodes-base.evaluationTrigger to the canonical core-node completeness gate so a silent drop fails the build - Add fixture-based regression tests exercising the real loader - Rebuild the node database: 827 core nodes (677 n8n-nodes-base + 150 @n8n/n8n-nodes-langchain) Fixes #937 Conceived by Romuald Członkowski - www.aiadvisors.pl/en Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes node database rebuild so n8n enterprise node modules (*.node.ee.js) are correctly discovered and parsed, restoring nodes-base.evaluationTrigger so MCP node discovery and workflow validation no longer reject valid evaluation workflows.
Changes:
- Update node loader to correctly extract node names from
.node.ee.jspaths and to avoid choosing non-class exports as the node class. - Add fixture-based regression tests covering
.node.ee.jsloading and “constant before class” export shapes. - Strengthen post-rebuild completeness gating by adding
nodes-base.evaluationandnodes-base.evaluationTriggerto the canonical core-node list; bump version + update README/CHANGELOG counts.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/loaders/node-loader.test.ts | Aligns mocked loader test logic with new .node.ee.js matching + safer export fallback. |
| tests/unit/loaders/node-loader-ee-nodes.test.ts | Adds regression tests using on-disk fixture packages for enterprise node export shapes. |
| src/scripts/core-node-check.ts | Adds evaluation + evaluationTrigger to canonical core-node completeness gate. |
| src/loaders/node-loader.ts | Implements .node.ee.js node-name extraction and a shared resolveNodeClass helper. |
| README.md | Updates total/core node counts after rebuild. |
| package.json | Bumps package version to 2.65.1. |
| package-lock.json | Updates lockfile version fields to 2.65.1. |
| CHANGELOG.md | Documents the fix and rebuild result for 2.65.1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+136
to
+142
| private resolveNodeClass(nodeModule: any, nodeName: string): any { | ||
| return ( | ||
| nodeModule.default || | ||
| nodeModule[nodeName] || | ||
| Object.values(nodeModule).find(exported => typeof exported === 'function') | ||
| ); | ||
| } |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
Test Results Summary📊 ArtifactsGenerated at Thu, 16 Jul 2026 12:43:03 GMT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #937.
Problem
nodes-base.evaluationTriggerwas missing from the bundled node database even thoughEvaluationTrigger.node.ee.jsships in n8n-nodes-base and is registered in its package.json. Agents could not discover or configure the Evaluation Trigger throughsearch_nodes/get_node, andn8n_validate_workflowfalsely rejected valid evaluation workflows with "Unknown node type: n8n-nodes-base.evaluationTrigger" — workflows a live n8n 2.30.6 instance accepts and runs.Root cause
Two compounding defects in
src/loaders/node-loader.ts:/\/([^\/]+)\.node\.(js|ts)$/did not match n8n's enterprise.node.ee.jssuffix, so the extracted node name was the garbage stringEvaluationTrigger.node.ee.jsand the named-export lookup missed.Object.values(nodeModule)[0]). EvaluationTrigger exports the numeric constantDEFAULT_STARTING_ROWbefore the class, so the "node class" passed downstream was the number 2; parsing threw and the node was dropped with only a build-log line. The siblingEvaluation.node.ee.jssurvived by luck — it has a single export.Fix
.eesegment:/\/([^\/]+)\.node(?:\.ee)?\.(js|ts)$/, so the class now resolves directly by name.resolveNodeClasshelper (deduplicating the two manifest-format branches) only ever falls back to a function-typed export, so a leading constant can never be mistaken for a node class again.nodes-base.evaluationandnodes-base.evaluationTriggerjoinedCANONICAL_CORE_NODES, so a future silent drop of either fails the rebuild loudly instead of shipping a broken database.tests/unit/loaders/node-loader-ee-nodes.test.ts) exercise the real loader against on-disk fixture packages mirroring the EvaluationTrigger export shape; all three failed before the fix.Verification
nodes-base.evaluationTriggernow in the DB withis_trigger=1, 14 properties, and mapped docs; FTS index finds it.WorkflowValidator(previously hard-errored).defaultor the name-matched export, and old-vs-new fallback results are identical everywhere except the buggy case — no regression surface. These are the only two.ee.jsentries in either package manifest.Conceived by Romuald Członkowski - www.aiadvisors.pl/en
🤖 Generated with Claude Code