{"id":15636333,"url":"https://github.com/saibotsivad/mergefs","last_synced_at":"2026-06-18T12:30:56.979Z","repository":{"id":57294826,"uuid":"297538066","full_name":"saibotsivad/mergefs","owner":"saibotsivad","description":"Like 'Object.assign' but recursive and for files.","archived":false,"fork":false,"pushed_at":"2021-12-09T21:52:54.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-18T04:30:22.245Z","etag":null,"topics":["filepath","files","merge","object-assign"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saibotsivad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-22T04:47:32.000Z","updated_at":"2020-10-14T13:26:44.000Z","dependencies_parsed_at":"2022-08-29T08:01:53.176Z","dependency_job_id":null,"html_url":"https://github.com/saibotsivad/mergefs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/saibotsivad/mergefs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmergefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmergefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmergefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmergefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saibotsivad","download_url":"https://codeload.github.com/saibotsivad/mergefs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmergefs/sbom","scorecard":{"id":795442,"data":{"date":"2025-08-11","repo":{"name":"github.com/saibotsivad/mergefs","commit":"13d985b455090994eb1330d8fadae4cc1673ffa0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/11 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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc"],"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-23T08:48:42.274Z","repository_id":57294826,"created_at":"2025-08-23T08:48:42.274Z","updated_at":"2025-08-23T08:48:42.274Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34491225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","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":["filepath","files","merge","object-assign"],"created_at":"2024-10-03T11:02:15.621Z","updated_at":"2026-06-18T12:30:56.963Z","avatar_url":"https://github.com/saibotsivad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mergefs\n\nLike `Object.assign` but recursive and for files.\n\n## The Idea\n\nSpecify an output folder, and any number of input folders. They will\nbe merged in order to the output, overwriting files duplicated by name.\n\nIn addition, you can also list specific filepaths, in which case *only*\nthose files will be merged from the input folders and written to the\noutput folders.\n\n## The Library\n\nYou can import or require or whatnot the usual ways:\n\n```js\nconst mergefs = require('mergefs')\n// or\nimport { mergefs } from 'mergefs'\n```\n\nThen you call that function, specifying a single output path and an\nordered array of input paths, with an optional list of file paths:\n\n```js\nawait mergefs({\n\t// required\n\toutput: './out',\n\t// required\n\tinput: [\n\t\t'./foo',\n\t\t'./bar',\n\t\t'./bizz'\n\t],\n\t// optional\n\tfiles: [\n\t\t'fizz/buzz.txt'\n\t]\n});\n```\n\nThere is no output from calling this function. If there is an error\nit will be thrown.\n\n## The API\n\n#### `output: String` **required**\n\nThe path to the output folder.\n\nIf the folder doesn't exist, it will be made.\n\n#### `input: Array\u003cString\u003e` **required**\n\nAn *ordered* list of paths to input folders.\n\nThe order matters: the last input will override the first, if\nthere are files with the same name.\n\n#### `files: Array\u003cString\u003e`\n\nAn unordered list of specific file paths to merge.\n\n## The Examples\n\nSuppose you have a folder structure like this:\n\n```\ninput\n  |- 001\n  |  |- aaa\n  |  |  \\- file.txt // \"text-1\"\n  |  \\- bbb\n  |  |  \\- file.txt // \"text-2\"\n  |- 002\n  |  |- aaa\n  |  |  \\- file.txt // \"text-3\"\n  |  \\- ccc\n  |     \\- file.txt // \"text-4\"\n  \\- 003\n     |- bbb\n     |  \\- file.txt // \"text-5\"\n     \\- ccc\n        \\- file.txt // \"text-6\"\n```\n\n#### The Example 1: Merge Everything\n\nIf you wanted to merge all input folders, you would do:\n\n```js\nawait mergefs({\n\toutput: '/output',\n\tinput: [\n\t\t'/input/001',\n\t\t'/input/002',\n\t\t'/input/003'\n\t]\n});\n```\n\nThen the structure of the output folder would be:\n\n```\noutput\n  |- aaa\n  |  \\- file.txt // \"text-3\"\n  |- bbb\n  | \\- file.txt // \"text-5\"\n  \\- ccc\n     \\- file.txt // \"text-6\"\n```\n\n#### The Example 2: Change Merge Order\n\nIf we take the same example but change the order of the input folders:\n\n```js\nawait mergefs({\n\toutput: '/output',\n\tinput: [\n\t\t'/input/003',\n\t\t'/input/002',\n\t\t'/input/001'\n\t]\n});\n```\n\nThen the structure of the output folder would be:\n\n```\noutput\n  |- aaa\n  |  \\- file.txt // \"text-1\"\n  |- bbb\n  | \\- file.txt // \"text-2\"\n  \\- ccc\n     \\- file.txt // \"text-4\"\n```\n\n### The Example 3: Merge Specific Files\n\nIf we take the same input folder structure but list specific files:\n\n```js\nawait mergefs({\n\toutput: '/output',\n\tinput: [\n\t\t'/input/001',\n\t\t'/input/002',\n\t\t'/input/003'\n\t],\n\tfiles: [\n\t\t'ccc/file.txt'\n\t]\n});\n```\n\nThen the structure of the output folder would be:\n\n```\noutput\n  \\- ccc\n     \\- file.txt // \"text-6\"\n```\n\n## The Path Details\n\nBoth the input and output paths will be resolved using the builtin NodeJS\n[`path.resolve`](https://nodejs.org/api/path.html#path_path_resolve_paths).\n\nYou can use relative or absolute paths, and they will be interpreted using\nthat module.\n\nThe `files` properties will be resolved with the input paths using\n[`path.join`](https://nodejs.org/api/path.html#path_path_join_paths)\nand then `path.resolve` on the resulting filepath.\n\n## The License\n\nPublished and released under the\n[Very Open License](http://veryopenlicense.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaibotsivad%2Fmergefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaibotsivad%2Fmergefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaibotsivad%2Fmergefs/lists"}