diff --git a/.changeset/dirty-cycles-love.md b/.changeset/dirty-cycles-love.md deleted file mode 100644 index 6c922c7..0000000 --- a/.changeset/dirty-cycles-love.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"@wbe/low-router": minor ---- - -## breaking change: Improve `resolve` and `onResolve` params. - -`router.resolve()` and `onResolve()` option return now `{response, context}` object of the matching route. - -before: -```js -router.resolve("/").then((res) => { - // res: "Hello home!" -}); -``` -after: -```js -router.resolve("/").then(({ response, context }) => { - // response: "Hello home!" - // context: RouteContext interface -}); -``` - diff --git a/packages/low-router/CHANGELOG.md b/packages/low-router/CHANGELOG.md index d55fe6a..ad8b7d6 100644 --- a/packages/low-router/CHANGELOG.md +++ b/packages/low-router/CHANGELOG.md @@ -1,5 +1,30 @@ # @wbe/low-router +## 0.2.0 + +### Minor Changes + +- c98cc80: ## breaking change: Improve `resolve` and `onResolve` params. + + `router.resolve()` and `onResolve()` option return now `{response, context}` object of the matching route. + + before: + + ```js + router.resolve("/").then((res) => { + // res: "Hello home!" + }) + ``` + + after: + + ```js + router.resolve("/").then(({ response, context }) => { + // response: "Hello home!" + // context: RouteContext interface + }) + ``` + ## 0.1.1 ### Patch Changes diff --git a/packages/low-router/package.json b/packages/low-router/package.json index d028eba..8046e86 100644 --- a/packages/low-router/package.json +++ b/packages/low-router/package.json @@ -2,7 +2,7 @@ "name": "@wbe/low-router", "author": "Willy Brauner", "license": "MIT", - "version": "0.1.1", + "version": "0.2.0", "type": "module", "files": [ "dist"