@docusaurus/plugin-client-redirects 0.0.0-4873 → 0.0.0-4878
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/lib/collectRedirects.js
CHANGED
|
@@ -65,8 +65,8 @@ Valid paths you can redirect to:
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function filterUnwantedRedirects(redirects, pluginContext) {
|
|
68
|
-
//
|
|
69
|
-
//
|
|
68
|
+
// We don't want to create the same redirect twice, since that would lead to
|
|
69
|
+
// writing the same html redirection file twice.
|
|
70
70
|
Object.entries(lodash_1.default.groupBy(redirects, (redirect) => redirect.from)).forEach(([from, groupedFromRedirects]) => {
|
|
71
71
|
if (groupedFromRedirects.length > 1) {
|
|
72
72
|
logger_1.default.error `name=${'@docusaurus/plugin-client-redirects'}: multiple redirects are created with the same "from" pathname: path=${from}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-client-redirects",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4878",
|
|
4
4
|
"description": "Client redirects plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-client-redirects.d.ts",
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "0.0.0-
|
|
22
|
-
"@docusaurus/logger": "0.0.0-
|
|
23
|
-
"@docusaurus/utils": "0.0.0-
|
|
24
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
25
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
21
|
+
"@docusaurus/core": "0.0.0-4878",
|
|
22
|
+
"@docusaurus/logger": "0.0.0-4878",
|
|
23
|
+
"@docusaurus/utils": "0.0.0-4878",
|
|
24
|
+
"@docusaurus/utils-common": "0.0.0-4878",
|
|
25
|
+
"@docusaurus/utils-validation": "0.0.0-4878",
|
|
26
26
|
"eta": "^1.12.3",
|
|
27
|
-
"fs-extra": "^10.0
|
|
27
|
+
"fs-extra": "^10.1.0",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"tslib": "^2.3.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@docusaurus/types": "0.0.0-
|
|
32
|
+
"@docusaurus/types": "0.0.0-4878"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^16.8.4 || ^17.0.0",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=14"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "186f6b50623681da063421e72dd69726a8d78f9e"
|
|
42
42
|
}
|
package/src/collectRedirects.ts
CHANGED
|
@@ -96,8 +96,8 @@ function filterUnwantedRedirects(
|
|
|
96
96
|
redirects: RedirectMetadata[],
|
|
97
97
|
pluginContext: PluginContext,
|
|
98
98
|
): RedirectMetadata[] {
|
|
99
|
-
//
|
|
100
|
-
//
|
|
99
|
+
// We don't want to create the same redirect twice, since that would lead to
|
|
100
|
+
// writing the same html redirection file twice.
|
|
101
101
|
Object.entries(_.groupBy(redirects, (redirect) => redirect.from)).forEach(
|
|
102
102
|
([from, groupedFromRedirects]) => {
|
|
103
103
|
if (groupedFromRedirects.length > 1) {
|