GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — chore: derive the workspace layout from pnpm-workspace.yaml only by sangwook-dev · Pull Request #3752 · meta/astryx Conversation
Contributor
What
Four scripts already walked the
This extracts the shared walk into Two bugs fixed on the wayThe copied regex was over-matching. Five globs where the file declares four. Harmless only because
Verification
Note
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
sangwook-dev
requested review from
cixzhang,
ejhammond,
imdreamrunner,
josephfarina,
marie-lucas,
nynexman4464,
thedjpetersen and
vjeux
as code owners
|
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7f4c7eb to
2583388
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Maintainer judgment recommended — the change itself looks clean, but the branch has a merge conflict with main and can't be merged as-is.
Initial review pass (community contributor).
Blocking (mechanical): rebase needed. main has moved under this branch — both package.json and apps/docsite/scripts/generate-data.mjs were changed upstream after the branch point, and the PR reports CONFLICTING. Please rebase on latest origin/main and re-push; the review can't clear a branch that won't merge.
On the change itself (looks good): consolidating the four copied workspace-walking loops into scripts/lib/workspace-globs.mjs and dropping the redundant root package.json workspaces array is a solid cleanup. Two things I verified:
packages: parser correctly scopes to that block, fixing the prior regex that over-matched entries from minimumReleaseAgeExclude/overrides/allowBuilds.throw-on-empty guard in readWorkspaceGlobs closes the silent-empty failure mode in generate-data.mjs.pkg.workspaces readers (packages/cli/src/utils/paths.mjs, scripts/verify-exports.mjs) are unaffected — findProjectRoot has no callers and verify-exports walks packages/ directly.Please confirm the post-rebase verification still holds (discoverPackageDirs() → same 13 dirs; docsite generate-data byte-identical summary) since the conflict is in exactly those two files.
Recap — #3752 · chore: derive the workspace layout from pnpm-workspace.yaml only · @Han5991
What it does: makes pnpm-workspace.yaml the single source of truth for the workspace layout, extracting the shared glob-walk into one helper and removing the duplicated workspaces array.
Recommendation: Rebase on main to resolve the conflict, then re-review. No objections to the change on its merits.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Four scripts already walked the `packages:` globs in pnpm-workspace.yaml,
each with its own copy of the same loop — setup-trusted-publishing.mjs even
apologizes for it ("Ported from check-changesets.mjs, which is NOT exported,
so it is copied here"). apps/docsite/scripts/generate-data.mjs was the lone
holdout, reading the root package.json `workspaces` array instead.
Extract the shared walk into scripts/lib/workspace-globs.mjs, point all five
at it, and drop the now-unused `workspaces` array from the root package.json.
Fixes a latent bug in the copied regex. `/^\s*-\s*["']?([^"'\n]+)["']?/gm`
swept the whole file, not just the `packages:` block, so it also picked up
`minimumReleaseAgeExclude`'s `@astryxdesign/*` — five globs where the file
declares four. It was harmless only because `@astryxdesign/` is not a real
directory and got skipped by a downstream existsSync. Any future list item
that happens to name one would have been walked as a workspace root. The
replacement is line-based and scoped to the `packages:` block.
generate-data.mjs also lost its silent-empty failure mode. `rootPkg.workspaces
|| []` meant a missing array produced an empty registry, no exception, and a
docsite build that shipped zero components. readWorkspaceGlobs() throws.
Verified:
- discoverPackageDirs() returns the same 13 directories before and after.
- `node apps/docsite/scripts/generate-data.mjs` prints a byte-identical
summary on this branch and on main (8 packages, 219 components, 582
blocks, 40 templates, 18 doc topics, 3 blog posts, 6 themes).
- check-changesets, format-changelogs --check, check-package-boundaries,
and format-changelogs.test.mjs (8 tests) all pass.
- `pnpm install --frozen-lockfile` still resolves all 26 workspace projects,
and @manypkg (what changesets uses) still reports tool=pnpm with 25
packages, so removing the array does not affect the release tooling.
2583388 to
666efaf
Compare
|
Rebased on latest The conflict was semantic, not just textual: #3858 landed
Post-rebase verification (as requested):
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR Analysis ReportNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | View full report |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
666efaff
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.