@docusaurus/core 0.0.0-5283 → 0.0.0-5289
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/server/routes.js +2 -18
- package/package.json +10 -10
package/lib/server/routes.js
CHANGED
|
@@ -68,24 +68,8 @@ ${indent(subroutesCodeStrings.join(',\n'))}
|
|
|
68
68
|
]`);
|
|
69
69
|
}
|
|
70
70
|
Object.entries(props).forEach(([propName, propValue]) => {
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
// Pre-sanitation to prevent injection
|
|
74
|
-
if (/[.,;:}/\s]/.test(key)) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
try {
|
|
78
|
-
// If this key can be used in an expression like ({a:0}).a
|
|
79
|
-
// eslint-disable-next-line no-eval
|
|
80
|
-
eval(`({${key}:0}).${key}`);
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
catch {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
})(propName);
|
|
87
|
-
// Escape quotes as well
|
|
88
|
-
const key = shouldQuote ? JSON.stringify(propName) : propName;
|
|
71
|
+
const isIdentifier = /^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u.test(propName);
|
|
72
|
+
const key = isIdentifier ? propName : JSON.stringify(propName);
|
|
89
73
|
parts.push(`${key}: ${JSON.stringify(propValue)}`);
|
|
90
74
|
});
|
|
91
75
|
return `{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/core",
|
|
3
3
|
"description": "Easy to Maintain Open Source Documentation Websites",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-5289",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@babel/runtime": "^7.18.9",
|
|
44
44
|
"@babel/runtime-corejs3": "^7.18.9",
|
|
45
45
|
"@babel/traverse": "^7.18.10",
|
|
46
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
47
|
-
"@docusaurus/logger": "0.0.0-
|
|
48
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
46
|
+
"@docusaurus/cssnano-preset": "0.0.0-5289",
|
|
47
|
+
"@docusaurus/logger": "0.0.0-5289",
|
|
48
|
+
"@docusaurus/mdx-loader": "0.0.0-5289",
|
|
49
49
|
"@docusaurus/react-loadable": "5.5.2",
|
|
50
|
-
"@docusaurus/utils": "0.0.0-
|
|
51
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
52
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
50
|
+
"@docusaurus/utils": "0.0.0-5289",
|
|
51
|
+
"@docusaurus/utils-common": "0.0.0-5289",
|
|
52
|
+
"@docusaurus/utils-validation": "0.0.0-5289",
|
|
53
53
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
|
|
54
54
|
"@svgr/webpack": "^6.3.1",
|
|
55
55
|
"autoprefixer": "^10.4.8",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"webpackbar": "^5.0.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
110
|
-
"@docusaurus/types": "0.0.0-
|
|
109
|
+
"@docusaurus/module-type-aliases": "0.0.0-5289",
|
|
110
|
+
"@docusaurus/types": "0.0.0-5289",
|
|
111
111
|
"@types/detect-port": "^1.3.2",
|
|
112
112
|
"@types/react-dom": "^18.0.6",
|
|
113
113
|
"@types/react-router-config": "^5.0.6",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=16.14"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "9c30f9d5be92b1b8ce7ea5258080dc00c2b9f17a"
|
|
131
131
|
}
|