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: pre-0.2.0 housekeeping #183

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs
node_modules
test
.github
eslint.config.mjs
15 changes: 15 additions & 0 deletions lib/structures/Entitlement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 0 additions & 1 deletion lib/structures/GroupChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class GroupChannel extends PrivateChannel { // (╯°□°)╯︵ ┻━┻
"icon",
"name",
"ownerID",
"recipients",
...props
]);
}
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading