Commit Graph
100 Commits
Author SHA1 Message Date
Sosuke Suzuki fe6820e815 Try to fix pnpm error on Dev Package Tests (#12774)
* Remove `-y` from `pnpm init`

* Change
2022-05-01 11:49:15 +09:00
Sosuke Suzuki 9348049311 Refactor: Use optional chaining in src/language-js/comments.js (#12747)
* Use optional chaining in `src/language-js/comments.js`

* Using sets

* Address review
2022-04-30 21:16:43 +09:00
Sosuke Suzuki 504d751036 Preserve blank line between export specifiers (#12746)
* Preserve blank line between export specifiers

* Add changelog

* rename
2022-04-29 17:42:42 +09:00
Sosuke Suzuki a4cba80dc0 Allow formatting for Vue template expression written in TypeScript (#12584)
* Support TS expression in vue SFC

* Add changelog

* Add `__ts_expression`

* Add `__vue_ts_expression`

* Add tests

* Do not use `ast.walk`

* Address review

* Add `__vue_ts_event_binding`

* Fix
2022-04-17 13:12:19 +09:00
Sosuke Suzukiandfisker Cheung fa3b95c2e1 Remove lodash (#12628)
* Replace `groupBy`

* Replace `partition`

* Replace `pick`

* Move `partition`

* Replace `uniqBy`

* Replace `fromPairs`

* Remove usage from website

* Reuse `partition`

* Remove from package.json

* Fix

* Use `ignore.default`

* Add `resolveConfig` to `FileInfoOptions`

* Explicit tuple types

* Make `cache` optional

* Fix cosmiconfig type

* Use `@ts-expect-error` for private property access

* Add type annotation for validate

* Fix type errors for `OptionInfo`

* Add `@ts-expect-error`

* Fix type of `normalizeOptions`

* Fix `OptionInfo` type

* Add `@ts-expect-error` for `option-normalizer`

* Avoid type error

* Fix typo

* Add types for lodash fns

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-10 15:26:07 +09:00
Sosuke Suzukiandfisker Cheung f8ce0e303b Fix HTML AST JSON serializer for debugging (#12611)
* Add `JSON.stringify` replacer

* Fix serializer for playground

* Use `opt.parser`

* Consitent style

* lwc

* Revert "lwc"

This reverts commit 799bf357e8b30765944b29639a45b3c326bce615.

Revert "Use `opt.parser`"

This reverts commit 3046f52798ce740ea0ed267bf46c3221606b1fbc.

Revert "Add `JSON.stringify` replacer"

This reverts commit 54266cde61ea8f7cc4b3b0c9714559c93b456923.

* Rewrite `Node` class

* Revert changes in playground

* Revert wrong changes

* Update clean.js

* Set `configurable: true`

* Fix missing `return`

* Fix: "children" and "attrs" are enumerable

* Type check

* Revert unnessary change

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-08 23:36:23 +09:00
Sosuke Suzuki 41ebbb0a0d Update vendors (#12585) 2022-04-03 10:27:05 +09:00
Sosuke Suzuki 8a52865cf9 Clean changelog_unureleased 2022-04-03 01:37:22 +09:00
Sosuke Suzuki 54b5418936 Merge branch 'patch-release' into main 2022-04-03 01:35:53 +09:00
Sosuke Suzuki 3abd7c9cd6 Git blame ignore 2.6.2 2022-04-03 01:33:49 +09:00
Sosuke Suzuki e2d9e9139d Bump Prettier dependency to 2.6.2 2022-04-03 01:33:49 +09:00
Sosuke Suzuki d2b63070af Update dependents count 2022-04-03 01:33:18 +09:00
Sosuke Suzuki d6f82a024a Release 2.6.2 2022-04-03 01:31:20 +09:00
Sosuke Suzukiandfisker Cheung 2bca9d65f4 Add new workflow to prevent updating users.yml (#11784)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-03 00:32:34 +09:00
Sosuke Suzuki 875694e3a9 Install dependencies for website (#12566) 2022-04-03 00:32:33 +09:00
Sosuke Suzukiandfisker Cheung 6d7c8ac387 Add new workflow to prevent updating users.yml (#11784)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-02 20:46:14 +08:00
Sosuke Suzuki 250847c2cc Install dependencies for website (#12566) 2022-03-31 22:50:48 +09:00
Sosuke Suzuki f7f13dcf82 Clean changelog_unreleased 2022-03-25 15:24:55 +09:00
Sosuke Suzuki f35121bde4 Git blame ignore 2.6.1 2022-03-25 14:01:16 +09:00
Sosuke Suzuki 678fe1562d Bump Prettier dependency to 2.6.1 2022-03-25 14:01:16 +09:00
Sosuke Suzuki 348ee15661 Update dependents count 2022-03-25 14:00:46 +09:00
Sosuke Suzuki ad505bf771 Release 2.6.1 2022-03-25 13:58:22 +09:00
Sosuke Suzuki 0e6c1d58d8 Enter OTP via enquirer (#12528) 2022-03-24 23:47:29 +09:00
Sosuke Suzuki becb6c9b74 Fix non-idempotent formatting of function calls with complex type arguments (#12508)
* Fix

* Add TS tests

* Add Flow tests

* Add changelog
2022-03-23 23:09:58 +09:00
Sosuke Suzuki 0d34974a07 Run prettier after release (#12472) 2022-03-16 18:38:31 +08:00
Sosuke Suzuki 58e48b79da Clean changelog_unreleased 2022-03-16 13:35:41 +09:00
eb671dd983 2.6 blog post (#12412)
* Generate

* Generate

* Add TS4.6 changelog

* Regenerate

* Add changelog to switch to esbuild

* Add category

* Update changelog_unreleased/blog-post-intro.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Address review

* Regenerate

* Highlight TS 4.6

* Update changelog_unreleased/blog-post-intro.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Regenerate

* Update changelog_unreleased/typescript/12390.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Add thanks message for sponsors

* Address review!

* Update cspell.json

* Fix link of Ubie

* Generate

* Add `Thanks to our sponsors!`

* Update cspell

* Address review

* Update changelog_unreleased/blog-post-intro.md

Co-authored-by: Alexander Kachkaev <alexander@kachkaev.ru>

* Regenerate

* Add `--print-truncate` option

* Address review

* Generate

Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: Alexander Kachkaev <alexander@kachkaev.ru>
2022-03-16 13:25:48 +09:00
Sosuke Suzuki 2f45d9bcc3 Fix release script 2022-03-16 13:25:18 +09:00
Sosuke Suzuki 08bcf83a2e Update dependents count 2022-03-16 13:24:52 +09:00
Sosuke Suzuki 22e59fb8c6 Git blame ignore 2.6.0 2022-03-16 13:24:48 +09:00
Sosuke Suzuki f7c4423733 Bump Prettier dependency to 2.6.0 2022-03-16 13:24:48 +09:00
Sosuke Suzuki cba25e6b09 Release 2.6.0 2022-03-16 13:09:58 +09:00
Sosuke Suzuki 828b7a30ea Print trailing comma for rest elements in tuple types (#12390)
* Remove `hasRest` condition for printing tuple types

* Update snapshots

* Fix test file name

* Add changelog
2022-03-05 15:40:11 +09:00
Sosuke Suzukiandfisker Cheung 199a1bb389 Support decorator auto accessors syntax (#12299)
* Handle `ClassAccessorProperty`

* Disable file

* Add `babel-plugins` tests

* Add more tests

* Fix tests

* Fix typo

* Add changelog

* Fix printing for no-semi

* Update statement.js

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-03-02 16:00:50 +09:00
Sosuke Suzuki 162097e2d2 Format .swcrc as a JSON file (#12320)
* Format `.swcrc` as JSON

* Test `.swcrc` JSON formatting

* Add changelog

* Update snapshots

* Address reviews

* Update `cspell.json`

* Address review
2022-02-18 08:39:12 +09:00
Sosuke Suzuki 8c49fd0f6f Support destructuring private proposal (#12276)
* Enable `destructuringPrivate` plugiin

* Add tests

* Add changelog

* Add more tests
2022-02-14 11:28:47 +09:00
Sosuke Suzukiandfisker Cheung 0aff39fd2b Update docs about ./scripts/vendors (#12300)
* Update docs

* Update scripts/vendors/README.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-02-14 11:26:29 +09:00
Sosuke Suzuki b14b13d2cf Update tempy to 2.0.0 (#12247)
* Update `tempy`

* require `tempy` directly

* Fix

* Fix

* Vendors

* Remove `vendord.d.tsd`

* Fix path
2022-02-12 18:23:50 +09:00
Sosuke Suzuki 5fbb8cacc4 Add changelog for unicode set notation proposal (#12277)
* Add changelog for unicode set notation

* Fix typo
2022-02-12 17:56:35 +09:00
Sosuke Suzuki 34fbd099de Update execa to 6.0.0 (#12245)
* Update execa

* Fix

* require `execa` directly

* Run `vendors:bundle`

* Run `vendors:bundle`

* Generate dts with considering defautl export

* Remove `vendors-versions.json`
2022-02-12 12:07:22 +09:00
Sosuke Suzuki 6819dc91f6 Add an esbuild plugin to add @ts-nocheck annotation for vendors (#12248)
* Enable prettier

* Add `esbuildPluginTsNocheck`

* Run build

* Update cspell.json
2022-02-06 23:25:29 +09:00
Sosuke Suzuki fce558e97a Tweaks vendors (#12246)
* Add `scripts` for vendors

* Add links to README
2022-02-06 21:44:54 +09:00
Sosuke Suzuki 1f50c8417d Run tests for logical-assignment operators witn flow (#12244) 2022-02-06 21:07:02 +09:00
Sosuke Suzuki 0abd1907bb Bundle Pure ESM Packages into /vendors/*.js as CommonJS (#12217)
* string-width

* Add bundle script

* Update package.json

* mem

* Add version validator

* Throw error

* Change filename

* Add documents

* Generate d.ts

* Fix lint problems

* globby

* Add workflow to validate vendor versions

* Fix eslintignore

* Fix

* Fix spell

* Address review

* process.exitCode = 1

* test validation

* Revert "test validation"

This reverts commit 5a86d5f71212e0e900709238a8cc109716678864.

* Remove exists files

* Fix conflicts

* Clean

* Remove globby
2022-02-06 17:31:50 +09:00
Sosuke Suzuki a0cc4ab43b Reduce bundle size of parser-postcss.js (#12204)
* Extract utils

* Move `utils.js` to `utils/index.js`
2022-01-31 16:46:47 +09:00
Sosuke Suzuki 54df16cdf5 Extract text utils that is used by babel-parser.js (#12203) 2022-01-31 00:45:58 +09:00
Sosuke Suzuki ff78a94424 Reduce bundle size of parser-html.js (#12176) 2022-01-28 10:07:37 +08:00
Sosuke Suzuki 893f43a599 Remove unused api at build time (#12171) 2022-01-27 19:24:36 +09:00
Sosuke Suzuki bb130d2d6e Extract getStringWidth (#12173) 2022-01-27 19:24:11 +09:00
Sosuke Suzuki b0e87946e9 refactor: Use default export for some utils (#12168) 2022-01-27 17:23:35 +08:00
Sosuke Suzuki 23dea6c0bb Reduce JS parsers bundle size 2 (#12164)
* Move get-shebang

* Use `getLast` directly

* Move `isNonEmptyArray`
2022-01-27 15:44:53 +09:00
Sosuke Suzuki d13feed42b Reduce JS parsers bundle size (#12156)
* Extract utils

* utils.js -> utils/index.js

* Fix linter
2022-01-26 23:29:19 +09:00
Sosuke Suzuki db73cc8e0c Print end-of-line comment for continue/break statements (#12075)
* Add handleBreakAndContinueStatementComments to handleEndOfLineComment

* Add tests

* Add changelog

* Update tests

* Add more tests

* Fix for own line comments

* Fix tests

* Fix tests

* Fix tests

* Add unstable tests
2022-01-19 22:29:37 +09:00
Sosuke Suzuki 6ccc462409 Print comments for parenthesized TS keyword types (#12070)
* Prefer node.start for TS keyword types

* Add tests

* Add changelog

* Refactor

* Use isTsKeywordType

* Fix lint problems
2022-01-13 09:54:06 +09:00
Sosuke Suzuki c083abac94 Enable @typescript-eslint/prefer-ts-expect-error (#12071)
* Add @typescript-eslint/eslint-plugin

* Enable prefer-ts-expect-error

* Address review
2022-01-10 10:35:09 +09:00
Sosuke Suzuki d1132d5f2b Add a new blog post (#12046)
* Add new blog

* Fix typo
2022-01-06 11:50:30 +09:00
Sosuke Suzuki a50bc4e14a Preserve end-of-line comment for if statement without blocks (#12017)
* Print as dangling comments

* Add tests

* Add changelog

* Use symbol instead of string
2022-01-06 09:31:58 +09:00
Sosuke Suzuki 66e4597c0e Update acorn (#12039) 2022-01-03 04:22:42 +08:00
sosukesuzuki 59336b9791 Clean changelog_unreleased 2021-12-04 23:35:40 +09:00
sosukesuzuki c63f8617d5 Merge branch 'patch-release' into main 2021-12-04 23:33:56 +09:00
sosukesuzuki 2ae1f98475 Update dependents count 2021-12-04 23:33:30 +09:00
sosukesuzuki 7a8e42de18 Git blame ignore 2.5.1 2021-12-04 23:33:25 +09:00
sosukesuzuki 4683a6284d Bump Prettier dependency to 2.5.1 2021-12-04 23:33:25 +09:00
sosukesuzuki 56ed71d1c9 Release 2.5.1 2021-12-04 23:31:03 +09:00
Sosuke Suzukiandfisker Cheung c0250b3837 Improve formatting for empty tuple types (#11884)
* Don't print trailing comma when tuple is empty

* Add tests

* Don't print softline

* Add tests

* Update tests

* Add changelog

* Update changelog_unreleased/typescript/11884.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* Fix names

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-12-04 22:21:21 +09:00
Sosuke Suzuki 046132520d Remove prepare-release script (#11913) 2021-12-03 18:06:15 +09:00
Sosuke Suzuki 6b254d57ec Add build script requirements (#11905) 2021-12-02 20:59:38 +09:00
Sosuke Suzukiandfisker Cheung e17404eeb1 Improve formatting for empty tuple types (#11884)
* Don't print trailing comma when tuple is empty

* Add tests

* Don't print softline

* Add tests

* Update tests

* Add changelog

* Update changelog_unreleased/typescript/11884.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* Fix names

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-11-30 23:48:28 +09:00
sosukesuzuki 7fc196e96b Clean changelog_unreleased 2021-11-25 23:12:16 +09:00
04aa850fde Add 2.5 blog (#11823)
* Mark highlights

* Update intro

* Draft

* Update changelog

* Update changelog

* Regenerate draft

* Update TS 4.5 blog URL

* Regenerate draft

* Fix by prettier

* Fix

* Remove changelogs released already

* Address review

* Update

* Regenerate draft

* Regenerate draft

* Regenerate

* Update changelog_unreleased/typescript/11515.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Update changelog_unreleased/typescript/11721.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Update changelog_unreleased/mdx/11563.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Update changelog_unreleased/mdx/11563.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Update website/blog/2021-11-21-2.5.0.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Update website/blog/2021-11-21-2.5.0.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Regenerate

* Address reviews

* Regenerate

* Use examples

* Regenerate

* Address review

* Renegrate

* Address review

* Regenerate

* MDX 2 comments => MDX v2 comment syntax

* Fix

* Update changelog_unreleased/blog-post-intro.md

Co-authored-by: Lucas Azzola <derflatulator@gmail.com>

* Update changelog_unreleased/typescript/11721.md

Co-authored-by: Lucas Azzola <derflatulator@gmail.com>

* Regenerate

* Update changelog_unreleased/typescript/11515.md

Co-authored-by: Jed Fox <git@jedfox.com>

* Regenerate

* Address review

* Regenerate

* Address review

* Regenerate

Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
2021-11-25 23:04:16 +09:00
sosukesuzuki 255d38982f Update dependents count 2021-11-25 23:00:50 +09:00
sosukesuzuki 854ca328a2 Git blame ignore 2.5.0 2021-11-25 23:00:45 +09:00
sosukesuzuki 846dbdd7e8 Bump Prettier dependency to 2.5.0 2021-11-25 23:00:45 +09:00
sosukesuzuki e351bfc678 Release 2.5.0 2021-11-25 22:57:21 +09:00
Sosuke Suzuki 7acdac30db Remove unnecessary parentheses for decorators (#11849)
* Remove unnecesary parans for typescript parser

* Add tests

* Update changelog
2021-11-21 15:54:18 +09:00
Sosuke Suzukiandfisker Cheung e1cc5b227c Update typescript to 4.5.2 (#11831)
* Update typescript to 4.5.2

* Try increase `--max-old-space-size`

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-11-21 14:10:50 +09:00
Sosuke Suzuki 9e1038c0eb Support TypeScript 4.5 syntax (#11813)
* Update dependencies

* Add tests for type-only module specifiers

* Add tests for ts import assertions

* Add tests for ts private-fields-in-in

* Update changelog

* Update misc tests

* Update SYNTAX_KIND_PROPERTY_DEFINITION

* List typescript from error list
2021-11-16 10:15:08 +09:00
Sosuke Suzuki 8f7c2f77a4 Respect spacing for between expressions and parentheses in embedded CSS (#11800)
* Fix embedded css formatting

* Add changelog
2021-11-12 23:17:29 +09:00
Sosuke Suzukiandfisker Cheung aab66b846b Add more tests, update changelog (#11779)
* Update changelog

* Fix

* Add more tests

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-11-08 22:52:20 +09:00
Sosuke Suzuki 6a0995040d Ignore strict errors by @babel/parser (#11778)
* Ignore StrictEvalArguments

* Ignore EvalArgumentsBinding

* Igngore StrictFunction

* Updates tests for binding eval

* Updates tests for eval

* Update changelog

* Address review
2021-11-08 15:14:20 +09:00
Sosuke Suzuki 2eb7cdd613 (only babel-ts) Support TypeScript 4.5 type-only module specifiers (#11723)
* Support TypeScript 4.5 type-only module specifiers

* Add tests

* Update changelog
2021-10-30 21:52:49 +09:00
Sosuke Suzuki ce0f70c9d2 Update to @babel/parser 7.16 (#11722)
* Update to 7.16

* Fix printing importKind

* Remove classStaticBlock from plugins
2021-10-30 20:56:36 +09:00
Sosuke Suzuki fb7080f82d Handle TypeScript 4.5 new file extensions .mts and .cts (#11721)
* Handle .mts and .cts

* Update integration tests

* Add changelog
2021-10-30 20:56:12 +09:00
Sosuke Suzuki 6f602d1126 Fix formatting for tagged template decorators (#11717)
* Fix formatting for tagged template decorators

* Add changelog
2021-10-25 21:23:42 +09:00
Sosuke Suzuki 65e01b7c03 Update typescript-estree to 5.x (#11676)
* Remove useJSXTextNode

* Replace TSAbstractClassProperty to TSAbstractPropertyDefinition

* Throw syntax error for inalid abstract property

* Support PropertyDefinition for quoted props

* Refactor postprocess

* Add tests for removing TSParenthesizedType

* Install new ts-estree

* Remove unused handling TSPrivateIdentifier

* Fix lint problem

* Address review
2021-10-20 15:13:02 +09:00
Sosuke Suzuki 7c6d0e462b Keep trailing commas for type parameters in embedded TSX (#11685)
* Keep trailing comma for embedded tsx

* Fix

* Add changelog

* Use dummy filepath
2021-10-19 16:15:05 +09:00
Sosuke Suzuki 79fa4f9383 Improve with (...) formatting (#11637)
* Null checking

* Improve configuration formatting

* Add tests

* Add changelog

* Format
2021-10-19 15:31:53 +09:00
sosukesuzuki fa5963730a Merge branch 'main' into next 2021-10-13 14:04:02 +09:00
Sosuke Suzuki 9f3e84fcf8 Use Node.js 16.10.0 (#11669) 2021-10-12 16:49:29 +09:00
sosukesuzuki 7446e06d47 Merge branch 'main' into next 2021-10-10 14:58:57 +09:00
Sosuke Suzuki 5909f5b3f1 Extract unified plugins (#11632) 2021-10-07 21:22:32 +09:00
Sosuke Suzuki 6106421f0a Remove unnecessary copy (#11602) 2021-10-05 14:23:01 +09:00
Sosuke Suzuki 8c23c58b7e Enable jest/prefer-to-be (#11627) 2021-10-04 07:46:38 +09:00
Sosuke Suzukianddependabot[bot] fb7451a1a2 Support right precedence hack-style pipeline (#11557)
* Build(deps): Bump @babel/parser from 7.15.5 to 7.15.7

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.15.5 to 7.15.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.15.7/packages/babel-parser)

---
updated-dependencies:
- dependency-name: "@babel/parser"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Build(deps): Bump @babel/parser from 7.15.5 to 7.15.6

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.15.5 to 7.15.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.15.6/packages/babel-parser)

---
updated-dependencies:
- dependency-name: "@babel/parser"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* tmp

* paren

* tmp

* Return parts simply

* Recursive for hack pipe

* Update tests

* Revert shouldFlatten

* Revert needs-parens

* Fix

* Fix lint problems

* Update error message

* Fix isEnabledHackPipeline logic

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-02 11:34:32 +09:00
Sosuke Suzuki 41d77d6c13 Remove PipelineTopicExpression and PipelinePrimaryTopicReference (#11531) 2021-09-22 18:08:08 +09:00
Sosuke Suzuki 30f82c0356 Remove sentence for copying from CHANGELOG (#11530) 2021-09-17 20:29:18 +09:00
Sosuke Suzuki 8bea529fde Fix changelog for #10961 (#11528) 2021-09-16 20:25:18 +03:00
sosukesuzuki 099b226913 Git blame ignore 2.4.1 2021-09-16 15:09:12 +09:00
sosukesuzuki 2b5b22056e Bump Prettier dependency to 2.4.1 2021-09-16 15:09:12 +09:00
sosukesuzuki 7ced9e6654 Release 2.4.1 2021-09-16 15:06:00 +09:00