diff --git a/bin/check-package-metadata.js b/bin/check-package-metadata.js index da4260559946..41235096fa15 100644 --- a/bin/check-package-metadata.js +++ b/bin/check-package-metadata.js @@ -44,7 +44,7 @@ async function checkMonorepoFile(packages, rootPath) { const monorepoFile = await fs.readFile('docs/site/MONOREPO.md', 'utf8'); for (const p of packages) { - const packagePath = path.relative(rootPath, p.location); + const packagePath = path.relative(rootPath, p.location).replace(/\\/g, '/'); const packageExists = monorepoFile.includes(p.name) || monorepoFile.includes(packagePath); @@ -73,7 +73,7 @@ async function checkCodeOwnersFile(packages, rootPath) { continue; } - const packagePath = path.relative(rootPath, p.location); + const packagePath = path.relative(rootPath, p.location).replace(/\\/g, '/'); if (!codeOwnersFile.includes(packagePath)) { errors.push(`${p.name} is not added in the CODEOWNERS.md file`); diff --git a/bin/update-monorepo-file.js b/bin/update-monorepo-file.js index 4c45018adcdf..ad76cbe61b53 100644 --- a/bin/update-monorepo-file.js +++ b/bin/update-monorepo-file.js @@ -19,7 +19,7 @@ const MONOREPO_FILE_DIST = 'docs/site'; const MONOREPO_FILE_NAME = 'MONOREPO.md'; function getPackageRelativeUri(pkg) { - return path.relative(pkg.rootPath, pkg.location); + return path.relative(pkg.rootPath, pkg.location).replace(/\\/g, '/'); } async function getSortedPackages() {