Commit a280bf6
authored
chore(cli-repl): clean up autocomplete implementation and fix flaky test MONGOSH-1908 MONGOSH-1960 (#2317)
* chore(cli-repl): clean autocomplete implementation up a bit
Best viewed as a whitespace-diff-disabled change, doesn't include
any functional work.
* chore(cli-repl): fix flaky autocompletion test MONGOSH-1960
Our current autocomplete logic does not always wait for the collection
or database name caches to be filled, in case it takes longer than 200ms
to do so. By ensuring that the caches are filled before we run the test,
we get consistent results.
* chore(cli-repl,shell-api): filter autocompletions for CCs MONGOSH-1908
Collection and database names, as well as other completion items, can
mostly contain arbitrary characters with only a few exceptions.
Since some characters may mess with our REPL input, we should filter
those autocompletions out.1 parent abe83bb commit a280bf6
File tree
3 files changed
+89
-45
lines changed- packages
- cli-repl/src
- shell-api/src
3 files changed
+89
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2365 | 2365 | | |
2366 | 2366 | | |
2367 | 2367 | | |
2368 | | - | |
| 2368 | + | |
2369 | 2369 | | |
2370 | 2370 | | |
2371 | 2371 | | |
| |||
2413 | 2413 | | |
2414 | 2414 | | |
2415 | 2415 | | |
2416 | | - | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
2417 | 2420 | | |
2418 | 2421 | | |
2419 | 2422 | | |
| |||
2428 | 2431 | | |
2429 | 2432 | | |
2430 | 2433 | | |
2431 | | - | |
| 2434 | + | |
| 2435 | + | |
2432 | 2436 | | |
2433 | 2437 | | |
2434 | 2438 | | |
2435 | 2439 | | |
2436 | 2440 | | |
2437 | | - | |
| 2441 | + | |
2438 | 2442 | | |
2439 | 2443 | | |
2440 | 2444 | | |
| |||
2445 | 2449 | | |
2446 | 2450 | | |
2447 | 2451 | | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
2448 | 2470 | | |
2449 | 2471 | | |
2450 | 2472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
388 | 391 | | |
389 | 392 | | |
390 | 393 | | |
391 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
392 | 437 | | |
393 | 438 | | |
394 | 439 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
425 | 444 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
| 445 | + | |
432 | 446 | | |
433 | 447 | | |
434 | 448 | | |
435 | 449 | | |
436 | 450 | | |
| 451 | + | |
437 | 452 | | |
438 | 453 | | |
439 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
452 | 455 | | |
453 | 456 | | |
454 | 457 | | |
455 | | - | |
456 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
457 | 462 | | |
458 | 463 | | |
459 | 464 | | |
| |||
469 | 474 | | |
470 | 475 | | |
471 | 476 | | |
472 | | - | |
473 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
474 | 481 | | |
475 | 482 | | |
476 | 483 | | |
| |||
0 commit comments