{"id":43183008,"url":"https://github.com/coder-spirit/lock-distill","last_synced_at":"2026-02-01T04:03:14.857Z","repository":{"id":37253721,"uuid":"482476499","full_name":"Coder-Spirit/lock-distill","owner":"Coder-Spirit","description":"Lock-Distill is a tool designed to create \"minimal\" lockfiles to be used when building OCI/Docker images, in the context of monorepos.","archived":false,"fork":false,"pushed_at":"2023-03-06T23:03:46.000Z","size":140,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-24T03:03:12.543Z","etag":null,"topics":["docker","lockfile","monorepo","yarn","yarn-workspaces"],"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/Coder-Spirit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-17T09:10:02.000Z","updated_at":"2023-07-10T09:57:19.000Z","dependencies_parsed_at":"2023-02-16T12:15:31.902Z","dependency_job_id":null,"html_url":"https://github.com/Coder-Spirit/lock-distill","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/Coder-Spirit/lock-distill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coder-Spirit%2Flock-distill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coder-Spirit%2Flock-distill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coder-Spirit%2Flock-distill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coder-Spirit%2Flock-distill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Coder-Spirit","download_url":"https://codeload.github.com/Coder-Spirit/lock-distill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coder-Spirit%2Flock-distill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28967109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T03:46:10.227Z","status":"ssl_error","status_checked_at":"2026-02-01T03:46:01.693Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker","lockfile","monorepo","yarn","yarn-workspaces"],"created_at":"2026-02-01T04:03:08.843Z","updated_at":"2026-02-01T04:03:14.853Z","avatar_url":"https://github.com/Coder-Spirit.png","language":"JavaScript","readme":"# Lock-Distill\n\n[![NPM version](https://img.shields.io/npm/v/@coderspirit/lock-distill.svg?style=flat)](https://www.npmjs.com/package/@coderspirit/lock-distill)\n[![License](https://badgen.net/npm/license/@coderspirit/lock-distill)](https://opensource.org/licenses/MIT)\n[![npm downloads](https://img.shields.io/npm/dm/@coderspirit/lock-distill.svg?style=flat)](https://www.npmjs.com/package/@coderspirit/lock-distill)\n[![Known Vulnerabilities](https://snyk.io//test/github/Coder-Spirit/lock-distill/badge.svg?targetFile=package.json)](https://snyk.io//test/github/Coder-Spirit/lock-distill?targetFile=package.json)\n[![Security Score](https://snyk-widget.herokuapp.com/badge/npm/@coderspirit%2Flock-distill/badge.svg)](https://snyk.io/advisor/npm-package/@coderspirit/lock-distill)\n\n## Introduction\n\nLock-Distill is a tool designed to create \"minimal\" lockfiles to be used when\nbuilding OCI/Docker images, in the context of monorepos.\n\nWhen working on monorepo environments, it is typical to rely on tools such as\n\"yarn workspaces\". This has some advantages, but it also presents some problems.\n\nA very insidious problem is that a unique and global lockfile is shared between\nall the workspaces inside the monorepo. This has the unfortunate consequence\nthat this lockfile will change with much higher frequency than if we had one\nrepository per workspace.\n\nThe higher changes frequency implies that Docker Builder (or any other OCI image\nbuilders) will have to discard the cached layers based on that file more often,\ntherefore having to spend more time and energy recomputing previously done work.\n\n## Install instructions\n\n```\n# With NPM\nnpm install @coderspirit/lock-distill\n\n# Or with Yarn:\nyarn add @coderspirit/lock-distill\n```\n\n## Usage\n\nWe have to pass at least two options:\n- The application `package.json` file path\n- The file path for the global lockfile\n\n```bash\nlock-distill -p ./apps/svc1/package.json -l ./yarn.lock -o ./apps/svc1/distilled.yarn.lock\n```\n\nOnce you have a \"distilled\" lockfile, you can COPY or mount it while building\nthe Docker/OCI image.\n\n### Options\n\n- `-p, --package \u003cpath\u003e`: The application's `package.json` file path.\n  **Required**.\n- `-l, --lockfile \u003cpath\u003e`: The monorepo's global lockfile path. **Required**.\n- `-o, --output \u003cpath\u003e`: The path where to write the distillation output. If not\n  passed, then the result can be directly read from stdout.\n- `-m, --mode \u003cfull|workspace\u003e`: It specifies how aggressive will be the\n  distillation process.\n  - If set to `workspace`, then it will generate a new lockfile containing\n    references to the workspace's prod \u0026 dev dependencies.\n  - If set to `full`, then it will generate a new lockfile only containing\n    references to the workspace's prod dependencies. This is the default option.\n- `-t, --type`: This option is not useful yet, as only Yarn v1.x is supported\n  for now, but hopefully we'll introduce support for Yarn \u003e=2, PNPM and others.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder-spirit%2Flock-distill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder-spirit%2Flock-distill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder-spirit%2Flock-distill/lists"}