fix: 🏷️ firefish-js types

This commit is contained in:
ThatOneCalculator 2023-10-19 16:43:30 -07:00
parent 027b4db37b
commit 558fc3b2b9
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
8 changed files with 1035 additions and 1663 deletions

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2021-2022 syuilo and other contributors Copyright (c) 2021-2023 Kainoa Kanter, Firefish contributors, Syuilo, and misskey-js contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,8 +1,7 @@
# Firefish.js # Firefish-js
Fork of firefish.js for Firefish ## Firefish SDK for Node.js, Bun, and browsers
https://www.npmjs.com/package/firefish-js Fork of [misskey-js](https://www.npmjs.com/package/misskey-js)
To fully build, run `pnpm i && pnpm run render`.
<https://www.npmjs.com/package/firefish-js>

BIN
packages/firefish-js/bun.lockb Executable file

Binary file not shown.

View File

@ -1,11 +1,13 @@
{ {
"name": "firefish-js", "name": "firefish-js",
"version": "0.0.25", "version": "0.0.26",
"description": "Firefish SDK for JavaScript", "description": "Firefish SDK for JavaScript",
"main": "./built/index.js", "main": "./built/index.js",
"types": "./built/index.d.ts", "types": "./built/index.d.ts",
"license": "MIT",
"scripts": { "scripts": {
"build": "pnpm swc src -d built -D", "build": "pnpm swc src -d built -D",
"build:types": "pnpm tsc --emitDeclarationOnly",
"build:debug": "pnpm swc src -d built -s -D", "build:debug": "pnpm swc src -d built -s -D",
"lint": "pnpm biome check --apply src", "lint": "pnpm biome check --apply src",
"format": "pnpm biome format --write src", "format": "pnpm biome format --write src",
@ -19,20 +21,21 @@
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.1.62", "@swc/cli": "^0.1.62",
"@swc/core": "1.3.78", "@swc/core": "1.3.78",
"@types/jest": "^27.4.0", "@swc/types": "^0.1.5",
"@types/node": "20.3.1", "@types/jest": "^29.5.6",
"jest": "^27.4.5", "@types/node": "20.8.7",
"jest": "^29.7.0",
"jest-fetch-mock": "^3.0.3", "jest-fetch-mock": "^3.0.3",
"jest-websocket-mock": "^2.2.1", "jest-websocket-mock": "^2.5.0",
"mock-socket": "^9.0.8", "mock-socket": "^9.3.1",
"ts-jest": "^27.1.2", "ts-jest": "^29.1.1",
"ts-node": "10.4.0", "ts-node": "10.9.1",
"tsd": "^0.28.1", "tsd": "^0.29.0",
"typescript": "5.1.3" "typescript": "5.2.2"
}, },
"files": ["built"], "files": ["built"],
"dependencies": { "dependencies": {
"eventemitter3": "^4.0.7", "eventemitter3": "^5.0.1",
"reconnecting": "^4.4.1", "reconnecting": "^4.4.1",
"semver": "^7.3.8" "semver": "^7.3.8"
}, },

View File

@ -26,8 +26,10 @@ export function urlQuery(
): string { ): string {
const params = Object.entries(obj) const params = Object.entries(obj)
.filter(([, v]) => (Array.isArray(v) ? v.length : v !== undefined)) .filter(([, v]) => (Array.isArray(v) ? v.length : v !== undefined))
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
.reduce( .reduce(
// rome-ignore lint/suspicious/noAssignInExpressions: <Used for key assigning>
// rome-ignore lint/style/noNonNullAssertion: <>
// rome-ignore lint/style/noCommaOperator: <>
(a, [k, v]) => ((a[k] = v!), a), (a, [k, v]) => ((a[k] = v!), a),
{} as Record<string, string | number | boolean>, {} as Record<string, string | number | boolean>,
); );

File diff suppressed because it is too large Load Diff