Skip to content

Commit 8d909b2

Browse files
committed
Require? In the year 2025? Time to move on.
1 parent ae39432 commit 8d909b2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/lib/utils.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import crypto from 'crypto'
1212
import fs, { readFile } from 'fs/promises'
1313
import path from 'path'
1414
import os from 'os'
15-
import { createRequire } from 'node:module'
16-
const require = createRequire(import.meta.url)
15+
import { version as MCP_REMOTE_VERSION } from '../../package.json'
1716

1817
// Global type declaration for typescript
1918
declare global {
@@ -26,9 +25,7 @@ export const REASON_TRANSPORT_FALLBACK = 'falling-back-to-alternate-transport'
2625

2726
// Transport strategy types
2827
export type TransportStrategy = 'sse-only' | 'http-only' | 'sse-first' | 'http-first'
29-
30-
// Package version from package.json
31-
export const MCP_REMOTE_VERSION = require('../../package.json').version
28+
export { MCP_REMOTE_VERSION }
3229

3330
const pid = process.pid
3431
// Global debug flag

0 commit comments

Comments
 (0)