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

build: Upgrade to TypeScript 4.5 #151

Merged
merged 1 commit into from
Jul 24, 2024
Merged

build: Upgrade to TypeScript 4.5 #151

merged 1 commit into from
Jul 24, 2024

Conversation

SimonAlling
Copy link
Owner

@SimonAlling SimonAlling commented Jul 24, 2024

This will enable upgrading to Jest 29, which requires TypeScript 4.5 if jest-environment-jsdom is used.

I did this:

npm install --save-dev --save-exact typescript@4.5

Then I got this warning when running npm run lint:

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0

YOUR TYPESCRIPT VERSION: 4.5.5

Please only submit bug reports when using the officially supported version.

So I did this:

npm install --save-dev @typescript-eslint/eslint-plugin@^4

It didn't help, so I did this:

npm install --save-dev @typescript-eslint/eslint-plugin@^5 @typescript-eslint/parser@^5

Breaking?

See #145 for details on why this should possibly be considered a breaking change.

I consider it backward compatible, because I don't think any consumer is broken by it. Notably, building with and without this PR in different Git working trees and using git diff --no-index to diff the emitted code (build/ and lib/) reveals that it is exactly identical.

@SimonAlling SimonAlling marked this pull request as ready for review July 24, 2024 11:00
@SimonAlling SimonAlling merged commit 1d60a62 into master Jul 24, 2024
7 checks passed
@SimonAlling SimonAlling deleted the typescript-4.5 branch July 24, 2024 11:02
SimonAlling added a commit that referenced this pull request Aug 1, 2024
We use TypeScript 4.5 to compile the package itself since #151 (v5.0.0), so it makes sense to use at least that version in the bootstrapped userscript as well.

I did `npm install --save-exact typescript@4.5` because it typically makes much more sense to specify an exact TypeScript version than to specify a version range.
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.

1 participant