repl: improve tab completion on computed properties by dario-piotrowicz · Pull Request #58775 · nodejs/node

dario-piotrowicz

@dario-piotrowicz

improve the tab completion capabilities around computed properties
by replacing the use of brittle and error prone Regex checks with
more robust AST based analysis

targos pushed a commit that referenced this pull request

Jul 3, 2025
improve the tab completion capabilities around computed properties
by replacing the use of brittle and error prone Regex checks with
more robust AST based analysis

PR-URL: #58775
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

addaleax added a commit to addaleax/node that referenced this pull request

Sep 5, 2025
A number of recent changes to the REPL tab completion logic have introduced
the ability for completion to cause side effects, specifically, calling
arbitrary functions or variable assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing when
attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have messages
or PR descriptions that imply the intention to avoid side effects,
which I can can generally be agreed upon is in line with the expectations
that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically verify
that side effects *can* happen under specific circunmstances. I am assuming
here that this is unintentional, and the corresponding tests have been
removed/replaced in this commit.

Refs: nodejs#58709
Refs: nodejs#58775
Refs: nodejs#57909
Refs: nodejs#58891

addaleax added a commit to addaleax/node that referenced this pull request

Sep 5, 2025
A number of recent changes to the REPL tab completion logic have introduced
the ability for completion to cause side effects, specifically, calling
arbitrary functions or variable assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing when
attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have messages
or PR descriptions that imply the intention to avoid side effects,
which I can can generally be agreed upon is in line with the expectations
that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically verify
that side effects *can* happen under specific circunmstances. I am assuming
here that this is unintentional, and the corresponding tests have been
removed/replaced in this commit.

Refs: nodejs#58709
Refs: nodejs#58775
Refs: nodejs#57909
Refs: nodejs#58891

addaleax added a commit to addaleax/node that referenced this pull request

Sep 5, 2025
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Refs: nodejs#58709
Refs: nodejs#58775
Refs: nodejs#57909
Refs: nodejs#58891

addaleax added a commit to addaleax/node that referenced this pull request

Sep 5, 2025
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Fixes: nodejs#58903
Refs: nodejs#58709
Refs: nodejs#58775
Refs: nodejs#57909
Refs: nodejs#58891

addaleax added a commit to addaleax/node that referenced this pull request

Sep 7, 2025
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Fixes: nodejs#59731
Fixes: nodejs#58903
Refs: nodejs#58709
Refs: nodejs#58775
Refs: nodejs#57909
Refs: nodejs#58891

nodejs-github-bot pushed a commit that referenced this pull request

Sep 8, 2025
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Fixes: #59731
Fixes: #58903
Refs: #58709
Refs: #58775
Refs: #57909
Refs: #58891
PR-URL: #59774
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>

targos pushed a commit that referenced this pull request

Sep 9, 2025
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Fixes: #59731
Fixes: #58903
Refs: #58709
Refs: #58775
Refs: #57909
Refs: #58891
PR-URL: #59774
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>

nodejs-github-bot pushed a commit that referenced this pull request

Sep 8, 2025
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Fixes: #59731
Fixes: #58903
Refs: #58709
Refs: #58775
Refs: #57909
Refs: #58891
PR-URL: #59774
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>

targos pushed a commit that referenced this pull request

Sep 9, 2025
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 0722023 and the problem exacerbated in
8ba66c5. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38 or 6945337, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Fixes: #59731
Fixes: #58903
Refs: #58709
Refs: #58775
Refs: #57909
Refs: #58891
PR-URL: #59774
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>