fix(pnpm-policy): build workspace deps in CI, and tidy the generated block - #109
Merged
Conversation
…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.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 buildbuilds only that package, sotschitCannot find module 'yamlize'....pulls in workspace dependencies:Verified from a clean state (
rm -rfthe threedist/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:
yamlmodels that separation asspaceBeforeon the node, not as part of the comment text, so a'\n…'prefix is silently dropped. yamlize now translates the prefix:and
applyPolicyasks 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