From 468ac2f4369e305a92dfcb0f1604fd9dd1a9d011 Mon Sep 17 00:00:00 2001 From: Matt Levy Date: Tue, 16 Nov 2021 21:19:16 +0000 Subject: [PATCH] fix: createRouter function types --- CHANGELOG.md | 5 +++ package-lock.json | 112 ++++++++++++++++++++-------------------------- package.json | 8 ++-- types/router.d.ts | 2 +- 4 files changed, 59 insertions(+), 68 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a03226..5e71c02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.1] - 2021-11-16 + +### Fixes +- Fix types for `createRouter` function + ## [3.1.0] - 2021-10-20 ### Updates diff --git a/package-lock.json b/package-lock.json index fd4c2c1..aa77ef7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "@ficusjs/router", - "version": "3.0.0", + "version": "3.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ficusjs/router", - "version": "3.0.0", + "version": "3.1.1", "license": "MIT", "devDependencies": { - "@ficusjs/renderers": "4.1.1", + "@ficusjs/renderers": "4.2.0", "cypress": "8.6.0", - "ficusjs": "3.8.3", + "ficusjs": "3.9.0", "http-server": "14.0.0", "npm-run-all": "4.1.5", "open-cli": "7.0.1", - "rollup": "2.58.0", + "rollup": "2.60.0", "rollup-plugin-filesize": "9.1.1", "rollup-plugin-terser": "7.0.2", "standard": "16.0.4", @@ -199,27 +199,27 @@ } }, "node_modules/@ficusjs/core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ficusjs/core/-/core-1.1.2.tgz", - "integrity": "sha512-MmXg/fWCh7pq33371vieRpvnwFHua/k8pKWhDlwe56WuV747Oj9+JjWeEmOku36gtM3n2/biHyFAAjcUtEOZbw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ficusjs/core/-/core-1.2.0.tgz", + "integrity": "sha512-7+bmkqQ+XQVnyteBx3ltOI+CiOqjwP6ivVzBcZ4XIpw24Qu8nRI6TxbjqrL+rPODKl3X5M8H7tY+HECkWEmq8A==", "dev": true }, "node_modules/@ficusjs/event-bus": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@ficusjs/event-bus/-/event-bus-1.1.1.tgz", - "integrity": "sha512-l8vlVlNnonc/mJE0SQxJJiJDAYp3nJj7ZDu7EHqRAZkI66ADN2/wdhzpK/SZo+vQB30Cq/qEqnVVosdD4v+aUQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ficusjs/event-bus/-/event-bus-1.2.0.tgz", + "integrity": "sha512-7N/U/FVZPzhxBu72rIb4yPuX4JcOCiIKc/q/H+FSb9HARo03z8zg4Bq0Ky/QCgTVqtSr9pHU5XuRQiDCyFEsWw==", "dev": true }, "node_modules/@ficusjs/renderers": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@ficusjs/renderers/-/renderers-4.1.1.tgz", - "integrity": "sha512-xqXhZGqUHpdCJHsazj4Mwo2aAJUoSNt+2fj22d5282kBKNjDoX4BJDcj0p0dAGOv+CzJhhafKuBgSf1N1fHlvA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@ficusjs/renderers/-/renderers-4.2.0.tgz", + "integrity": "sha512-lyTcd4Kq+RV6X/4+SnLJC5mfVNPdot7U9LztBNir8pwXOhR5HH6Gl2ARZkEe2wFO3iChUjG4rL1s28V5m4JAOQ==", "dev": true }, "node_modules/@ficusjs/state": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ficusjs/state/-/state-1.2.1.tgz", - "integrity": "sha512-LS8YcOeu6+tvF9qLdhNmBShYCErxNxCPJdk6529FKAG/ngnz27MLWMGLoQbiFQ+4/KdcodZhCI0dGwYCQqxPsA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ficusjs/state/-/state-1.3.0.tgz", + "integrity": "sha512-D2YJq39TsAsDor/Y/2smfdPUDpne2TITot4X+RVnnkc8O1jmw9aYi0VkU+VKNWprn6lADILAFK2gO/leDbZn0Q==", "dev": true }, "node_modules/@hapi/hoek": { @@ -2404,23 +2404,17 @@ } }, "node_modules/ficusjs": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/ficusjs/-/ficusjs-3.8.3.tgz", - "integrity": "sha512-k6mN8iibN8uQId/KU7IdZv3rhpcr5W3I2KeflOMflgZ+5aHt4pPBGDzAEY4FVDI7vb+Ubf5HgbAZGGZMdYTthg==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ficusjs/-/ficusjs-3.9.0.tgz", + "integrity": "sha512-k+ndWWPqbW3zmrmw76MCNeDY6T2hcwgPeVxIJmTMwB88Bbyj6E7iQQNXXiKCCL6FK8i6CBsYI4KT5wM5nH80EA==", "dev": true, "dependencies": { - "@ficusjs/core": "1.1.2", - "@ficusjs/event-bus": "1.1.1", - "@ficusjs/renderers": "4.0.0", - "@ficusjs/state": "1.2.1" + "@ficusjs/core": "1.2.0", + "@ficusjs/event-bus": "1.2.0", + "@ficusjs/renderers": "4.2.0", + "@ficusjs/state": "1.3.0" } }, - "node_modules/ficusjs/node_modules/@ficusjs/renderers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@ficusjs/renderers/-/renderers-4.0.0.tgz", - "integrity": "sha512-nbkaJYuNFNDFNKK1PxqT+TG9mFqE8LQLfKr4TgeAt70OTzrsyGcCbW8DhE9qLbqBOkv1KsYQq9HI7un2MU4+/w==", - "dev": true - }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -5907,9 +5901,9 @@ } }, "node_modules/rollup": { - "version": "2.58.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.58.0.tgz", - "integrity": "sha512-NOXpusKnaRpbS7ZVSzcEXqxcLDOagN6iFS8p45RkoiMqPHDLwJm758UF05KlMoCRbLBTZsPOIa887gZJ1AiXvw==", + "version": "2.60.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.0.tgz", + "integrity": "sha512-cHdv9GWd58v58rdseC8e8XIaPUo8a9cgZpnCMMDGZFDZKEODOiPPEQFXLriWr/TjXzhPPmG5bkAztPsOARIcGQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -7509,27 +7503,27 @@ } }, "@ficusjs/core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ficusjs/core/-/core-1.1.2.tgz", - "integrity": "sha512-MmXg/fWCh7pq33371vieRpvnwFHua/k8pKWhDlwe56WuV747Oj9+JjWeEmOku36gtM3n2/biHyFAAjcUtEOZbw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ficusjs/core/-/core-1.2.0.tgz", + "integrity": "sha512-7+bmkqQ+XQVnyteBx3ltOI+CiOqjwP6ivVzBcZ4XIpw24Qu8nRI6TxbjqrL+rPODKl3X5M8H7tY+HECkWEmq8A==", "dev": true }, "@ficusjs/event-bus": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@ficusjs/event-bus/-/event-bus-1.1.1.tgz", - "integrity": "sha512-l8vlVlNnonc/mJE0SQxJJiJDAYp3nJj7ZDu7EHqRAZkI66ADN2/wdhzpK/SZo+vQB30Cq/qEqnVVosdD4v+aUQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ficusjs/event-bus/-/event-bus-1.2.0.tgz", + "integrity": "sha512-7N/U/FVZPzhxBu72rIb4yPuX4JcOCiIKc/q/H+FSb9HARo03z8zg4Bq0Ky/QCgTVqtSr9pHU5XuRQiDCyFEsWw==", "dev": true }, "@ficusjs/renderers": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@ficusjs/renderers/-/renderers-4.1.1.tgz", - "integrity": "sha512-xqXhZGqUHpdCJHsazj4Mwo2aAJUoSNt+2fj22d5282kBKNjDoX4BJDcj0p0dAGOv+CzJhhafKuBgSf1N1fHlvA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@ficusjs/renderers/-/renderers-4.2.0.tgz", + "integrity": "sha512-lyTcd4Kq+RV6X/4+SnLJC5mfVNPdot7U9LztBNir8pwXOhR5HH6Gl2ARZkEe2wFO3iChUjG4rL1s28V5m4JAOQ==", "dev": true }, "@ficusjs/state": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ficusjs/state/-/state-1.2.1.tgz", - "integrity": "sha512-LS8YcOeu6+tvF9qLdhNmBShYCErxNxCPJdk6529FKAG/ngnz27MLWMGLoQbiFQ+4/KdcodZhCI0dGwYCQqxPsA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ficusjs/state/-/state-1.3.0.tgz", + "integrity": "sha512-D2YJq39TsAsDor/Y/2smfdPUDpne2TITot4X+RVnnkc8O1jmw9aYi0VkU+VKNWprn6lADILAFK2gO/leDbZn0Q==", "dev": true }, "@hapi/hoek": { @@ -9218,23 +9212,15 @@ } }, "ficusjs": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/ficusjs/-/ficusjs-3.8.3.tgz", - "integrity": "sha512-k6mN8iibN8uQId/KU7IdZv3rhpcr5W3I2KeflOMflgZ+5aHt4pPBGDzAEY4FVDI7vb+Ubf5HgbAZGGZMdYTthg==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ficusjs/-/ficusjs-3.9.0.tgz", + "integrity": "sha512-k+ndWWPqbW3zmrmw76MCNeDY6T2hcwgPeVxIJmTMwB88Bbyj6E7iQQNXXiKCCL6FK8i6CBsYI4KT5wM5nH80EA==", "dev": true, "requires": { - "@ficusjs/core": "1.1.2", - "@ficusjs/event-bus": "1.1.1", - "@ficusjs/renderers": "4.0.0", - "@ficusjs/state": "1.2.1" - }, - "dependencies": { - "@ficusjs/renderers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@ficusjs/renderers/-/renderers-4.0.0.tgz", - "integrity": "sha512-nbkaJYuNFNDFNKK1PxqT+TG9mFqE8LQLfKr4TgeAt70OTzrsyGcCbW8DhE9qLbqBOkv1KsYQq9HI7un2MU4+/w==", - "dev": true - } + "@ficusjs/core": "1.2.0", + "@ficusjs/event-bus": "1.2.0", + "@ficusjs/renderers": "4.2.0", + "@ficusjs/state": "1.3.0" } }, "figures": { @@ -11816,9 +11802,9 @@ } }, "rollup": { - "version": "2.58.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.58.0.tgz", - "integrity": "sha512-NOXpusKnaRpbS7ZVSzcEXqxcLDOagN6iFS8p45RkoiMqPHDLwJm758UF05KlMoCRbLBTZsPOIa887gZJ1AiXvw==", + "version": "2.60.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.0.tgz", + "integrity": "sha512-cHdv9GWd58v58rdseC8e8XIaPUo8a9cgZpnCMMDGZFDZKEODOiPPEQFXLriWr/TjXzhPPmG5bkAztPsOARIcGQ==", "dev": true, "requires": { "fsevents": "~2.3.2" diff --git a/package.json b/package.json index 8746210..35214a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ficusjs/router", - "version": "3.1.0", + "version": "3.1.1", "description": "Lightweight standalone client-side router that supports history and hash routing", "type": "module", "main": "dist/router.mjs", @@ -30,13 +30,13 @@ "author": "Matt Levy", "license": "MIT", "devDependencies": { - "@ficusjs/renderers": "4.1.1", + "@ficusjs/renderers": "4.2.0", "cypress": "8.6.0", - "ficusjs": "3.8.3", + "ficusjs": "3.9.0", "http-server": "14.0.0", "npm-run-all": "4.1.5", "open-cli": "7.0.1", - "rollup": "2.58.0", + "rollup": "2.60.0", "rollup-plugin-filesize": "9.1.1", "rollup-plugin-terser": "7.0.2", "standard": "16.0.4", diff --git a/types/router.d.ts b/types/router.d.ts index 7c16bdc..8df98b1 100644 --- a/types/router.d.ts +++ b/types/router.d.ts @@ -86,6 +86,6 @@ declare class Router { type GetRouterFunction = () => Router -export declare function createRouter (routes: Routes, options?: RouterOptions): Router +export declare function createRouter (routes: Routes, rootOutletSelector: string, options?: RouterOptions): Router export declare function getRouter (): Router