Commit Graph
100 Commits
Author SHA1 Message Date
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
Sosuke Suzuki 9f3e84fcf8 Use Node.js 16.10.0 (#11669) 2021-10-12 16:49:29 +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
Sosuke SuzukiandGeorgii Dolzhykov aa63269743 Add new CLI option debug-print-ast (#11514)
* Add new CLI option debug-print-ast

* Add tests

* Add changelog

* Remove text from ast

* Update tests/integration/__tests__/debug-print-ast.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>

* Update tests

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-09-15 21:03:04 +09:00
Sosuke Suzuki bf5a027794 Revert workaround for node 16.9 (#11493) 2021-09-13 00:47:08 +09:00
Sosuke Suzukiandfisker Cheung 96795dc2b3 Adds more info for release URL (#11492)
* Add getReleaseUrl function

* Implement

* Add emoji

* tmp

* Update jest

* Test works

* Add comment

* Empty lines to tigger netlify build

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-09-11 16:20:26 +09:00
Sosuke Suzukiandfisker Cheung 2664fcb2ba Enable import/no-anonymous-default-export (#11478)
* Enable import/no-anonymous-default-export

* Add names to default exported

* More

* Ignore shims

* Update scripts/build/config.mjs

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

* lint  for shims

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-09-10 11:17:09 +09:00
Sosuke Suzuki 6739679767 Revert workaround (#11481) 2021-09-09 19:59:04 +09:00
Sosuke Suzuki a1cc5d4ecd refactor: Extract printChildren and printElement (#11466)
* Extract printChildrent and printElement

* Refactor printChildren
2021-09-09 19:00:14 +09:00
sosukesuzuki d812687502 Clean changelog 2021-09-09 18:29:57 +09:00
Sosuke SuzukiandJed Fox 07476f80a7 2.4 blog post (#11457)
* Mark highlights

* Add new draft

* Update intro

* Fix typo

* Update changelog_unreleased/blog-post-intro.md

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

* Update changelog_unreleased/blog-post-intro.md

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

* Update changelog_unreleased/blog-post-intro.md

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

* Address review

* Address review

* Address review

* Regenerate draft

* Update changelog_unreleased/blog-post-intro.md

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

* Update changelog_unreleased/blog-post-intro.md

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

* Address review

* Regenerate draft

* Regenerate draft

Co-authored-by: Jed Fox <git@jedfox.com>
2021-09-09 18:24:31 +09:00
sosukesuzuki a93128ff1a Update dependents count 2021-09-09 18:23:44 +09:00
sosukesuzuki 043043b8de Git blame ignore 2.4.0 2021-09-09 18:23:34 +09:00
sosukesuzuki ef514b9b5c Bump Prettier dependency to 2.4.0 2021-09-09 18:23:34 +09:00
sosukesuzuki e49951e5a3 Release 2.4.0 2021-09-09 18:19:39 +09:00
Sosuke Suzuki ce1bb16c17 Use node 16.8.0 for GitHub Actions (#11470)
* Use node 16.8

* More fix
2021-09-09 10:01:43 +09:00
Sosuke Suzuki 0eb1493988 Refactor html printer (#11462)
* tmp: not working

* works

* renamae

* Refactor

* Address review
2021-09-08 16:32:20 +09:00
Sosuke Suzuki bf2a24fdd1 Add tests for release script (#11454)
* Install jest

* Configure jest script

* Fix eslintrc

* Add @types/jest

* Add test for validate-new-version

* Fix eslintrc

* Add workflow file

* Add node version

* cd to script/release

* Fix workflow file

* Fix version

* Ignore from root

* Update yarn.lock

* Set defaults.run.working-directory
2021-09-07 14:53:45 +09:00
Sosuke Suzuki 2bbe331f64 Regenerate lockfile (#11458)
* Regenerate yarn.lock

* Fix  tests

* Add yarn.lock to workflow paths
2021-09-07 13:10:54 +09:00
Sosuke Suzuki f5abf17bf0 Update stage 3 -> stage 4 (#11456) 2021-09-06 04:34:53 +09:00
Sosuke Suzuki affc17392d Fix blog draft script (#11453) 2021-09-05 22:51:23 +09:00
Sosuke Suzuki bef39f2394 Update @babel/parser to 7.15.4 (#11436)
* Install new babel/parser

* Add tests for static blocks with line breaks
2021-09-04 22:02:30 +09:00
Sosuke Suzuki c2808faf2a Fix Playground (#11433)
* Revert ENABLED_OPTIONS

* Fix

* Fix typo
2021-09-02 17:55:30 +09:00
Sosuke Suzuki af19dd18d6 Improve generate changelog script (#11427)
* Output file path

* Address review
2021-08-31 10:55:16 +09:00
Sosuke Suzuki 6dd2788e85 Support TypeScript 4.4 (#11426)
* Update to ts-estree 4.30

* Add tests

* Add changelog
2021-08-31 10:29:20 +09:00
Sosuke Suzuki 53f95f3500 Support hack-style pipeline (#11335)
* Avoid to conflicts to v8intrinsic plugin

* Support hack-style pipeline

* Update tests for hask-style pipeline

* Update tests 2

* Add changelog

* Update misc tests

* Address reviews

* Fix type error

* Copy plugin array

* Add tests

* Address review

* Add error tests
2021-08-15 01:16:13 +09:00
Sosuke Suzuki 83e5ebe891 Add a script to generate unreleased changelog (#10988)
* Add script to generate changelog

* Fix by prettier

* Use CHANGELOG_CATEGORIES from utils

* Fix filename

* Fix typo

* Add comments

* Replace codeblock

* Fix typo

* Avoid to use top-level await

* Use enquirer

* Address review

* Use meriyah for mjs

* Add comment

* Update usase comment

* Update CONTRIBUTING.md
2021-08-13 12:47:18 +09:00
Sosuke Suzuki 0507897bde Use cspell options (#11336) 2021-08-12 18:55:21 +09:00
Sosuke Suzuki a14c55009a Improve types for using babel parser (#11316) 2021-08-11 23:06:52 +09:00
Sosuke Suzuki 9e34cbcc98 Update @babel/parser to 7.15.2 (#11331)
* Install new babel

* Remove ts-expect-error
2021-08-09 02:26:42 +09:00
Sosuke Suzuki 9dcfd16e6a Use ts-expect-error instead of ts-ignore (#11330) 2021-08-09 00:00:22 +09:00
Sosuke Suzuki 6ea2aa22c4 Follow up #11314 (#11315) 2021-08-07 03:18:53 +09:00
Sosuke Suzuki e315513178 Use regexp instead of two include methods (#11314) 2021-08-06 23:34:35 +09:00
Sosuke Suzuki 1645e7a9c4 Update to babel/parser 7.15.0 (#11310)
* Update to babel/parser 7.15

* Avoid plugin conflicts

* Remove allowAwaitOutsideFunction

* Add remove private-in

* Update tests for top-level-await

* Update typescript tests

* Handle bar style record/tuple

* Update tests

* Use appendPlugin

* Dont consider about bar style record and tuple

* Revert appendChild

* Update appendPlugins
2021-08-05 19:14:42 +09:00
Sosuke Suzuki b6fd414918 Count correctly regex literals in method chain arguments (#11299)
* Use getStringWidth instead of String length

* Add changelog

* Fix changelog
2021-08-02 14:15:07 +09:00
Sosuke Suzuki bd1c1bd08f Update node-actionlint to 1.1 (#11277) 2021-07-28 21:14:15 +09:00
Sosuke Suzuki 0792cf9604 Fix formatting intersection types that includes mapped types (#11247)
* Treat TSMappedType as object types

* Add tests

* Add changelog
2021-07-27 00:49:24 +09:00
Sosuke Suzuki 0696f583ee Use node-actionlint (#11268) 2021-07-26 09:23:54 +09:00
Sosuke Suzuki 1ecae48ae8 Support parenthesized tagged template literals for styled components (#11246)
* Support parenthesized styled.property

* Add changelog

* Fix changelog
2021-07-25 18:16:25 +09:00
Sosuke Suzukiandfisker Cheung 4d8871c106 Migrate generate-schema script to ESM (#11226)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-07-20 19:25:54 +08:00
Sosuke Suzuki aefcb0cc0a Add types for cosmiconfig explorer (#11224) 2021-07-19 16:41:40 +09:00
Sosuke Suzukiandfisker Cheung c2599d4714 Fix workflow files according to actionlint (#11197)
* Fix by actionlint

* Run actionlint in GH Actions

* Update cspelljson

* Test

* Revert

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-07-13 17:27:04 +09:00
Sosuke Suzuki fceaab3e84 Move type definition for angular-html-parser (#11193) 2021-07-12 15:42:29 +09:00
Sosuke Suzuki 392c72b3cd Fix replace-module plugin name (#11192) 2021-07-12 07:45:33 +08:00
Sosuke Suzuki 1a535de3f8 Clean changelog unreleased (#11111) 2021-06-26 17:37:17 +09:00
sosukesuzuki d345f173ea Git blame ignore 2.3.2 2021-06-26 17:31:48 +09:00
sosukesuzuki 0747d92041 Bump Prettier dependency to 2.3.2 2021-06-26 17:31:48 +09:00
sosukesuzuki 9a8b579d36 Release 2.3.2 2021-06-26 17:27:44 +09:00
Sosuke Suzuki 2faf01b8b4 Add changelog-for-patch script (#11052)
- Add ./scripts/changelog-for-patch.mjs
- Extract common functions to ./scripts/utils/changelog
- Use changelog-for-patch.mjs from release script
2021-06-26 16:29:30 +09:00
Sosuke Suzuki 82687f1c02 Print override modifier for parameter property (#11074)
* Install new typescript-estree

* Print override modifier for parameter property

* Add tests

* Add changelog

* Fix by Prettier

* Update babel-parser

* Update snapshot

* Update snapshots
2021-06-15 15:28:31 +09:00
Sosuke Suzuki 17d8cb57b7 Add PR and users link (#11072) 2021-06-14 22:05:06 +09:00
Sosuke Suzuki 3332a28aaf Update generate-schema script (#11043)
* Support custom parser and use anyOf

* Update snapshots
2021-06-11 14:04:51 +09:00