versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.27k stars 1.13k forks source link

Node: extract version from package.json using require() #1217

Closed camilleoudot closed 1 year ago

camilleoudot commented 1 year ago

This allows JS bundlers such as webpack to embed the version string in the bundle. Otherwise a bundled JS app would look for mediasoup's package.json in "../.." on the filesystem (and it's very likely not there).

nazar-pc commented 1 year ago

Why would you use bundlers for server-side JS?

camilleoudot commented 1 year ago

In my case it produces a smaller and single artifact, and loads faster, in a context where this really matters.

ibc commented 1 year ago

Bufff, I'm about to just remove that version getter despite it would break API compatibility in v3...

Thanks, merging and releasing.

piranna commented 1 year ago

Bufff, I'm about to just remove that version getter despite it would break API compatibility in v3...

Maybe time to start with v4 roadmap.

ibc commented 1 year ago

mediasoup node 3.13.1 released.