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

update(history): update history file format to handler multiple task runner like pnpm, yarn, e.t.c. #315 #324

Merged
merged 36 commits into from
Nov 24, 2024

Conversation

kyu08
Copy link
Owner

@kyu08 kyu08 commented Nov 11, 2024

Refactor for #315.
Resolves #323.

TODO(specification)

  • New history file format
  • How to implement --repeat
    // TODO(#321): Decide the specification of this.

    Just run latest command. New history file format enables it.

TODO(implementation)

New history file format

[[histories]]
path = "path/to/hoge"

[[histories.commands]]
runner = "make"
command = "run"

[[histories.commands]]
runner = "make"
command = "test"

[[histories.commands]]
runner = "pnpm"
command = "install"

[[histories]]
path = "path/to/fuga"

[[histories.commands]]
runner = "yarn"
command = "run"

[[histories.commands]]
runner = "make"
command = "test"

[[histories.commands]]
runner = "bun"
command = "test"
A format not adopted

[[histories]]
path = "path/to/hoge"

[[histories.runners]]
name = "make"
commands = ["run", "test"]

[[histories.runners]]
name = "pnpm"
commands = ["install", "test"]

[[histories]]
path = "path/to/fuga"

[[histories.runners]]
name = "make"
commands = ["run", "test"]

[[histories.runners]]
name = "pnpm"
commands = ["install", "test"]

Old format

[[history]]
path = "Users/john/projects/projectA/Makefile"
executed-targets = ["test", "lint"]

[[history]]
path = "Users/john/projects/projectB/makefile"
executed-targets = ["test", "lint"]

[[history]]
path = "Users/john/projects/projectC/Makefile"
executed-targets = ["test", "lint"]

TODO(review)

  • Check if each responsibility is appropriate.
    • model/
    • tui/
  • Check if test cases is enough.
    • model/
    • tui/
  • Check if naming is appropriate.
    • model/
    • tui/

@kyu08 kyu08 changed the title refactor(history): #315 update(history): update history file format to handler multiple task runner like pnpm, yarn, e.t.c. #315 Nov 17, 2024
}
}

// TODO: should return Result not Option(returns when it fails to get the home dir)
Copy link
Owner Author

@kyu08 kyu08 Nov 24, 2024

Choose a reason for hiding this comment

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

wont fix in this PR

@kyu08 kyu08 marked this pull request as ready for review November 24, 2024 04:22
@kyu08 kyu08 merged commit a357a36 into main Nov 24, 2024
4 checks passed
@kyu08 kyu08 deleted the refactor-history-for-315 branch November 24, 2024 07:00
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.

Use rust-pretty-assertions/rust-pretty-assertions for unit tests
1 participant