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

chore: add repository directory for all packages.json #560

Merged
merged 1 commit into from Oct 14, 2021
Merged

chore: add repository directory for all packages.json #560

merged 1 commit into from Oct 14, 2021

Conversation

iamandrewluca
Copy link
Contributor

If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives:

"repository": {
  "type" : "git",
  "url" : "https://github.com/facebook/react.git",
  "directory": "packages/react-dom"
}

https://docs.npmjs.com/cli/v6/configuring-npm/package-json#repository

I use a lot https://njt.vercel.app/ to jump to different packages information,
and with this PR we can know exactly what package in what folder lives

Made the changes with a script to make it easier 🙂

https://gist.github.com/iamandrewluca/5cc85b56a595056f0099d04ed6dd8a79

> If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives:
> ```json
> "repository": {
>   "type" : "git",
>   "url" : "https://github.com/facebook/react.git",
>   "directory": "packages/react-dom"
> }
> ```
> — https://docs.npmjs.com/cli/v6/configuring-npm/package-json#repository

I use a lot https://njt.vercel.app/ to jump to different packages information,
and with this PR we can know exactly what package in what folder lives

Made the changes with a script to make it easier 🙂

https://gist.github.com/iamandrewluca/5cc85b56a595056f0099d04ed6dd8a79
@codecov-commenter
Copy link

Codecov Report

Merging #560 (a02e17d) into master (9f91ac4) will decrease coverage by 0.21%.
The diff coverage is 91.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #560      +/-   ##
==========================================
- Coverage   93.95%   93.74%   -0.22%     
==========================================
  Files          32       32              
  Lines         711      719       +8     
  Branches      167      174       +7     
==========================================
+ Hits          668      674       +6     
- Misses         12       13       +1     
- Partials       31       32       +1     
Impacted Files Coverage Δ
...ckages/casl-prisma/src/prisma/PrismaQueryParser.ts 93.84% <75.00%> (-1.07%) ⬇️
packages/casl-mongoose/src/accessible_records.ts 80.00% <88.88%> (-5.19%) ⬇️
packages/casl-ability/src/utils.ts 95.23% <91.30%> (-0.82%) ⬇️
packages/casl-ability/src/RuleIndex.ts 94.87% <95.23%> (+0.42%) ⬆️
packages/casl-ability/src/structures/LinkedItem.ts 100.00% <100.00%> (ø)
packages/casl-angular/src/AbilityModule.ts 100.00% <100.00%> (ø)
packages/casl-angular/src/pipes.ts 100.00% <100.00%> (+4.16%) ⬆️
packages/casl-mongoose/src/accessible_fields.ts 95.23% <100.00%> (ø)
packages/casl-mongoose/src/mongo.ts 100.00% <100.00%> (ø)
...ges/casl-prisma/src/prisma/interpretPrismaQuery.ts 97.61% <100.00%> (-0.11%) ⬇️
... and 2 more

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 74fc248...a02e17d. Read the comment docs.

@stalniy
Copy link
Owner

stalniy commented Oct 14, 2021

Awesome, thank you!

However, it needs to be a fix or even feat because it's an addition. Otherwise, semantic-release won't allow me to release a new version. I will change the commit message

@stalniy stalniy merged commit 0ef534c into stalniy:master Oct 14, 2021
@iamandrewluca iamandrewluca deleted the package-json-repository-directory branch October 14, 2021 18:41
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.

None yet

3 participants