fix: add prepack script to generate lib/ before publishing#260
Open
gin0606 wants to merge 2 commits intosquare:masterfrom
Open
fix: add prepack script to generate lib/ before publishing#260gin0606 wants to merge 2 commits intosquare:masterfrom
gin0606 wants to merge 2 commits intosquare:masterfrom
Conversation
Yarn Berry does not automatically run the `prepare` script during `yarn pack`. Add `prepack` script to explicitly run `bob build`, ensuring the `lib/` directory is generated before the tarball is created. Fixes square#259
Author
|
Hi @mansi-square @plinio-square @Charmis-Square 👋 I'd like to kindly request a review of this PR. This fix addresses a critical issue where the published v2.0.0 package is missing the Since this is a small, low-risk change (adding a Please let me know if there's anything I can do to help move this forward. Thanks! |
|
@mansi-square @plinio-square @Charmis-Square can we please get attention here? |
|
any suggested fix in the meantime? |
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
Yarn Berry does not automatically run the
preparescript duringyarn pack. This causes thelib/directory (generated bybob build) to be missing from the published npm package, resulting in the error:This PR adds a
prepackscript that explicitly runsbob buildbefore the tarball is created, ensuring thelib/directory is included in the published package.Note: This PR is based on
v2.0.0tag and includes commit 3b19f0e ("update publish pipeline") which was not merged to master.Related issues
Fix #259
Changelog
lib/directory in published npm package by addingprepackscriptTest Plan
yarn packand verify thatlib/directory is included in the generated tarballlib/module/index.jsandlib/typescript/src/index.d.ts