Skip to content

Commit

Permalink
chore: add repository directory for all packages.json (aws#17203)
Browse files Browse the repository at this point in the history
> 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


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
iamandrewluca authored and TikiTDO committed Feb 21, 2022
1 parent 35d2df3 commit c32a040
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/@aws-cdk/cfnspec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
},
"repository": {
"url": "https://github.com/aws/aws-cdk.git",
"type": "git"
"type": "git",
"directory": "packages/@aws-cdk/cfnspec"
},
"license": "Apache-2.0",
"author": {
Expand Down
7 changes: 5 additions & 2 deletions packages/cdk-dasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"types": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-cdk.git"
"url": "https://github.com/aws/aws-cdk.git",
"directory": "packages/cdk-dasm"
},
"bin": {
"cdk-dasm": "bin/cdk-dasm"
Expand Down Expand Up @@ -42,7 +43,9 @@
"cdk"
],
"nozem": {
"ostools": ["chmod"]
"ostools": [
"chmod"
]
},
"homepage": "https://github.com/aws/aws-cdk",
"engines": {
Expand Down
5 changes: 3 additions & 2 deletions packages/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-cdk.git"
"url": "https://github.com/aws/aws-cdk.git",
"directory": "packages/cdk"
},
"keywords": [
"aws",
Expand All @@ -35,7 +36,7 @@
"build+test+package": "npm run build+test && npm run package",
"build+test+extract": "npm run build+test",
"build+extract": "npm run build"
},
},
"engines": {
"node": ">= 8.10.0"
},
Expand Down

0 comments on commit c32a040

Please sign in to comment.