Skip to content

Commit dfb7c08

Browse files
committed
fix(sync-docs-changelog): - resolve #948 (comment)
- resolve #948 (comment)
1 parent d4fdbf3 commit dfb7c08

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tools/sync-docs-changelog.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const path = require('path');
55

66
const ROOT = path.resolve(__dirname, '..');
77
const PACKAGES_DIR = path.join(ROOT, 'packages');
8+
const ORG_SCOPE = '@lit-protocol/';
89

910
function resolveDocsChangelogPaths() {
1011
const arg = process.argv.find((value) => value.startsWith('--docs='));
@@ -28,7 +29,6 @@ function resolveDocsChangelogPaths() {
2829

2930
candidates.push({ path: path.resolve(ROOT, 'docs', 'changelog.mdx'), allowCreate: false });
3031
candidates.push({ path: path.resolve(ROOT, '..', 'docs-v2', 'changelog.mdx'), allowCreate: false });
31-
candidates.push({ path: path.resolve(ROOT, '..', 'naga-doc', 'changelog.mdx'), allowCreate: false });
3232

3333
const resolved = [];
3434
const seen = new Set();
@@ -358,7 +358,9 @@ async function main() {
358358
}
359359

360360
const sections = parseReleaseSections(latest.content);
361-
const labelText = `${packageName.replace('@lit-protocol/', '')}`;
361+
const labelText = packageName.startsWith(ORG_SCOPE)
362+
? packageName.slice(ORG_SCOPE.length)
363+
: packageName;
362364
const label = escapeAttribute(labelText);
363365
let descriptionText = null;
364366
for (const section of sections) {
@@ -404,10 +406,10 @@ async function main() {
404406
}
405407

406408
const priorityNames = [
407-
'@lit-protocol/lit-client',
408-
'@lit-protocol/auth',
409-
'@lit-protocol/networks',
410-
'@lit-protocol/auth-services',
409+
`${ORG_SCOPE}lit-client`,
410+
`${ORG_SCOPE}auth`,
411+
`${ORG_SCOPE}networks`,
412+
`${ORG_SCOPE}auth-services`,
411413
];
412414
const priorityDirs = ['lit-client', 'auth', 'networks', 'auth-services'];
413415

0 commit comments

Comments
 (0)