Skip to content

Conversation

@Fdawgs
Copy link
Owner

@Fdawgs Fdawgs commented Nov 18, 2025

Closes #419.

Will reduce the package size for Linux and MacOS users by a good amount!

Checklist

@Fdawgs Fdawgs requested a review from Copilot November 18, 2025 11:02
Copilot finished reviewing on behalf of Fdawgs November 18, 2025 11:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the package to move Windows binaries into a separate optional dependency (node-unrtf-win32), significantly reducing the package size for Linux and macOS users. The Windows binaries and associated license files are removed from the main package and accessed via dynamic require() when needed.

  • Windows binaries (unrtf.exe) and license files removed from src/lib/win32/
  • Dynamic loading of node-unrtf-win32 optional dependency for Windows platform
  • Updated license configuration to ignore the new optional dependency

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Adds node-unrtf-win32 as an optional dependency
src/index.js Updates constructor to dynamically require optional dependency with try-catch error handling
src/index.test.js Updates test helper to use the optional dependency instead of local binary path
.licensee.json Adds ignore rule for packages prefixed with node-unrtf
src/lib/win32/unrtf-0.19.3/COPYING Removes GPL v2 license file for bundled Windows binary
src/lib/win32/unrtf-0.19.3-GnuWin32.README Removes README for bundled Windows binary
src/lib/win32/unrtf-0.19.3/bin/unrtf.exe Removes Windows binary executable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Fdawgs Fdawgs force-pushed the refactor/bins branch 2 times, most recently from 61f532d to 313bf4c Compare November 18, 2025 11:23
@Fdawgs Fdawgs merged commit 5f3211d into main Nov 18, 2025
18 checks passed
@Fdawgs Fdawgs deleted the refactor/bins branch November 18, 2025 11:47
Fdawgs added a commit that referenced this pull request Nov 18, 2025
BREAKING CHANGE: moved windows binary to optional dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Windows binaries to separate package

2 participants