node-talon
node-talon copied to clipboard
Remove lodash dependency
Lodash v3 triggers "critical" security warnings when installing talon with npm.
I removed the lodash dependency since all usages of it can easily be replaced with APIs that are still available in all old Node versions tested in CI (while the patched lodash version is only compatible with Node 18 and up).
All tests pass:
npm test
> [email protected] test
> mocha
signature.bruteforce
✓ should parse empty body
✓ should parse unsigned body
✓ should parse signature only messages
✓ should detect dash signatures
✓ should detect signature words
✓ should detect iphone signature
✓ should detect Mailbox for iPhone signature
✓ should detect non-signature lines starting with signature-words
✓ should detect non-signature lines starting with dashes
✓ should keep blank lines inside signature
✓ should detect BlackBerry signature
✓ should survive crash in signature detection
✓ should not detect signature at first line
✓ should ignore empty lines when checking for max lines signature
French support
✓ should detect signature words
✓ should detect iphone signature
✓ should detect non-signature lines starting with signature-words
signature candidate
✓ should have no signature if not at least two non-empty lines
✓ should never include first line
✓ should be limited by SIGNATURE_MAX_LINES
✓ should not include long lines
✓ should handle dashed lists
internals
✓ should mark candidate indices
✓ should test process marked candidate indices
advanced features
✓ should ignore URLs
25 passing (14ms)