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

chore: update TypeScript to v5 #270

Merged
merged 7 commits into from
Jul 18, 2024
Merged

chore: update TypeScript to v5 #270

merged 7 commits into from
Jul 18, 2024

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Jun 7, 2024

No description provided.

src/common.ts Outdated Show resolved Hide resolved
src/parser.ts Outdated Show resolved Hide resolved
@fisker fisker changed the title Update TypeScript to v5 chore: update TypeScript to v5 Jun 7, 2024
@fisker fisker marked this pull request as ready for review June 7, 2024 08:07
3cp added a commit that referenced this pull request Jun 7, 2024
Based on the discussion in #270
@3cp
Copy link
Member

3cp commented Jul 17, 2024

I have seen weird ts v5.5 typing issue in other projects.
ts v5 seems trying to be too smart.

@fisker
Copy link
Collaborator Author

fisker commented Jul 17, 2024

Maybe this solution is acceptable? microsoft/TypeScript#9998 (comment)

@3cp
Copy link
Member

3cp commented Jul 17, 2024

I think it's a ts bug, it assumes our nextToken(parser, ...) didn't mutate parser.token.
But parser.token = is right there in the implementation of nextToken.

@3cp
Copy link
Member

3cp commented Jul 17, 2024

@3cp
Copy link
Member

3cp commented Jul 18, 2024

Had a read of the ts github issue. It sounds like ts would not address this issue anytime soon.

If you have time to apply the parser.currentToken() or getToken() solution, please go ahead :-)

@3cp
Copy link
Member

3cp commented Jul 18, 2024

I am also very confused why we didn't have this issue with ts v4 and v3 before.

# Conflicts:
#	src/parser.ts
@fisker fisker marked this pull request as draft July 18, 2024 03:17
@fisker fisker force-pushed the ts-5 branch 2 times, most recently from d953f5f to 8879c01 Compare July 18, 2024 06:19
@fisker fisker marked this pull request as ready for review July 18, 2024 06:56
@fisker
Copy link
Collaborator Author

fisker commented Jul 18, 2024

Done.

@3cp 3cp merged commit e5e89d1 into meriyah:master Jul 18, 2024
5 checks passed
@fisker fisker deleted the ts-5 branch July 18, 2024 07:59
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.

None yet

2 participants