Skip to content

fix: remove unnecessary TypeScript peer dependency - #20

Merged
3w36zj6 merged 2 commits into
textlint:mainfrom
myakura:relax-typescript-peer-dependency
Aug 10, 2026
Merged

fix: remove unnecessary TypeScript peer dependency#20
3w36zj6 merged 2 commits into
textlint:mainfrom
myakura:relax-typescript-peer-dependency

Conversation

@myakura

@myakura myakura commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Widens peerDependencies.typescript from ^5.0.0 to *.

Background

The typescript package is only used for type-checking during development — the plugin's source never imports it, and the published lib/index.js is a self-contained esbuild bundle with no .d.ts output. Despite that, pinning the peer range to ^5.0.0 makes consumers on TypeScript 6 hit an unmet-peer warning, as reported in #19, and can end up being a reason a downstream project can't upgrade its own TypeScript version.

textlint-scripts, itself a dependency of this plugin, already treats typescript as an optional peer with a permissive "*" range. This change aligns the plugin with that same policy.

Test plan

  • bun run tsc
  • bun run ci (biome)
  • bun run build
  • bun run test -- --run

Closes #19

The typescript package is only used for type-checking during development; the plugin's source never imports it, and the published lib/index.js is a self-contained esbuild bundle. Pinning peerDependencies.typescript to ^5.0.0 nonetheless has consumers on TypeScript 6 hitting an unmet-peer warning (textlint#19).

textlint-scripts, itself a dependency of this plugin, already treats typescript as an optional peer with a permissive "*" range. This aligns the plugin with that same policy.
@myakura

myakura commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @3w36zj6, thanks for maintaining this project! Whenever you have a moment, could you please take a look at this PR? I also have two earlier PRs still open — #12 and #13 — if you're able to review those as well, that would be much appreciated. No rush at all, thank you!

@3w36zj6

3w36zj6 commented Aug 10, 2026

Copy link
Copy Markdown
Member

This package is a plugin for textlint and does not ship any TypeScript declarations, so TypeScript should be treated solely as a development dependency.

@3w36zj6 3w36zj6 changed the title fix: widen typescript peerDependency range fix: remove unnecessary TypeScript peer dependency Aug 10, 2026
@3w36zj6
3w36zj6 merged commit 4408091 into textlint:main Aug 10, 2026
7 checks passed
@myakura
myakura deleted the relax-typescript-peer-dependency branch August 10, 2026 22:15
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.

When a project uses TypeScript 6, pnpm reports peer dependency issues

2 participants