chore: updated dependencies
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'json'],
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['<rootDir>/tests/**/*.test.ts'],
|
||||
|
||||
Generated
+656
-952
File diff suppressed because it is too large
Load Diff
+14
-14
@@ -35,7 +35,7 @@
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "jest --runInBand",
|
||||
"check": "npm run format:check && npm run lint && npm run lint:types && npm run typecheck && npm run test",
|
||||
"build": "del-cli dist && tsup",
|
||||
"build": "del-cli dist && tsup && tsc -p tsconfig.build.json && node scripts/copy-dts.cjs",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"repository": "https://github.com/FrauJulian/Discord-Audio-Stream",
|
||||
@@ -62,26 +62,26 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^30.2.0",
|
||||
"@jest/globals": "^30.4.1",
|
||||
"@types/ejs": "^3.1.5",
|
||||
"@types/node": "^25.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
||||
"@typescript-eslint/parser": "^8.50.0",
|
||||
"@types/node": "^25.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.59.4",
|
||||
"@typescript-eslint/parser": "^8.59.4",
|
||||
"del-cli": "^7.0.0",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint": "^10.4.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-n": "^17.23.1",
|
||||
"eslint-plugin-promise": "^7.2.1",
|
||||
"eslint-plugin-unused-imports": "^4.3.0",
|
||||
"eslint-plugin-n": "^18.0.1",
|
||||
"eslint-plugin-promise": "^7.3.0",
|
||||
"eslint-plugin-unused-imports": "^4.4.1",
|
||||
"husky": "^9.1.7",
|
||||
"jest": "^30.2.0",
|
||||
"npm-check-updates": "^19.2.0",
|
||||
"prettier": "^3.7.4",
|
||||
"ts-jest": "^29.4.6",
|
||||
"jest": "^30.4.2",
|
||||
"npm-check-updates": "^22.2.0",
|
||||
"prettier": "^3.8.3",
|
||||
"ts-jest": "^29.4.11",
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "^5.9.3"
|
||||
"typescript": "^6.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@discordjs/voice": "^0.19.0",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
const { copyFileSync, existsSync } = require('node:fs');
|
||||
const { join } = require('node:path');
|
||||
|
||||
const declarationFile = join(__dirname, '..', 'dist', 'index.d.ts');
|
||||
const esmDeclarationFile = join(__dirname, '..', 'dist', 'index.d.mts');
|
||||
|
||||
if (!existsSync(declarationFile)) {
|
||||
throw new Error(`Missing declaration file: ${declarationFile}`);
|
||||
}
|
||||
|
||||
copyFileSync(declarationFile, esmDeclarationFile);
|
||||
@@ -3,9 +3,9 @@ import { sep } from 'node:path';
|
||||
import { PassThrough } from 'node:stream';
|
||||
|
||||
import AudioManager from '../src/audio-manager';
|
||||
import { AudioManagerConfigError, AudioManagerStateError } from '@/errors';
|
||||
import { startFfmpeg } from '@/ffmpeg';
|
||||
import type { AudioSource, VoiceConnectionOptions } from '@/types';
|
||||
import { AudioManagerConfigError, AudioManagerStateError } from '../src';
|
||||
import { startFfmpeg } from '../src/ffmpeg';
|
||||
import type { AudioSource, VoiceConnectionOptions } from '../src';
|
||||
|
||||
const mockAudioPlayer = {
|
||||
play: jest.fn(),
|
||||
@@ -49,7 +49,7 @@ jest.mock('@discordjs/voice', () => ({
|
||||
joinVoiceChannel: jest.fn(() => mockConnection),
|
||||
}));
|
||||
|
||||
jest.mock('@/ffmpeg', () => ({
|
||||
jest.mock('../src/ffmpeg', () => ({
|
||||
startFfmpeg: jest.fn(() => mockFfmpegHandle),
|
||||
}));
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"declarationMap": false,
|
||||
"emitDeclarationOnly": true,
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+2
-6
@@ -2,16 +2,12 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022"],
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"module": "Node16",
|
||||
"moduleResolution": "node16",
|
||||
"resolveJsonModule": true,
|
||||
"types": [],
|
||||
"rootDir": "./",
|
||||
"outDir": "./dist",
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
},
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { defineConfig } from 'tsup';
|
||||
export default defineConfig({
|
||||
format: ['cjs', 'esm'],
|
||||
entry: ['./src/index.ts'],
|
||||
dts: true,
|
||||
dts: false,
|
||||
shims: true,
|
||||
skipNodeModulesBundle: true,
|
||||
clean: true,
|
||||
|
||||
Reference in New Issue
Block a user