discordjs / voice

Implementation of the Discord Voice API for discord.js and other JS/TS libraries
Apache License 2.0
327 stars 110 forks source link

fix(typescript): bundle types at prepublishOnly #149

Closed favna closed 3 years ago

favna commented 3 years ago

Please describe the changes this PR makes and why it should be merged:

Note: Also lmk what other repos need these same tooling changes added. I'm not too familiar with the DJS repo stack yet.

This is required to support proper module augmentation with declare module '@discordjs/voice' { } because TypeScript doesn't propegate module augmentations when only targeting the root index.d.ts, even when that file is re-exporting other types.

It's an issue we faced with Sapphire Framework & Pieces and easily fixed by bundling up all the types using Rollup.

Status and versioning classification:

Fixes discordjs/discord.js#6009

codecov[bot] commented 3 years ago

Codecov Report

Merging #149 (3f39ec6) into main (36aad8d) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #149   +/-   ##
=======================================
  Coverage   67.74%   67.74%           
=======================================
  Files          19       19           
  Lines         896      896           
  Branches      214      220    +6     
=======================================
  Hits          607      607           
  Misses        287      287           
  Partials        2        2           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 36aad8d...3f39ec6. Read the comment docs.

favna commented 3 years ago

Converted to draft as I'm making the steps performed here into a CLI lib as you guys recommended me to license it (https://github.com/favware/rollup-type-bundler)

favna commented 3 years ago

Reopened for review as the change to the CLI tool has been made