Skip to content

Commit d7c63b5

Browse files
committedFeb 20, 2025··
chore: add root package to workspace
1 parent 4a538fd commit d7c63b5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed
 

‎scripts/update-changelog.ts

+12-6
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,22 @@ export async function loadWorkspace(dir: string) {
138138

139139
const packages: Package[] = []
140140

141+
async function addWorkspace(dir: string) {
142+
const pkg = await loadPackage(dir)
143+
if (!pkg.data.name || pkg.data.private || ignoredPackages.includes(pkg.data.name)) {
144+
return
145+
}
146+
console.log(pkg.data.name)
147+
packages.push(pkg)
148+
}
149+
150+
await addWorkspace(dir)
151+
141152
for await (const pkgDir of fsp.glob(['packages/*'], { withFileTypes: true })) {
142153
if (!pkgDir.isDirectory()) {
143154
continue
144155
}
145-
const pkg = await loadPackage(join(pkgDir.parentPath, pkgDir.name))
146-
if (!pkg.data.name || ignoredPackages.includes(pkg.data.name)) {
147-
continue
148-
}
149-
console.log(pkg.data.name)
150-
packages.push(pkg)
156+
await addWorkspace(join(pkgDir.parentPath, pkgDir.name))
151157
}
152158

153159
const find = (name: string) => {

0 commit comments

Comments
 (0)
Please sign in to comment.