@thi.ng/router 3.2.37 → 3.2.40
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.
- package/CHANGELOG.md +7 -1
- package/README.md +3 -5
- package/basic.js +3 -0
- package/history.js +5 -0
- package/package.json +11 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-
|
|
3
|
+
- **Last updated**: 2023-11-09T10:28:19Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [3.2.39](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.2.39) (2023-11-09)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
|
|
17
|
+
|
|
12
18
|
### [3.2.30](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.2.30) (2023-08-04)
|
|
13
19
|
|
|
14
20
|
#### ♻️ Refactoring
|
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ For Node.js REPL:
|
|
|
68
68
|
const router = await import("@thi.ng/router");
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 1.
|
|
71
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 1.50 KB
|
|
72
72
|
|
|
73
73
|
## Dependencies
|
|
74
74
|
|
|
@@ -80,11 +80,9 @@ Package sizes (brotli'd, pre-treeshake): ESM: 1.38 KB
|
|
|
80
80
|
|
|
81
81
|
## Usage examples
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
One project in this repo's
|
|
84
84
|
[/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
|
|
85
|
-
directory
|
|
86
|
-
|
|
87
|
-
A selection:
|
|
85
|
+
directory is using this package:
|
|
88
86
|
|
|
89
87
|
| Screenshot | Description | Live demo | Source |
|
|
90
88
|
|:---------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------|:----------------------------------------------------|:---------------------------------------------------------------------------------|
|
package/basic.js
CHANGED
|
@@ -7,6 +7,9 @@ import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
|
|
|
7
7
|
import { illegalArity } from "@thi.ng/errors/illegal-arity";
|
|
8
8
|
import { EVENT_ROUTE_CHANGED, EVENT_ROUTE_FAILED, } from "./api.js";
|
|
9
9
|
let BasicRouter = class BasicRouter {
|
|
10
|
+
config;
|
|
11
|
+
current;
|
|
12
|
+
routeIndex;
|
|
10
13
|
constructor(config) {
|
|
11
14
|
this.config = {
|
|
12
15
|
authenticator: (route, _, params) => ({
|
package/history.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { equiv } from "@thi.ng/equiv";
|
|
2
2
|
import { BasicRouter } from "./basic.js";
|
|
3
3
|
export class HTMLRouter extends BasicRouter {
|
|
4
|
+
currentPath;
|
|
5
|
+
popHandler;
|
|
6
|
+
hashHandler;
|
|
7
|
+
useFragment;
|
|
8
|
+
ignoreHashChange;
|
|
4
9
|
constructor(config) {
|
|
5
10
|
super({ prefix: config.useFragment ? "#/" : "/", ...config });
|
|
6
11
|
this.useFragment = config.useFragment !== false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/router",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.40",
|
|
4
4
|
"description": "Generic router for browser & non-browser based applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -28,24 +28,23 @@
|
|
|
28
28
|
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
|
|
29
29
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
|
-
"doc:readme": "
|
|
32
|
-
"doc:stats": "tools:module-stats",
|
|
31
|
+
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
33
32
|
"pub": "yarn npm publish --access public",
|
|
34
|
-
"test": "
|
|
33
|
+
"test": "bun test"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.9.
|
|
38
|
-
"@thi.ng/checks": "^3.4.
|
|
39
|
-
"@thi.ng/equiv": "^2.1.
|
|
40
|
-
"@thi.ng/errors": "^2.4.
|
|
36
|
+
"@thi.ng/api": "^8.9.8",
|
|
37
|
+
"@thi.ng/checks": "^3.4.8",
|
|
38
|
+
"@thi.ng/equiv": "^2.1.33",
|
|
39
|
+
"@thi.ng/errors": "^2.4.2",
|
|
41
40
|
"tslib": "^2.6.2"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@microsoft/api-extractor": "^7.38.
|
|
45
|
-
"@thi.ng/testament": "^0.
|
|
43
|
+
"@microsoft/api-extractor": "^7.38.2",
|
|
44
|
+
"@thi.ng/testament": "^0.4.1",
|
|
46
45
|
"rimraf": "^5.0.5",
|
|
47
46
|
"tools": "^0.0.1",
|
|
48
|
-
"typedoc": "^0.25.
|
|
47
|
+
"typedoc": "^0.25.3",
|
|
49
48
|
"typescript": "^5.2.2"
|
|
50
49
|
},
|
|
51
50
|
"keywords": [
|
|
@@ -91,5 +90,5 @@
|
|
|
91
90
|
],
|
|
92
91
|
"year": 2014
|
|
93
92
|
},
|
|
94
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
|
|
95
94
|
}
|