{"id":14155667,"url":"https://github.com/g-plane/tiny-package-manager","last_synced_at":"2025-05-16T07:03:56.200Z","repository":{"id":46021218,"uuid":"146164792","full_name":"g-plane/tiny-package-manager","owner":"g-plane","description":"Learn how npm or Yarn v1 works.","archived":false,"fork":false,"pushed_at":"2024-11-29T03:02:11.000Z","size":143,"stargazers_count":398,"open_issues_count":0,"forks_count":30,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-12T05:09:01.345Z","etag":null,"topics":["npm","package-manager","yarn"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/g-plane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"g-plane"}},"created_at":"2018-08-26T08:40:11.000Z","updated_at":"2025-05-11T19:52:34.000Z","dependencies_parsed_at":"2023-02-15T21:31:23.518Z","dependency_job_id":"e59f402d-b4d8-4b71-b224-9a244fabc8e3","html_url":"https://github.com/g-plane/tiny-package-manager","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":"0.021276595744680882","last_synced_commit":"747c147dab5510960e41001d97840014bd7f8aad"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Ftiny-package-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Ftiny-package-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Ftiny-package-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Ftiny-package-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g-plane","download_url":"https://codeload.github.com/g-plane/tiny-package-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485053,"owners_count":22078767,"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":["npm","package-manager","yarn"],"created_at":"2024-08-17T08:04:50.736Z","updated_at":"2025-05-16T07:03:56.169Z","avatar_url":"https://github.com/g-plane.png","language":"TypeScript","funding_links":["https://github.com/sponsors/g-plane"],"categories":["Tutorials","package-manager"],"sub_categories":[],"readme":"# Tiny Package Manager\n\n\u003e A very very simple demo and guide for explaining package manager.\n\n## Introduction\n\nAs a JavaScript developer, you may use package manager like [npm](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/)\nfrequently.\n\nHowever, do you know how a package manager works? Or, you may be curious about how to build a package manager.\n\nWell, the purpose of this guide is not to let you re-invent a new wheel.\nThere is no need to do that because both npm and Yarn are mature and stable enough.\nThe purpose is just to explain how a package manager works under the hood.\nYou can read the code, and the comments will explain how it works.\n\nNote: To simplify the guide and make it as simple as possible,\nthis demo doesn't handle some edge cases and catch errors and exceptions.\nIf you are really curious about that,\nit's recommended to read the source code of [npm](https://github.com/npm/npm) or [Yarn](https://github.com/yarnpkg/yarn).\n\n## Features\n\n- [x] Download packages to `node_modules` directory.\n- [x] Simple CLI.\n- [x] Simply resolve dependency conflicts.\n- [x] Flatten dependencies tree.\n- [x] Support lock file. (Like `yarn.lock` or `package-lock.json`)\n- [x] Add a new package through CLI. (Like `yarn add` or `npm i \u003cpackage\u003e` command)\n- [ ] Run lifecycle scripts. (`preinstall` and `postinstall`)\n- [ ] Symlink the `bin` files.\n\n## How to start?\n\nRead the source code in the `src` directory.\nYou can read the `src/index.ts` file in the beginning.\n\nIf you would like to try this simple package manager,\njust install it globally:\n\nVia Yarn:\n\n```\n$ yarn global add tiny-package-manager\n```\n\nVia npm:\n\n```\n$ npm i -g tiny-package-manager\n```\n\nThen just go to a directory which contains valid `package.json` and run:\n\n```\n$ tiny-pm\n```\n\n## License\n\nMIT License (c) 2018-present [Pig Fang](https://gplane.win/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-plane%2Ftiny-package-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg-plane%2Ftiny-package-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-plane%2Ftiny-package-manager/lists"}