Skip to content

Conversation

@sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Aug 29, 2023

Description

Fixes #15004

  • Update dependencies
  • Update and fix snapshots

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@sosukesuzuki
Copy link
Member Author

I'll release new patch after this is merged.

@sosukesuzuki sosukesuzuki requested a review from fisker August 29, 2023 03:26
@sosukesuzuki sosukesuzuki requested a review from fisker August 29, 2023 05:11
Copy link
Member

Choose a reason for hiding this comment

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

File name.

Copy link
Member

Choose a reason for hiding this comment

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

File name. Missing "a"

invalid
   ^

Copy link
Member

Choose a reason for hiding this comment

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

This should be valid, I think it's from babel too.

Copy link
Member

@fisker fisker Aug 29, 2023

Choose a reason for hiding this comment

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

I believe these two from existing tests? They should be still named "valid".

Better put them back, just let typescript parser to throw.

Comment on lines +33 to +35
"valid-for-using-declaration.js",
"valid-await-using-comments.js",
"valid-for-lhs-await-as-identifier.js",
"using-declarations.js",
Copy link
Member Author

Choose a reason for hiding this comment

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

typescript-estree throws for these files (tsc doesn't throw).

Copy link
Member

Choose a reason for hiding this comment

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

We can ignore edge cases.

Copy link
Member

@fisker fisker left a comment

Choose a reason for hiding this comment

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

Good job.

@fisker
Copy link
Member

fisker commented Aug 29, 2023

Size Change: +20.6 kB (0%)

Total Size: 8.5 MB

Filename Size Change
./dist/plugins/typescript.js 1.15 MB +10.3 kB (+1%)
./dist/plugins/typescript.mjs 1.15 MB +10.3 kB (+1%)

If it's possible, you can run

yarn build --file=plugins/typescript.mjs --no-minify

To compare the file with main branch see why the file size grows, and try to remove unnessary code.
But it's not that important.

@sosukesuzuki
Copy link
Member Author

@fisker Sure! I'll merge this PR after CI is passed. And I'll try to do reduce bundle size before release.

@fisker
Copy link
Member

fisker commented Aug 29, 2023

If you want do it, in my experience, I suggest you do it before merge, it's easier to switch between branches. Just a quick check is enough, maybe obvious unless code can be found, not necessary to dig deep.

@sosukesuzuki
Copy link
Member Author

I tried a little, but it was difficult, so I gave up once! sorry!

@sosukesuzuki sosukesuzuki merged commit 1ce97d1 into prettier:main Aug 29, 2023
@fisker
Copy link
Member

fisker commented Aug 29, 2023

I compared the files, there is noting we can do, we are good.

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.

Support TypeScript 5.2

2 participants