Coder Social home page Coder Social logo

Husky workflow mistakes about dtaas HOT 8 CLOSED

prasadtalasila avatar prasadtalasila commented on May 27, 2024
Husky workflow mistakes

from dtaas.

Comments (8)

prasadtalasila avatar prasadtalasila commented on May 27, 2024

@ravvnen , it might be worthwhile to add husky git hooks to lib microservice as well.

from dtaas.

prasadtalasila avatar prasadtalasila commented on May 27, 2024

Commit ade0558 resolves the issue of installing npm packages in client/ before running husky git hooks. But this is not the same as having husky at top-level.

from dtaas.

Omarley7 avatar Omarley7 commented on May 27, 2024

@prasadtalasila husky was triggered by modified: client/README.md. I've modified our hooks in commit bfe04a0, so it only looks in code-related directories. This is also part of the next PR, which I'll create later today.

from dtaas.

prasadtalasila avatar prasadtalasila commented on May 27, 2024

@prasadtalasila husky was triggered by modified: client/README.md. I've modified our hooks in commit bfe04a0, so it only looks in code-related directories. This is also part of the next PR, which I'll create later today.

It makes sense to let husky run through all the files in client/. We can always put in linters for non-code files later. The real problem to solve is not to bind husky to yarn commands. I can't think of a way to run yarn commands in git hooks without at least yarn install. That's why yarn install was put into the husky script.

from dtaas.

prasadtalasila avatar prasadtalasila commented on May 27, 2024

Copied from issue #24:

The husky git hooks are currently working for client because of the husky npm package in client/package.json. Can we make husky work by putting it at the root level and still not having package.json at the root?
One obvious solution is to copy husky.sh into .husky directory at the root of the project. In this case, we are pushing the husky.sh script into the code base instead of bringing it in via npm. An npm package keeps semantic version, but we pushing a script into the code base doesn't. So, the versioning goes out the window. Is there a better solution?

The git-hooks.bash is a good idea. We can perhaps keep them in .hooks directory and have git-hooks.bash copy them into .git/hooks on the developer machine. If this takes less than half a day, please finish it. Otherwise, let's copy husky.sh into .husky directory and move on for now. If you decide to use the husky hack, please open an issue and copy our discussion to that issue so that we don't forget it. Thanks.

@Omarley7 , I've added a bit more description to the versioning problem. Does it help?

from dtaas.

Omarley7 avatar Omarley7 commented on May 27, 2024

Ooohh that explains it haha. Then I've been working on the wrong problem. Do you want me to revert the changes to the hooks in #37, so it will run on any change in the client directory like before?

from dtaas.

prasadtalasila avatar prasadtalasila commented on May 27, 2024

Ooohh that explains it haha. Then I've been working on the wrong problem. Do you want me to revert the changes to the hooks in #37, so it will run on any change in the client directory like before?

please revert

from dtaas.

prasadtalasila avatar prasadtalasila commented on May 27, 2024

PR #37 resolves this problem.

from dtaas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.