{"id":18657828,"url":"https://github.com/lightsofapollo/dependency_groups","last_synced_at":"2025-04-11T18:31:45.472Z","repository":{"id":13553292,"uuid":"16245376","full_name":"lightsofapollo/dependency_groups","owner":"lightsofapollo","description":"Convert a list of dependencies into groups","archived":false,"fork":false,"pushed_at":"2014-01-27T23:23:45.000Z","size":408,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-04-25T10:01:10.037Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/lightsofapollo.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-01-26T02:58:16.000Z","updated_at":"2021-10-13T12:47:59.000Z","dependencies_parsed_at":"2022-08-30T07:31:50.347Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/dependency_groups","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdependency_groups","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdependency_groups/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdependency_groups/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdependency_groups/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/dependency_groups/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458537,"owners_count":21107099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-07T07:29:58.534Z","updated_at":"2025-04-11T18:31:44.291Z","avatar_url":"https://github.com/lightsofapollo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dependency-groups\n\nDependency groups is useful when you have a list of interrelated items\nthat need to be actioned on in the correct order (package managers are a\ndecent parallel).\n\n## Features\n\n  - cyclic dependencies throw errors\n  - no duplicates in the final group\n  - depth first ordering of services make it easy to action on groups\n\n## Usage\n\n```js\nvar group = require('dependency-groups');\n\n// Imagine you have this list of services. The service can have many\n// different dependencies (and dependencies can have dependencies,\n// etc...) the goal is to launch them in the correct order and in\n// parallel as much as possible.\nvar services = {\n  worker: ['queue'],\n  appworker: ['worker'],\n  app: ['db', 'queue'],\n  db: ['monit', 'xvfb'],\n  queue: ['monit', 'amqp'],\n  monit: [],\n  xvfb: ['monit'],\n  amqp: []\n};\n\n// group them together so you can take some action on each group\nvar launchGroups = group(services);\n\n// the above will give you this list of groups\nlaunchGroups = [\n  ['monit', 'amqp'],\n  ['queue', 'xvfb'],\n  ['worker', 'db'],\n  ['appworker', 'app']\n];\n\n// selectively group only some items\nvar workerGroups = group(services, ['worker']);\nworkerGroups = [\n  ['monit', 'amqp'],\n  ['queue'],\n  ['worker']\n];\n```\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Sahaja James Lal\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fdependency_groups","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Fdependency_groups","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fdependency_groups/lists"}