🚀 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",
"version": "5.2.2-alpha.7",
"version": "5.2.2",
"description": "YouTube Music API",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"files": ["dist"],
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"author": "zS1L3NT <dev@zectan.com> (http://www.zectan.com)",
"license": "GPL-3.0",
"repository": {
"type": "git",
"url": "https://github.com/zS1L3NT/ts-npm-ytmusic-api"
},
"files": ["dist", "package.json"],
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/types/index.d.ts",
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
"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"
},
"dependencies": {

View File

@ -90,7 +90,7 @@ export default class YTMusic {
const cookie = Cookie.parse(`${cookieString}`)
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 {
AlbumBasic,
AlbumDetailed,
@ -16,4 +18,4 @@ export type {
HomeSection,
} 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,
})