θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Conversation

@angelplusultra
Copy link
Contributor

@angelplusultra angelplusultra commented Nov 7, 2025

Pull Request Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ”¨ chore
  • πŸ“ docs

Relevant Issues

resolves #4582

What is in this change?

This PR

  1. Adds patch-package as a dependency inside /collector, an NPM package that allows for easy patching of code inside node_modules.
  2. Sets up patch-package as a yarn postinstall script inside package.json
  3. Applies a simple fix in the epub2 library to the EPub class to ensure title is a string before calling .trim()

Additional Information

Yarn has native lifecycle scripts, one of which is called postinstall which runs after packages are added, removed, etc. Read more here.

The postinstall script this PR adds calls patch-package, which looks at the patches directory and applies the git diffs it discovers inside there.

Example Execution Flow

  1. yarn install or yarn is executed
  2. Dependencies are installed
  3. postinstall script is executed which runs patch-package
  4. patch-package applies git diffs inside the relative patches directory to code in node_modules

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@angelplusultra angelplusultra linked an issue Nov 7, 2025 that may be closed by this pull request
@angelplusultra angelplusultra added the PR:needs review Needs review by core team label Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:needs review Needs review by core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: EPUB not uploading due to trim issue

3 participants