Skip to content

Commit

Permalink
1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alii committed Oct 25, 2023
1 parent 1544107 commit 6b29a8c
Show file tree
Hide file tree
Showing 6 changed files with 843 additions and 725 deletions.
35 changes: 21 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
{
"name": "use-lanyard",
"version": "1.4.4",
"version": "1.5.0",
"author": "Alistair Smith",
"description": "React hook for Lanyard for tracking your Discord presence.",
"repository": "https://github.com/alii/use-lanyard",
"main": "./dist/index.js",
"exports": "./dist/index.mjs",
"typings": "./dist/index.d.ts",
"main": "./dist/index.cjs",
"typings": "./dist/index.d.cts",
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"type": "module",
"license": "MIT",
"sideEffects": false,
"files": [
"dist",
"README.md",
"LICENSE",
"package.json"
"./dist",
"./README.md",
"./LICENSE",
"./package.json"
],
"engines": {
"node": ">=14"
},
"scripts": {
"build": "tsup-node",
"build": "tsup",
"release": "yarn build && yarn publish",
"example": "parcel ./example/index.html"
},
Expand All @@ -30,13 +37,13 @@
"hook"
],
"devDependencies": {
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"parcel": "^2.8.3",
"@types/react": "^18.2.32",
"@types/react-dom": "^18.2.14",
"parcel": "^2.10.1",
"process": "^0.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tsup": "^6.5.0",
"typescript": "^4.9.5"
"tsup": "^7.2.0",
"typescript": "^5.2.2"
}
}
2 changes: 1 addition & 1 deletion src/hooks/socket.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useEffect, useState} from 'react';
import {Options, Data, Snowflake, DEFAULT_OPTIONS} from '../types';
import {DEFAULT_OPTIONS, Data, Options, Snowflake} from '../types';

export enum SocketOpcode {
Event,
Expand Down
3 changes: 2 additions & 1 deletion src/utils/get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {LanyardResponse, Options, Snowflake} from '../types';
import {LanyardError} from '../hooks/rest';
import {LanyardResponse, Options, Snowflake} from '../types';

export interface GetOptions extends Options {
controller?: AbortController;
Expand Down Expand Up @@ -29,6 +29,7 @@ export async function get(url: ReturnType<typeof getURL>, options: GetOptions) {
error: new LanyardError(request, response, body),
};
}

return {
success: true as const,
data: body.data,
Expand Down
5 changes: 3 additions & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import {defineConfig} from 'tsup';

export default defineConfig({
entry: ['src/index.ts'],
entry: ['./src/index.ts', './src/types.ts'],
format: ['cjs', 'esm'],
dts: true,
target: 'node18',
target: 'node20',
sourcemap: true,
minify: true,
publicDir: 'build',
});
Binary file added use-lanyard-v1.5.0.tgz
Binary file not shown.
Loading

0 comments on commit 6b29a8c

Please sign in to comment.