Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FE-6024 shell history #431

Closed
wants to merge 13 commits into from
Closed

FE-6024 shell history #431

wants to merge 13 commits into from

Conversation

ptpaterson
Copy link
Contributor

@ptpaterson ptpaterson commented Nov 22, 2024

Ticket(s): FE-6024

Problem

We use the built-in Node.js REPL for the shell command, but don't leverage the native history feature.

Solution

Setup and register ~/.fauna/history file and tell the REPL to use it for history.

Add a shell .clearhistory shell command to clear the history.

Move file utils to use the containerized fs module.

ignore test/test-homedir

Result

Screen.Recording.2024-11-22.at.4.45.00.PM.mov

Testing

Updated test container to not stub node:fs by default. This required some existing tests to stub it out, but allowed others that need native fs behavior.

Added tests for shell history. Each test specifies a different homedir, so that they tests won't collide with each other.

image

@echo-bravo-yahoo echo-bravo-yahoo changed the base branch from main to v3 November 22, 2024 22:41
@ptpaterson ptpaterson force-pushed the fe-6024-repl-history branch 3 times, most recently from 9b6416a to 26f2328 Compare November 26, 2024 16:02
@ptpaterson ptpaterson marked this pull request as ready for review November 26, 2024 16:02
@ptpaterson ptpaterson requested a review from a team as a code owner November 26, 2024 16:02
@ptpaterson ptpaterson changed the title Fe 6024 repl history FE-6024 shell history Nov 26, 2024
src/lib/file-util.mjs Outdated Show resolved Hide resolved
test/shell.mjs Outdated Show resolved Hide resolved
test/shell.mjs Outdated Show resolved Hide resolved
src/config/setup-test-container.mjs Outdated Show resolved Hide resolved
@ptpaterson ptpaterson requested a review from a team November 26, 2024 19:27
@ptpaterson ptpaterson closed this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants