{"id":20931507,"url":"https://github.com/sumanjs/suman-watch","last_synced_at":"2026-04-27T14:05:30.992Z","repository":{"id":57374333,"uuid":"83401347","full_name":"sumanjs/suman-watch","owner":"sumanjs","description":"Watch for file changes in a project and transpile/run tests upon changes. :eyes: ","archived":false,"fork":false,"pushed_at":"2018-09-30T02:20:16.000Z","size":214,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-29T14:15:03.521Z","etag":null,"topics":["chokidar","developer-experience","developer-tools","dx","file-watchers","nodejs","nodejs-testing","suman","suman-watch","sumanjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sumanjs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-28T07:10:10.000Z","updated_at":"2023-09-08T17:21:35.000Z","dependencies_parsed_at":"2022-09-05T15:00:33.154Z","dependency_job_id":null,"html_url":"https://github.com/sumanjs/suman-watch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sumanjs/suman-watch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumanjs%2Fsuman-watch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumanjs%2Fsuman-watch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumanjs%2Fsuman-watch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumanjs%2Fsuman-watch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumanjs","download_url":"https://codeload.github.com/sumanjs/suman-watch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumanjs%2Fsuman-watch/sbom","scorecard":{"id":858142,"data":{"date":"2025-08-11","repo":{"name":"github.com/sumanjs/suman-watch","commit":"53a1a296f69f7594a781cc90f65fde84fef11f06"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license.md:0","Info: FSF or OSI recognized license: MIT License: license.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: test/_suman/Dockerfile:2: pin your Docker image by updating node:7 to node:7@sha256:af5c2c6ac8bc3fa372ac031ef60c45a285eeba7bce9ee9ed66dad3a01e29ab8d","Warn: npmCommand not pinned by hash: test/_suman/Dockerfile:19","Warn: npmCommand not pinned by hash: test/_suman/Dockerfile:20","Warn: npmCommand not pinned by hash: scripts/test.sh:6","Warn: npmCommand not pinned by hash: test/typescript/@transform-X.sh:10","Info:   0 out of   4 npmCommand dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"28 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T00:28:22.423Z","repository_id":57374333,"created_at":"2025-08-24T00:28:22.424Z","updated_at":"2025-08-24T00:28:22.424Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32339343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chokidar","developer-experience","developer-tools","dx","file-watchers","nodejs","nodejs-testing","suman","suman-watch","sumanjs"],"created_at":"2024-11-18T21:43:33.638Z","updated_at":"2026-04-27T14:05:30.953Z","avatar_url":"https://github.com/sumanjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n###  Suman-Watch\n\n# Purpose\nThe biggest advantage of using suman-watch is when you need to transpile/compile tests. Building and then running tests\nin an ongoing manner can be very useful for longer build steps. \u003cp\u003e\nIf no transpile/compile \"transform\" step is needed, then watching won't be particularly useful. \u003cp\u003e\nHowever, you can still use suman-watch to run tests\nas the test source files change, or to run unit tests as the project source changes.\n\n\n# In more detail\nSuman watch can run test files on changes, transpile/compile code on changes, or both. By default, suman-watch\nwill both transpile and run files. To prevent transpilation, use the `--nt` flag (no-transpile). To prevent running files, \nuse the `--nr` (no-run) flag. If you use both the `--nr` and `--nt` flags, suman-watch does not have much to do :)\n\nSuman watch can be told to use a plugin, which are loaded via the `suman-watch-plugins` project. \u003cbr\u003e \nThese plugins allow suman-watch to incorporate other watch processes, such as `tsc --watch` and `webpack --watch`. \u003cbr\u003e\nSuman is able to incorporate other watchers, by hooking into the stdout outputted by those other watch utilities.\nWe encourage people to write a plugin by submitting a PR [here.](https://github.com/sumanjs/suman-watch-plugins)\n\nJust like with running suman at the command line, suman-watch uses the @transform.sh and @run.sh files,\nwhere they exist. Transpilation will happen by default, if a @transform.sh file exists for that file, \nand the file is in a @src directory, otherwise no transpilation step will occur and the test will only be run.\nIn order to transpile/compile, a @transform.sh file must exist. And if a @transform.sh file exists, a\n@run.sh file must also exist, otherwise suman will have no idea how to execute your transpiled tests. \nHowever, a @run.sh file can exist without a @transform.sh file. \nThe @run.sh and @transform.sh files will be applied to any sibling or child file in the filesystem tree.\n\n\n# Common Usage \nSuman provides some sensible defaults for the two most common patterns when using watch features for testing -\n\n1. When test files change, we run the changed file. This can speed up test development, so you don't have to switch between\neditor and command line. This is especially useful when tests require a build step, because using a watcher process can\nallow developers to do incremental builds, thus saving a lot of time.\n\n2. Running a set of tests when \u003ci\u003eproject files\u003c/i\u003e (as opposed to test files) change. \u003cp\u003e\nThis will watch for files outside of your test directory,\nessentially the inverse of the above. This means you get can get quick feedback when developing new features\non common code paths.\n\nSuman allows you to define your own scripts to use when files change, using watch scripts defined in\nyour suman.conf.js file. In order to accomplish #2 above, you should use a watch script.\n\n# Examples\n\nHere are some example commands, with a description of what each command does.\n\n## Command:\n```bash\nsuman --watch  # `suman -w` for short \n```\n### Explanation:\nThis will watch your testSrcDir (defined in your suman.conf.js file) for changes to any file in that directory\nthat matches a runnable test, and transform and run it when it changes. The source file will only be transformed\nif there is relevant @transform.sh file.\n\n## Command:\n```bash\nsuman -w --per=\"browser-tests\"\n```\n### Explanation:\nUsing \"--per\" is possibly the most useful way to use `suman-watch`.\nUsing `--per=\"browser-tests\"` tells suman to look at the `suman.conf.js` file, for this property `watch.per['browser-tests']`.\nThe --per option should allow you to configure a few sane defaults for yourself.\u003cp\u003e\nThe options for `-w --per` are shown below.\n\n## Command:\n```bash\nsuman --watch --nt\n```\n### Explanation:\nThis is probably not a common choice, but is supported. This will watch your `testSrcDir` \n(defined in your `suman.conf.js` file), but will only watch files for changes for which there is no relevant\n@tranform.sh file. So what will happen is files may change, and they will be executed directly. This will\nallow you to rapidly develop tests which do not require compilation/transpilation. Note using the `--nt` option\nis exactly the same as omitting the option, if there are no @transform.sh files in your test directory.\n\n## Command:\n```bash\nsuman --watch --nr\n```\n### Explanation:\nThis will watch your `testSrcDir` (defined in your `suman.conf.js` file) for changes to any file in any `@src` directory,\nand run the nearest `@transform.sh` for that file, with the path of the changed file represented by the `${SUMAN_TEST_FILE_PATH}`\nenv variable. The --nr flag means the tests won't be run, just transpiled/compiled.\n\n\n# Suman watch scripts\n\nYou can define watch scripts in your `suman.conf.js` file, like so:\n\n\u003cbr\u003e\n\nA complete list of options is here:\n```javascript\n{\n  watch: {\n  \n  \n      per: {\n  \n        foo: {\n          exec: 'suman test/*.js',\n          include: [],\n          exclude: [],\n          confOverride: {},\n          env: {}\n        },\n  \n        bar: {\n          exec: 'suman --browser test/front-end/*.js',\n          include: [],\n          exclude: [],\n          confOverride: {}\n        },\n  \n        baz: {\n          exec: 'exec \"${SUMAN_CHANGED_TEST_FILE}\"',\n          include: [],\n          exclude: [],\n          confOverride: {\n  \n          }\n        }\n  \n      }\n  \n    }\n}\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumanjs%2Fsuman-watch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumanjs%2Fsuman-watch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumanjs%2Fsuman-watch/lists"}