Updated project configuration

This commit is contained in:
Zechariah 2022-02-05 15:40:45 +08:00
parent 425fd57d81
commit eb1309c5a1
5 changed files with 45 additions and 24 deletions

12
.gitignore vendored
View File

@ -1,6 +1,6 @@
/node_modules **/node_modules
/.idea **/.idea
/build **/dist
config.json **/config.json
*.test.ts **/*.test.ts
.rest **/.vscode

View File

@ -3,5 +3,5 @@
.gitignore .gitignore
.prettierrc .prettierrc
.editorconfig .editorconfig
nodemon.json tsconfig.json
tsconfig.json babel.config.js

View File

@ -1,9 +1,9 @@
{ {
"name": "ytmusic-api", "name": "ytmusic-api",
"version": "1.0.3", "version": "1.0.4",
"description": "YouTube Music API", "description": "YouTube Music API",
"main": "build/index.js", "main": "dist/index.js",
"types": "build/index.d.ts", "types": "dist/index.d.ts",
"author": "zS1L3NT <zechariahtan144@gmail.com> (http://www.zectan.com)", "author": "zS1L3NT <zechariahtan144@gmail.com> (http://www.zectan.com)",
"license": "ISC", "license": "ISC",
"repository": { "repository": {

View File

@ -138,7 +138,7 @@ export default class YTMusic {
const searchParams = new URLSearchParams({ const searchParams = new URLSearchParams({
...query, ...query,
alt: "json", alt: "json",
key: this.config.INNERTUBE_API_KEY key: this.config.INNERTUBE_API_KEY!
}) })
const res = await this.client.post( const res = await this.client.post(

View File

@ -1,22 +1,43 @@
{ {
"compilerOptions": { "compilerOptions": {
/** Transpiler */
"target": "esnext", "target": "esnext",
"allowSyntheticDefaultImports": true, "lib": ["esnext"], // "dom", "dom.iterable", "esnext"
"forceConsistentCasingInFileNames": true, "module": "commonjs", // esnext
"module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true,
/** Project */
"rootDir": "src",
"outDir": "dist",
"typeRoots": ["./node_modules/@types", "./src/@types"],
"declaration": true,
/** Type Checking */
"strict": true, "strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"resolveJsonModule": true,
"strictNullChecks": true, "strictNullChecks": true,
"strictFunctionTypes": true, "strictFunctionTypes": true,
"outDir": "build", "strictBindCallApply": true,
"rootDir": "src", "strictPropertyInitialization": true,
"declaration": true "noImplicitThis": true,
"useUnknownInCatchVariables": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"allowUnusedLabels": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true
/** Other */
// "noEmit": true,
// "allowJs": true,
// "jsx": "react-jsx",
// "skipLibCheck": true,
// "isolatedModules": true,
// "incremental": true
}, },
"exclude": ["**/*.test.*", "**/tests"] "include": ["src"],
"exclude": ["src/__tests__"]
} }