Skip to content

Conversation

@yehorkardash
Copy link
Contributor

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 co would suggest both concat and length

изображение изображение изображение

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-3876/hackmation-js-method-aliases

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@yehorkardash yehorkardash requested a review from elsmr November 13, 2025 08:25
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Nov 13, 2025
@bundlemon
Copy link

bundlemon bot commented Nov 13, 2025

BundleMon

Files added (2)
Status Path Size Limits
WASM Dependencies
tree-sitter-bash.wasm
+181.26KB -
WASM Dependencies
tree-sitter.wasm
+74.47KB -

Total files change +255.73KB

Groups added (2)
Status Path Size Limits
**/*.js
+6.02MB -
**/*.css
+235.79KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 52.67176% with 62 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...lugins/codemirror/typescript/client/completions.ts 3.12% 62 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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&#39;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.

Copy link
Member

@elsmr elsmr left a 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 🙏

@currents-bot
Copy link

currents-bot bot commented Dec 15, 2025

E2E Tests: n8n tests passed after 5m 7.1s

🟢 68 · 🔴 0 · ⚪️ 1 · 🟣 1

View Run Details

Run Details

  • Project: n8n

  • Groups: 1

  • Framework: Playwright

  • Run Status: Passed

  • Commit: 6b83de7

  • Spec files: 121

  • Overall tests: 553

  • Duration: 5m 7.1s

  • Parallelization: 1


This message was posted automatically by currents.dev | Integration Settings

@blacksmith-sh

This comment has been minimized.

@yehorkardash yehorkardash merged commit 1b256cc into master Dec 15, 2025
68 of 72 checks passed
@yehorkardash yehorkardash deleted the hackmation-js-aliases branch December 15, 2025 14:36
@github-actions github-actions bot mentioned this pull request Dec 15, 2025
@n8n-assistant
Copy link

n8n-assistant bot commented Dec 15, 2025

Got released with n8n@[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants