@microsoft/fast-router 1.0.0-alpha.26 → 1.0.0-alpha.28

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/.eslintrc.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": ["@microsoft/eslint-config-fast-dna", "prettier"],
2
+ "extends": ["../../../.eslintrc.js"],
3
3
  "rules": {
4
4
  "@typescript-eslint/no-non-null-assertion": "off",
5
5
  "@typescript-eslint/ban-types": [
package/CHANGELOG.json CHANGED
@@ -1,6 +1,70 @@
1
1
  {
2
2
  "name": "@microsoft/fast-router",
3
3
  "entries": [
4
+ {
5
+ "date": "Mon, 19 Aug 2024 22:04:19 GMT",
6
+ "version": "1.0.0-alpha.28",
7
+ "tag": "@microsoft/fast-router_v1.0.0-alpha.28",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "13071055+chrisdholt@users.noreply.github.com",
12
+ "package": "@microsoft/fast-router",
13
+ "commit": "630a5e25a953201afa016e54aa77cf68d9d7663a",
14
+ "comment": "update beachball and move disallowedChangeTypes to package.json"
15
+ },
16
+ {
17
+ "author": "7559015+janechu@users.noreply.github.com",
18
+ "package": "@microsoft/fast-router",
19
+ "commit": "78910b1158a6a24b717b3d94616fa93ab6786ab4",
20
+ "comment": "Remove yarn and lerna in favor of npm"
21
+ }
22
+ ],
23
+ "prerelease": [
24
+ {
25
+ "author": "7559015+janechu@users.noreply.github.com",
26
+ "package": "@microsoft/fast-router",
27
+ "commit": "035aefc8a25f4f75f3eb2e8cfb4dd0c60e0d2f67",
28
+ "comment": "Fix CodeQL issues"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@microsoft/fast-router",
33
+ "comment": "Bump @microsoft/fast-element to v2.0.0",
34
+ "commit": "not available"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ {
40
+ "date": "Thu, 20 Jun 2024 17:00:56 GMT",
41
+ "version": "1.0.0-alpha.27",
42
+ "tag": "@microsoft/fast-router_v1.0.0-alpha.27",
43
+ "comments": {
44
+ "prerelease": [
45
+ {
46
+ "author": "1222863+xuwaters@users.noreply.github.com",
47
+ "package": "@microsoft/fast-router",
48
+ "commit": "a789e140aa58098c10a35c86056a7f79a660b456",
49
+ "comment": "fix: remove link handler in disconnect"
50
+ }
51
+ ],
52
+ "none": [
53
+ {
54
+ "author": "7559015+janechu@users.noreply.github.com",
55
+ "package": "@microsoft/fast-router",
56
+ "commit": "00bccd7812ca072fc2efdf39af7762bbfdc90846",
57
+ "comment": "Remove eslint config package"
58
+ },
59
+ {
60
+ "author": "7559015+janechu@users.noreply.github.com",
61
+ "package": "@microsoft/fast-router",
62
+ "commit": "4b23b5caa76c172d3ea6c6559699d632a278442c",
63
+ "comment": "DevDependency update"
64
+ }
65
+ ]
66
+ }
67
+ },
4
68
  {
5
69
  "date": "Fri, 18 Aug 2023 00:04:39 GMT",
6
70
  "tag": "@microsoft/fast-router_v1.0.0-alpha.26",
package/CHANGELOG.md CHANGED
@@ -1,9 +1,26 @@
1
1
  # Change Log - @microsoft/fast-router
2
2
 
3
- This log was last generated on Fri, 18 Aug 2023 00:04:39 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 19 Aug 2024 22:04:19 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.0.0-alpha.28
8
+
9
+ Mon, 19 Aug 2024 22:04:19 GMT
10
+
11
+ ### Changes
12
+
13
+ - Fix CodeQL issues (7559015+janechu@users.noreply.github.com)
14
+ - Bump @microsoft/fast-element to v2.0.0
15
+
16
+ ## 1.0.0-alpha.27
17
+
18
+ Thu, 20 Jun 2024 17:00:56 GMT
19
+
20
+ ### Changes
21
+
22
+ - fix: remove link handler in disconnect (1222863+xuwaters@users.noreply.github.com)
23
+
7
24
  ## 1.0.0-alpha.26
8
25
 
9
26
  Fri, 18 Aug 2023 00:04:39 GMT
package/README.md CHANGED
@@ -6,16 +6,12 @@ The `@microsoft/fast-router` package contains a history-based navigation and rou
6
6
 
7
7
  ### From NPM
8
8
 
9
- To install the `fast-router` library, use either `npm` or `yarn` as follows:
9
+ To install the `fast-router` library using `npm`:
10
10
 
11
11
  ```shell
12
12
  npm install --save @microsoft/fast-router
13
13
  ```
14
14
 
15
- ```shell
16
- yarn add @microsoft/fast-router
17
- ```
18
-
19
15
  Within your JavaScript or TypeScript code, you can then import library APIs like this:
20
16
 
21
17
  ```ts
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.24.2"
8
+ "packageVersion": "7.47.0"
9
9
  }
10
10
  ]
11
11
  }
package/dist/esm/links.js CHANGED
@@ -16,7 +16,7 @@ export class DefaultLinkHandler {
16
16
  window.addEventListener("click", this.handler, true);
17
17
  }
18
18
  disconnect() {
19
- window.removeEventListener("click", this.handler);
19
+ window.removeEventListener("click", this.handler, true);
20
20
  }
21
21
  getEventInfo(event) {
22
22
  const info = {
@@ -1,5 +1,5 @@
1
1
  const encode = encodeURIComponent;
2
- const encodeKey = (key) => encode(key).replace("%24", "$");
2
+ const encodeKey = (key) => encode(key).replace(/%24/g, "$");
3
3
  function buildParam(key, value, traditional) {
4
4
  let result = [];
5
5
  if (value === null || value === undefined) {
@@ -51,14 +51,15 @@ function parseComplexParam(queryParams, keys, value) {
51
51
  if (j < keysLastIndex) {
52
52
  // The value has to be an array or a false value
53
53
  // It can happen that the value is no array if the key was repeated with traditional style like `list=1&list[]=2`
54
- const prevValue = !currentParams[key] || typeof currentParams[key] === "object"
55
- ? currentParams[key]
56
- : [currentParams[key]];
57
- currentParams = currentParams[key] =
58
- prevValue || (isNaN(keys[j + 1]) ? {} : []);
54
+ const prevValue = !currentParams.get(key) || typeof currentParams.get(key) === "object"
55
+ ? currentParams.get(key)
56
+ : [currentParams.get(key)];
57
+ currentParams.set(key, prevValue || (isNaN(keys[j + 1]) ? {} : []));
58
+ currentParams = currentParams.get(key);
59
59
  }
60
60
  else {
61
- currentParams = currentParams[key] = value;
61
+ currentParams.set(key, value);
62
+ currentParams = currentParams.get(key);
62
63
  }
63
64
  }
64
65
  }