From 576c4dd4bb8693e9017b688dc5a1344584030321 Mon Sep 17 00:00:00 2001 From: delangle Date: Wed, 28 Feb 2024 10:47:10 +0100 Subject: [PATCH] [core] Remove grid folder from getComponentInfo RegExp --- scripts/buildApiDocs/chartsSettings/getComponentInfo.ts | 4 ++-- scripts/buildApiDocs/gridSettings/getComponentInfo.ts | 4 ++-- scripts/buildApiDocs/pickersSettings/getComponentInfo.ts | 4 ++-- scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts b/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts index 20991387b4dcb..5a0e2d103951e 100644 --- a/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts @@ -64,12 +64,12 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, + /\/packages\/(.+?)?\/src\/.*/, (match, dash, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, ); diff --git a/scripts/buildApiDocs/gridSettings/getComponentInfo.ts b/scripts/buildApiDocs/gridSettings/getComponentInfo.ts index 62b495ebaa780..e1540a5905583 100644 --- a/scripts/buildApiDocs/gridSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/gridSettings/getComponentInfo.ts @@ -50,12 +50,12 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, + /\/packages\/(.+?)?\/src\/.*/, (match, dash, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, ); diff --git a/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts b/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts index a40e71771a115..a7d97df4b6873 100644 --- a/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts @@ -66,12 +66,12 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, + /\/packages\/(.+?)?\/src\/.*/, (match, dash, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, ); diff --git a/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts b/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts index 89800438bbac9..d2e990b8c2f90 100644 --- a/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts @@ -64,12 +64,12 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, + /\/packages\/(.+?)?\/src\/.*/, (match, dash, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, );