{"id":14542073,"url":"https://github.com/paritytech/psvm","last_synced_at":"2025-04-06T22:06:03.123Z","repository":{"id":227056159,"uuid":"765212859","full_name":"paritytech/psvm","owner":"paritytech","description":"Polkadot SDK Version Manager","archived":false,"fork":false,"pushed_at":"2025-02-03T18:46:41.000Z","size":130,"stargazers_count":50,"open_issues_count":7,"forks_count":8,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-03-17T11:59:59.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-29T13:48:34.000Z","updated_at":"2025-02-17T19:46:06.000Z","dependencies_parsed_at":"2024-03-11T11:51:45.013Z","dependency_job_id":"6ef4c904-b092-4734-8302-b4aabdf37af9","html_url":"https://github.com/paritytech/psvm","commit_stats":null,"previous_names":["paritytech/psvm"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fpsvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fpsvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fpsvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fpsvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/psvm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"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-09-05T23:01:26.388Z","updated_at":"2025-04-06T22:06:03.106Z","avatar_url":"https://github.com/paritytech.png","language":"Rust","funding_links":[],"categories":["Rust","Developer"],"sub_categories":["Tooling"],"readme":"# Polkadot SDK Version Manager\n\nThis is a simple tool to manage and update the Polkadot SDK dependencies in any Cargo.toml file. It will automatically update the Polkadot SDK dependencies to their correct crates.io version.\n\n## Installation\n\nFrom [GitHub](https://github.com/paritytech/psvm):\n\n```sh\ncargo install --git https://github.com/paritytech/psvm psvm\n```\n\nFrom [crates.io](https://crates.io/crates/psvm):\n\n```sh\ncargo install psvm\n```\n\n## Usage\n\nGo to the directory containing the Cargo.toml file you want to update and run `psvm`. This will automatically update the Polkadot SDK dependencies in the Cargo.toml file to their correct crates.io version.\n\nIf you want to update the local dependencies (using `path=\"...\"`), you can use the `-o` or `-overwrite` flag, this will remove the `path` and set a crates.io version instead.\n\nIf you want to update the dependencies to a specific Polkadot SDK version, you can use the `-v` or `--version` flag, followed by the version you want to update to.\n\nIf you want to check if the dependencies in your local Cargo.toml file are matching to a specific Polkadot SDK version, you can use the `-c` or `--check` flag along with the `--version` flag followed by the version you want to check against.\n\nIf you want to update the ORML crates in your local Cargo.toml, you can use the `-O` or `--orml` flag along with the `--version` flag to update the ORML crates along with the polkadot-sdk crates. This works only if the supplied version is present in the ORML releases.\n\n```sh\n# Go to the directory containing the Cargo.toml file you want to update\ncd \u003ccargo-toml-dir\u003e\n# Update to a specific Polkadot SDK version\npsvm -v \"1.3.0\"\n# You can also update an specific Cargo.toml file by passing its path\npsvm -v \"1.4.0\" -p \u003ccargo-toml-dir\u003e/Cargo.toml\n# Overwrite local dependencies (with same name as Polkadot SDK crates) with crates.io versions\npsvm -v \"1.7.0\" -o\n# List all available Polkadot SDK versions\npsvm -l\n# Check against a particular Polkadot SDK version without updating the Cargo.toml file\npsvm -v \"1.4.0\" -c\n# Update the ORML dependencies along with the Polkadot SDK dependencies.\npsvm -v \"1.6.0\" -O\n```\n\n\u003e Listing all available Polkadot SDK versions requires querying the GitHub API, so your IP may be rate-limited. If a rate limit is reached, the tool will fallback to the GitHub CLI to list the versions. Ensure you have the GitHub CLI installed and authenticated to avoid any issue.\n\n## Workflow\n\nTo update a `Cargo.toml`, the tool will fetch the `Plan.toml` file (used to publish crates into crates.io) from the release branch in Polkadot SDK associated to the version input (`--version` argument), generate a mapping (crate -\u003e version) filtering all crates that were not published in this released (i.e. `publish = false`) **but keeping the [crates published by `parity-crate_owner`](https://crates.io/users/parity-crate-owner) (even if they were not published in this release)**, and overwrite the input Cargo.toml file to match the version from the mapping (i.e [v1.6.0 `Plan.toml`](https://raw.githubusercontent.com/paritytech/polkadot-sdk/release-crates-io-v1.6.0/Plan.toml)).\n\nIn specific versions, the `Plan.toml` file may not exists (i.e. v1.3.0). In this case, the tool will fallback to the `Cargo.lock` file (i.e. [v1.3.0 `Cargo.lock`](https://raw.githubusercontent.com/paritytech/polkadot-sdk/release-crates-io-v1.3.0/Cargo.lock)) from the branch, generate a mapping using this file and overwrite the input Cargo.toml file to match the version from the mapping. The only concern to be aware in this scenario is that the `Cargo.lock` file may contain dependencies that are not published in crates.io, and the tool will not be able to filter them out cause it is not possible to determine if a crate is published or not (with this file). If you have a local dependency with a name similar to a crate not published, the tool will overwrite it, so be careful. Currently, this only happens with v1.3.0, but as the branches can change at any time, it is important to be aware of this. The tool will alert with a message \"Failed to get Plan.toml, falling back to Cargo.lock.\" if this happens.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fpsvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fpsvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fpsvm/lists"}