Skip to content

Conversation

azu
Copy link
Member

@azu azu commented Aug 16, 2025

Summary

  • Replaced get-url-origin package with native URL object
  • Reduced external dependencies by using built-in Node.js functionality
  • All existing tests pass without modifications

Changes

  • Removed get-url-origin from dependencies in package.json
  • Updated src/no-dead-link.ts to use new URL(uri).origin instead of getURLOrigin(uri)
  • Added try-catch to handle potential URL parsing errors gracefully

Test Plan

  • Run existing test suite: all 36 tests pass
  • Type checking passes
  • Code formatting applied

Fixes #160

🤖 Generated with Claude Code

@azu azu added the Type: Refactoring A code change that neither fixes a bug nor adds a feature label Aug 16, 2025
@azu azu marked this pull request as ready for review August 16, 2025 04:56
@azu azu force-pushed the remove-get-url-origin branch from a92a3ff to e66ddae Compare August 16, 2025 04:59
Replace get-url-origin package with native URL object for getting URL origins.
This reduces external dependencies and uses built-in Node.js functionality.

Fixes #160

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@azu azu force-pushed the remove-get-url-origin branch from e66ddae to ae1455c Compare August 16, 2025 05:06
Use Node.js built-in fileURLToPath function instead of manual string
manipulation for converting file:// URLs to file paths. This ensures
proper handling across all platforms including Windows.
@azu azu force-pushed the remove-get-url-origin branch from 5cc78cb to 0996208 Compare August 16, 2025 05:14
@azu azu merged commit c4119ae into master Aug 16, 2025
6 checks passed
@azu azu deleted the remove-get-url-origin branch August 16, 2025 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Refactoring A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove get-url-origin

1 participant