Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump path-to-regexp, major changes #111

Merged
merged 1 commit into from
Sep 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
sudo: false
language: node_js
node_js:
- 'node'
- '7'
- 'stable'
- '6'
script:
- npm run lint
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]

- Update [path-to-regexp](https://github.com/pillarjs/path-to-regexp) to v2.0.0, see
[changelog](https://github.com/pillarjs/path-to-regexp/blob/1bf805251c8486ea44395cd12afc37f77deec95e/History.md#200--2017-08-23)
(BREAKING CHANGE)
- Explicitly handle trailing delimiters (e.g. `/test/` is now treated as `/test/` instead of `/test` when matching)
- No wildcard asterisk (`*`) - use parameters instead (`(.*)`)

Middleware routes must use empty string path `''` or do not use path at all when need to match any url.<br>
See [#111](https://github.com/kriasoft/universal-router/pull/111) for more info and examples
- Add `encode` option to `generateUrls(router, options)` function for pretty encoding
(e.g. pass your own implementation)
- Remove `pretty` option from `generateUrls(router, options)` function in favor of new `encode` option
- Preserve `context.keys` values from the parent route
- Inherit `context.params` and `queryParams` from
[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
(e.g. `params.hasOwnProperty()` won't throw an exception anymore)
- Include the source code of the router in the [npm package](https://www.npmjs.com/package/universal-router)
([#110](https://github.com/kriasoft/universal-router/pull/110))

Expand Down
4 changes: 2 additions & 2 deletions dist/universal-router-generate-urls.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/universal-router-generate-urls.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/universal-router-generate-urls.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.