{"id":20155,"library":"jest-watch-select-projects","title":"jest-watch-select-projects","description":"Jest watch plugin (v2.0.0) that allows selecting which Jest projects to run when using Jest's --watch mode with multiple projects. Part of the jest-community ecosystem. Requires Jest 23+ and Node >=8. Key differentiator: interactive project selection in watch mode with keyboard navigation (space to toggle, enter to confirm), using displayName or basename. Minimal API surface but critical for monorepo workflows.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/rogeliog/jest-watch-select-projects","tags":["javascript"],"install":[{"cmd":"npm install jest-watch-select-projects","lang":"bash","label":"npm"},{"cmd":"yarn add jest-watch-select-projects","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-watch-select-projects","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; required version >=23","package":"jest","optional":false}],"imports":[{"note":"No default export; configured as a plugin name string in Jest config","wrong":"import jestWatchSelectProjects from 'jest-watch-select-projects'","symbol":"default","correct":"module.exports = { watchPlugins: ['jest-watch-select-projects'] }"},{"note":"Do not require the module; use string name. Jest resolves it internally.","wrong":"module.exports = { watchPlugins: [require('jest-watch-select-projects')] }","symbol":"module.exports (config)","correct":"module.exports = { watchPlugins: ['jest-watch-select-projects'] }"},{"note":"Options must be in a sub-array with the plugin name","wrong":"watchPlugins: [ 'jest-watch-select-projects', { key: 'X' } ]","symbol":"with options","correct":"watchPlugins: [ ['jest-watch-select-projects', { key: 'X', prompt() { ... } } ] ]"}],"quickstart":{"code":"// jest.config.js\nmodule.exports = {\n  projects: ['<rootDir>/packages/*'],\n  watchPlugins: ['jest-watch-select-projects'],\n};\n// package.json scripts\n// \"test:watch\": \"jest --watch\"\n// Run: npm run test:watch\n// Press SPACE to toggle project selection, ENTER to confirm.","lang":"javascript","description":"Sets up jest-watch-select-projects in Jest config and runs watch mode with project selection."},"warnings":[{"fix":"Ensure you run 'jest --watch' or 'jest --watchAll'.","message":"Plugin does not work without Jest's --watch flag. Running jest without --watch will ignore the plugin.","severity":"gotcha","affected_versions":"all"},{"fix":"Set unique displayName in each project's Jest config.","message":"If projects do not have displayName in their Jest config, the plugin uses the basename of the project path. If multiple projects have the same basename (e.g., two folders named 'utils'), selection can be confusing.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Node to >=8.","message":"v2.0.0 dropped support for Node versions below 8, which may break CI pipelines using older Node.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade Jest to >=23.","message":"Plugin requires Jest 23 or newer. Older Jest versions do not support watchPlugins.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add 'projects: [\"<rootDir>/packages/*\"]' or similar to your Jest config.","cause":"Jest config does not have a 'projects' array, so the plugin cannot list projects.","error":"No projects found"},{"fix":"Run 'npm install --save-dev jest-watch-select-projects' or 'yarn add --dev jest-watch-select-projects'.","cause":"Plugin not installed or not in node_modules.","error":"Cannot find module 'jest-watch-select-projects'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}