🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@rspress/shared

Package Overview
Dependencies
Maintainers
1
Versions
704
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rspress/shared - npm Package Compare versions

Comparing version

to
2.0.0-alpha-canary-202504162001

12

dist/index.d.ts

@@ -364,2 +364,9 @@ import type { loadConfig } from '@rsbuild/core';

/**
* match the sidebar key in user config
* @param pattern /zh/guide
* @param currentPathname /base/zh/guide/getting-started
*/
export declare const matchSidebar: (pattern: string, currentPathname: string, base: string) => boolean;
export declare const MDX_OR_MD_REGEXP: RegExp;

@@ -454,2 +461,3 @@

content: string;
flattenContent?: string;
_html: string;

@@ -631,2 +639,6 @@ frontmatter: FrontMatterMeta;

/**
* Callback after routeService generated
*/
routeServiceGenerated?: (routeService: any, isProd: boolean) => Promise<void> | void;
/**
* Add addition ssg routes, for dynamic routes.

@@ -633,0 +645,0 @@ */

15

dist/index.js

@@ -45,2 +45,3 @@ "use strict";

isSCM: ()=>isSCM,
matchSidebar: ()=>matchSidebar,
addTrailingSlash: ()=>addTrailingSlash,

@@ -58,3 +59,3 @@ normalizeSlash: ()=>normalizeSlash,

isDataUrl: ()=>isDataUrl,
cleanUrl: ()=>runtime_utils_cleanUrl
cleanUrl: ()=>utils_cleanUrl
});

@@ -105,3 +106,3 @@ const QUERY_REGEXP = /\?.*$/s;

const isDevDebugMode = ()=>'rspress-dev' === process.env.DEBUG;
const runtime_utils_cleanUrl = (url)=>url.replace(HASH_REGEXP, '').replace(QUERY_REGEXP, '');
const utils_cleanUrl = (url)=>url.replace(HASH_REGEXP, '').replace(QUERY_REGEXP, '');
function slash(str) {

@@ -220,2 +221,10 @@ return str.replace(/\\/g, '/');

}
const matchSidebar = (pattern, currentPathname, base)=>{
const prefix = withBase(pattern, base);
if (prefix === currentPathname) return true;
const prefixWithTrailingSlash = addTrailingSlash(prefix);
if (currentPathname.startsWith(prefixWithTrailingSlash)) return true;
const prefixWithDot = `${prefix}.`;
return currentPathname.startsWith(prefixWithDot);
};
exports.APPEARANCE_KEY = __webpack_exports__.APPEARANCE_KEY;

@@ -238,2 +247,3 @@ exports.DEFAULT_HIGHLIGHT_LANGUAGES = __webpack_exports__.DEFAULT_HIGHLIGHT_LANGUAGES;

exports.isSCM = __webpack_exports__.isSCM;
exports.matchSidebar = __webpack_exports__.matchSidebar;
exports.normalizeHref = __webpack_exports__.normalizeHref;

@@ -271,2 +281,3 @@ exports.normalizePosixPath = __webpack_exports__.normalizePosixPath;

"isSCM",
"matchSidebar",
"normalizeHref",

@@ -273,0 +284,0 @@ "normalizePosixPath",

@@ -384,2 +384,3 @@ import type { MdxJsxAttribute } from 'mdast-util-mdx-jsx';

content: string;
flattenContent?: string;
_html: string;

@@ -501,2 +502,6 @@ frontmatter: FrontMatterMeta;

/**
* Callback after routeService generated
*/
routeServiceGenerated?: (routeService: any, isProd: boolean) => Promise<void> | void;
/**
* Add addition ssg routes, for dynamic routes.

@@ -503,0 +508,0 @@ */

2

package.json
{
"name": "@rspress/shared",
"version": "2.0.0-alpha.11",
"version": "2.0.0-alpha-canary-202504162001",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

Sorry, the diff of this file is not supported yet