Releases: textlint-rule/textlint-rule-no-dead-link
Releases · textlint-rule/textlint-rule-no-dead-link
v6.0.1
v6.0.0
🎉 Breaking Changes
Node.js 20+ Required
- Minimum Node.js version updated to v20.0.0
- Enables use of modern JavaScript features and improved security
- Native fetch API support
✨ Major Improvements
Significant Dependency Reduction and Modernization
1. Migration to Native APIs (#161, #164)
-
Removed node-fetch: Migrated to Native fetch API available in Node.js 18+
- Reduced external dependencies for better security
- Improved performance
-
Removed get-url-origin: Now using standard URL object
// Before import getURLOrigin from "get-url-origin"; const origin = getURLOrigin(uri); // After const origin = new URL(uri).origin;
-
Removed fs-extra: Eliminated unused dependency
2. minimatch v10 Compatibility (#165)
- Updated for minimatch v10 breaking changes
- Changed from default export to named export
// Before (v9) import minimatch from "minimatch" // After (v10) import { minimatch } from "minimatch"
- Made Document:exit handler async with proper Promise handling
Testing Infrastructure Improvements
- Implemented Local Test Server
- Removed dependency on httpstat.us
- Improved test stability and speed
- Enabled offline test execution
CI/CD Optimization (#163)
- GitHub Actions Workflow Improvements
- Prevented duplicate runs: Eliminated double execution on pull requests
- Push events: Limited to master branch only
- Pull request events: Runs on all branches
- Reduced CI execution time and costs
📦 Dependency Changes
Removed Packages
node-fetch
(^2.6.0) → Native fetch APIget-url-origin
(^1.0.1) → Native URL APIfs-extra
(^8.1.0) → Removed as unused@types/node-fetch
→ No longer needed
Current Core Dependencies
{
"minimatch": "^10.0.3",
"p-memoize": "^8.0.0",
"p-queue": "^8.1.0",
"textlint-rule-helper": "^2.3.1"
}
🔧 Technical Details
Enhanced Error Handling
- Added try-catch for URL parsing to improve robustness against invalid URLs
- Strengthened asynchronous error handling
Improved TypeScript Type Safety
- Compliance with minimatch v10 type definitions
- Consistent use of async/await patterns
📈 Performance Improvements
Benefits from reduced dependencies:
- Faster installation times
- Smaller bundle size
- Improved startup performance
🧪 Testing
- All 36 tests passing successfully
- TypeScript type checking completed without errors
- Stable test environment with local test server
🔄 Migration Guide
Update Node.js Version
# Node.js 20 or higher required
node --version # Verify v20.0.0 or higher
Installation
npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]
Configuration Changes
No configuration changes required. Your existing .textlintrc
will work as-is.
What's Changed
- refactor: remove node-fetch and fs-extra dependencies by @azu in #161
- ci: improve workflow triggers to prevent duplicate runs by @azu in #163
- refactor: remove get-url-origin dependency by @azu in #164
- fix: update minimatch import for v10 compatibility by @azu in #165
New Contributors
- @massongit made their first contribution in #165
Full Changelog: v5.2.0...v6.0.0
v5.2.0
What's Changed
- feat(rule): add
dotInIgnore
option by @kangetsu121 in #153
New Contributors
- @kangetsu121 made their first contribution in #153
Full Changelog: v5.1.2...v5.2.0