@rspress/shared 1.25.1 → 1.26.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.js +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -1128,7 +1128,13 @@ var DEFAULT_HIGHLIGHT_LANGUAGES = [
|
|
1128
1128
|
];
|
1129
1129
|
var isSCM = () => Boolean(process.env.BUILD_VERSION);
|
1130
1130
|
var isProduction = () => process.env.NODE_ENV === "production";
|
1131
|
-
var isDebugMode = () =>
|
1131
|
+
var isDebugMode = () => {
|
1132
|
+
if (!process.env.DEBUG) {
|
1133
|
+
return false;
|
1134
|
+
}
|
1135
|
+
const values = process.env.DEBUG?.toLocaleLowerCase().split(",") ?? [];
|
1136
|
+
return ["rsbuild", "builder", "*"].some((key) => values.includes(key));
|
1137
|
+
};
|
1132
1138
|
var cleanUrl = (url) => url.replace(HASH_REGEXP, "").replace(QUERY_REGEXP, "");
|
1133
1139
|
function slash(str) {
|
1134
1140
|
return str.replace(/\\/g, "/");
|
package/dist/index.mjs
CHANGED
@@ -1070,7 +1070,13 @@ var DEFAULT_HIGHLIGHT_LANGUAGES = [
|
|
1070
1070
|
];
|
1071
1071
|
var isSCM = () => Boolean(process.env.BUILD_VERSION);
|
1072
1072
|
var isProduction = () => process.env.NODE_ENV === "production";
|
1073
|
-
var isDebugMode = () =>
|
1073
|
+
var isDebugMode = () => {
|
1074
|
+
if (!process.env.DEBUG) {
|
1075
|
+
return false;
|
1076
|
+
}
|
1077
|
+
const values = process.env.DEBUG?.toLocaleLowerCase().split(",") ?? [];
|
1078
|
+
return ["rsbuild", "builder", "*"].some((key) => values.includes(key));
|
1079
|
+
};
|
1074
1080
|
var cleanUrl = (url) => url.replace(HASH_REGEXP, "").replace(QUERY_REGEXP, "");
|
1075
1081
|
function slash(str) {
|
1076
1082
|
return str.replace(/\\/g, "/");
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/shared",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.26.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": "0.
|
45
|
+
"@rsbuild/core": "1.0.0-alpha.6",
|
46
46
|
"chalk": "4.1.2",
|
47
47
|
"execa": "5.1.1",
|
48
48
|
"fs-extra": "11.2.0",
|