mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
build: switch to esbuild-plugin-version-injector for injecting version strings (#8723)
This commit is contained in:
@@ -11,3 +11,12 @@ export * from './utils/IdentifyThrottler.js';
|
||||
|
||||
export * from './ws/WebSocketManager.js';
|
||||
export * from './ws/WebSocketShard.js';
|
||||
|
||||
/**
|
||||
* The [\@discordjs/voice](https://github.com/discordjs/discord.js/blob/main/packages/voice/#readme) version
|
||||
* that you are currently using.
|
||||
*
|
||||
* Note to developers: This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
||||
export const version: string = '[VI]{{inject}}[/VI]';
|
||||
|
||||
@@ -2,7 +2,6 @@ import process from 'node:process';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
import { lazy } from '@discordjs/util';
|
||||
import { APIVersion, GatewayOpcodes } from 'discord-api-types/v10';
|
||||
import { version } from '../../package.json';
|
||||
import type { OptionalWebSocketManagerOptions, SessionInfo } from '../ws/WebSocketManager.js';
|
||||
|
||||
/**
|
||||
@@ -19,7 +18,7 @@ export enum CompressionMethod {
|
||||
ZlibStream = 'zlib-stream',
|
||||
}
|
||||
|
||||
export const DefaultDeviceProperty = `@discordjs/ws ${version}`;
|
||||
export const DefaultDeviceProperty = `@discordjs/ws [VI]{{inject}}[/VI]`;
|
||||
|
||||
const getDefaultSessionStore = lazy(() => new Collection<number, SessionInfo | null>());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user