Skip to content

Commit

Permalink
chore: Add directory to package.json (#9456)
Browse files Browse the repository at this point in the history
* chore: Add directory to package.json

* fix: run fmt

* fix: undo formatting
  • Loading branch information
RiskyMH authored Apr 25, 2023
1 parent 8153ca9 commit 1b4d34c
Show file tree
Hide file tree
Showing 22 changed files with 45 additions and 21 deletions.
3 changes: 2 additions & 1 deletion apps/guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "apps/guide"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "apps/website"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/actions"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/api-extractor-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/api-extractor-utils"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/brokers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/brokers"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/builders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/builders"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/collection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/collection"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"keywords": [],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/core"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/discord.js"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/docgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/docgen"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/formatters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"keywords": [],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/formatters"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"keywords": [],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/next"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/proxy-container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/proxy-container"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/proxy"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/rest"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/scripts"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 3 additions & 0 deletions packages/scripts/src/createPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export async function createPackage(packageName: string, packageDescription?: st
// Edit changelog script
packageJSON.scripts.changelog = packageJSON.scripts.changelog.replace('{name}', packageName);

// Edit repository directory
packageJSON.repository.directory = packageJSON.repository.directory.replace('{name}', packageName);

// Create package.json
await writeFile(`package.json`, JSON.stringify(packageJSON, null, 2));

Expand Down
3 changes: 2 additions & 1 deletion packages/scripts/src/template/template.package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"keywords": [],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/{name}"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"keywords": [],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/ui"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/util"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/voice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/voice"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/discordjs/discord.js.git"
"url": "https://github.com/discordjs/discord.js.git",
"directory": "packages/ws"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
Expand Down

2 comments on commit 1b4d34c

@vercel
Copy link

@vercel vercel bot commented on 1b4d34c Apr 25, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 1b4d34c Apr 25, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.