From e3be6072fa6beff88d2125788ea5e08e1eca0c28 Mon Sep 17 00:00:00 2001 From: square Date: Fri, 9 Jul 2021 21:23:23 +0200 Subject: [PATCH 01/18] wip npm release --- .github/workflows/build.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e8da6d..6628428 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,20 +46,36 @@ jobs: - name: bump package version (pre-release) if: ${{ 'refs/heads/master' != github.ref }} + # TODO: use different --preid for every ref run: | git config --local user.email "actions@github.com" git config --local user.name "BDBuilder builder" npm version prerelease --preid preview -m "bump package version to %s" - - name: publish - id: publish + - name: publish to GH + id: publish-gh uses: JS-DevTools/npm-publish@v1 with: token: ${{ github.token }} access: public registry: https://npm.pkg.github.com - tag: latest + tag: latest # TODO: remove this tag for preview releases - name: push version change if: steps.publish.outputs.type != 'none' run: git push + + - name: patch package.json + run: | + node -e " + require('fs').writeFileSync(Object.assign(require('./package.json'), { + name: 'bdbuilder' + }));" + + - name: publish to NPM + id: publish + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + access: public + tag: latest # TODO: remove this tag for preview releases From 876352af2b33e79092b0bf66fe87adcf0e9b32a4 Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Fri, 9 Jul 2021 21:12:09 +0000 Subject: [PATCH 02/18] bump package version to 1.2.6-preview.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a56e943..93b894d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.5", + "version": "1.2.6-preview.0", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From 265ac4ce1a401e31220f3768ead64ad195439b21 Mon Sep 17 00:00:00 2001 From: square Date: Fri, 9 Jul 2021 23:13:57 +0200 Subject: [PATCH 03/18] fix? --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6628428..b55d01c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,9 +68,9 @@ jobs: - name: patch package.json run: | node -e " - require('fs').writeFileSync(Object.assign(require('./package.json'), { + require('fs').writeFileSync(JSON.stringify(Object.assign(require('./package.json'), { name: 'bdbuilder' - }));" + }), null, 2));" - name: publish to NPM id: publish From 9072a0d31bcc17a39cf1977991141d3d507a9bef Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Fri, 9 Jul 2021 21:14:42 +0000 Subject: [PATCH 04/18] bump package version to 1.2.6-preview.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93b894d..9f541b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.6-preview.0", + "version": "1.2.6-preview.1", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From 3f1b0afe6192c83ef58aea6a04fc839f855a6f66 Mon Sep 17 00:00:00 2001 From: square Date: Fri, 9 Jul 2021 23:16:17 +0200 Subject: [PATCH 05/18] now fix? --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b55d01c..e5bc597 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: - name: patch package.json run: | node -e " - require('fs').writeFileSync(JSON.stringify(Object.assign(require('./package.json'), { + require('fs').writeFileSync('package.json', JSON.stringify(Object.assign(require('./package.json'), { name: 'bdbuilder' }), null, 2));" From 70a03b47f3e2326c561e2527789049e060eaa7d9 Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Fri, 9 Jul 2021 21:17:01 +0000 Subject: [PATCH 06/18] bump package version to 1.2.6-preview.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f541b8..7176d0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.6-preview.1", + "version": "1.2.6-preview.2", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From 30c792ec528e6b7d9b8216d91ff5fc312f9c7c73 Mon Sep 17 00:00:00 2001 From: square Date: Fri, 9 Jul 2021 23:26:31 +0200 Subject: [PATCH 07/18] allow manual workflow run --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5bc597..37b799c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: - feature/** paths-ignore: - '**.md' + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 8f144972c9bca71626af84321f6243ff5eef010e Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Fri, 9 Jul 2021 21:27:20 +0000 Subject: [PATCH 08/18] bump package version to 1.2.6-preview.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7176d0b..01566a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.6-preview.2", + "version": "1.2.6-preview.3", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From 3e7f78d24c88b580cab80ea824a1cbee6139120a Mon Sep 17 00:00:00 2001 From: square Date: Sun, 11 Jul 2021 23:10:44 +0200 Subject: [PATCH 09/18] trigger deployment From f84bb75bf53a16be3a607efebd8e6faee18d27a3 Mon Sep 17 00:00:00 2001 From: square Date: Sun, 11 Jul 2021 23:11:23 +0200 Subject: [PATCH 10/18] trigger deployment --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 01566a9..6c6b7d9 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "@types/react-dom": "^17.0.7", "webpack-cli": "^4.7.2" }, + "files": [ "dist/**", "common/**", From 02755199396dee9e474bfc642d3ee36b3cfb1655 Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Sun, 11 Jul 2021 21:12:00 +0000 Subject: [PATCH 11/18] bump package version to 1.2.6-preview.4 --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 6c6b7d9..58065c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.6-preview.3", + "version": "1.2.6-preview.4", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { @@ -68,7 +68,6 @@ "@types/react-dom": "^17.0.7", "webpack-cli": "^4.7.2" }, - "files": [ "dist/**", "common/**", From 67ca98359259fa7fb6affeaf84d17f37aad1907a Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Thu, 15 Jul 2021 19:11:07 +0000 Subject: [PATCH 12/18] bump package version to 1.2.9-preview.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f2cede..9c4df04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.8", + "version": "1.2.9-preview.0", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From 1d0cbb04c0f7079180d7f863ed12f62f1b71e2e6 Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Thu, 15 Jul 2021 19:15:20 +0000 Subject: [PATCH 13/18] bump package version to 1.2.9-preview.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9c4df04..2a13c35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.9-preview.0", + "version": "1.2.9-preview.1", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From 21b2c56534208b7ba61e6f3981acc9333bfd2f79 Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Thu, 15 Jul 2021 22:28:39 +0200 Subject: [PATCH 14/18] Fix translations --- common/apis/strings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/apis/strings.ts b/common/apis/strings.ts index 04a9e1a..ece07f0 100644 --- a/common/apis/strings.ts +++ b/common/apis/strings.ts @@ -7,8 +7,8 @@ const loadedStrings = {}; SettingsStore.addChangeListener(injectStrings); function injectStrings() { - Object.assign(Strings._proxyContext.messages, loadedStrings[Strings.getLocale()] ?? {}); - if (loadedStrings["en-US"]) Object.assign(Strings._proxyContext.defaultMessages, loadedStrings["en-US"]); + Object.assign(Strings._provider._context.messages, loadedStrings[Strings.getLocale()] ?? {}); + if (loadedStrings["en-US"]) Object.assign(Strings._provider._context.defaultMessages, loadedStrings["en-US"]); }; export function addStrings(locale: string, strings: any) { From 1661e32a4b05493ba855b6ad2f2a9df8944e9d4d Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Thu, 15 Jul 2021 20:29:19 +0000 Subject: [PATCH 15/18] bump package version to 1.2.9-preview.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a13c35..ce9d418 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.9-preview.1", + "version": "1.2.9-preview.2", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From de1d818569ba1b8fb63d770d5dee75d96ca142f1 Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Fri, 23 Jul 2021 21:50:42 +0000 Subject: [PATCH 16/18] bump package version to 1.2.9-preview.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce9d418..8aa5da6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.9-preview.2", + "version": "1.2.9-preview.3", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": { From bab9736c03721ec7447e9eea163a7e65a25999e4 Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Fri, 23 Jul 2021 14:52:44 -0700 Subject: [PATCH 17/18] Update commands.ts --- common/apis/commands.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/apis/commands.ts b/common/apis/commands.ts index ba565d5..8fe3b9d 100644 --- a/common/apis/commands.ts +++ b/common/apis/commands.ts @@ -60,13 +60,13 @@ export type Command = { __registerId?: string; }; -if (!DiscordCommands.BUILT_IN_SECTIONS.some(e => e.id === "betterdiscord")) { - DiscordCommands.BUILT_IN_SECTIONS.push({ +if (!DiscordCommands.BUILT_IN_SECTIONS["betterdiscord"]) { + DiscordCommands.BUILT_IN_SECTIONS["betterdiscord"] = { icon: "https://github.com/BetterDiscord.png", id: "betterdiscord", name: "BetterDiscord", type: 0 - }); + }; } export function registerCommand(caller: string, options: Command) { @@ -96,4 +96,4 @@ export function unregisterAllCommands(caller: string) { const Commands = { registerCommand, unregisterAllCommands }; -export default Commands; \ No newline at end of file +export default Commands; From 656dbf85a0bc7debe4775dfdded9184d389e0e22 Mon Sep 17 00:00:00 2001 From: BDBuilder builder Date: Fri, 23 Jul 2021 21:53:24 +0000 Subject: [PATCH 18/18] bump package version to 1.2.9-preview.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8aa5da6..8315f4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@betterdiscordbuilder/bdbuilder", - "version": "1.2.9-preview.3", + "version": "1.2.9-preview.4", "description": "Enhanced plugins transpiler for BetterDiscord. Allows you to build plugin with multiple files at once.", "main": "./dist/bdbuilder.min.js", "dependencies": {