Commit Graph
100 Commits
Author SHA1 Message Date
fisker Cheung 81a4d455f3 Build: Refactor build script (#13513) 2022-09-25 11:50:59 +08:00
fisker Cheung 08620b41eb Use ESM version of parsers in bundles (#13505) 2022-09-23 19:26:13 +08:00
fisker Cheung 1569db783b Rename bin-prettier.js bundle to bin-prettier.cjs (#13511) 2022-09-23 19:25:16 +08:00
fisker Cheung 5465517f4b Bundle third-party.js in ESM (#13509) 2022-09-23 19:24:54 +08:00
fisker Cheung 16c9d8bafe Bundle files in ESM (#13266) 2022-09-23 09:46:18 +08:00
fisker Cheung 77ac062120 Fix 2022-09-22 20:20:16 +08:00
fisker Cheung 7ccc4f55f2 Merge branch 'main' into next
# Conflicts:
#	package.json
#	scripts/build/modify-typescript-module.mjs
#	yarn.lock
2022-09-22 19:17:55 +08:00
fisker Cheung 2bc757554b Update acorn & espree (#13506) 2022-09-22 19:11:34 +08:00
fisker Cheung 8764a3d378 Improve typescript bundle speed (#13433) 2022-09-22 19:11:19 +08:00
fisker Cheung 8564a215a6 Ignore dist* dirs 2022-09-22 17:12:02 +08:00
fisker Cheung 824690fcc7 Allow parsers initialize asynchronously (#13449) 2022-09-22 15:13:37 +08:00
fisker Cheung 6d551ab0ed Simplify getAncestorNode in css (#13497) 2022-09-20 18:57:07 +08:00
fisker Cheung 5b962d6f14 Extract inferParserByLanguage to seperate file (#13483) 2022-09-18 19:25:21 +08:00
fisker Cheung 9bacc75772 Use .at() and Object.hasOwn() (#13482) 2022-09-18 17:50:14 +08:00
fisker Cheung b0d9387b95 Fix unpkg link (#13484) 2022-09-17 20:32:03 +08:00
fisker Cheung be5f457498 Use AstPath getters in needs-parens.js (#13476) 2022-09-14 14:09:10 +08:00
fisker Cheung 61d4cb0813 Simplify print pre-check with AstPath getters (#13474) 2022-09-13 19:50:21 +08:00
fisker Cheung e2337dce26 Glimmer: Combine plugins to reduce traverse (#13446) 2022-09-09 11:25:30 +08:00
fisker Cheung d0953f34d8 Fix yarn lint script (#13441) 2022-09-08 09:44:12 +08:00
fisker Cheung 6082e3ec9e Remove outdated hack for flow parser (#13442) 2022-09-08 09:43:47 +08:00
fisker Cheung a6d6c9c3a2 Merge remote-tracking branch 'remotes/upstream/main' into next
# Conflicts:
#	scripts/build/config.mjs
2022-09-06 20:43:52 +08:00
fisker Cheung cd3e530c2e Reduce size of parser-typescript.js (#13431) 2022-09-06 20:38:50 +08:00
fisker Cheung 151ab582b5 Merge branch 'main' into next
# Conflicts:
#	package.json
#	scripts/release/yarn.lock
#	yarn.lock
2022-09-06 19:22:51 +08:00
fisker Cheung 371c7093d0 Group @typescript-eslint/* dependencies in renovate config (#13430) 2022-09-06 14:40:59 +08:00
fisker Cheung bfc91d9f81 Use visitor keys from "hermes-eslint" (#13409) 2022-09-03 17:12:19 +08:00
fisker Cheung 05922176b9 Simplify print command trim (#13314) 2022-08-31 17:46:22 +08:00
fisker Cheung f47a852afa Move print pre-check into core (#13400) 2022-08-30 22:42:58 +08:00
fisker Cheung 17cb07665f Improve css/yaml embed traverse (#13294) 2022-08-30 11:00:12 +08:00
fisker Cheung 8d86bc1a78 Add print pre-check to CSS printer (#13398) 2022-08-30 10:30:47 +08:00
fisker Cheung 30f8825cb0 Add cause to parse error (#13342) 2022-08-30 10:27:11 +08:00
fisker Cheung 6712071e24 Stop passing undefine and null to printer (#13397) 2022-08-29 16:10:50 +03:00
fisker Cheung 4a224a7221 Add print pre-check to handlebars, html, markdown, yaml (#13392) 2022-08-29 18:16:38 +08:00
fisker Cheung 0a294ac130 Forbid pass non-node object to graphql printer (#13363) 2022-08-28 23:54:17 +08:00
fisker Cheung d0f0b09d1b Replace replaceTextEndOfLine with replaceEndOfLine (#13343) 2022-08-27 19:14:07 +08:00
fisker Cheung 5c465a77b3 Check all types in traverseDoc (#13357) 2022-08-27 18:41:33 +08:00
fisker Cheung d921087d12 Throw errors when too many 'cursor' found in doc (#13339) 2022-08-26 21:33:49 +08:00
fisker Cheung 286c354c46 Minor refactor (#13356) 2022-08-26 21:31:09 +08:00
fisker Cheung 135a9952d2 Fix snapshot 2022-08-26 10:53:38 +08:00
fisker Cheung 90d836d5ca Update tests 2022-08-26 10:35:34 +08:00
fisker Cheung 0b072060b5 Merge branch 'main' into next
# Conflicts:
#	src/language-js/print/flow.js
#	src/language-js/print/literal.js
2022-08-26 10:29:09 +08:00
fisker Cheung a166544583 Forbid pass non-node object to print() (#13293) 2022-08-25 19:19:46 +08:00
fisker Cheung 75025561c4 Return undefined for invalid doc type (#13306) 2022-08-25 19:18:26 +08:00
fisker Cheung db21497592 Docs: Fix handleComments function signature (#13308) 2022-08-25 19:17:38 +08:00
fisker Cheung edf36039f9 Add test for traverseDoc and findInDoc (#13349) 2022-08-25 01:12:41 +03:00
fisker Cheung f33ae9f583 Check all types in cleanDoc (#13348) 2022-08-23 16:14:48 +08:00
fisker Cheung cd8c49d78e Mention @prettier/sync in changelog (#13297) 2022-08-23 16:10:40 +08:00
fisker Cheung 4959b7c113 Check all doc types in mapDoc (#13344) 2022-08-23 09:49:45 +08:00
fisker CheungandGeorgii Dolzhykov 3cae07c9df Fix cursor positioning for files containing emoji (#13340)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2022-08-22 19:24:14 +08:00
fisker Cheung e28ae2670c Remove placeholder from doc.builders.cursor (#13312) 2022-08-22 19:21:30 +08:00
fisker Cheung 49cd8be0b8 Minor refactor to mapDoc (#13305) 2022-08-22 18:38:18 +08:00
fisker Cheung 88c178c17f Minor refactor to cleanDoc (#13304) 2022-08-22 18:04:32 +08:00
fisker Cheung 968ea2e444 Use symbol for doc print mode (#13313) 2022-08-22 12:16:20 +08:00
fisker Cheung 67e1348df1 Fix lock file (#13334) 2022-08-21 23:01:50 +08:00
fisker Cheung aa3158d43e Move groupModeMap into printDocToString (#13311) 2022-08-20 21:12:07 +08:00
fisker Cheung 0964f9424b Keep tokens in graphql AST (#13292) 2022-08-18 13:31:57 +08:00
fisker Cheung b4f39ba704 graphql: Explicit location getter (#13295) 2022-08-17 18:59:15 +03:00
fisker Cheung 1a602b590e Fix schema 2022-08-17 17:10:34 +08:00
fisker Cheung 4b4f6cfa4e Update support info 2022-08-17 17:03:46 +08:00
fisker Cheung f2de966156 Release 3.0.0-alpha.0 2022-08-17 16:46:46 +08:00
fisker Cheung 5fa0802315 Add getVisitorKeys (#13255) 2022-08-17 09:47:08 +08:00
fisker Cheung a7d1ccb72b Enable no-unused-expressions rule (#13290) 2022-08-16 23:58:14 +08:00
fisker Cheung 86424ccc22 Remove the parsers argument for plugin.parsers.parse (#13268) 2022-08-16 09:52:27 +08:00
fisker Cheung a054eb3868 Make prettier.clearConfigCache async (#13265) 2022-08-11 14:13:13 +08:00
fisker Cheung 2052ce5cb8 Bundle CLI as ES Module (#13091) 2022-08-11 14:08:08 +08:00
fisker Cheung a6661e850c Use import() in parsers (#13261) 2022-08-10 19:32:44 +08:00
fisker Cheung 0a8f397f2e Switch jest-light-runner back to npm version (#13257) 2022-08-09 16:25:50 +08:00
fisker Cheung 8bb035e3d1 Use import() to load @babel/code-frame (#13233) 2022-08-09 10:45:09 +08:00
fisker Cheung f8fff81005 Print HTML5 doctype in lowercase (#7391) 2022-08-08 01:13:18 +08:00
fisker Cheung 18a31ebc7e Merge branch 'main' into next 2022-08-08 01:11:08 +08:00
fisker CheungandGeorgii Dolzhykov 0b9cb96f58 Remove support for custom parser api (#13250)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2022-08-08 01:09:10 +08:00
fisker Cheung 3e9e9ddec7 Imporve error message for InvalidDocError (#13248) 2022-08-07 14:13:03 +03:00
fisker Cheung e8cd97d6b3 Remove unnecessary spreading options in textToDoc (#13251) 2022-08-07 14:12:36 +03:00
fisker Cheung 7abc9bcb07 Remove stripTrailingHardline option in textToDoc (#13220) 2022-08-07 18:15:24 +08:00
fisker Cheung dd034ec127 Fix test on local (#13234) 2022-08-07 00:15:54 +03:00
fisker Cheung 31cdcd0487 Sort plugin default values when create usage (#13230) 2022-08-06 22:03:37 +08:00
fisker 07ac240dfb Fix 2022-08-06 11:47:29 +08:00
fisker 5daa8eba6c Merge remote-tracking branch 'remotes/upstream/main' into next
# Conflicts:
#	.gitignore
#	website/playground/PrettierFormat.js
#	website/static/worker.js
2022-08-06 11:42:33 +08:00
fisker Cheung 81709487cd Use private fields (#13156) 2022-08-06 11:13:37 +08:00
fisker Cheung 33e621133c Remove prettier.doc.builders.concat (#13203) 2022-08-06 11:03:47 +08:00
fisker Cheung 5aadab6f28 Support ESM plugins (#13201) 2022-08-06 10:42:27 +08:00
fisker Cheung e096ea7552 Use try/finally in AstPath (#13216) 2022-08-05 21:58:54 +08:00
fisker Cheung f7cdd326f8 Minor refactor (#13221) 2022-08-05 19:48:42 +08:00
fisker Cheung 14968e4c59 Enable eslint rule to forbid cli/ import code from other directories (#13209) 2022-08-03 18:30:45 +08:00
fisker Cheung d4a49e2441 Minor refactor to cosmiconfig search (#13205) 2022-08-03 14:20:02 +08:00
fisker Cheung 55779bb96c Refactor CLI tests (#13208) 2022-08-03 14:19:00 +08:00
fisker Cheung cdb1494170 Revert "Switch print/embed to async (#13104)" (#13210) 2022-08-02 18:11:34 +08:00
fisker Cheung 298347c9fb Merge branch 'main' into next
# Conflicts:
#	netlify.toml
#	src/cli/find-cache-file.js
#	src/cli/utils.js
#	src/main/parser.js
#	website/playground/PrettierFormat.js
#	website/static/worker.js
2022-08-01 11:27:34 +08:00
fisker Cheung 83400d19b4 Change default value of trailingComma to "all" (#11479) 2022-08-01 11:05:17 +08:00
fisker Cheung 44d246a2a2 Support config file in ESM (#13130) 2022-08-01 10:51:31 +08:00
fisker Cheung bb203e3fa5 Simplify plugin loading (#13138) 2022-08-01 10:48:37 +08:00
fisker Cheung 26cf77a5d5 Disable a test (#13159) 2022-07-24 00:19:07 +08:00
fisker Cheung f79c8d56ac Fix 2022-07-23 20:48:21 +08:00
fisker Cheung c5ffd9130f Merge branch 'main' into next
# Conflicts:
#	src/document/doc-printer.js
2022-07-23 20:45:25 +08:00
fisker Cheung 03416a153a Throw errors for invalid doc (#13149) 2022-07-23 20:10:37 +08:00
fisker Cheung 77e165b446 Disable Dev_Package_Test on npm temporarily 2022-07-23 18:55:42 +08:00
fisker Cheung 1d750585fd Missing lock file 2022-07-23 18:24:34 +08:00
fisker Cheung 73b8c86cc4 Merge branch 'main' into next
# Conflicts:
#	scripts/tools/bundle-test/yarn.lock
2022-07-23 18:19:22 +08:00
fisker Cheung 8ee0c6354d Fix ifBreak check in fits (#12362) 2022-07-23 18:02:05 +08:00
fisker Cheung 95779099a3 Update acorn to v8.8.0 (#13148) 2022-07-21 21:05:28 +08:00
fisker Cheung 6a1d1d093b Rewrite config resolution tests (#13146) 2022-07-21 15:21:59 +08:00