Skip to content

Commit

Permalink
feat: support TypeScript 5.1 (#7088)
Browse files Browse the repository at this point in the history
* feat: support TypeScript 5.1

* Re-apply patch-package typescript

* jsx: preserve in ast-spec

* Added component-dashed fixture

* Rename to avoid global naming conflict

* chore: only run website tests on non-forks

* chore: only run website tests on non-forks

* Updated ast-spec snapshots

* Let's try --runInBand

* How about some logging

* --verbose

* Skip parse.moduleResolver.+ tests in Node 14

* map of undefined

* more logging on process version

* Remove jest.config.js shenanigans

* Remove --frozen-lockfile for now

* Mention ts version in jest.config.js

* Split placeholder-error in twain

* Try a .skip

* Revert "Try a .skip"

This reverts commit 0b4eb19.

* Heck, let's try Node 20

* Revert "Heck, let's try Node 20"

This reverts commit c6f949b.

* skipLibCheck and strict

* Undid some changes, for 5.1.3 again

* Used new resolution courtesy of Jake

* Corrected TypeScript patching and resolution

* Fix packages/website/tsconfig.json module

* 5.1.6

* Recreated patch-package typescript

---------

Co-authored-by: “JamesHenry” <james@henry.sc>
  • Loading branch information
JoshuaKGoldberg and JamesHenry committed Jun 30, 2023
1 parent 97abdbc commit 4bf2d73
Show file tree
Hide file tree
Showing 39 changed files with 4,469 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -177,6 +177,8 @@ jobs:
retention-days: 1

website_tests:
# The NETLIFY_TOKEN secret will not be available on forks
if: github.repository_owner == 'typescript-eslint'
permissions:
contents: read # to fetch code (actions/checkout)

Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Expand Up @@ -17,6 +17,10 @@ packages/ast-spec/src/element/AccessorProperty/fixtures
# prettier doesn't yet support `const` modifiers for type parameters
packages/ast-spec/src/special/TSTypeParameter/fixtures

# prettier doesn't yet support JSX namespaced attributes
packages/ast-spec/src/jsx/JSXNamespacedName/fixtures/component/fixture.tsx
packages/scope-manager/tests/fixtures/jsx/namespaced-attribute.tsx

# Ignore CHANGELOG.md files to avoid issues with automated release job
CHANGELOG.md

Expand Down
2 changes: 1 addition & 1 deletion docs/users/Dependency_Versions.mdx
Expand Up @@ -16,7 +16,7 @@ Support for specific Current status releases are considered periodically.

## TypeScript

> The version range of TypeScript currently supported is `>=3.3.1 <5.1.0`.
> The version range of TypeScript currently supported is `>=3.3.1 <5.2.0`.
These versions are what we test against.

Expand Down
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -68,7 +68,6 @@
"@types/is-glob": "^4.0.2",
"@types/jest": "29.4.4",
"@types/jest-specific-snapshot": "^0.5.5",
"@types/lodash": "^4.14.182",
"@types/marked": "^4.0.3",
"@types/ncp": "^2.0.5",
"@types/node": "^18.11.9",
Expand Down Expand Up @@ -112,10 +111,10 @@
"ts-node": "10.7.0",
"tslint": "^6.1.3",
"tsx": "^3.12.1",
"typescript": ">=3.3.1 <5.1.0"
"typescript": "5.1.6"
},
"resolutions": {
"typescript": "~5.0.2",
"typescript": "5.1.6",
"@types/node": "^18.11.9",
"@jest/create-cache-key-function": "^29",
"@jest/reporters": "^29",
Expand Down
@@ -0,0 +1,7 @@
namespace JSX {
export interface IntrinsicElements {
'foo-bar:baz-bam': any;
}
}

const componentDashed = <foo-bar:baz-bam />;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4bf2d73

Please sign in to comment.