[feature request]run lerna script against staged-files
See original GitHub issueI would like to run lerna scripts against packages that have staged files. It similar to --since flag. I would recommend to add new filtered flag --staged (git diff --cached).
Expected Behavior
Run pre-commit git hook with husky using lint-staged package on packages that have staged files.
The command should looks like: lerna run pre-commit --staged
Current Behavior
There is not such possibility yet
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to use lint-staged in a lerna monorepo to run the same ...
So lerna will run the script lint-staged on all packages that has the script lint-staged added to scripts entry on their package.json files....
Read more >Run Tasks - Lerna
Run Tasks. Monorepos can have hundreds or even thousands of projects, so being able to run npm scripts against all (or some) of...
Read more >Create a monorepo with Lerna | by Damian Cyrus - Medium
Lint over Git staged files to have a check on files before they are committed. Add ESLint and lint-staged to all packages. In...
Read more >Managing Your Typescript Monorepo With Lerna and Codefresh
Setting up our Monorepo · Create Typescript Project · Create React Project · Make one package depend on the other · Testing ·...
Read more >lerna/npm-run-script
An internal Lerna tool. Latest version: 6.0.1, last published: 12 days ago. Start using @lerna/npm-run-script in your project by running ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The proposed
--since HEAD
solution will run the command on every package with changed files not staged ones. Could this be reopened and the feature request reconsidered?For the exact same use case, I was able to use
lerna run pre-commit --since HEAD
.You would place that in your root
package.json
config.This will only run the pre-commit script on packages that have staged changes within them.