Skip to content

Commit

Permalink
chore: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
xhayper committed Jul 29, 2024
1 parent ddf6d5a commit fa106e0
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 61 deletions.
13 changes: 7 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,9 +24,10 @@ A clear and concise description of what you expected to happen.
If applicable, add a sample code for us to reproduce the bug.

**(please complete the following information):**
- OS: [e.g. Windows, macOS, Arch Linux]
- OS Version: [e.g. Windows 11, macOS 12.5]
- Discord Version: [e.g. Stable 140355)

- OS: [e.g. Windows, macOS, Arch Linux]
- OS Version: [e.g. Windows 11, macOS 12.5]
- Discord Version: [e.g. Stable 140355)

**Additional context**
Add any other context about the problem here.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
2 changes: 1 addition & 1 deletion .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
paths:
- src
- src
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
56 changes: 28 additions & 28 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '16 2 * * 3'
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "16 2 * * 3"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'typescript' ]
strategy:
fail-fast: false
matrix:
language: ["typescript"]

steps:
- name: Checkout repository
uses: actions/checkout@v3
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
packs: codeql/javascript-queries
config-file: ./.github/codeql/codeql-config.yml
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
packs: codeql/javascript-queries
config-file: ./.github/codeql/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
16 changes: 8 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
".yarn": false,
"yarn.lock": false
},
"search.exclude": {
".yarn": true,
"yarn.lock": true
}
"files.exclude": {
".yarn": false,
"yarn.lock": false
},
"search.exclude": {
".yarn": true,
"yarn.lock": true
}
}
1 change: 0 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# examples

Here, you can find some example on how to use the library, `oauth` is the one that use scopes, the default one is all the scope that you can use, `status` is just a simple status

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xhayper/discord-rpc",
"version": "1.1.5",
"version": "1.1.6",
"description": "a fork of discordjs/RPC",
"main": "dist/index.js",
"author": "xhayper",
Expand Down
2 changes: 1 addition & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export class Client extends (EventEmitter as new () => TypedEventEmitter<ClientE
promise.error.code =
typeof reason === "object" ? reason!.code : CUSTOM_RPC_ERROR_CODE.CONNECTION_ENDED;
promise.error.message =
typeof reason === "object" ? reason!.message : reason ?? "Connection ended";
typeof reason === "object" ? reason!.message : (reason ?? "Connection ended");
promise.reject(promise.error);
});

Expand Down
4 changes: 2 additions & 2 deletions src/structures/ClientUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export class ClientUser extends User {

return (
await this.client.request("SET_ACTIVITY", {
pid: pid ?? process ? process.pid ?? 0 : 0,
pid: (pid ?? process) ? (process.pid ?? 0) : 0,
activity: formattedAcitivity
})
).data;
Expand All @@ -322,7 +322,7 @@ export class ClientUser extends User {
* @param pid - the application's process id
*/
async clearActivity(pid?: number): Promise<void> {
await this.client.request("SET_ACTIVITY", { pid: pid ?? process ? process.pid ?? 0 : 0 });
await this.client.request("SET_ACTIVITY", { pid: (pid ?? process) ? (process.pid ?? 0) : 0 });
}

// #region Undocumented
Expand Down
4 changes: 2 additions & 2 deletions src/transport/IPC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class IPCTransport extends Transport {
?.join(" ")
.toUpperCase()}`
);

data = Buffer.concat([data, chunk]);
} while (true);

Expand All @@ -188,7 +188,7 @@ export class IPCTransport extends Transport {
this.client.emit("debug", "SERVER => CLIENT | Malformed packet, invalid payload");
return;
}

let parsedData: any;
try {
parsedData = JSON.parse(data.subarray(8, length + 8).toString());
Expand Down

0 comments on commit fa106e0

Please sign in to comment.