Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Conversation

AminFazlMondo
Copy link
Contributor

The config reader is aware of the context of the directory that the package.json file is in and will search only the same directory.
This is useful in the context of monorepo where you want to run this with multiple different package.json file and their individula version of config file.

The config reader is aware of the context of the directory that the package.json file is in and will search only the same directory.
This is useful in the context of monorepo where you want to  run this with multiple different package.json file and their individula version of config file.
@AminFazlMondo AminFazlMondo changed the title Update config reader to work in mono repo Update config reader to work in monorepo May 3, 2021
@AminFazlMondo
Copy link
Contributor Author

@rumpl , Would you be able to have a look at this?

@rumpl
Copy link
Member

rumpl commented May 10, 2021

@AminFazlMondo 👋 sorry about that, I just started the CI and it seems red, could you take a look at it.

Also, I'm not sure I 100% understand what issue this fixes, could you show me some examples please?

Cheers

@AminFazlMondo
Copy link
Contributor Author

AminFazlMondo commented May 11, 2021

Thanks for the response @rumpl ,
I have made changes to fix linting issue of the pull request, hopefully should be passing now.

In regards to the context of the change, I have tried to use this useful package in our monorepos using lerna.

The package structure is

my-lerna-repo/
  package.json
  .depcheckrc.yaml
  packages/
    package-1/
      package.json
      .depcheckrc.yaml
    package-2/
      package.json
      .depcheckrc.yaml

As you can see, each of the packages has its own config file for depcheck, and we want to be able to run the same command without needing to change the working directory (ie, lerna run depcheck)

Hopefully that clarifies the reason behind this change, please let me know if you need more details

@AminFazlMondo sorry about that, I just started the CI and it seems red, could you take a look at it.

Also, I'm not sure I 100% understand what issue this fixes, could you show me some examples please?

Cheers

@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #631 (986ced3) into main (b92e569) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #631      +/-   ##
==========================================
+ Coverage   98.62%   98.62%   +0.01%     
==========================================
  Files          48       48              
  Lines        1009     1010       +1     
==========================================
+ Hits          995      996       +1     
  Misses         14       14              
Impacted Files Coverage Δ
src/utils/configuration-reader.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36c73d9...986ced3. Read the comment docs.

Copy link
Member

@rumpl rumpl left a comment

Choose a reason for hiding this comment

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

LGTM

@rumpl
Copy link
Member

rumpl commented May 11, 2021

Thank you @AminFazlMondo, that was a crystal clear explanation! 👍

@rumpl rumpl merged commit 01e3d0c into depcheck:main May 11, 2021
@rumpl
Copy link
Member

rumpl commented May 11, 2021

I just released version 1.4.1 that contains your changes, thanks a bunch

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

Successfully merging this pull request may close these issues.

2 participants