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: support TypeScript 4.8 #5551

Merged
merged 8 commits into from Aug 29, 2022
Merged

feat: support TypeScript 4.8 #5551

merged 8 commits into from Aug 29, 2022

Conversation

bradzacher
Copy link
Member

@bradzacher bradzacher commented Aug 26, 2022

PR Checklist

Overview

This PR:

  • bumps the TS version to 4.8.2
  • updates the allowed range to include 4.8.2
  • regenerates the lib variables for the scope manager
  • adds eslint-plugin-deprecation to catch the deprecated property usage added in TS4.8
  • fixes all deprecated member usage
    • of particular note is two new utility functions - getModifiers and getDecorators which do the heavy lifting in this backwards-compatible work.
  • adds patch-package so that we can slightly tweak some of the types locally
    • add some additional @deprecated annotations to new functions that are only in TS4.8+. This was the easiest way I could see to "ban" the functions in our codebase.
    • fix a type in the tsutils package to be more correct so that it supports TS4.8 types.
  • adds a netlify config to the repo.
    • previously the config was housed in the netlify UI - but I think it's better if we manage it in the open in the repo so that (a) contributors can update it if needs be and (b) we can tie config to specific commits and branches rather than being global

@bradzacher bradzacher added the dependencies Issue about dependencies of the package label Aug 26, 2022
@nx-cloud
Copy link

nx-cloud bot commented Aug 26, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit e8d1185. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Aug 26, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit e8d1185
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/630c2ad5d26c7800088b39b1
😎 Deploy Preview https://deploy-preview-5551--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Aug 28, 2022

Codecov Report

Merging #5551 (e8d1185) into main (14b33a4) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5551      +/-   ##
==========================================
+ Coverage   91.57%   91.62%   +0.05%     
==========================================
  Files         132      134       +2     
  Lines        1496     1505       +9     
  Branches      226      226              
==========================================
+ Hits         1370     1379       +9     
  Misses         62       62              
  Partials       64       64              
Flag Coverage Δ
unittest 91.62% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/scope-manager/src/lib/dom.iterable.ts 100.00% <ø> (ø)
packages/scope-manager/src/lib/dom.ts 100.00% <ø> (ø)
packages/scope-manager/src/lib/webworker.ts 100.00% <ø> (ø)
packages/scope-manager/src/lib/es2020.intl.ts 100.00% <100.00%> (ø)
packages/scope-manager/src/lib/es2022.intl.ts 100.00% <100.00%> (ø)
...kages/scope-manager/src/lib/es2022.sharedmemory.ts 100.00% <100.00%> (ø)
packages/scope-manager/src/lib/es2022.ts 100.00% <100.00%> (ø)
packages/scope-manager/src/lib/index.ts 100.00% <100.00%> (ø)

@bradzacher bradzacher marked this pull request as ready for review August 28, 2022 14:00
[build]
base = ""
publish = "packages/website/build"
command = "NX_VERBOSE_LOGGING=true yarn patch-package && yarn nx build website"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: We could potentially remove the opt-in verbose logging, it was only needed while troubleshooting something a long while back

@@ -110,6 +110,7 @@ export default createRule<Options, MessageIds>({
if (
prevToken &&
isTokenOnSameLine(prevToken, commaToken) &&
// eslint-disable-next-line deprecation/deprecation -- TODO - switch once our min ESLint version is 6.7.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I'm forgetting something obvious, what was the line in the sand on ESLint versions here? Is it documented somewhere else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see I found it on eslint.org, isSpaceBetweenTokens() - replaced by isSpaceBetween()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it's marked as deprecated in our types.
in the next major we'll probably do a massive bump to a higher ESLint version (maybe 6.7?) to enable us to switch to these new APIs and clean house as well.

Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🎉

@bradzacher bradzacher merged commit 81450ed into main Aug 29, 2022
@bradzacher bradzacher deleted the support-TS4.8 branch August 29, 2022 11:54
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Sep 1, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.35.1` -> `5.36.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.35.1/5.36.1) |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.35.1` -> `5.36.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.35.1/5.36.1) |

---

### Release Notes

<details>
<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/eslint-plugin)</summary>

### [`v5.36.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#&#8203;5361-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5360v5361-2022-08-30)

[Compare Source](typescript-eslint/typescript-eslint@v5.36.0...v5.36.1)

**Note:** Version bump only for package [@&#8203;typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/eslint-plugin)

### [`v5.36.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#&#8203;5360-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5351v5360-2022-08-30)

[Compare Source](typescript-eslint/typescript-eslint@v5.35.1...v5.36.0)

##### Bug Fixes

-   **eslint-plugin:** revert [#&#8203;5266](typescript-eslint/typescript-eslint#5266) ([#&#8203;5564](typescript-eslint/typescript-eslint#5564)) ([7a8afe2](typescript-eslint/typescript-eslint@7a8afe2))

##### Features

-   support TypeScript 4.8 ([#&#8203;5551](typescript-eslint/typescript-eslint#5551)) ([81450ed](typescript-eslint/typescript-eslint@81450ed))

#### [5.35.1](typescript-eslint/typescript-eslint@v5.35.0...v5.35.1) (2022-08-24)

##### Bug Fixes

-   **eslint-plugin:** correct rule schemas to pass ajv validation ([#&#8203;5531](typescript-eslint/typescript-eslint#5531)) ([dbf8b56](typescript-eslint/typescript-eslint@dbf8b56))

</details>

<details>
<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/parser)</summary>

### [`v5.36.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#&#8203;5361-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5360v5361-2022-08-30)

[Compare Source](typescript-eslint/typescript-eslint@v5.36.0...v5.36.1)

**Note:** Version bump only for package [@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)

### [`v5.36.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#&#8203;5360-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5351v5360-2022-08-30)

[Compare Source](typescript-eslint/typescript-eslint@v5.35.1...v5.36.0)

**Note:** Version bump only for package [@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)

#### [5.35.1](typescript-eslint/typescript-eslint@v5.35.0...v5.35.1) (2022-08-24)

**Note:** Version bump only for package [@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xODIuNCIsInVwZGF0ZWRJblZlciI6IjMyLjE4Mi40In0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1530
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@JeanMeche
Copy link

For those looking for the info, 4.8 support was shipped with 5.36.1

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Issue about dependencies of the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript 4.8 Support
4 participants