{"id":22435511,"url":"https://github.com/timeraa/autopm","last_synced_at":"2025-08-01T14:31:50.523Z","repository":{"id":42670620,"uuid":"329132202","full_name":"Timeraa/AutoPM","owner":"Timeraa","description":"Simple module to detect unused dependencies and missing dependencies and functions to automatically install/remove those.","archived":false,"fork":false,"pushed_at":"2022-11-10T14:18:19.000Z","size":195,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-25T14:02:47.965Z","etag":null,"topics":["dependencies","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Timeraa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-12T22:46:55.000Z","updated_at":"2023-03-17T12:33:01.000Z","dependencies_parsed_at":"2023-01-21T11:32:01.388Z","dependency_job_id":null,"html_url":"https://github.com/Timeraa/AutoPM","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/Timeraa%2FAutoPM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timeraa%2FAutoPM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timeraa%2FAutoPM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timeraa%2FAutoPM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Timeraa","download_url":"https://codeload.github.com/Timeraa/AutoPM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228383636,"owners_count":17911331,"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":["dependencies","typescript"],"created_at":"2024-12-05T23:14:09.411Z","updated_at":"2024-12-05T23:14:10.122Z","avatar_url":"https://github.com/Timeraa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auto Package Manager\n\nSimple module to detect unused dependencies and missing dependencies and functions to automatically install/remove those.\n\n## Compatability\n\nUses yarn if you have yarn. (Detected by project's `yarn.lock`)\n\nAutoPM is run by default in [DevScript](https://www.npmjs.com/package/ts-devscript).\n\n## Installation\n\n```bash\n# global\nnpm i -g autopm\n\n# npm\nnpm i autopm\n\n# yarn\nyarn add autopm\n```\n\n## Usage\n\n```TypeScript\nimport AutoPM from \"autopm\";\n\n//* Automatically checks the process.cwd() if not specified\nconst aPM = new AutoPM();\n\n//* Console log all used dependencies.\nconsole.log(aPM.usedModules);\n\n//* Console log all unused dependencies.\n//* (Installed but never imported / required.)\nconsole.log(aPM.unusedModules);\n\n//* Console log all imported dependencies that dont exist at all.\n//* (Imported / required but they don't exist on NPM.)\nconsole.log(aPM.unknownModules);\n\n//* Console log all missing dependencies.\n//* (Imported / required but they aren't installed.)\nconsole.log(aPM.missingModules);\n\n//* Console log all outdated dependencies.\nconsole.log(aPM.outdatedModules);\n\n//* Console log all deprecated dependencies.\nconsole.log(aPM.deprecatedModules);\n\n//* Promise\u003cvoid\u003e Re-check the folder\naPM.recheck();\n\n//* Promise\u003cvoid\u003e Installs missing dependencies.\naPM.installMissing();\n\n//* Promise\u003cvoid\u003e Uninstalls unused dependencies.\naPM.uninstallUnused();\n\n//* Promise\u003cvoid\u003e Upgrades given dependencies to given versions.\n//* (First array is normal dependencies, second array is devDependencies.)\naPM.upgradeModulesToVersions([\n  {\n    module: \"axios\",\n    version: \"0.21.0\"\n  }\n], [\n  {\n    module: \"@types/chrome\",\n    version: \"0.0.100\"\n  }\n]);\n\n//* Promise\u003cvoid\u003e Upgrades all outdated dependencies to the latest version.\naPM.upgradeAllOutdatedToLatest();\n\n//* Promise\u003cvoid\u003e Upgrades all deprecated dependencies to the latest version.\naPM.upgradeAllDeprecatedToLatest();\n\n//* Console logs all changed dependencies between now and the last recheck.\nconsole.log(aPM.changedModules);\n```\n\n## Settings\n\nSimply include the setting while creating the AutoPM instance.\n\n```Typescript\nconst aPM = new AutoPM({ path: \"D:\\Coding\\AutoPM\", exclude: [\"@types/chrome\"] });\n```\n\n| Settings | Type          | Description                            | Default       |\n| -------- | ------------- | -------------------------------------- | ------------- |\n| path     | string        | Path to the directory.                 | process.cwd() |\n| exclude  | Array\u003cstring\u003e | Modules to exlcude from unusedModules. |               |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimeraa%2Fautopm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimeraa%2Fautopm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimeraa%2Fautopm/lists"}