{"id":25146573,"url":"https://github.com/wulfmann/pin-latest","last_synced_at":"2026-03-11T08:34:44.555Z","repository":{"id":42759908,"uuid":"278228605","full_name":"wulfmann/pin-latest","owner":"wulfmann","description":"Small utility for converting `package.json` versions from `latest` to the actual latest version.","archived":false,"fork":false,"pushed_at":"2023-02-03T10:24:44.000Z","size":184,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T23:41:33.139Z","etag":null,"topics":["cli","npm","pin","pin-latest","tool","version","version-manager"],"latest_commit_sha":null,"homepage":"https://github.com/wulfmann/pin-latest","language":"TypeScript","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/wulfmann.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":"2020-07-09T01:06:40.000Z","updated_at":"2020-11-27T10:00:57.000Z","dependencies_parsed_at":"2023-02-18T05:45:18.421Z","dependency_job_id":null,"html_url":"https://github.com/wulfmann/pin-latest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wulfmann/pin-latest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fpin-latest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fpin-latest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fpin-latest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fpin-latest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wulfmann","download_url":"https://codeload.github.com/wulfmann/pin-latest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulfmann%2Fpin-latest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30376309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: 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":["cli","npm","pin","pin-latest","tool","version","version-manager"],"created_at":"2025-02-08T20:19:34.569Z","updated_at":"2026-03-11T08:34:44.533Z","avatar_url":"https://github.com/wulfmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pin-latest\n\nSmall utility for converting `package.json` versions from `latest` to the actual latest version.\n\n## Quickstart\n\nInstall\n\n```bash\nnpm i -g pin-latest\n# or\nyarn global add pin-latest\n# or\nnpx pin-latest\n```\n\nGiven the following `package.json`:\n\n```json\n{\n    \"name\": \"example-project\",\n    \"dependencies\": {\n        \"react\": \"latest\"\n    }\n}\n```\n\nRunning `pin-latest` will result in the following output:\n\n```bash\n$ pin-latest .\n\n{\n    \"name\": \"example-project\",\n    \"dependencies\": {\n        \"react\": \"^16.13.1\"\n    }\n}\n```\n\nTo save changes pass the `--write` flag:\n\n```bash\n$ pin-latest .\npackage.json updated.\n\n$ cat package.json\n{\n    \"name\": \"example-project\",\n    \"dependencies\": {\n        \"react\": \"^16.13.1\"\n    }\n}\n```\n\n## Usage\n\n```text\n$ pin-latest --help\n\nUsage\n    $ pin-latest \u003cproject-directory\u003e\nOptions\n    --exact, -t     Set the exact version\n    --write, -w     Write changes\n    --version, -v   Version number\n    --help, -h      Displays this message\n    --debug, -d     Enable verbose logging\n```\n\n### Exact\n\nThe `--exact` flag modifies the behavior of the version that is written.\n\nIf `--exact` is passed, the version will be written without a leading `^`.\n\nExample:\n\n```bash\n$ pin-latest .\n{\n    \"react\": \"^1.0.0\"\n}\n\n$ pin-latest --exact .\n{\n    \"react\": \"1.0.0\"\n}\n```\n\n### Write\n\nThe `--write` flag decides whether or not changes should be written to disk. If `--write` is not passed, the modified file is sent to `stdout`.\n\n## Programmatic Usage\n\nYou can also import the main `PinLatest` class to use pin-latest programmatically:\n\n```typescript\n// my-script.ts\nimport PinLatest from 'pin-latest';\n\n(async function() {\n    await PinLatest({\n        '.',\n        exact: false,\n        debug: false,\n        write: false\n    });\n}())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwulfmann%2Fpin-latest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwulfmann%2Fpin-latest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwulfmann%2Fpin-latest/lists"}