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 Implement shell history #453

Merged
merged 6 commits into from
Dec 4, 2024
Merged

FE-6024 Implement shell history #453

merged 6 commits into from
Dec 4, 2024

Conversation

ptpaterson
Copy link
Contributor

@ptpaterson ptpaterson commented Dec 3, 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

@ptpaterson ptpaterson changed the base branch from main to v3 December 3, 2024 20:26
@ptpaterson ptpaterson requested a review from a team as a code owner December 3, 2024 20:26
@ptpaterson ptpaterson force-pushed the fe-6024-repl-history-2 branch from a5d6277 to 3f12c25 Compare December 3, 2024 20:35
@ptpaterson ptpaterson requested a review from wildemat December 3, 2024 20:49
@ptpaterson ptpaterson changed the title Fe 6024 repl history 2 FE-6024 Implement shell history Dec 3, 2024
@ptpaterson ptpaterson force-pushed the fe-6024-repl-history-2 branch from 711882f to 94863ae Compare December 3, 2024 21:50
@ptpaterson ptpaterson requested a review from a team December 3, 2024 22:23
Copy link
Contributor

@cleve-fauna cleve-fauna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reorganize the code a bit and take a look at the question.

@ptpaterson ptpaterson force-pushed the fe-6024-repl-history-2 branch from 002a0d5 to 8dec6c9 Compare December 4, 2024 17:25
@ptpaterson ptpaterson merged commit 6c7acb6 into v3 Dec 4, 2024
4 checks passed
@ptpaterson ptpaterson deleted the fe-6024-repl-history-2 branch December 4, 2024 18:20
@cleve-fauna cleve-fauna mentioned this pull request Dec 5, 2024
This was referenced Dec 6, 2024
@cleve-fauna cleve-fauna mentioned this pull request Dec 13, 2024
@wildemat wildemat mentioned this pull request Dec 18, 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.

4 participants