Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move typescript to an optional peer dependency #275

Closed
wants to merge 1 commit into from

Conversation

FauxFaux
Copy link
Contributor

This mirrors how typescript-estree depends on typescript:

https://github.com/typescript-eslint/typescript-eslint/blob/946ee3b68823a48fad2cb7b99589e56a68fb11e3/packages/typescript-estree/package.json#L69-L73

typescript-estree prints a warning if it doesn't like the currently
installed typescript version, which seems like good behaviour.

This has two advantages:

  1. We don't have to update this library every time there's a new TS release
  2. Better alignment with what the user is actually using.

And some disadvantages:

  1. npx madge won't support typescript? Or will error on start. Can't test now, because this change would also need to be applied to e.g. detective-typescript.

NB: Typescript don't do semver, so the gap from 3.9 to 4.0 is the same as
the gap from 4.0 to 4.1 or 3.8 to 3.9.

This mirrors how typescript-estree depends on typescript:

https://github.com/typescript-eslint/typescript-eslint/blob/946ee3b68823a48fad2cb7b99589e56a68fb11e3/packages/typescript-estree/package.json#L69-L73

typescript-estree prints a warning if it doesn't like the currently
installed typescript version, which seems like good behaviour.

This has two advantages:

1) We don't have to update this library every time there's a new TS release
2) Better alignment with what the user is actually using.

NB: Typescript don't do semver, so the gap from 3.9 to 4.0 is the same as
the gap from 4.0 to 4.1 or 3.8 to 3.9.
@pahen pahen self-assigned this Mar 17, 2021
@FauxFaux
Copy link
Contributor Author

I decided it was easier to rewrite the entire ecosystem than to fix these bugs.

Here's my implementation of madge: https://github.com/FauxFaux/fadge

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.

2 participants