From 98b3fecaf302a1ef749af6ead130859948bb48b8 Mon Sep 17 00:00:00 2001 From: TTtie Date: Fri, 15 Nov 2024 06:44:05 +0000 Subject: [PATCH 1/4] chore(Entitlement, GroupChannel): clean up toJSON() --- lib/structures/Entitlement.js | 15 +++++++++++++++ lib/structures/GroupChannel.js | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/structures/Entitlement.js b/lib/structures/Entitlement.js index 9ab07e2b..966e7fdf 100644 --- a/lib/structures/Entitlement.js +++ b/lib/structures/Entitlement.js @@ -76,6 +76,21 @@ class Entitlement extends Base { consume() { return this.#client.consumeEntitlement.call(this.#client, this.id); } + + toJSON(props = []) { + return super.toJSON([ + "skuID", + "userID", + "guildID", + "applicationID", + "type", + "startsAt", + "endsAt", + "deleted", + "consumed", + ...props + ]); + } } module.exports = Entitlement; diff --git a/lib/structures/GroupChannel.js b/lib/structures/GroupChannel.js index 06c161ad..89abb31d 100644 --- a/lib/structures/GroupChannel.js +++ b/lib/structures/GroupChannel.js @@ -59,7 +59,6 @@ class GroupChannel extends PrivateChannel { // (╯°□°)╯︵ ┻━┻ "icon", "name", "ownerID", - "recipients", ...props ]); } From a5f8e02e5490da8b34f6269a954f80202b8538a8 Mon Sep 17 00:00:00 2001 From: TTtie Date: Sat, 16 Nov 2024 00:06:38 +0000 Subject: [PATCH 2/4] chore: ignore the eslint config when publishing to NPM --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index 33163b56..fea6dee0 100644 --- a/.npmignore +++ b/.npmignore @@ -9,3 +9,4 @@ docs node_modules test .github +eslint.config.mjs From 7965cf225b9615747d45403e30796b3e33ee938a Mon Sep 17 00:00:00 2001 From: TTtie Date: Sat, 16 Nov 2024 00:07:35 +0000 Subject: [PATCH 3/4] feat(ci): add publish workflow done because provenance and laziness; a copycat from libsodium, pretty much --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..73d69620 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release +on: + release: + types: [released] + workflow_dispatch: + +jobs: + release: + name: Release to NPM + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + registry-url: 'https://registry.npmjs.org' + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Package the project + run: | + mkdir -p ${{ runner.temp }}/gha-dist + npm pack . --pack-destination ${{ runner.temp }}/gha-dist/ + - name: Upload the built package as an artifact + uses: actions/upload-artifact@v4 + with: + name: npm-package + path: + ${{ runner.temp }}/gha-dist/*.tgz + - name: Publish the package to NPM + if: github.event_name == 'release' + env: + NODE_AUTH_TOKEN: ${{ github.event_name == 'release' && secrets.NPM_TOKEN || '' }} + run: npm publish --provenance --access public From 256445b1b1347b44f5d3f56f476279888278d757 Mon Sep 17 00:00:00 2001 From: TTtie Date: Sat, 16 Nov 2024 00:53:50 +0000 Subject: [PATCH 4/4] chore: update dev dependencies --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 4c5c84d8..a8441971 100644 --- a/package.json +++ b/package.json @@ -43,16 +43,16 @@ "ws": "^8.18.0" }, "devDependencies": { - "@eslint/js": "^9.10.0", - "@stylistic/eslint-plugin": "^2.8.0", - "@types/node": "^18.19.41", - "@types/ws": "^8.5.12", - "eslint": "^9.10.0", - "eslint-plugin-jsdoc": "^50.2.3", - "eslint-plugin-sort-class-members": "^1.20.0", - "globals": "^15.9.0", - "typescript": "^5.6.2", - "typescript-eslint": "^8.6.0" + "@eslint/js": "^9.15.0", + "@stylistic/eslint-plugin": "^2.10.1", + "@types/node": "^18.19.64", + "@types/ws": "^8.5.13", + "eslint": "^9.15.0", + "eslint-plugin-jsdoc": "^50.5.0", + "eslint-plugin-sort-class-members": "^1.21.0", + "globals": "^15.12.0", + "typescript": "^5.6.3", + "typescript-eslint": "^8.14.0" }, "optionalDependencies": { "@stablelib/xchacha20poly1305": "~1.0.1",