{"id":13471917,"url":"https://github.com/vuejs/router","last_synced_at":"2026-04-22T10:01:01.434Z","repository":{"id":37931424,"uuid":"169618186","full_name":"vuejs/router","owner":"vuejs","description":"🚦 The official router for Vue.js","archived":false,"fork":false,"pushed_at":"2026-03-31T10:05:24.000Z","size":13552,"stargazers_count":4588,"open_issues_count":64,"forks_count":1273,"subscribers_count":49,"default_branch":"main","last_synced_at":"2026-04-17T20:06:01.254Z","etag":null,"topics":["vue","vue-router"],"latest_commit_sha":null,"homepage":"https://router.vuejs.org/","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/vuejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":".github/funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["posva"],"open_collective":"vuejs"}},"created_at":"2019-02-07T18:09:43.000Z","updated_at":"2026-04-17T18:27:51.000Z","dependencies_parsed_at":"2024-03-05T08:44:22.721Z","dependency_job_id":"7706dfb6-1132-4c37-8660-543c631c1940","html_url":"https://github.com/vuejs/router","commit_stats":{"total_commits":2440,"total_committers":250,"mean_commits":9.76,"dds":0.3270491803278689,"last_synced_commit":"8c73877dc159fb7d736f9d0a71ba22e8130012a3"},"previous_names":["vuejs/vue-router-next"],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/vuejs/router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Frouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Frouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Frouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Frouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vuejs","download_url":"https://codeload.github.com/vuejs/router/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Frouter/sbom","scorecard":{"id":559864,"data":{"date":"2025-08-04","repo":{"name":"github.com/vuejs/router","commit":"6171856c504daaee5a9f9f89b28a4a83220204f4"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.5,"checks":[{"name":"Maintained","score":10,"reason":"12 commit(s) and 11 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pkg.pr.new.yml:1","Warn: no topLevel permission defined: .github/workflows/release-tag.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":5,"reason":"Found 15/30 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pkg.pr.new.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/pkg.pr.new.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pkg.pr.new.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/pkg.pr.new.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pkg.pr.new.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/pkg.pr.new.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-tag.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/release-tag.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-tag.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/release-tag.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/vuejs/router/test.yml/main?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T13:21:38.372Z","repository_id":37931424,"created_at":"2025-08-20T13:21:38.372Z","updated_at":"2025-08-20T13:21:38.372Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31994249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["vue","vue-router"],"created_at":"2024-07-31T16:00:50.344Z","updated_at":"2026-04-22T10:01:01.407Z","avatar_url":"https://github.com/vuejs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/posva","https://opencollective.com/vuejs","https://paypal.me/posva"],"categories":["TypeScript","Pre-packed","vue","武器库"],"sub_categories":["Plugins","前端"],"readme":"# vue-router [![nmp version](https://img.shields.io/npm/v/vue-router.svg)](https://npmx.dev/package/vue-router) [![test](https://github.com/vuejs/router/actions/workflows/test.yml/badge.svg)](https://github.com/vuejs/router/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/vuejs/router/graph/badge.svg?token=azNM3FI0d1)](https://codecov.io/gh/vuejs/router)\n\n\u003e - This is the repository for Vue Router 4 (for Vue 3)\n\u003e - For Vue Router 3 (for Vue 2) see [vuejs/vue-router](https://github.com/vuejs/vue-router).\n\u003e   To see what versions are currently supported, please refer to the [Security Policy](./packages/router/SECURITY.md).\n\n\u003ch2 align=\"center\"\u003eSupporting Vue Router\u003c/h2\u003e\n\nVue Router is part of the Vue Ecosystem and is an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:\n\n- [Become a Sponsor on GitHub](https://github.com/sponsors/posva)\n- [One-time donation via PayPal](https://paypal.me/posva)\n\n\u003c!--sponsors start--\u003e\n\n\u003ch4 align=\"center\"\u003eGold Sponsors\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.coderabbit.ai/?utm_source=vuerouter\u0026utm_medium=sponsor\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/coderabbitai-dark.svg\" media=\"(prefers-color-scheme: dark)\" height=\"72px\" alt=\"CodeRabbit\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/coderabbitai-light.svg\" height=\"72px\" alt=\"CodeRabbit\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003eSilver Sponsors\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.vuemastery.com/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/vuemastery-dark.png\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"VueMastery\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/vuemastery-light.svg\" height=\"42px\" alt=\"VueMastery\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://www.controla.ai/?utm_source=posva\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/controla-dark.png\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"Controla\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/controla-light.png\" height=\"42px\" alt=\"Controla\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://route4me.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/route4me.png\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"Route Optimizer and Route Planner Software\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/route4me.png\" height=\"42px\" alt=\"Route Optimizer and Route Planner Software\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://jobs.sendcloud.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/sendcloud-dark.svg\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"SendCloud\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/sendcloud-light.svg\" height=\"42px\" alt=\"SendCloud\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003eBronze Sponsors\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://stormier.ninja\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://avatars.githubusercontent.com/u/2486424\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Stanislas Ormières\" /\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/2486424\" height=\"26px\" alt=\"Stanislas Ormières\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://www.rtvision.com/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://avatars.githubusercontent.com/u/8292810\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"RTVision\" /\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/8292810\" height=\"26px\" alt=\"RTVision\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://storyblok.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/storyblok.png\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Storyblok\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/storyblok.png\" height=\"26px\" alt=\"Storyblok\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!--sponsors end--\u003e\n\n---\n\nGet started with the [documentation](https://router.vuejs.org).\n\n## Quickstart\n\n- Via CDN: `\u003cscript src=\"https://unpkg.com/vue-router@4\"\u003e\u003c/script\u003e`\n- In-browser playground on [CodeSandbox](https://codesandbox.io/s/vue-router-4-reproduction-hb9lh)\n- Add it to an existing Vue Project:\n\n  ```bash\n  npm install vue-router@4\n  ```\n\n## Changes from Vue Router 3\n\nPlease consult the [Migration Guide](https://router.vuejs.org/guide/migration/).\n\n## Contributing\n\nSee [Contributing Guide](https://github.com/vuejs/router/blob/main/.github/contributing.md).\n\n## Special Thanks\n\n\u003ca href=\"https://www.browserstack.com\"\u003e\n  \u003cimg src=\"https://github.com/vuejs/vue-router/raw/dev/assets/browserstack-logo-600x315.png\" height=\"80\" title=\"BrowserStack Logo\" alt=\"BrowserStack Logo\" /\u003e\n\u003c/a\u003e\n\nSpecial thanks to [BrowserStack](https://www.browserstack.com) for letting the maintainers use their service to debug browser specific issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuejs%2Frouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvuejs%2Frouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuejs%2Frouter/lists"}