chore: shrink the npm patch to the README gap - #224
Merged
Conversation
Generator 0.38.10 routes packageIdentity into the launcher's package.json. description, license, keywords, homepage and author now come through on their own, which was the part that mattered -- dependency scanners reject unlicensed packages, and 1.1.0 shipped as "License: none" because of this. What it still does not do is ship the README. `files` lists only "bin/", and npm packs a README only when it sits beside package.json, so the package page renders blank. The patch is reduced to that: one `files` entry and the copy step that was already separate. The old anchor carried the whole metadata block, so the script aborted on the 1.2.0 regeneration rather than silently skipping -- working as designed, but the anchor had to follow upstream. Also records in the docstring that custom.rs now ships in the generated .fernignore; the entry stays in FERNIGNORE because that patch rewrites the whole file. Exercised against four trees: raw 0.38.10 output applies all three patches; a Fern Replay-processed branch reports every one already applied; a second run on the same tree is a no-op; and a tree with a deliberately mangled `files` line still aborts loudly.
josephfeleke
approved these changes
Sep 1, 2026
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.
Shrinks the npm patch in
post-regen-patch.pyto what 0.38.10 still leaves undone.Fern fixed most of item 2
The generator now routes
packageIdentityinto the launcher'spackage.json. Proof from the1.2.0 regeneration, comparing the raw generator commit against the Fern Replay commit — this is
the generator's own output, before any of our patches:
That was the part that mattered. 1.1.0 shipped as License: none because of this gap, and
dependency scanners reject unlicensed packages.
What remains
The generator emits
"files": ["bin/"]. npm packs a README only when it sits besidepackage.json, so without both thefilesentry and the copy step the package page rendersblank. The patch is now exactly that.
Why the script aborted
The old anchor spanned the whole metadata block, which upstream now writes itself — so the
anchor matched zero times and the script stopped:
That is the designed behaviour — fail loudly rather than skip — but the anchor had to follow
upstream. Also recorded in the docstring:
custom.rsnow ships in the generated.fernignore.The entry stays in
FERNIGNOREbecause that patch rewrites the whole file, so dropping it wouldremove protection the generator adds on its own.
Verification
Exercised against four trees:
filesline deliberately mangledThe 1.2.0 generated PR is agentmail-to/agentmail-cli#49;
running this script against it is a no-op, confirming Replay carried the hand-edits correctly.