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

Michael/plugins #108

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Michael/plugins #108

wants to merge 5 commits into from

Conversation

mikicho
Copy link
Collaborator

@mikicho mikicho commented Jan 27, 2024

Inspired by Jest watch plugins API: https://jestjs.io/docs/watch-plugins

@MoLow please let me know what you think
Also, should we be compatible (as much as possible) to Jest API for easy migration?

@MoLow
Copy link
Owner

MoLow commented Jan 27, 2024

the idea looks good to me. what are some usecases for this?

@mikicho
Copy link
Collaborator Author

mikicho commented Jan 27, 2024

If you remember, we talked about this a few months ago. It's to enable the extension of the REPL functionality with 3rd third-party plugin. For example, a fuzzy search for files and tests, suspend mode, etc..

@mikicho
Copy link
Collaborator Author

mikicho commented Mar 14, 2024

@MoLow wdyt?

@MoLow
Copy link
Owner

MoLow commented Mar 14, 2024

@mikicho lets add it!
can you fix lint errors and add documentation?

@mikicho
Copy link
Collaborator Author

mikicho commented Mar 16, 2024

@MoLow how to we want to declare on the plugins? like jest with a config file?

{
  "watchPlugins": [
    // default
    "jest-watch-suspend",
    // configure
    [
      "jest-watch-suspend", {
        // override key press
        "key": "s",
        // override prompt
        "prompt": "suspend watch mode",
        // starts in suspend mode
        "suspend-on-start": true
      }
    ]
  ]
}

@MoLow
Copy link
Owner

MoLow commented Mar 17, 2024

@MoLow how to we want to declare on the plugins? like jest with a config file?

maybe we can simplify it to just be a map of { [key: path to plugin]: config object}?

@mikicho
Copy link
Collaborator Author

mikicho commented Mar 18, 2024

@MoLow, I'm OK with whatever you prefer, but I think we might want to add more configurations in the future and it will be a breaking change.

@MoLow
Copy link
Owner

MoLow commented Mar 19, 2024

I think we might want to add more configurations in the future and it will be a breaking change.

My suggestion was that each plugin can define its own schema for configuration. why would it be a breaking change?

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