Skip to content

Commit

Permalink
chore: release esm-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
twlite committed Apr 19, 2023
1 parent 6af2035 commit e9e4686
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/discord-player/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-player",
"version": "6.2.0",
"version": "6.2.1",
"description": "Complete framework to facilitate music commands using discord.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/discord-player/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { version as djsVersion } from 'discord.js';

export * from './utils/PlayerEventsEmitter';
export * from './utils/AudioFilters';
export * from './extractors/BaseExtractor';
Expand Down Expand Up @@ -27,7 +28,7 @@ export {
AF_VAPORWAVE_RATE,
FiltersChain
} from '@discord-player/equalizer';
export { createAudioPlayer, AudioPlayer, CreateAudioPlayerOptions } from '@discordjs/voice';
export { createAudioPlayer, AudioPlayer, type CreateAudioPlayerOptions } from '@discordjs/voice';

// eslint-disable-next-line @typescript-eslint/no-inferrable-types
export const version: string = '[VI]{{inject}}[/VI]';
Expand Down
2 changes: 1 addition & 1 deletion packages/extractor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@discord-player/extractor",
"version": "4.2.0",
"version": "4.2.1",
"description": "Extractors for discord-player",
"keywords": [
"discord-player",
Expand Down
4 changes: 2 additions & 2 deletions packages/extractor/src/extractors/AttachmentExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import type { IncomingMessage } from 'http';
import { createReadStream, existsSync } from 'fs';
import { downloadStream } from '../internal/downloader';
import { fromFile } from 'file-type';
import * as fileType from 'file-type';
import path from 'path';
import { stat } from 'fs/promises';

Expand Down Expand Up @@ -77,7 +77,7 @@ export class AttachmentExtractor extends BaseExtractor {
if (!existsSync(query)) return this.emptyResponse();
const fstat = await stat(query);
if (!fstat.isFile()) return this.emptyResponse();
const mime = await fromFile(query).catch(() => null);
const mime = await fileType.fromFile(query).catch(() => null);
if (!mime || !['audio/', 'video/'].some((r) => !!mime.mime.startsWith(r))) return this.emptyResponse();
const trackInfo = {
title: path.basename(query) || 'Attachment',
Expand Down
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function defineConfig({
esbuildPlugins = [],
entry = ['./src/index.ts'],
skipNodeModulesBundle = true,
sourcemap = true,
sourcemap = 'inline',
target = 'ES2020',
silent = true,
shims = true
Expand Down

0 comments on commit e9e4686

Please sign in to comment.