chore: updated dependencies
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
/** @type {import('jest').Config} */
|
/** @type {import('jest').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
moduleNameMapper: {
|
|
||||||
'^@/(.*)$': '<rootDir>/src/$1',
|
|
||||||
},
|
|
||||||
moduleFileExtensions: ['ts', 'js', 'json'],
|
moduleFileExtensions: ['ts', 'js', 'json'],
|
||||||
testEnvironment: 'node',
|
testEnvironment: 'node',
|
||||||
testMatch: ['<rootDir>/tests/**/*.test.ts'],
|
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",
|
"typecheck": "tsc --noEmit",
|
||||||
"test": "jest --runInBand",
|
"test": "jest --runInBand",
|
||||||
"check": "npm run format:check && npm run lint && npm run lint:types && npm run typecheck && npm run test",
|
"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"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"repository": "https://github.com/FrauJulian/Discord-Audio-Stream",
|
"repository": "https://github.com/FrauJulian/Discord-Audio-Stream",
|
||||||
@@ -62,26 +62,26 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/globals": "^30.2.0",
|
"@jest/globals": "^30.4.1",
|
||||||
"@types/ejs": "^3.1.5",
|
"@types/ejs": "^3.1.5",
|
||||||
"@types/node": "^25.0.2",
|
"@types/node": "^25.9.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
"@typescript-eslint/eslint-plugin": "^8.59.4",
|
||||||
"@typescript-eslint/parser": "^8.50.0",
|
"@typescript-eslint/parser": "^8.59.4",
|
||||||
"del-cli": "^7.0.0",
|
"del-cli": "^7.0.0",
|
||||||
"eslint": "^9.39.2",
|
"eslint": "^10.4.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-import-resolver-typescript": "^4.4.4",
|
"eslint-import-resolver-typescript": "^4.4.4",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
"eslint-plugin-n": "^17.23.1",
|
"eslint-plugin-n": "^18.0.1",
|
||||||
"eslint-plugin-promise": "^7.2.1",
|
"eslint-plugin-promise": "^7.3.0",
|
||||||
"eslint-plugin-unused-imports": "^4.3.0",
|
"eslint-plugin-unused-imports": "^4.4.1",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"jest": "^30.2.0",
|
"jest": "^30.4.2",
|
||||||
"npm-check-updates": "^19.2.0",
|
"npm-check-updates": "^22.2.0",
|
||||||
"prettier": "^3.7.4",
|
"prettier": "^3.8.3",
|
||||||
"ts-jest": "^29.4.6",
|
"ts-jest": "^29.4.11",
|
||||||
"tsup": "^8.5.1",
|
"tsup": "^8.5.1",
|
||||||
"typescript": "^5.9.3"
|
"typescript": "^6.0.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@discordjs/voice": "^0.19.0",
|
"@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 { PassThrough } from 'node:stream';
|
||||||
|
|
||||||
import AudioManager from '../src/audio-manager';
|
import AudioManager from '../src/audio-manager';
|
||||||
import { AudioManagerConfigError, AudioManagerStateError } from '@/errors';
|
import { AudioManagerConfigError, AudioManagerStateError } from '../src';
|
||||||
import { startFfmpeg } from '@/ffmpeg';
|
import { startFfmpeg } from '../src/ffmpeg';
|
||||||
import type { AudioSource, VoiceConnectionOptions } from '@/types';
|
import type { AudioSource, VoiceConnectionOptions } from '../src';
|
||||||
|
|
||||||
const mockAudioPlayer = {
|
const mockAudioPlayer = {
|
||||||
play: jest.fn(),
|
play: jest.fn(),
|
||||||
@@ -49,7 +49,7 @@ jest.mock('@discordjs/voice', () => ({
|
|||||||
joinVoiceChannel: jest.fn(() => mockConnection),
|
joinVoiceChannel: jest.fn(() => mockConnection),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
jest.mock('@/ffmpeg', () => ({
|
jest.mock('../src/ffmpeg', () => ({
|
||||||
startFfmpeg: jest.fn(() => mockFfmpegHandle),
|
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": {
|
"compilerOptions": {
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"lib": ["ES2022"],
|
"lib": ["ES2022"],
|
||||||
"module": "commonjs",
|
"module": "Node16",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node16",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"types": [],
|
"types": [],
|
||||||
"rootDir": "./",
|
"rootDir": "./",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"baseUrl": "./",
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["src/*"]
|
|
||||||
},
|
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import { defineConfig } from 'tsup';
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
entry: ['./src/index.ts'],
|
entry: ['./src/index.ts'],
|
||||||
dts: true,
|
dts: false,
|
||||||
shims: true,
|
shims: true,
|
||||||
skipNodeModulesBundle: true,
|
skipNodeModulesBundle: true,
|
||||||
clean: true,
|
clean: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user