{"action":"opened","number":12,"pull_request":{"url":"https://api.github.com/repos/taion/rrtr/pulls/12","id":66094845,"html_url":"https://github.com/taion/rrtr/pull/12","diff_url":"https://github.com/taion/rrtr/pull/12.diff","patch_url":"https://github.com/taion/rrtr/pull/12.patch","issue_url":"https://api.github.com/repos/taion/rrtr/issues/12","number":12,"state":"open","locked":false,"title":"[WIP] Use Express-style path matching","user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"body":"This is a remake of https://github.com/reactjs/react-router/pull/3105.\r\n\r\nThis is not quite ready for release, as I want to make this an opt-in feature guarded behind a deprecation for now, as well as to update the documentation and examples as appropriate.\r\n\r\nThis PR changes the pattern matching algorithm from the home-grown React Router to `path-to-regexp`, which is used by Express and a number of other JavaScript routing frameworks.\r\n\r\nThe biggest advantages of this change are:\r\n- No more need to maintain a bespoke pattern matching algorithm, and instead use a syntax consistent with the rest of the JavaScript ecosystem\r\n- Support for regex-qualified route parameters, for constraining route patterns (https://github.com/reactjs/react-router/issues/2286)\r\n- Dramatically increased performance, though for reasons somewhat unclear to me (https://github.com/reactjs/react-router/issues/3215, providing a more optimal implementation than is available on React Router)\r\n\r\nThis will come with a few breaking changes once the feature is enabled:\r\n- Optional segments must be specified as `/:foo?` as with Express, rather than `(/:foo)` as with RR v1+ (but this is the syntax in v0.13.x)\r\n- Splats now come through as numbered parameters, rather than under `splat`\r\n- Repeated named parameters will take the last value, rather than collapsing into an array\r\n- Non-greedy splats are no longer supported; `*` is a greedy splat\r\n\r\nIn other words, Express's path matching works slightly differently to React Router's.\r\n\r\nI expect that for the majority of applications, this should be fully drop-in. For the rest, the migration work will be relatively limited.","created_at":"2016-04-12T03:11:27Z","updated_at":"2016-04-12T03:11:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ced5f02b82b4fd495940f032cdc4ede81d16439","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/taion/rrtr/pulls/12/commits","review_comments_url":"https://api.github.com/repos/taion/rrtr/pulls/12/comments","review_comment_url":"https://api.github.com/repos/taion/rrtr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taion/rrtr/issues/12/comments","statuses_url":"https://api.github.com/repos/taion/rrtr/statuses/394bf1c1b7e5bb6cffb077530e8ce906a37b8ee2","head":{"label":"taion:path-to-regexp","ref":"path-to-regexp","sha":"394bf1c1b7e5bb6cffb077530e8ce906a37b8ee2","user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"repo":{"id":55992606,"name":"rrtr","full_name":"taion/rrtr","owner":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taion/rrtr","description":"A complete routing solution for React.js","fork":false,"url":"https://api.github.com/repos/taion/rrtr","forks_url":"https://api.github.com/repos/taion/rrtr/forks","keys_url":"https://api.github.com/repos/taion/rrtr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taion/rrtr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taion/rrtr/teams","hooks_url":"https://api.github.com/repos/taion/rrtr/hooks","issue_events_url":"https://api.github.com/repos/taion/rrtr/issues/events{/number}","events_url":"https://api.github.com/repos/taion/rrtr/events","assignees_url":"https://api.github.com/repos/taion/rrtr/assignees{/user}","branches_url":"https://api.github.com/repos/taion/rrtr/branches{/branch}","tags_url":"https://api.github.com/repos/taion/rrtr/tags","blobs_url":"https://api.github.com/repos/taion/rrtr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taion/rrtr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taion/rrtr/git/refs{/sha}","trees_url":"https://api.github.com/repos/taion/rrtr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taion/rrtr/statuses/{sha}","languages_url":"https://api.github.com/repos/taion/rrtr/languages","stargazers_url":"https://api.github.com/repos/taion/rrtr/stargazers","contributors_url":"https://api.github.com/repos/taion/rrtr/contributors","subscribers_url":"https://api.github.com/repos/taion/rrtr/subscribers","subscription_url":"https://api.github.com/repos/taion/rrtr/subscription","commits_url":"https://api.github.com/repos/taion/rrtr/commits{/sha}","git_commits_url":"https://api.github.com/repos/taion/rrtr/git/commits{/sha}","comments_url":"https://api.github.com/repos/taion/rrtr/comments{/number}","issue_comment_url":"https://api.github.com/repos/taion/rrtr/issues/comments{/number}","contents_url":"https://api.github.com/repos/taion/rrtr/contents/{+path}","compare_url":"https://api.github.com/repos/taion/rrtr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taion/rrtr/merges","archive_url":"https://api.github.com/repos/taion/rrtr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taion/rrtr/downloads","issues_url":"https://api.github.com/repos/taion/rrtr/issues{/number}","pulls_url":"https://api.github.com/repos/taion/rrtr/pulls{/number}","milestones_url":"https://api.github.com/repos/taion/rrtr/milestones{/number}","notifications_url":"https://api.github.com/repos/taion/rrtr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taion/rrtr/labels{/name}","releases_url":"https://api.github.com/repos/taion/rrtr/releases{/id}","deployments_url":"https://api.github.com/repos/taion/rrtr/deployments","created_at":"2016-04-11T17:25:21Z","updated_at":"2016-04-12T03:08:43Z","pushed_at":"2016-04-12T03:11:28Z","git_url":"git://github.com/taion/rrtr.git","ssh_url":"git@github.com:taion/rrtr.git","clone_url":"https://github.com/taion/rrtr.git","svn_url":"https://github.com/taion/rrtr","homepage":null,"size":4631,"stargazers_count":219,"watchers_count":219,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":219,"default_branch":"master"}},"base":{"label":"taion:master","ref":"master","sha":"9fd7657918e9330b36355eb31c1ea187f3572968","user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"repo":{"id":55992606,"name":"rrtr","full_name":"taion/rrtr","owner":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taion/rrtr","description":"A complete routing solution for React.js","fork":false,"url":"https://api.github.com/repos/taion/rrtr","forks_url":"https://api.github.com/repos/taion/rrtr/forks","keys_url":"https://api.github.com/repos/taion/rrtr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taion/rrtr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taion/rrtr/teams","hooks_url":"https://api.github.com/repos/taion/rrtr/hooks","issue_events_url":"https://api.github.com/repos/taion/rrtr/issues/events{/number}","events_url":"https://api.github.com/repos/taion/rrtr/events","assignees_url":"https://api.github.com/repos/taion/rrtr/assignees{/user}","branches_url":"https://api.github.com/repos/taion/rrtr/branches{/branch}","tags_url":"https://api.github.com/repos/taion/rrtr/tags","blobs_url":"https://api.github.com/repos/taion/rrtr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taion/rrtr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taion/rrtr/git/refs{/sha}","trees_url":"https://api.github.com/repos/taion/rrtr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taion/rrtr/statuses/{sha}","languages_url":"https://api.github.com/repos/taion/rrtr/languages","stargazers_url":"https://api.github.com/repos/taion/rrtr/stargazers","contributors_url":"https://api.github.com/repos/taion/rrtr/contributors","subscribers_url":"https://api.github.com/repos/taion/rrtr/subscribers","subscription_url":"https://api.github.com/repos/taion/rrtr/subscription","commits_url":"https://api.github.com/repos/taion/rrtr/commits{/sha}","git_commits_url":"https://api.github.com/repos/taion/rrtr/git/commits{/sha}","comments_url":"https://api.github.com/repos/taion/rrtr/comments{/number}","issue_comment_url":"https://api.github.com/repos/taion/rrtr/issues/comments{/number}","contents_url":"https://api.github.com/repos/taion/rrtr/contents/{+path}","compare_url":"https://api.github.com/repos/taion/rrtr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taion/rrtr/merges","archive_url":"https://api.github.com/repos/taion/rrtr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taion/rrtr/downloads","issues_url":"https://api.github.com/repos/taion/rrtr/issues{/number}","pulls_url":"https://api.github.com/repos/taion/rrtr/pulls{/number}","milestones_url":"https://api.github.com/repos/taion/rrtr/milestones{/number}","notifications_url":"https://api.github.com/repos/taion/rrtr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taion/rrtr/labels{/name}","releases_url":"https://api.github.com/repos/taion/rrtr/releases{/id}","deployments_url":"https://api.github.com/repos/taion/rrtr/deployments","created_at":"2016-04-11T17:25:21Z","updated_at":"2016-04-12T03:08:43Z","pushed_at":"2016-04-12T03:11:28Z","git_url":"git://github.com/taion/rrtr.git","ssh_url":"git@github.com:taion/rrtr.git","clone_url":"https://github.com/taion/rrtr.git","svn_url":"https://github.com/taion/rrtr","homepage":null,"size":4631,"stargazers_count":219,"watchers_count":219,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":219,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taion/rrtr/pulls/12"},"html":{"href":"https://github.com/taion/rrtr/pull/12"},"issue":{"href":"https://api.github.com/repos/taion/rrtr/issues/12"},"comments":{"href":"https://api.github.com/repos/taion/rrtr/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/taion/rrtr/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/taion/rrtr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taion/rrtr/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/taion/rrtr/statuses/394bf1c1b7e5bb6cffb077530e8ce906a37b8ee2"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":211,"deletions":303,"changed_files":9}}