chore(repo): temporarily allow linking to vue (#19591)

This commit is contained in:
Jason Jean 2023-10-12 17:54:56 -04:00 committed by GitHub
parent 37e59418fb
commit 57247e0b81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,7 @@ const path = require('path');
module.exports = {
siteUrl: process.env.SITE_URL || 'https://nx.dev',
generateRobotsTxt: true,
exclude: ['/ai'],
exclude: [],
sourceDir: path.resolve(__dirname, '../../dist/nx-dev/nx-dev/.next'),
outDir: path.resolve(__dirname, '../../dist/nx-dev/nx-dev/public'),
};

View File

@ -97,6 +97,11 @@ function checkLinkIsForPrivatePackage(link: string) {
}
const pathSegments = link.split('/').filter(Boolean);
if (pathSegments[0] === 'nx-api') {
// TODO(v17): Remove this once vue is public or once this logic is fixed
if (pathSegments[1] === 'vue') {
return true;
}
const packageJsonPath = join(
workspaceRoot,
'packages',
@ -119,6 +124,7 @@ const sitemapLinks = readSiteMapIndex(
const errors: Array<{ file: string; link: string }> = [];
for (let file in documentLinks) {
for (let link of documentLinks[file]) {
// TODO(@isaacplmann): This ignores errors which are links TO private packages. It allows links FROM public packages (public docs) TO private packages (404 links)
if (
!sitemapLinks.includes(['https://nx.dev', link].join('')) &&
!checkLinkIsForPrivatePackage(link)