Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yarn commit into script instead of use git commit #2774

Merged
merged 5 commits into from
Oct 13, 2022

Conversation

tianyingchun
Copy link
Contributor

  1. fix wrong package.jsonn main configuration for eslint-config-bases
    Does it support NodeNext .mjs, .mts ? #2763 (comment)
  2. add cz hook git commit using yarn commit instead to standarize commit data.

@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2022

🦋 Changeset detected

Latest commit: 9a7257f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@your-org/eslint-config-bases Patch
remix-app Patch
vite-app Patch
@your-org/core-lib Patch
@your-org/ui-lib Patch
nextjs-app Patch

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

@vercel
Copy link

vercel bot commented Oct 11, 2022

Someone is attempting to deploy a commit to a Personal Account owned by @belgattitude on Vercel.

@belgattitude first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
monorepo-nextjs-app ✅ Ready (Inspect) Visit Preview Oct 12, 2022 at 3:21PM (UTC)
monorepo-vite-app ✅ Ready (Inspect) Visit Preview Oct 12, 2022 at 3:21PM (UTC)

@codeclimate
Copy link

codeclimate bot commented Oct 11, 2022

Code Climate has analyzed commit 9a7257f and detected 0 issues on this pull request.

View more on Code Climate.

@ghost
Copy link

ghost commented Oct 11, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@belgattitude
Copy link
Owner

Nice I'm new to commitizen. Can you clarify how it compares to the installed conventional commilint ?

I'm open to do a change here. But only if we also remove the existing conventional commit (package/config/adapt husky hook on pre commit)

@tianyingchun
Copy link
Contributor Author

  1. husky focus on git hooks
  2. it better combine husky prepare-commmit-msg hooks to standard git commit message
  3. How to get Commit to define whether it was bug fix , feature added , Major changes or Minor Patch as below picture show

image

the workflow is:
  1. cz-convention-changelog adapter
  2. husky and commitlint (checks for lint in your commit message)
  3. prettier and lint-staged(which runs lint against staged git files)
  4. commitizen
  5. Save it these package to devDependency of your package.json
  6. Adds config.commitizen key to the root of your package.json

as above commit, you can try

  1. git add .
  2. git commit -m="something"
  3. it will show above picture inquier box interaction for developer.
  4. pass commit message to git

@belgattitude
Copy link
Owner

belgattitude commented Oct 12, 2022

Very nice !

CI fail for duplicate deps, could I ask you one last thing: run yarn dedupe and commit the updated yarn.lock. https://github.com/belgattitude/nextjs-monorepo-example/actions/runs/3231571191/jobs/5293288406. In case you might have to update from latest main (I'm not sure)

From there I can go on with remaining steps

PS:

Some notes just to be sure you're aware (when I wrote the last command I was on my phone). The reason I ask is that I wouldn't like to have two tools doing the same thing (and possibly compete).

The current tool used in this repo is https://github.com/conventional-changelog/commitlint and is called on husky commit-msg

Lint-staged is run from the husky pre-commit.

There's nothing in pre-push (on small repos it makes sense to run typecheck, but in bigger repo it's perceived as slow)

So the idea if we move to commitizen

  • Remove commitlint deps
  • Be sure don't prevent changesets to operate 'commit' in the release action (I guess so, but I can fix afterward)
  • Be sure we're in control of tasks that will be run by the tool at each step

Copy link
Owner

@belgattitude belgattitude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few questions ?

.husky/prepare-commit-msg Show resolved Hide resolved
package.json Show resolved Hide resolved
@tianyingchun
Copy link
Contributor Author

Some notes just to be sure you're aware (when I wrote the last command I was on my phone). The reason I ask is that I wouldn't like to have two tools doing the same thing (and possibly compete).

it seems that we can remove [commitlint](https://github.com/conventional-changelog/commitlint) use pre-commit-msg hook instead?

@belgattitude
Copy link
Owner

it seems that we can remove commitlint use pre-commit-msg hook instead?

I don't know enough the difference between the two tools in term of maintenance and long term usage. But yes let's do that.

I propose this:

  • Let's merge this 'as is'... (There's some conflicts with the branch, could you update with latest main ? and run yarn dedupe right after)

Once done, I'll create another PR to remove commilint and find a hack for windows (or you if you want)

@tianyingchun
Copy link
Contributor Author

have udpate latest main and merged

@belgattitude
Copy link
Owner

Thx I'll merge tomorrow.

@belgattitude
Copy link
Owner

@tianyingchun Thanks for your P/R. I've merged it.

Unfortunately I had to revert back the commitizen changes in #2784.

Not saying commitizen is "bad", it's more that it needs more work to be included in this example. So feel free to open a new P/R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants