🚀 long awaited bug fixes

This commit is contained in:
zS1L3NT Mac 2024-07-08 04:51:46 +08:00
parent 09f113e7bb
commit 2817c590ee
No known key found for this signature in database
GPG Key ID: 02BE07CD431E4F42
4 changed files with 24 additions and 12 deletions

View File

@ -1,27 +1,26 @@
{ {
"name": "ytmusic-api", "name": "ytmusic-api",
"version": "5.2.2-alpha.7", "version": "5.2.2",
"description": "YouTube Music API", "description": "YouTube Music API",
"main": "./dist/cjs/index.js", "main": "./dist/index.js",
"module": "./dist/esm/index.js", "module": "./dist/index.mjs",
"types": "./dist/types/index.d.ts", "types": "./dist/index.d.ts",
"files": ["dist"],
"author": "zS1L3NT <dev@zectan.com> (http://www.zectan.com)", "author": "zS1L3NT <dev@zectan.com> (http://www.zectan.com)",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/zS1L3NT/ts-npm-ytmusic-api" "url": "https://github.com/zS1L3NT/ts-npm-ytmusic-api"
}, },
"files": ["dist", "package.json"],
"exports": { "exports": {
"./package.json": "./package.json",
".": { ".": {
"types": "./dist/types/index.d.ts", "require": "./dist/index.js",
"require": "./dist/cjs/index.js", "import": "./dist/index.mjs",
"import": "./dist/esm/index.js" "types": "./dist/index.d.ts"
} }
}, },
"scripts": { "scripts": {
"build": "tsup src/index.ts --dts --format cjs,esm --clean --out-dir dist", "build": "tsup src/index.ts",
"lint": "tsc --noEmit ; bunx @biomejs/biome check --write" "lint": "tsc --noEmit ; bunx @biomejs/biome check --write"
}, },
"dependencies": { "dependencies": {

View File

@ -90,7 +90,7 @@ export default class YTMusic {
const cookie = Cookie.parse(`${cookieString}`) const cookie = Cookie.parse(`${cookieString}`)
if (!cookie) return if (!cookie) return
this.cookiejar.setCookieSync(cookie, "https://music.youtube.com/") this.cookiejar.setCookieSync(cookie, "https://www.youtube.com/")
} }
} }

View File

@ -1,3 +1,5 @@
import YTMusic from "./YTMusic"
export type { export type {
AlbumBasic, AlbumBasic,
AlbumDetailed, AlbumDetailed,
@ -16,4 +18,4 @@ export type {
HomeSection, HomeSection,
} from "./types" } from "./types"
export { default as YTMusic } from "./YTMusic" export default YTMusic

11
tsup.config.ts Normal file
View File

@ -0,0 +1,11 @@
import { defineConfig } from "tsup"
export default defineConfig({
target: "esnext",
format: ["cjs", "esm"],
splitting: true,
sourcemap: true,
clean: true,
dts: true,
cjsInterop: true,
})