Commit 815fbec
repl: do not include legacy getter/setter methods in completion
For every object that inherits from `Object.prototype`, the REPL
includes the `Object.prototype` methods in its autocompletion.
This is already a little noisy, but in particular, this also
includes the legacy `__defineGetter__` family of methods;
since those are deprecated and not in practical use anymore,
it helps reduce noise a bit to remove them.
This commit does not remove `__proto__` as it is a little
more popular and, despite its downsides, a slightly more convenient
way to access the prototype of an object in the REPL than
`Object.getPrototypeOf(...)`.
PR-URL: #39576
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent 93bbaa0 commit 815fbecCopy full SHA for 815fbec
2 files changed
+34-2Lines changed: 34 additions & 2 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+22-2Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1188 | 1188 | |
1189 | 1189 | |
1190 | 1190 | |
| 1191 | + |
| 1192 | + |
| 1193 | + |
| 1194 | + |
| 1195 | + |
| 1196 | + |
| 1197 | + |
| 1198 | + |
1191 | 1199 | |
1192 | 1200 | |
| 1201 | + |
| 1202 | + |
| 1203 | + |
| 1204 | + |
| 1205 | + |
| 1206 | + |
| 1207 | + |
| 1208 | + |
| 1209 | + |
| 1210 | + |
| 1211 | + |
1193 | 1212 | |
1194 | | - |
1195 | | - |
| 1213 | + |
| 1214 | + |
| 1215 | + |
1196 | 1216 | |
1197 | 1217 | |
1198 | 1218 | |
|
Collapse file
test/parallel/test-repl-tab-complete.js
Copy file name to clipboardExpand all lines: test/parallel/test-repl-tab-complete.js+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
443 | 443 | |
444 | 444 | |
445 | 445 | |
| 446 | + |
| 447 | + |
| 448 | + |
| 449 | + |
| 450 | + |
| 451 | + |
| 452 | + |
| 453 | + |
| 454 | + |
| 455 | + |
| 456 | + |
| 457 | + |
446 | 458 | |
447 | 459 | |
448 | 460 | |
|
0 commit comments