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

Support yarn v2 #702

Open
fifn2 opened this issue Feb 5, 2020 · 2 comments
Open

Support yarn v2 #702

fifn2 opened this issue Feb 5, 2020 · 2 comments

Comments

@fifn2
Copy link

fifn2 commented Feb 5, 2020

Yarn v2 has a new directory structure that doesn't involve modules. eslint-plugin-import was able to solve an issue like this quite easily by using createRequireFromPath instead of require.resolve.

@tonyfromundefined
Copy link

tonyfromundefined commented Jul 10, 2020

git-cz cli works for me in yarn-2.0.0-rc.36. below is my project setup.

Install

$ yarn add commitizen cz-lerna-changelog

package.json

{
  "config": {
    "commitizen": {
      "path": "cz-lerna-changelog"
    }
  }
}

Script

$ yarn git-cz

@kevin-lindsay-1
Copy link

kevin-lindsay-1 commented Apr 3, 2021

I think the docs should probably be updated to reflect this, but here's my current config with the newest version of husky:

package.json

{
  "config": {
    "commitizen": {
      "path": "cz-<your flavor>" // Notice the lack of ./node_modules
    }
  }
}

.husky/prepare-commit-msg

#!/bin/bash
exec < /dev/tty && yarn cz --hook || true # notice the lack of node_modules/.bin and instead using yarn

I would argue that if this is added to the docs, this issue should be closed.

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

No branches or pull requests

3 participants