Skip to content

Commit

Permalink
Bump path-to-regexp, major changes (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzzy committed Sep 8, 2017
1 parent 7883e10 commit ac3b903
Show file tree
Hide file tree
Showing 22 changed files with 345 additions and 370 deletions.
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.

0 comments on commit ac3b903

Please sign in to comment.