fisker Cheung
8dae4abf41
Switch print/embed to async ( #13104 )
2022-07-17 16:10:06 +08:00
fisker Cheung
e3cb487706
Merge branch 'main' into next
...
# Conflicts:
# .eslintrc.cjs
# package.json
# src/language-yaml/index.js
# yarn.lock
2022-07-11 17:03:30 +08:00
fisker Cheung
4b4e3a4666
Merge branch 'main' into next
...
# Conflicts:
# package.json
# yarn.lock
2022-07-11 15:33:30 +08:00
fisker Cheung
811b591ee8
Update dependency jest-docblock to v28.1.1 ( #13054 )
2022-07-11 10:03:49 +08:00
Huáng Jùnliàng
9dd761a6e4
fix: JSON modules disable named exports ( #13035 )
2022-06-23 02:05:46 +08:00
fisker
0e0f879c1a
Merge branch 'main' into next
...
# Conflicts:
# docs/browser.md
# package.json
# scripts/release/yarn.lock
# scripts/vendors/vendor-meta.json
# scripts/vendors/vendors.mjs
# src/cli/expand-patterns.js
# src/cli/format.js
# src/cli/utils.js
# src/language-js/index.js
# src/language-js/parse/postprocess/index.js
# src/language-js/parse/postprocess/typescript.js
# tests/format/misc/errors/invalid/jsfmt.spec.js
# tests/integration/__tests__/__snapshots__/support-info.js.snap
# website/playground/sidebar/SidebarOptions.js
# yarn.lock
2022-06-19 11:12:22 +08:00
fisker Cheung
d2bcaea121
Throw errors for invalid TSEmptyBodyFunctionExpression node ( #12982 )
2022-06-14 12:33:44 +08:00
Sosuke Suzuki
7f9a08762d
Update dependency flow-parser to v0.180.0 ( #12990 )
...
* Update `flow-parser`
* Update snapshots
2022-06-11 00:06:22 +09:00
fisker Cheung
c22ea97e00
Merge branch 'main' into next
...
# Conflicts:
# package.json
# scripts/build/bundler.mjs
# scripts/build/config.mjs
# src/language-html/print/tag.js
# src/main/load-parser.js
# src/main/parser.js
# yarn.lock
2022-06-06 22:00:41 +08:00
Sosuke Suzuki
a808df643d
Update @typescript-eslint/typescript-estree to 5.27.0 and move tests ( #12959 )
...
* Install latest typescript-estree
* Move tests for type parameter of typeof
* Update changelog
2022-06-01 06:47:51 +09:00
fisker Cheung
9569ab12aa
Merge branch 'main' into next
...
# Conflicts:
# .github/renovate.json5
# .github/workflows/lint.yml
# package.json
# src/cli/format.js
# src/language-js/print/type-annotation.js
# src/language-js/print/typescript.js
# src/language-js/utils/index.js
# tests/format/typescript/enum/jsfmt.spec.js
# tests/format/vue/with-plugins/jsfmt.spec.js
# website/yarn.lock
# yarn.lock
2022-05-28 11:19:03 +08:00
Sosuke Suzuki
9c11aa141a
Add tests for TS 4.7 features ( #12924 )
...
* Add tests for instantiation expressions
* Add tests for infer extends
* Add tests for optional variance
* Update changelog
2022-05-28 03:37:30 +09:00
Sosuke Suzuki
2fc6e5dd4f
Support TS 4.7 optional variance ( #12900 )
...
* Print `in` and `out`
* Add tests
* Add tests for jsx
2022-05-22 03:33:05 +09:00
Sosuke Suzuki
1eecc85985
Support TS 4.7 instantiation expression ( #12898 )
...
* Handle `TSInstantiationExpression`
* Print `typeParameters` for `TSTypeQuery`
* Add tests
* Add more tests
2022-05-22 03:30:47 +09:00
Sosuke Suzuki
bc6539c15c
Add tests for extends constraints for infer ( #12897 )
2022-05-22 03:28:47 +09:00
fisker Cheung
193365eb71
Load plugins asynchronously ( #12790 )
2022-05-06 09:27:54 +08:00
fisker Cheung
c1f6d021e5
Use named export instead of default export ( #12740 )
2022-05-05 15:03:08 +08:00
fisker Cheung
e14411c278
Support async parser ( #12748 )
2022-05-04 11:15:48 +08:00
fisker Cheung
a85f38f096
Merge branch 'main' into next
...
# Conflicts:
# .github/workflows/dev-test.yml
# jest.config.mjs
# package.json
# scripts/vendors/vendor-meta.json
# scripts/vendors/vendors.mjs
# src/cli/format.js
# src/cli/options/create-minimist-options.js
# src/cli/options/parse-cli-arguments.js
# src/cli/usage.js
# src/cli/utils.js
# src/common/create-ignorer.js
# src/common/load-plugins.js
# src/config/resolve-config.js
# src/index.js
# src/language-css/utils/css-units.evaluate.js
# src/language-html/ast.js
# src/language-html/print-preprocess.js
# src/language-html/utils/index.js
# src/main/multiparser.js
# tests/format/markdown/auto-link/jsfmt.spec.js
# tests/integration/__tests__/__snapshots__/config-resolution.js.snap
# tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap
# tests/integration/__tests__/file-info.js
# yarn.lock
2022-04-25 14:28:27 +08:00
Simen Bekkhus
033ac94f25
chore: disable string escaping in snapshots ( #12612 )
2022-04-08 09:59:17 +09:00
fisker Cheung
3fd64b4f30
Format .importmap file with json-stringify parser ( #12603 )
2022-04-07 09:37:30 +08:00
fisker Cheung
a21dfbfa21
Merge branch 'main' into next-rebase
...
# Conflicts:
# .eslintrc.cjs
# package.json
# scripts/build/bundler.mjs
# scripts/build/config.mjs
# scripts/build/esbuild-plugins/replace-module.mjs
# src/cli/file-info.js
# src/cli/find-config-path.js
# src/cli/index.js
2022-03-24 15:02:29 +08:00
dependabot[bot]
425255cc5b
Build(deps): Bump @babel/parser from 7.17.3 to 7.17.7 ( #12460 )
2022-03-20 04:46:45 +00:00
fisker Cheung
52c9a20e2c
Merge branch 'main' into next
...
# Conflicts:
# package.json
# src/cli/index.js
# tests/config/install-prettier.js
# tests/format/yaml/block-literal/jsfmt.spec.js
# tests/integration/__tests__/file-info.js
# yarn.lock
2022-02-21 16:12:59 +08:00
fisker Cheung
da7eb9aa60
Remove duplicated location info in error message from meriyah parser ( #12307 )
2022-02-16 08:24:53 +08:00
fisker Cheung
be0739ec22
Add type:"module" to package.json ( #12272 )
2022-02-12 15:39:16 +08:00
fisker Cheung
1b6388e9b1
Fix
2022-02-09 10:08:32 +08:00
fisker Cheung
f0b63f3dff
Merge branch 'main' into next
...
# Conflicts:
# CONTRIBUTING.md
# cspell.json
# docs/options.md
# package.json
# scripts/build/bundler.mjs
# src/language-css/loc.js
# src/language-css/parser-postcss.js
# src/language-css/utils/index.js
# tests/format/js/arrows-bind/jsfmt.spec.js
# tests/format/js/async-do-expressions/jsfmt.spec.js
# tests/format/js/bind-expressions/jsfmt.spec.js
# tests/format/js/classes/top-level-super/jsfmt.spec.js
# tests/format/js/comments-pipeline-own-line/jsfmt.spec.js
# tests/format/js/decorator-comments/jsfmt.spec.js
# tests/format/js/decorators-export/jsfmt.spec.js
# tests/format/js/decorators/jsfmt.spec.js
# tests/format/js/do/jsfmt.spec.js
# tests/format/js/export-default/escaped/jsfmt.spec.js
# tests/format/js/export-extension/jsfmt.spec.js
# tests/format/js/export-star/jsfmt.spec.js
# tests/format/js/exports/jsfmt.spec.js
# tests/format/js/invalid-code/jsfmt.spec.js
# tests/format/js/logical-assignment/jsfmt.spec.js
# tests/format/js/multiparser-invalid/jsfmt.spec.js
# tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js
# tests/format/js/object-property-comment/jsfmt.spec.js
# tests/format/js/partial-application/jsfmt.spec.js
# tests/format/js/pipeline-operator/jsfmt.spec.js
# tests/format/js/private-in/jsfmt.spec.js
# tests/format/js/record/jsfmt.spec.js
# tests/format/js/reserved-word/jsfmt.spec.js
# tests/format/js/strings/jsfmt.spec.js
# tests/format/js/throw_expressions/jsfmt.spec.js
# tests/format/js/trailing-whitespace/jsfmt.spec.js
# tests/format/js/v8_intrinsic/jsfmt.spec.js
# tests/format/misc/errors/js/literal/jsfmt.spec.js
# tests/format/misc/errors/js/object/jsfmt.spec.js
# tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js
# tests/integration/__tests__/bundle.js
# tsconfig.json
# yarn.lock
2022-02-09 09:22:32 +08:00
dependabot[bot]
b1645073b8
Build(deps): Bump @babel/parser from 7.16.12 to 7.17.0 ( #12241 )
2022-02-07 06:15:31 +00:00
fisker Cheung
9691e7bc37
Add acorn parser ( #12172 )
2022-01-28 15:25:30 +08: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
fisker Cheung and Sosuke Suzuki
6bd81c23b6
Migrate format test to ES Module ( #11902 )
...
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
2022-01-04 17:00:25 +08:00
fisker Cheung
49c6b82517
Merge branch 'main' into next
...
# Conflicts:
# package.json
# tests/integration/__tests__/help-options.js
# yarn.lock
2021-12-17 10:30:50 +08:00
dependabot[bot]
db0604eddd
Build(deps): Bump @babel/parser from 7.16.4 to 7.16.6 ( #11973 )
2021-12-15 02:04:49 +00:00
fisker Cheung
44c8508e02
Merge branch 'main' into next
...
# Conflicts:
# yarn.lock
2021-11-22 11:24:52 +08: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
fisker Cheung
3001154f8d
Merge branch 'main' into next
...
# Conflicts:
# package.json
# scripts/build/bundler.mjs
# scripts/build/config.mjs
# yarn.lock
2021-11-18 10:40:53 +08:00
Titus and sosukesuzuki
cca8469388
Add support for MDX 2 comments ( #11563 )
...
* Add support for MDX 2 comments
This adds support for MDX 2 comments (which are the same as other
comments inside JSX) in addition to MDX 1 comments (HTML-like
constructs).
Related to GH-10706.
Related to wooorm/xdm#61 .
* Fix blank line before comment
* Add `esComment` to `printer-markdown`
* Add embedded test
* Remove embedded formatter
* Add support for es-comments as blocks & test prettier-ignore comments
* Add a test for mdx pragma
* Remove duplicate fixture
* Add changelog
* Add note clarifying support
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-11-17 16:49:19 +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
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
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
sosukesuzuki
7446e06d47
Merge branch 'main' into next
2021-10-10 14:58:57 +09:00
Sosuke Suzuki and dependabot[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
fisker Cheung
beba6fa88c
Merge branch 'next' of github.com:prettier/prettier into next
...
# Conflicts:
# package.json
# yarn.lock
2021-09-08 12:54:17 +08:00
dependabot[bot]
47cfb6beb3
Build(deps): Bump typescript from 4.3.5 to 4.4.2 ( #11423 )
2021-08-29 09:37:09 +00:00
dependabot[bot] and Sosuke Suzuki
29b116b4a1
Build(deps): Bump @babel/parser from 7.15.2 to 7.15.3 ( #11345 )
...
* Build(deps): Bump @babel/parser from 7.15.2 to 7.15.3
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.15.2 to 7.15.3.
- [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.3/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 >
* Add tests for `@babel/parser` 7.15.3 (#11366 )
* Add tests for babel/babel#13659
* Add tests for babel/babel#13655
* Add tests for babel/babel#13645
* Update tests
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
2021-08-19 07:26:12 +08: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
fisker Cheung
a998e3c34d
Merge branch 'main' into next
...
# Conflicts:
# package.json
# scripts/build/bundler.mjs
# src/language-css/loc.js
# yarn.lock
2021-08-13 11:45:05 +08: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