@thi.ng/router 4.1.41 → 4.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +103 -103
  2. package/CHANGELOG.md +0 -139
package/package.json CHANGED
@@ -1,104 +1,104 @@
1
1
  {
2
- "name": "@thi.ng/router",
3
- "version": "4.1.41",
4
- "description": "Generic trie-based router with support for wildcards, route param validation/coercion, auth",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://thi.ng/router",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- },
23
- {
24
- "type": "liberapay",
25
- "url": "https://liberapay.com/thi.ng"
26
- }
27
- ],
28
- "author": "Karsten Schmidt (https://thi.ng)",
29
- "license": "Apache-2.0",
30
- "scripts": {
31
- "build": "yarn build:esbuild && yarn build:decl",
32
- "build:decl": "tsc --declaration --emitDeclarationOnly",
33
- "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
34
- "clean": "bun ../../tools/src/clean-package.ts",
35
- "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
36
- "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
37
- "pub": "yarn npm publish --access public",
38
- "test": "bun test",
39
- "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
- },
41
- "dependencies": {
42
- "@thi.ng/api": "^8.12.2",
43
- "@thi.ng/checks": "^3.7.18",
44
- "@thi.ng/equiv": "^2.1.92",
45
- "@thi.ng/errors": "^2.5.42"
46
- },
47
- "devDependencies": {
48
- "esbuild": "^0.25.9",
49
- "typedoc": "^0.28.12",
50
- "typescript": "^5.9.2"
51
- },
52
- "keywords": [
53
- "browser",
54
- "datastructure",
55
- "declarative",
56
- "history",
57
- "html",
58
- "parametric",
59
- "pattern",
60
- "router",
61
- "server",
62
- "spa",
63
- "trie",
64
- "typescript",
65
- "ui",
66
- "validate",
67
- "wildcard"
68
- ],
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
- "engines": {
73
- "node": ">=18"
74
- },
75
- "files": [
76
- "./*.js",
77
- "./*.d.ts"
78
- ],
79
- "exports": {
80
- ".": {
81
- "default": "./index.js"
82
- },
83
- "./api": {
84
- "default": "./api.js"
85
- },
86
- "./html": {
87
- "default": "./html.js"
88
- },
89
- "./router": {
90
- "default": "./router.js"
91
- },
92
- "./trie": {
93
- "default": "./trie.js"
94
- }
95
- },
96
- "thi.ng": {
97
- "related": [
98
- "hdom",
99
- "rdom"
100
- ],
101
- "year": 2014
102
- },
103
- "gitHead": "e215a3e8de3809736ba0042c93bd8703a5a1a337\n"
104
- }
2
+ "name": "@thi.ng/router",
3
+ "version": "4.1.46",
4
+ "description": "Generic trie-based router with support for wildcards, route param validation/coercion, auth",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://thi.ng/router",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ },
23
+ {
24
+ "type": "liberapay",
25
+ "url": "https://liberapay.com/thi.ng"
26
+ }
27
+ ],
28
+ "author": "Karsten Schmidt (https://thi.ng)",
29
+ "license": "Apache-2.0",
30
+ "scripts": {
31
+ "build": "yarn build:esbuild && yarn build:decl",
32
+ "build:decl": "tsc --declaration --emitDeclarationOnly",
33
+ "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
34
+ "clean": "bun ../../tools/src/clean-package.ts",
35
+ "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
36
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
37
+ "pub": "npm publish --access public",
38
+ "test": "bun test",
39
+ "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
+ },
41
+ "dependencies": {
42
+ "@thi.ng/api": "^8.12.7",
43
+ "@thi.ng/checks": "^3.7.23",
44
+ "@thi.ng/equiv": "^2.1.97",
45
+ "@thi.ng/errors": "^2.5.47"
46
+ },
47
+ "devDependencies": {
48
+ "esbuild": "^0.25.11",
49
+ "typedoc": "^0.28.14",
50
+ "typescript": "^5.9.3"
51
+ },
52
+ "keywords": [
53
+ "browser",
54
+ "datastructure",
55
+ "declarative",
56
+ "history",
57
+ "html",
58
+ "parametric",
59
+ "pattern",
60
+ "router",
61
+ "server",
62
+ "spa",
63
+ "trie",
64
+ "typescript",
65
+ "ui",
66
+ "validate",
67
+ "wildcard"
68
+ ],
69
+ "publishConfig": {
70
+ "access": "public"
71
+ },
72
+ "engines": {
73
+ "node": ">=18"
74
+ },
75
+ "files": [
76
+ "./*.js",
77
+ "./*.d.ts"
78
+ ],
79
+ "exports": {
80
+ ".": {
81
+ "default": "./index.js"
82
+ },
83
+ "./api": {
84
+ "default": "./api.js"
85
+ },
86
+ "./html": {
87
+ "default": "./html.js"
88
+ },
89
+ "./router": {
90
+ "default": "./router.js"
91
+ },
92
+ "./trie": {
93
+ "default": "./trie.js"
94
+ }
95
+ },
96
+ "thi.ng": {
97
+ "related": [
98
+ "hdom",
99
+ "rdom"
100
+ ],
101
+ "year": 2014
102
+ },
103
+ "gitHead": "d977f819bcafdcb2b24c45f8d01a167fe29fc85a\n"
104
+ }
package/CHANGELOG.md DELETED
@@ -1,139 +0,0 @@
1
- # Change Log
2
-
3
- - **Last updated**: 2025-09-01T16:38:35Z
4
- - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
-
6
- All notable changes to this project will be documented in this file.
7
- Only versions published since **2022-01-01** are listed here.
8
- Please consult the Git history for older version information.
9
- See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
10
-
11
- **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
- and/or version bumps of transitive dependencies.
13
-
14
- ### [4.1.28](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@4.1.28) (2025-05-15)
15
-
16
- #### 🩹 Bug fixes
17
-
18
- - fix [#496](https://github.com/thi-ng/umbrella/issues/496), add support for query string ([2d29f46](https://github.com/thi-ng/umbrella/commit/2d29f46))
19
- - update `HTMLRouter.route()` to keep existing query string
20
- (only needed if not using hash fragment)
21
-
22
- ## [4.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@4.1.0) (2024-07-02)
23
-
24
- #### 🚀 Features
25
-
26
- - update HTMLRouter initial & default route handling ([8ea075e](https://github.com/thi-ng/umbrella/commit/8ea075e))
27
- - avoid duplicate dispatch (and breaking back button) for missing routes
28
- - new behavior: HTMLRouter dispatches default route redirect, but does **not** push it to history
29
- - update initial route handling to use `replaceState()` instead of `pushState()`
30
-
31
- ### [4.0.11](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@4.0.11) (2024-06-21)
32
-
33
- #### ♻️ Refactoring
34
-
35
- - enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
36
-
37
- ### [4.0.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@4.0.8) (2024-04-20)
38
-
39
- #### ♻️ Refactoring
40
-
41
- - update type usage ([835dfb0](https://github.com/thi-ng/umbrella/commit/835dfb0))
42
-
43
- ### [4.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@4.0.1) (2024-03-13)
44
-
45
- #### ♻️ Refactoring
46
-
47
- - update/simplify AugmentedRoute handling ([37ae88b](https://github.com/thi-ng/umbrella/commit/37ae88b))
48
-
49
- # [4.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@4.0.0) (2024-03-13)
50
-
51
- #### 🛑 Breaking changes
52
-
53
- - trie-based route matching & wildcard support ([f1ab427](https://github.com/thi-ng/umbrella/commit/f1ab427))
54
- - BREAKING CHANGES: update types, args, rename option fields
55
- - add `Trie` data structure for route storage & matching
56
- - add support for `+` wildcards to match arbitrary length routes
57
- - update `BasicRouter.route()` & replace `.matchRoutes()` with new impl
58
- - add `AugmentedRoute` interface & pre-process routes to compute
59
- wildcard indices for faster matching (along with using the trie)
60
- - update `Route.match` to be initially specified as string
61
- - update `RouteMatch` to include `.rest` args (if any)
62
- - add optional `RouteMatch.redirect` flag
63
- - REMOVE `Route.title` & `RouteMatch.title` (obsolete since only used
64
- by `HTMLRouter`, but usage unsupported by browsers now
65
- (`history.pushState()` doesn't support title anymore)
66
- - RENAME `RouterConfig` => `RouterOpts` (align naming convention)
67
- - RENAME `RouterOpts.defaultRouteID` => `RouterOpts.default`
68
- - RENAME `RouterOpts.initialRouteID` => `RouterOpts.initial`
69
- - RENAME `RouterOpts.removeTrailingSlash` => `RouterOpts.trim`
70
- - REMOVE obsolete `defMatch()` helper
71
- - add/update tests
72
- - rename BasicRouter => Router ([4d14aab](https://github.com/thi-ng/umbrella/commit/4d14aab))
73
- - BREAKING CHANGE: rename BasicRouter => Router
74
- - update all refs
75
-
76
- #### 🚀 Features
77
-
78
- - update RouteAuthenticator and .route() args ([f009afb](https://github.com/thi-ng/umbrella/commit/f009afb))
79
- - add support for optional arbitrary user context object passed
80
- to .route() and global auth handler
81
- - update optional args for HTMLRouter.route()/.routeTo()
82
- - update/improve wildcard priority handling ([59c2557](https://github.com/thi-ng/umbrella/commit/59c2557))
83
- - implement wildcard fallback logic in `Trie.get()`
84
- - add docs
85
- - add tests
86
-
87
- ## [3.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.4.0) (2024-03-10)
88
-
89
- #### 🚀 Features
90
-
91
- - add defMatch() helper ([12134b6](https://github.com/thi-ng/umbrella/commit/12134b6))
92
-
93
- #### 🩹 Bug fixes
94
-
95
- - rebuild index in updateRoutes() ([deb494e](https://github.com/thi-ng/umbrella/commit/deb494e))
96
-
97
- ## [3.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.3.0) (2024-03-09)
98
-
99
- #### 🚀 Features
100
-
101
- - sort & validate routes, add tests ([9243c01](https://github.com/thi-ng/umbrella/commit/9243c01))
102
-
103
- ### [3.2.39](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.2.39) (2023-11-09)
104
-
105
- #### ♻️ Refactoring
106
-
107
- - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
108
-
109
- ### [3.2.30](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.2.30) (2023-08-04)
110
-
111
- #### ♻️ Refactoring
112
-
113
- - update INotify impl ([d36aca6](https://github.com/thi-ng/umbrella/commit/d36aca6))
114
- - update INotify impls ([cbdc527](https://github.com/thi-ng/umbrella/commit/cbdc527))
115
-
116
- ### [3.2.14](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.2.14) (2022-11-28)
117
-
118
- #### ♻️ Refactoring
119
-
120
- - update INotify.notify() signature ([066bae5](https://github.com/thi-ng/umbrella/commit/066bae5))
121
-
122
- ## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.2.0) (2022-06-17)
123
-
124
- #### 🚀 Features
125
-
126
- - add trailing slash option, optimize routeForID() ([c003dc2](https://github.com/thi-ng/umbrella/commit/c003dc2))
127
- - update BasicRouter default config init
128
- - pre-build `routeIndex` in ctor
129
- - optimize `routeForID()` to use new `routeIndex`
130
- - update format(), hash/prefix handling ([724b3ad](https://github.com/thi-ng/umbrella/commit/724b3ad))
131
- - update HTMLRouter default prefix to "#/" if `useFragment` is true
132
- - remove obsolete `HTMLRouter.format()` (now the same as BasicRouter)
133
- - update BasicRouter.format() to throw error for missing route param value
134
-
135
- ### [3.1.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.1.5) (2022-04-07)
136
-
137
- #### ♻️ Refactoring
138
-
139
- - replace deprecated .substr() w/ .substring() ([0710509](https://github.com/thi-ng/umbrella/commit/0710509))