@rspress/shared 1.37.3 → 1.38.0
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/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
@@ -44,8 +44,8 @@ declare const parseUrl: (url: string) => {
|
|
44
44
|
};
|
45
45
|
declare function normalizeHref(url?: string, cleanUrls?: boolean): string;
|
46
46
|
declare function withoutLang(path: string, langs: string[]): string;
|
47
|
-
declare function withoutBase(path: string, base
|
48
|
-
declare function withBase(url
|
47
|
+
declare function withoutBase(path: string, base: string): string;
|
48
|
+
declare function withBase(url: string, base: string): string;
|
49
49
|
declare function removeBase(url: string, base: string): string;
|
50
50
|
|
51
51
|
export { APPEARANCE_KEY, DEFAULT_HIGHLIGHT_LANGUAGES, HASH_REGEXP, MDX_REGEXP, QUERY_REGEXP, RSPRESS_TEMP_DIR, SEARCH_INDEX_NAME, addLeadingSlash, addTrailingSlash, cleanUrl, inBrowser, isDataUrl, isDebugMode, isDevDebugMode, isExternalUrl, isProduction, isSCM, normalizeHref, normalizePosixPath, normalizeSlash, parseUrl, removeBase, removeHash, removeLeadingSlash, removeTrailingSlash, replaceLang, replaceVersion, slash, withBase, withoutBase, withoutLang };
|
package/dist/index.js
CHANGED
@@ -223,10 +223,10 @@ function withoutLang(path, langs) {
|
|
223
223
|
const langRegexp = new RegExp(`^\\/(${langs.join("|")})`);
|
224
224
|
return addLeadingSlash(path.replace(langRegexp, ""));
|
225
225
|
}
|
226
|
-
function withoutBase(path, base
|
226
|
+
function withoutBase(path, base) {
|
227
227
|
return addLeadingSlash(path).replace(normalizeSlash(base), "");
|
228
228
|
}
|
229
|
-
function withBase(url
|
229
|
+
function withBase(url, base) {
|
230
230
|
const normalizedUrl = addLeadingSlash(url);
|
231
231
|
const normalizedBase = normalizeSlash(base);
|
232
232
|
return normalizedUrl.startsWith(normalizedBase) ? normalizedUrl : `${normalizedBase}${normalizedUrl}`;
|
package/dist/index.mjs
CHANGED
@@ -167,10 +167,10 @@ function withoutLang(path, langs) {
|
|
167
167
|
const langRegexp = new RegExp(`^\\/(${langs.join("|")})`);
|
168
168
|
return addLeadingSlash(path.replace(langRegexp, ""));
|
169
169
|
}
|
170
|
-
function withoutBase(path, base
|
170
|
+
function withoutBase(path, base) {
|
171
171
|
return addLeadingSlash(path).replace(normalizeSlash(base), "");
|
172
172
|
}
|
173
|
-
function withBase(url
|
173
|
+
function withBase(url, base) {
|
174
174
|
const normalizedUrl = addLeadingSlash(url);
|
175
175
|
const normalizedBase = normalizeSlash(base);
|
176
176
|
return normalizedUrl.startsWith(normalizedBase) ? normalizedUrl : `${normalizedBase}${normalizedUrl}`;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/shared",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.38.0",
|
4
4
|
"types": "./dist/index.d.ts",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/index.mjs",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
}
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@rsbuild/core": "~1.1.
|
45
|
+
"@rsbuild/core": "~1.1.9",
|
46
46
|
"chalk": "5.3.0",
|
47
47
|
"execa": "5.1.1",
|
48
48
|
"fs-extra": "11.2.0",
|
@@ -55,7 +55,7 @@
|
|
55
55
|
"@types/jest": "~29.5.14",
|
56
56
|
"@types/lodash-es": "^4.17.12",
|
57
57
|
"@types/node": "^18.11.17",
|
58
|
-
"@types/react": "^18.3.
|
58
|
+
"@types/react": "^18.3.14",
|
59
59
|
"medium-zoom": "1.1.0",
|
60
60
|
"rimraf": "^3.0.2",
|
61
61
|
"typescript": "^5.5.3"
|