Commit Graph
37 Commits
Author SHA1 Message Date
fisker Cheung e14411c278 Support async parser (#12748) 2022-05-04 11:15:48 +08:00
fisker b4c74de822 Merge branch 'main' into next
# Conflicts:
#	src/cli/format.js
#	src/language-css/utils/has-string-or-function.js
#	src/language-css/utils/is-scss-variable.js
2022-05-01 21:41:20 +08:00
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
fisker Cheung c6d6b25833 prettier.{format,formatWithCursor,check}() are now async (#12574) 2022-04-29 14:22:24 +08:00
fisker Cheung 3a852871a3 Fix createSandBox 2022-04-06 16:05:22 +08:00
fisker Cheung 6016404f59 Merge branch 'main' into next
# Conflicts:
#	.eslintrc.cjs
#	.github/workflows/prod-test.yml
#	.github/workflows/validate-vendors.yml
#	scripts/build/bundler.mjs
#	scripts/vendors/bundle-vendors.mjs
#	scripts/vendors/utils.mjs
#	scripts/vendors/vendor-meta.json
#	scripts/vendors/vendors.mjs
#	src/cli/logger.js
#	src/cli/options/get-options-for-file.js
#	src/cli/options/parse-cli-arguments.js
#	src/common/util.js
#	src/language-html/utils/html-tag-names.js
#	tests/integration/__tests__/bundle.js
#	tests/integration/__tests__/loglevel.js
#	tests/integration/run-prettier.js
#	vendors/string-width.js
2022-04-06 15:41:50 +08:00
fisker Cheung 637c00618c Use published jest-light-runner (#12592) 2022-04-05 10:42:21 +08:00
fisker Cheung afd0220dea Move some bundle test code into tests/ (#12577) 2022-04-02 16:14:32 +08:00
fisker Cheung 65ce63b4dc Merge branch 'main' into next
# Conflicts:
#	package.json
#	scripts/vendors/bundle-vendors.mjs
#	scripts/vendors/vendor-meta.json
#	scripts/vendors/vendors.mjs
#	src/language-handlebars/utils.js
#	src/language-html/utils/html-elements-attributes.js
#	vendors/tempy.js
2022-04-01 10:37:35 +08:00
fisker Cheung 4b73b7e8ab Refactor format test to async (#12559) 2022-04-01 10:21:44 +08:00
fisker Cheung c96f148ccf Merge branch 'main' into next
# Conflicts:
#	tests/config/install-prettier.js
#	tests/format/js/cursor/jsfmt.spec.js
#	tests/integration/__tests__/doc-trim.js
#	tests/integration/__tests__/format.js
#	tests/integration/__tests__/line-suffix-boundary.js
#	tests/integration/__tests__/load-toml.js
#	tests/integration/__tests__/stdin-filepath.js
#	tests/integration/__tests__/with-parser-inference.js
2022-03-17 21:32:14 +08:00
fisker Cheung ae080df3e7 Enable unicorn/template-indent rule (#12469) 2022-03-17 20:13:28 +08:00
fisker Cheung c95c899b6f Merge branch 'main' into next
# Conflicts:
#	package.json
#	scripts/build/bundler.mjs
#	scripts/build/config.mjs
#	scripts/vendors/vendor-meta.json
#	scripts/vendors/vendors.mjs
#	src/cli/format.js
#	src/cli/logger.js
#	src/cli/options/get-options-for-file.js
#	src/cli/options/parse-cli-arguments.js
#	src/main/core.js
#	tests/config/install-prettier.js
#	vendors/execa.js
#	vendors/mem.js
#	vendors/string-width.js
#	vendors/tempy.js
#	yarn.lock
2022-03-17 09:44:08 +08:00
fisker Cheung 935d76780a Prevent plugin search on format test (#12322) 2022-03-15 09:44:37 +08:00
fisker Cheung 4b7a39c936 Update chalk to v5 (#12446) 2022-03-15 09:40:25 +08:00
fisker Cheung b11044e58c Merge branch 'main' into next
# Conflicts:
#	scripts/vendors/vendor-meta.json
#	src/cli/options/get-options-for-file.js
#	src/cli/options/parse-cli-arguments.js
#	src/language-js/print/class.js
#	src/language-js/print/type-annotation.js
#	src/language-js/printer-estree.js
#	src/main/options-normalizer.js
#	vendors/tempy.js
2022-03-07 11:18:46 +08: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 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
fisker Cheung be0739ec22 Add type:"module" to package.json (#12272) 2022-02-12 15:39:16 +08: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
fisker Cheung 8a1da32ebe Merge branch 'main' into next
# Conflicts:
#	tests/config/install-prettier.js
2022-02-11 17:33:56 +08:00
fisker Cheung 1ec2fd8a8b Clean installed Prettier after test (#12273) 2022-02-11 17:25:51 +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
Bogdan Chadkin 76bb0226d5 Replace globby with fast-glob (#12223)
There is already fast-glob used in src/cli/expand-patterns.js
Here I migrate everywhere to it from globby which is a thin wrapper with
a couple of unused here features.

```
du -ck dist
```
17280 kB
17260 kB
2022-02-05 10:24:10 -03: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 CheungandSosuke 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 48243c2a3e Merge remote-tracking branch 'remotes/upstream/main' into next
# Conflicts:
#	package.json
#	scripts/build/bundler.mjs
#	yarn.lock
2021-11-30 21:17:36 +08:00
fisker Cheung 1bdd1d115c Update execa to v6 (#11826) 2021-11-29 10:07:11 +08:00
dependabot[bot]andfisker Cheung 2c9adaed39 Build(deps): Bump lines-and-columns from 1.1.6 to 2.0.3 (#11861)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-11-29 10:06:40 +08:00
fisker Cheung 0cc8e96c37 Refactor installPrettier (#11476) 2021-09-09 18:53:31 +08:00
fisker Cheung 894f841fbd Style: Enforce extensions (#11227) 2021-07-21 09:10:34 +08:00
Klaus Hott Vidal b5eba9475f remove tests folder from path (#11035) 2021-06-07 17:32:22 +08:00
Klaus Hott Vidal 32b13b3972 Small detail in tests config (#11034) 2021-06-07 13:35:46 +08:00
fisker Cheung 4d37ac46a3 Add __babel_estree parser (#10910) 2021-05-19 09:22:52 +08:00
Georgii Dolzhykov 3d8dc612b5 Bump Prettier dependency to 2.3.0 2021-05-10 00:07:47 +03:00
fisker Cheung ece93681f1 Restructure test files (#10415) 2021-04-25 20:01:56 +08:00