-
Notifications
You must be signed in to change notification settings - Fork 52.4k
feat(editor): Add JS method aliases #21799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BundleMonFiles added (2)
Total files change +255.73KB Groups added (2)
Final result: ✅ View report in BundleMon website ➡️ |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 11 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="packages/workflow/src/extensions/array-extensions.ts">
<violation number="1" location="packages/workflow/src/extensions/array-extensions.ts:388">
`tail` shouldn't alias `last()`—`tail()` conventionally returns all but the first element, but this alias would return only the final element.</violation>
<violation number="2" location="packages/workflow/src/extensions/array-extensions.ts:647">
`push` shouldn’t alias `append()` because this method returns the array, not the new length like JavaScript’s `push()`; the alias will break expressions expecting the normal `push()` contract.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
elsmr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! tested and works perfectly, thanks for adding tests too 🙏
|
E2E Tests: n8n tests passed after 5m 7.1s Run Details
This message was posted automatically by
currents.dev | Integration Settings
|
This comment has been minimized.
This comment has been minimized.
|
Got released with |
Summary
This PR adds common aliases to some JS methods in expressions and code node.
In code node some aliases have custom description to let user know how to use the alternative method.
Some aliases have match mode 'exact', to prevent cases when typing
cowould suggest bothconcatandlengthRelated Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-3876/hackmation-js-method-aliases
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)