Open source projects like @codemod-utils
live on your words of encouragement and contribution. Please give feedback, report issues, or submit pull requests!
Here are some guidelines to help you and everyone else.
Install dependencies
-
Fork and clone this repo.
git clone git@github.com:<your-github-handle>/codemod-utils.git
-
Change directory.
cd codemod-utils
-
Use
pnpm
to install dependencies.pnpm install
Lint files
-
When you write code, please check that it meets the linting rules.
# From the workspace root pnpm lint
-
You can run
lint:fix
to automatically fix linting errors.# From the workspace root pnpm lint:fix
Run tests
-
When you write code, please check that all tests continue to pass.
# From the workspace root pnpm test
Add changeset to pull request
-
To record how a pull request affects packages, you will want to add a changeset.
The changeset provides a summary of the code change. It also describes how package versions should be updated (major, minor, or patch) as a result of the code change.
# From the workspace root pnpm changeset
Publish packages (for admins)
-
Generate a personal access token in GitHub, with
repo
andread:user
scopes enabled. This token will be used to retrieve pull request information. -
Run the
release:prepare
script. This removes changesets, updates package versions, and updatesCHANGELOG
s.# From the workspace root GITHUB_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> pnpm release:prepare
Note,
release:prepare
also updated the workspace root's version (e.g. from0.1.1
to0.1.2
). We will use it to name the tag that will be published. -
Review the file changes. Commit them in a branch, then open a pull request to merge the changes to the
main
branch.# From the workspace root git checkout -b tag-0.1.2 git add . git commit -m "Tagged 0.1.2" git push origin tag-0.1.2
-
Create a tag and provide release notes. The tag name should match the workspace root's version (e.g.
0.1.2
). -
Publish the packages.
# From the workspace root pnpm release:publish
If you haven't before, I encourage you to watch Sean Massa's mini-talk on what it means to be a contributor. To sum up the talk, you can be a contributor in many ways. I want you to discover a path that meets your goals well!
Here are some suggestions to help you start:
Give feedback 💞
-
An open source project's value comes from people using the code and extending it to make greater things. Let me know how you use
@codemod-utils
in your codemod! -
You can create an issue to:
- Share how you used
@codemod-utils
- Share what you liked or didn't like about
@codemod-utils
- Share how you used
Help with marketing 📢
-
Platforms include:
- Blog post
- GitHub star
- Meetup or conference talk
- Social media
- Word of mouth
Join this project 👩💻👨💻
-
Help me maintain the project! I have limited time and there is much that I don't know.
- Cut releases
- Research new ways to implement codemods
- Respond to issues
- Review pull requests
Make issues 📝
-
In addition to sharing feedback (described in
Give feedback
), you can create an issue to:- Ask for better documentation
- Ask for new feature or refactor
- Report bug
- Report outdated dependency
-
When reporting a bug, please provide details to help me understand what's going on. If possible, please use the latest version of
@codemod-utils
and set up a public demo that I (and others) can check the code.
💡 Have ideas for contribution? Reach out to @ijlee2
on Discord!