Skip to content

fix(pnpm-policy): build workspace deps in CI, and tidy the generated block - #109

Merged
pyramation merged 1 commit into
mainfrom
fix/pnpm-policy-generated-output
Aug 5, 2026
Merged

fix(pnpm-policy): build workspace deps in CI, and tidy the generated block#109
pyramation merged 1 commit into
mainfrom
fix/pnpm-policy-generated-output

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Three fixes, all found by running the thing for real — the refresh workflow on main, and generating constructive-db's policy locally.

The workflow failed on its first run: pnpm --filter pnpm-policy run build builds only that package, so tsc hit Cannot find module 'yamlize'. ... pulls in workspace dependencies:

-run: pnpm --filter pnpm-policy run build
+run: pnpm --filter 'pnpm-policy...' run build

Verified from a clean state (rm -rf the three dist/ dirs first), which is what a CI checkout looks like.

Subject-verb agreement in the generated comment — one maintainer reads "what pyramation publish on npm".

A blank line before an appended key. A managed key that does not already exist is appended to the end of the file, and its comment block landed flush against whatever the last line was:

  graphile-build: 5.0.2
# Exempt from the wait: 6 scope glob(s), 70 first-party package(s).
minimumReleaseAgeExclude:

yaml models that separation as spaceBefore on the node, not as part of the comment text, so a '\n…' prefix is silently dropped. yamlize now translates the prefix:

function splitSpaceBefore(text: string) {
  return text.startsWith('\n') ? { spaceBefore: true, text: text.slice(1) } : { spaceBefore: false, text };
}

and applyPolicy asks for it on every top-level managed key. Idempotency holds (existing test) and the new test asserts no triple newline, so a re-generate does not accumulate blank lines.

Tests: yamlize 42, pnpm-policy 72.

Link to Devin session: https://app.devin.ai/sessions/ffa3b012deac4eb7afb8f49a9af9f9ca
Requested by: @pyramation

…block

The refresh workflow built pnpm-policy without yamlize, so tsc could not
resolve it. Two cosmetic fixes found by generating constructive-db's policy
for real: subject-verb agreement for a single maintainer, and a blank line
before an appended key, which otherwise lands flush against the last line of
the file it was patched into.
@pyramation pyramation self-assigned this Aug 5, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation
pyramation merged commit 3bdc96c into main Aug 5, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant