Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: move Router fully to TypeScript (#886)
* feat!: replace umd and esm bundles with esm for distribution Fixes #828 * chore: remove gen-typescript-declarations dependency * build: separate tsconfig.json for build and test * --wip-- [skip ci] * --wip-- [skip ci] * --wip-- [skip ci] * --wip-- [skip ci] * --wip-- [skip ci] * --wip-- [skip ci] * --wip-- [skip ci] * --wip-- [skip ci] * chore: remove interfaces.d.ts * test: add vite, karma, mocha devDeps * --wip-- [skip ci] * test: fix .nested.property assertions * fix: match parent route when route.children is truthy * refactor: improve types and move them to d.ts * refactor: move generatedUrls spec to TS * refactor: move matchPath spec to TS * refactor: move dynamic-redirect spec to TS * chore: update config files * refactor: cleanup code & move to async-await to resolve the dynamic-redirect issues * chore: improve Karma config * refactor: improve code & tests * refactor: move code/tests to plain TS files * test: fix most of the test issues * refactor: add some types to utils and to supplementary declaration file * chore: update dependencies * test: disable several failing tests * refactor: redirect type import * refactor: add typings for generateUrls module * chore: add eslint-config-vaadin and perfectionist plugin * refactor: make path not required * refactor: finalize matchPath & matchRoute functions * chore: get back Mocha reporter in Karma * refactor: improve typings for Resolver * refactor: improve typings for Resolver [2] * build: update dependencies and remove install blockers * build: add separate compile tsconfig * fix: some TypeScript errors * refactor: update typings for the Router * chore: remove unnecessary import * test: fix karma setup * refactor: improve typings & update some tests * test: remove ShadyDOM suite marking * fix: matching routes with empty children * test: remove test for { path: null } route * test: relax asserting { done: false } iterator result to falsy * add github action validation file * remove unnecessary travis file * fix: Resolver not found error handling * refactor: fix some typings & update tests * fix: restore resolver children behaviour * test: enable lifecycle events test * fix: Params array support * refactor: restore context result type returned from resolve() * refactor: fix typings & update more tests * refactor: use RouteContext type in resolve callback argument * refactor: remove promise from onAfterEnter / onAfterLeave * fix: workflow around resolve next(), unwrap context result * test: use spec reporter with karma * test: avoid errorneous initial render from setRoutes * test: fix TypeScript error in matchRoute suite * test: adjust assertion for async setRoutes method * test: fix checkOutlet utility function * test: test suite structure * fix: carry locaiton.redirectFrom from redirect context * refactor: make Resolver typings more agnostic * test: address some ESlint feedback in tests * test: address more ESlint feedback in tests * test: fix syntax * test: bypass TypeScript errors in some tests * test: avoid errorneous initial render from setRoutes * fix: support sync render() use cases * fix: support params in getUrl() * chore: make render async again * test: ensure consistent initial location in router tests * refactor: address more TypeScript / ESLint feedback * fix: runtime behaviour for primitive resolve results * fix: remove next from children context * test: support route errors also from setRoutes * test: avoid deep.property assertions on Element * test(resolver): resolver result is wrapped in context * refactor: support more urlFor param types * fix: support using view component name in urlFor * refactor: finalize Resolver * refactor: restore ensureRoute / ensureRoutes / fireRouterEvent utils * fix: support symbolic NotFoundResult * fix: router lifecycle use cases * test: more correct timing in simultanious callback tests * refactor: continue working on the Router typings * refactor: almost finalize Router typings * fix: matching parameterized routes * refactor: attempt to resolve the most stubborn types * refactor: address TypeScript / ESLint errors * refactor: fix TypeScript type for action * refactor: fix TypeScript type for action * refactor: improve typings * fix: make `commands` in action required * fix: type for default resolveRoute implementation * test: make tests run again * test: use spy instead of stub for updated sinon API * fix: remove next from children context * refactor: continue moving to typescript in tests * style: lint * style: format * fix: prevent extra onBeforeLeave lifecycle callback calls * refactor: rollback testing-library changes to avoid test breaks * refactor: small fixes * refactor: use native private props in router * refactor: fix TS errors * refactor: get back test search * fix: remove next from children context * test: avoid erroneous parallel assertions * build: add TypeScript validation steps * test: fix error in TypeScript fixture * refactor: cleanup & deps update * build: add TypeScript declaration files * build: add TypeScript declaration files * refactor!: remove bower support * refactor!: remove documentation-only interfaces --------- Co-authored-by: Anton Platonov <[email protected]> Co-authored-by: Zhe Sun <[email protected]>
- Loading branch information