fix(create-mud): include .gitignore files in created projects#1945
Merged
Conversation
🦋 Changeset detectedLatest commit: 56e7f9b The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Author
|
It seems that pnpm downgraded npm-packlist last week due to a performance issue, which means the latest version of pnpm includes the .gitignore files without this change. However, I believe this new approach is more stable. |
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.
This Pull Request resolves #1865, where projects created by
create-mudare missing.gitignorefiles, specifically in versions2.0.0-next.13and2.0.0-next.14.The cause is an update in
npm-packlist, used during the npm package publishing process to list target package files. The MUD's release commandchangeset publishrelies onnpm-packlistthroughpnpm publish.The previous version of
npm-packlistincluded.gitignorefiles by respecting the.npmignorefile, but the latest version doesn't. This change is not documented in its changelog, but based on this issue's comment, it seems better not to expect.gitignorefiles to be included.This PR addresses this issue by utilizing
create-create-app's feature for handling.gitignore. During the build process ofcreate-mud,.gitignorefiles are renamed togitignore, ensuring their inclusion in the package. When thecreate-mudcli is executed,create-create-appautomatically renames thosegitignorefiles back to.gitignorefor project creation.To test the fix, you can run
pnpm build && dist/cli.js test-project.Reference: #336
Testing the
npm-packlistbehavior:To observe the behavior change in
npm-packlist, we can usepnpm packornpm packwithout the changes from this PR.