Commit 6257cf2
repl: improve repl autocompletion for require calls
This improves the autocompletion for require calls. It had multiple
small issues so far. Most important: it won't suggest completions for
require statements that are fully written out. Second, it'll detect
require calls that have whitespace behind the opening bracket. Third,
it makes sure node modules are detected as such instead of only
suggesting them as folders. Last, it adds suggestions for input that
starts with backticks.
Signed-off-by: Ruben Bridgewater <[email protected]>
PR-URL: #33282
Fixes: #33238
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>1 parent 95842db commit 6257cf2
File tree
4 files changed
+77
-59
lines changed- lib
- test
- fixtures/node_modules/no_index
- lib
- parallel
4 files changed
+77
-59
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | | - | |
| 1049 | + | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
1097 | | - | |
1098 | | - | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
1099 | 1104 | | |
1100 | 1105 | | |
1101 | 1106 | | |
| |||
1117 | 1122 | | |
1118 | 1123 | | |
1119 | 1124 | | |
1120 | | - | |
1121 | | - | |
| 1125 | + | |
1122 | 1126 | | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1126 | 1130 | | |
1127 | 1131 | | |
1128 | 1132 | | |
1129 | | - | |
| 1133 | + | |
1130 | 1134 | | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1134 | 1138 | | |
1135 | 1139 | | |
| 1140 | + | |
1136 | 1141 | | |
1137 | 1142 | | |
1138 | | - | |
1139 | | - | |
| 1143 | + | |
1140 | 1144 | | |
1141 | 1145 | | |
1142 | 1146 | | |
| |||
1150 | 1154 | | |
1151 | 1155 | | |
1152 | 1156 | | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1165 | 1166 | | |
1166 | 1167 | | |
1167 | 1168 | | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1172 | 1175 | | |
1173 | 1176 | | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
1180 | 1184 | | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | 1185 | | |
1189 | 1186 | | |
1190 | 1187 | | |
| |||
1197 | 1194 | | |
1198 | 1195 | | |
1199 | 1196 | | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
| 1197 | + | |
1204 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
1205 | 1201 | | |
1206 | 1202 | | |
1207 | 1203 | | |
| |||
1232 | 1228 | | |
1233 | 1229 | | |
1234 | 1230 | | |
1235 | | - | |
| 1231 | + | |
1236 | 1232 | | |
1237 | 1233 | | |
1238 | 1234 | | |
| |||
1582 | 1578 | | |
1583 | 1579 | | |
1584 | 1580 | | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | 1581 | | |
1590 | 1582 | | |
1591 | 1583 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
237 | 239 | | |
238 | | - | |
239 | | - | |
240 | | - | |
| 240 | + | |
| 241 | + | |
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
246 | 266 | | |
247 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
248 | 270 | | |
249 | | - | |
| 271 | + | |
250 | 272 | | |
251 | 273 | | |
252 | 274 | | |
| |||
0 commit comments